Object delivery method and device, electronic equipment and storage medium

文档序号:57137 发布日期:2021-10-01 浏览:23次 中文

阅读说明:本技术 对象投放方法、装置、电子设备及存储介质 (Object delivery method and device, electronic equipment and storage medium ) 是由 裴超 于 2021-06-23 设计创作,主要内容包括:本公开关于一种对象投放方法、装置、电子设备及存储介质。该方法包括:获取展示虚拟空间的第一区域中第一对象的位置信息和第一运动方向;基于所述位置信息和所述第一运动方向,确定用于投放第二对象的目标区域,其中,所述目标区域在所述第一区域的外部、且位于所述第一区域沿所述第一运动方向的一侧;获取对象投放配置信息;基于所述对象投放配置信息,从全量第二对象中筛选出目标对象;在所述目标区域投放所述目标对象。根据本公开提供的技术方案,可以提升对象投放的灵活性以及使得虚拟空间的模拟效果更加真实。(The disclosure relates to an object delivery method, an object delivery device, an electronic device and a storage medium. The method comprises the following steps: acquiring position information and a first motion direction of a first object in a first area showing a virtual space; determining a target area for delivering a second object based on the position information and the first motion direction, wherein the target area is outside the first area and is located on one side of the first area along the first motion direction; acquiring object delivery configuration information; screening out a target object from the full second objects based on the object putting configuration information; and putting the target object in the target area. According to the technical scheme provided by the disclosure, the flexibility of object putting can be improved, and the simulation effect of the virtual space is more real.)

1. An object delivery method, comprising:

acquiring position information and a first motion direction of a first object in a first area showing a virtual space;

determining a target area for delivering a second object based on the position information and the first motion direction, wherein the target area is outside the first area and is located on one side of the first area along the first motion direction;

acquiring object delivery configuration information;

screening out a target object from the full second objects based on the object putting configuration information;

and putting the target object in the target area.

2. The object delivery method according to claim 1, wherein before the step of obtaining the position information and the first moving direction of the first object in the first area showing the virtual space, the method further comprises:

periodically acquiring the number of second objects in the first area and acquiring the grade information of a target user corresponding to the virtual space;

determining a second object quantity threshold corresponding to the grade information;

the step of obtaining the position information and the first motion direction of the first object in the first area showing the virtual space comprises:

and when the number of the second objects in the first area is smaller than the threshold value of the number of the second objects, acquiring the position information and the first movement direction of the first object in the first area showing the virtual space.

3. The object delivery method according to claim 1 or 2, wherein the step of determining a target area for delivering a second object based on the position information and the first direction of motion comprises:

determining two straight lines which are away from the target position by a preset distance, wherein the two straight lines are positioned on two sides of the first object and are respectively parallel to the first motion direction;

intercepting a target line segment on each of the two straight lines, wherein the target line segment is positioned on one side of the first area along the first movement direction;

and connecting the end points of the target line segment in sequence to form the target area.

4. The object delivery method according to claim 3, wherein the object delivery configuration information includes a preset rate range corresponding to each second object; the step of delivering the target object in the target area comprises:

acquiring a first rate of the first object;

determining a preset number of sub-regions matched with the grade information; the preset number of sub-areas are obtained by dividing the second area along the first movement direction, and the second area is a spliced area of the first area and the target area;

screening out a target sub-region which does not comprise a second object from the sub-regions with the preset number;

randomly determining an initial position in each target sub-area, wherein the initial position is located in the target area;

determining a second speed and a second movement direction corresponding to the target object based on the preset speed range and the first movement direction;

determining a target speed of the target object in the first area according to the first speed, the second speed and the second motion direction;

and putting the target object at the initial position, and controlling the target object to move at the target speed.

5. The object delivery method according to claim 4, wherein the delivering the target object at the initial position comprises:

acquiring quantity information and quantity weight corresponding to each target object;

determining the target delivery quantity of each target object according to the quantity information and the quantity weight;

determining an initial position corresponding to each target object;

and throwing the target objects with the target throwing quantity at the initial position corresponding to each target object.

6. The object delivery method according to claim 5, wherein the second movement direction is opposite to the first movement direction, and the first movement direction has a predetermined angle with respect to a central axis of the first region.

7. An object delivery device, comprising:

a position information and first movement direction acquisition module configured to perform acquisition of position information and a first movement direction of a first object in a first area showing a virtual space;

a target area determination module configured to perform determining a target area for delivering a second object based on the position information and the first motion direction, wherein the target area is outside the first area and located on one side of the first area along the first motion direction;

the object delivery configuration information acquisition module is configured to execute acquisition of object delivery configuration information;

the target object screening module is configured to screen out a target object from a full amount of second objects based on the object delivery configuration information;

a target object delivery module configured to perform delivery of the target object in the target area.

8. An electronic device, comprising:

a processor;

a memory for storing the processor-executable instructions;

wherein the processor is configured to execute the instructions to implement the object delivery method of any of claims 1 to 6.

9. A computer-readable storage medium, wherein instructions, when executed by a processor of an electronic device, enable the electronic device to perform the object delivery method of any of claims 1-6.

10. A computer program product comprising computer instructions, characterized in that said computer instructions, when executed by a processor, implement the object delivery method of any of claims 1 to 6.

Technical Field

The present disclosure relates to the field of computer technologies, and in particular, to an object delivery method and apparatus, an electronic device, and a storage medium.

Background

Various objects are generally included in the present virtual space display, for example, items are generally present in the game to increase the game effect. In the related art, the items are generally generated in a fixed position or a random position independent of the game, so that the generated items are not natural enough and the flexibility of the generation of the items is poor.

Disclosure of Invention

The present disclosure provides an object delivery method, an object delivery apparatus, an electronic device, and a storage medium, so as to at least solve the problem in the related art of how to improve flexibility of object delivery and how to improve a simulation effect of a virtual space. The technical scheme of the disclosure is as follows:

according to a first aspect of the embodiments of the present disclosure, there is provided an object delivery method, including:

acquiring position information and a first motion direction of a first object in a first area showing a virtual space;

determining a target area for delivering a second object based on the position information and the first motion direction, wherein the target area is outside the first area and is located on one side of the first area along the first motion direction;

acquiring object delivery configuration information;

screening out a target object from the full second objects based on the object putting configuration information;

and putting the target object in the target area.

In a possible implementation manner, before the step of obtaining the position information and the first moving direction of the first object in the first area showing the virtual space, the method further includes:

periodically acquiring the number of second objects in the first area and acquiring the grade information of a target user corresponding to the virtual space;

determining a second object quantity threshold corresponding to the grade information;

the step of obtaining the position information and the first motion direction of the first object in the first area showing the virtual space comprises:

and when the number of the second objects in the first area is smaller than the threshold value of the number of the second objects, acquiring the position information and the first movement direction of the first object in the first area showing the virtual space.

In a possible implementation manner, the step of determining a target area for delivering a second object based on the position information and the first motion direction includes:

determining two straight lines which are away from the target position by a preset distance, wherein the two straight lines are positioned on two sides of the first object and are respectively parallel to the first motion direction;

intercepting a target line segment on each of the two straight lines, wherein the target line segment is positioned on one side of the first area along the first movement direction;

and connecting the end points of the target line segment in sequence to form the target area.

In a possible implementation manner, the object delivery configuration information includes a preset rate range corresponding to each second object; the step of delivering the target object in the target area comprises:

acquiring a first rate of the first object;

determining a preset number of sub-regions matched with the grade information; the preset number of sub-areas are obtained by dividing the second area along the first movement direction, and the second area is a spliced area of the first area and the target area;

screening out a target sub-region which does not comprise a second object from the sub-regions with the preset number;

randomly determining an initial position in each target sub-area, wherein the initial position is located in the target area;

determining a second speed and a second movement direction corresponding to the target object based on the preset speed range and the first movement direction;

determining a target speed of the target object in the first area according to the first speed, the second speed and the second motion direction;

and putting the target object at the initial position, and controlling the target object to move at the target speed.

In one possible implementation, the step of delivering the target object at the initial position includes:

acquiring quantity information and quantity weight corresponding to each target object;

determining the target delivery quantity of each target object according to the quantity information and the quantity weight;

determining an initial position corresponding to each target object;

and throwing the target objects with the target throwing quantity at the initial position corresponding to each target object.

In a possible implementation manner, the second moving direction is opposite to the first moving direction, and the first moving direction and the central axis of the first area have a preset included angle.

In a possible implementation manner, the step of screening out a target object from a full number of second objects based on the object placement configuration information includes:

and screening out target objects from the full amount of second objects based on the number of the second objects in the first area, the second object number threshold and the object putting configuration information.

In a possible implementation manner, the object delivery configuration information further includes a mapping relationship between each second object and a refresh time point, a delivery number threshold value in each refresh time period, a delivery weight, and/or a priority; the step of screening out target objects from a total number of second objects based on the number of second objects in the first area, the second object number threshold and the object delivery configuration information comprises:

taking a difference value between the number of second objects in the first area and the second object number threshold as a target number;

acquiring a release frequency threshold of each second object in a target refresh time period and a target release frequency of each second object in the target refresh time period, wherein the target time period is a refresh time period matched with the current time;

screening out an initial second object set of which the target putting times are smaller than a corresponding putting time threshold value from the full second objects;

and screening the target number of second objects from the initial second object set as the target objects according to the delivery weight and/or priority of each object in the initial second object set.

In one possible implementation, the method further includes:

executing a preset operation when detecting that a second object in the first area is triggered;

and if the preset operation does not meet the operation condition, performing alarm processing.

According to a second aspect of the embodiments of the present disclosure, there is provided an object delivering apparatus, including:

a position information and first movement direction acquisition module configured to perform acquisition of position information and a first movement direction of a first object in a first area showing a virtual space;

a target area determination module configured to perform determining a target area for delivering a second object based on the position information and the first motion direction, wherein the target area is outside the first area and located on one side of the first area along the first motion direction;

the object delivery configuration information acquisition module is configured to execute acquisition of object delivery configuration information;

the target object screening module is configured to screen out a target object from a full amount of second objects based on the object delivery configuration information;

a target object delivery module configured to perform delivery of the target object in the target area.

In one possible implementation, the apparatus further includes:

a number of second objects and level information acquisition periodicity acquisition module configured to execute the number of second objects in the first region and acquire level information of a target user corresponding to the virtual space;

a second object number threshold determination module configured to perform determining a second object number threshold corresponding to the level information;

the position information and first moving direction acquiring module includes:

a position information and first movement direction obtaining unit configured to perform obtaining position information and a first movement direction of a first object in a first area showing a virtual space when the number of second objects in the first area is less than the second object number threshold.

In one possible implementation, the target area determination module includes:

a first target area determination unit configured to perform determination of two straight lines which are located at both sides of the first object and are respectively parallel to the first movement direction and are a preset distance from the target position;

a target line segment acquisition unit configured to execute cutting a target line segment on each of the two straight lines, the target line segment being located on one side of the first area in the first movement direction;

a second target region determination unit configured to perform forming the target region by sequentially connecting end points of the target line segment.

In a possible implementation manner, the object delivery configuration information includes a preset rate range corresponding to each second object; the delivery module comprises:

a first rate acquisition unit configured to perform acquisition of a first rate of the first object;

a sub-region acquisition unit configured to perform determination of a preset number of sub-regions that match the level information; the preset number of sub-areas are obtained by dividing the second area along the first movement direction, and the second area is a spliced area of the first area and the target area;

a target sub-region screening unit configured to perform screening out a target sub-region not including the second object from the preset number of sub-regions;

an initial position determination unit configured to perform a random determination of an initial position in each target sub-area, the initial position being located within the target area;

a second velocity and second movement direction determination unit configured to perform determining a second velocity and a second movement direction corresponding to the target object based on the preset velocity range and the first movement direction;

a target speed determination unit configured to perform determining a target speed of the target object in the first region according to the first velocity, the second velocity, and the second movement direction;

a throwing unit configured to perform throwing of the target object at the initial position and control the target object to move at the target speed.

In one possible implementation, the delivery unit includes:

a quantity information and quantity weight acquisition subunit configured to perform acquisition of quantity information and quantity weight corresponding to each target object;

a target delivery quantity determining subunit configured to determine a target delivery quantity of each target object according to the quantity information and the quantity weight;

an initial position determining subunit configured to perform determining an initial position corresponding to each target object;

and the releasing subunit is configured to release the target objects of the target releasing quantity at the initial position corresponding to each target object.

In a possible implementation manner, the second moving direction is opposite to the first moving direction, and the first moving direction and the central axis of the first area have a preset included angle.

In one possible implementation, the target object filtering module includes:

and the target object screening unit is configured to perform screening of a target object from a total amount of second objects based on the number of second objects in the first area, the second object number threshold and the object delivery configuration information.

In a possible implementation manner, the object delivery configuration information further includes a mapping relationship between each second object and a refresh time point, a delivery number threshold value in each refresh time period, a delivery weight, and/or a priority; the target object screening unit includes:

a target number determination subunit configured to perform, as a target number, a difference of the number of second objects in the first area and the second object number threshold;

the releasing time threshold and target releasing time obtaining subunit is configured to perform obtaining of a releasing time threshold of each second object in a target refreshing time period and a target releasing time of each second object in the target refreshing time period, and the target time period is a refreshing time period matched with the current time;

an initial second object set screening subunit configured to perform screening of an initial second object set, from the full-scale second objects, of which the target delivery times are smaller than a corresponding delivery time threshold;

a target object screening subunit configured to perform screening of the target number of second objects from the initial second object set as the target objects according to the delivery weight and/or priority of each object in the initial second object set.

In one possible implementation, the apparatus further includes:

the interaction module is configured to execute preset operation when detecting that a second object in the first area is triggered;

and the alarm module is configured to perform alarm processing if the preset operation does not meet the operation condition.

According to a third aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including: a processor; a memory for storing the processor-executable instructions; wherein the processor is configured to execute the instructions to implement the method of any of the first aspects above.

According to a fourth aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium, wherein instructions, when executed by a processor of an electronic device, enable the electronic device to perform the method of any one of the first aspect of the embodiments of the present disclosure.

According to a fifth aspect of embodiments of the present disclosure, there is provided a computer program product comprising computer instructions which, when executed by a processor, cause a computer to perform the method of any one of the first aspects of the embodiments of the present disclosure.

The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:

determining a target area for launching a second object based on the position information and the first motion direction of the first object in the first area showing the virtual space, so that the determination of the target area is related to the position in the virtual space in real time, and the target area can change in real time along with the position of the first object in the virtual space, thereby ensuring that the launching position of the second object can change in real time and improving the flexibility of launching; in addition, the target area is arranged on one side of the edge of the first area, which points to the first motion direction, so that the target area thrown by the second object is relatively consistent with a real scene, the second object can be ensured to naturally enter the first area in the subsequent time, and the simulation effect of the virtual space is more real.

It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.

Drawings

The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.

FIG. 1 is a schematic diagram illustrating an application environment in accordance with an exemplary embodiment.

Fig. 2 is a flow chart illustrating a method of object delivery, according to an exemplary embodiment.

FIG. 3 is a pictorial diagram illustrating a representation of a virtual space, according to an example embodiment.

Fig. 4 is a flow chart illustrating a method of object delivery, according to an exemplary embodiment.

FIG. 5 is a schematic illustration of a target area shown in accordance with an exemplary embodiment.

Fig. 6 is a flowchart illustrating a method for determining a target area for delivering a second object based on position information and a first direction of motion, according to an example embodiment.

FIG. 7 is a schematic illustration of a target area shown in accordance with an exemplary embodiment.

Fig. 8 is a flowchart illustrating a method for delivering a target object in a target area, according to an example embodiment.

FIG. 9 is a schematic diagram illustrating a sub-region in accordance with an exemplary embodiment.

Fig. 10 is a flowchart illustrating a method for screening out a target object from a full number of second objects based on object placement configuration information, according to an example embodiment.

Fig. 11 is a block diagram illustrating an apparatus for delivering an object according to an exemplary embodiment.

Fig. 12 is a block diagram illustrating an electronic device for object delivery, in accordance with an exemplary embodiment.

Detailed Description

In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.

It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.

Referring to fig. 1, fig. 1 is a schematic diagram illustrating an application environment according to an exemplary embodiment, which may include a server 01 and a terminal 02, as shown in fig. 1.

In an alternative embodiment, the server 01 may be used for a background service for object launching, such as an update service for object launching a corresponding game. Specifically, the server 01 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a Network service, cloud communication, a middleware service, a domain name service, a security service, a CDN (Content Delivery Network), a big data and artificial intelligence platform, and the like.

In an alternative embodiment, the terminal 02 may be used for object delivery processing. Specifically, the terminal 02 may include, but is not limited to, a smart phone, a desktop computer, a tablet computer, a notebook computer, a smart speaker, a digital assistant, an Augmented Reality (AR)/Virtual Reality (VR) device, a smart wearable device, and other types of electronic devices. Optionally, the operating system running on the electronic device may include, but is not limited to, an android system, an IOS system, linux, windows, and the like.

In addition, it should be noted that fig. 1 illustrates only one application environment of the image processing method provided by the present disclosure.

In the embodiment of the present specification, the server 01 and the terminal 02 may be directly or indirectly connected by a wired or wireless communication method, and the present application is not limited herein.

It should be noted that the following figures show a possible sequence of steps, and in fact do not limit the order that must be followed. Some steps may be performed in parallel without being dependent on each other. User information (including but not limited to user device information, user personal information, user behavior information, etc.) and data (including but not limited to data for presentation, training, etc.) to which the present disclosure relates are both information and data that are authorized by the user or sufficiently authorized by various parties.

The present disclosure may be a game showing a virtual space, such as a raft drifting game, an air floating game, etc., in which a first object, a second object, and an environment object may be included, or may further include a virtual character representing a game user, where the second object and the first object may move along with the movement of the environment object to simulate a real environment effect, and the second object moves to an edge of a game interface, and the second object may be controlled to be in a disappearing state. The environmental object may include water, a blue sky, a white cloud, and the like. The environmental object in the raft drifting game may be water, such as the ocean; the environmental objects in the air floating game may be blue sky, white cloud. The present disclosure is not limited to these.

Taking a raft drifting game as an example, the first object may be a raft and the second object may be floating objects (garbage) in water, such as branches, wires, drifting bottles, etc. The game user can perform preset operation on the second object, such as fishing the second object, and if fishing succeeds, the grade information of the game user can be updated based on the total number of the fishing second objects, such as that the more the total number of the fishing second objects is, the higher the grade represented by the corresponding grade information is. Wherein, the fishing operation can be executed by a virtual character, and the execution process can be displayed in the game interface.

Optionally, the fishing behavior can be monitored to prevent cheating of the game user, for example, the threshold of the fishing time length can be set to be 3s, if the fishing time length is less than 3s, the fishing behavior can be determined to be cheating, the fishing is set to be invalid, and the floating window can prompt that the fishing is invalid at this time.

In an alternative manner, when a collision of the second object with the first object is detected, a special effect may be exhibited, for example, a special effect in which the second object gradually disappears, which is not limited by the present disclosure.

The above is an introduction to the present disclosure scenario, and the object delivery process will be described below:

fig. 2 is a flow chart illustrating a method of object delivery, according to an exemplary embodiment. As shown in fig. 2, the following steps may be included.

In step S201, position information and a first movement direction of a first object in a first area showing a virtual space are acquired.

In the embodiments of the present specification, the first area may refer to a game interface, that is, an interface that a user can see in a game. Position information and a first moving direction of a first object in a first area may be acquired, as shown in fig. 3, the first object is an ABCD, and the ABCD may be a shape of a raft, which is not limited by the present disclosure. The position information of the raft may be the coordinates of the center P1 of the raft, or may be the edge of the raft in the first direction of movement: l1(AB) and L2 (DC).

It should be noted that the speed of the first object in the virtual space and the speed of the environmental object may be the same, that is, the speed and the moving direction of the first object and the speed and the moving direction of the environmental object are the same. The speed of the first object and the speed of the environment object may be time-varying, i.e., have a mapping relationship with the game time, so that the speed of the first object and the speed of the environment object may be changed accordingly based on the time of entry into the game to achieve realism of the virtual space.

In one possible implementation, as shown in fig. 4, before step S201, the method may include:

in step S401, periodically acquiring the number of second objects in the first area and acquiring level information of a target user corresponding to the virtual space; the periodicity may refer to a heartbeat period, such as 1 second. The target user corresponding to the virtual space may refer to a user viewing the virtual space, or may refer to a user playing a game in the virtual space.

In step S403, a second object number threshold corresponding to the level information is determined.

In practical application, a mapping relation between the level information of the user and the second object quantity threshold value can be preset, and the higher the level represented by the level information is, the larger the corresponding second object quantity threshold value can be, so that the user can salvage more garbage along with the increase of the level. Based on the mapping relationship, a second object number threshold corresponding to the level information of the target user can be determined.

Accordingly, the step S201 may include:

when the number of the second objects in the first area is smaller than the second object number threshold value, position information and a first movement direction of the first object in the first area showing the virtual space are obtained. By executing the object processing method when the number of second objects in the first area is less than the second object number threshold, unnecessary resource consumption can be avoided; and the number of second objects in the first area can be flexibly controlled.

In step S203, a target area for delivering the second object is determined based on the position information and the first movement direction.

The target area may be outside the first area and located on one side of the first area along the first moving direction, as shown in fig. 5, for example, the first moving direction points to the lower right corner, and the target area may be located at a position lower than the right of the first area and does not intersect with the first area. I.e. the position where the target area may be outside the first area and pointing in the first direction of movement. It should be noted that fig. 5 is merely an example of the target area, and the shape and size of the target area are not limited in the present disclosure as long as the relationship between the target area and the position information and the first movement direction can be satisfied, and the requirement of the size of the drop area of the second object can be satisfied.

In step S205, object delivery configuration information is acquired;

in step S207, a target object is screened out from the full amount of second objects based on the object placement configuration information.

In one example, the object delivery configuration information may be preset, which is not limited by this disclosure. For example, the object placement configuration information may include a placement weight and a threshold number of placements per time for each second object, so that the target objects may be randomly screened from the total number of second objects based on the placement weight, and the number of screened target objects may be a number between 0 and the threshold number of placements per time, which is not limited by the present disclosure. That is, the object delivery process may be performed periodically, and each time the target objects are delivered, the target objects may be screened for delivery by a number between 0 and a threshold number of deliveries per time.

In step S209, the target object is delivered in the target area.

In practical applications, the target object may be placed in the target area, for example, at least one initial position may be randomly determined in the target area, so that the target object may be randomly placed in the at least one initial position. And the target object may be controlled to move to the first area, specifically, the moving speed, which is not limited in this disclosure.

Optionally, the rotation speed of the target object may also be set to enrich the floating effect, which is not limited by the present disclosure.

Determining a target area for launching a second object based on the position information and the first motion direction of the first object in the first area showing the virtual space, so that the determination of the target area is related to the position in the virtual space in real time, and the target area can change in real time along with the position of the first object in the virtual space, thereby ensuring that the launching position of the second object can change in real time and improving the flexibility of launching; in addition, the target area is arranged on one side of the edge of the first area, which points to the first motion direction, so that the target area thrown by the second object is relatively consistent with a real scene, the second object can be ensured to naturally enter the first area in the subsequent time, and the simulation effect of the virtual space is more real.

In one possible implementation, the method may further include: and executing preset operation when detecting that the second object in the first area is triggered. Taking a raft drifting game as an example, when it is detected that branches in the first area are triggered, for example, clicked, a salvage operation can be executed; the length of time of the fishing operation may be from the triggering time to the fishing success time, and the fishing success time may be the time when the branches are fished onto the raft, that is, the time when the positions of the branches match the positions of the raft. If the fishing is successful, a corresponding reward may be given, such as a corresponding reward value to the target user, which may be used to update the rating information of the target user.

Further, the validity of the preset operation may be verified to prevent cheating, for example, if the preset operation does not satisfy the operation condition, an alarm is performed. The operation condition may be a duration condition, for example, the duration condition of the fishing is greater than or equal to 3 seconds, and if the duration of the fishing operation is less than 3 seconds, it may be considered that the preset operation does not satisfy the operation condition, and an alarm process is performed, for example, an alarm prompt or the like.

Optionally, a mapping relationship between the level information and the first object size may also be set, for example, when the user enters a game, the raft may be displayed according to the raft size corresponding to the level information of the user; along with the continuous rubbish salvage of the user in the game, the grade information can be continuously updated, and the wooden raft can be displayed according to the size of the wooden raft corresponding to the updated grade information, namely, the wooden valve can be gradually enlarged along with the grade increase.

Through the setting of the preset operation, the second object can be viewed, the interaction between a game user and the second object can be realized, and the user experience is improved.

Fig. 6 is a flowchart illustrating a method for determining a target area for delivering a second object based on position information and a first direction of motion, according to an example embodiment. As shown in fig. 6, in a possible implementation manner, the step S203 may include the following steps:

in step S601, two straight lines which are a preset distance away from the target position are determined, and the two straight lines may be located on two sides of the first object and are respectively parallel to the first moving direction;

in step S603, a target line segment is cut out on each of the two straight lines, the target line segment being located on one side of the first area in the first movement direction;

in step S605, the end points of the target line segments are sequentially connected to form a target region.

Referring to the target area schematic shown in fig. 7, the two straight lines may be: a first straight line and a second straight line, which are shown in dashed lines in fig. 7. As an example, as shown in fig. 7, the first line, the second line, L1, and L2 may all be parallel to the first direction of motion. The target positions may include L1 and L2, and the preset distances may be d1 and d2 as shown in fig. 7, wherein d1 and d2 may be the same; the target region may be a quadrangle Q1Q2Q3Q4 shown in fig. 7, the length of the target region in the horizontal direction may be d3, and the length of the target region d3 may be 200 pixels, which is not limited by the disclosure.

As shown in fig. 7, the target line segments may be L3(Q1Q2) and L4(Q4Q3), the end points of L3 may include Q1 and Q2, and the end points of L4 may include Q3 and Q4, so that Q1, Q2, Q3, and Q4 may be sequentially connected to form a target region, which is not limited by the disclosure, as long as the connection of Q1, Q2, Q3, and Q4 may form a closed region.

By means of the first movement direction and the target position, the determined target area can be located outside the first area and on one side of the first area along the first movement direction, and the drifting effect of the second object is enabled to be more real.

Fig. 8 is a flowchart illustrating a method for delivering a target object in a target area, according to an example embodiment. As shown in fig. 8, in a possible implementation manner, the object delivery configuration information may include a preset rate range corresponding to each second object; the above step S209 may include the steps of:

in step S801, a first rate of a first object is acquired;

in step S803, a preset number of sub-regions matching the level information are determined; the preset number of sub-areas are obtained by dividing a second area along the first movement direction, and the second area can be an area formed by splicing the first area and the target area; wherein the preset number may be the same as the second object number threshold.

As shown in the sub-region diagram of fig. 9, for example, the preset number of level information matches is 5, and the number of sub-regions may be 5, as shown in fig. 9. The 5 sub-regions may be parallel to the first moving direction, and the 5 sub-regions may be sub-regions between every two adjacent virtual lines in fig. 9, for example, the gray region EFGQ2 may be a sub-region, as shown in fig. 9, five sub-regions may be referred to as 5 tracks, and the 5 tracks may be parallel to the first moving direction. This is by way of example only and the disclosure is not limited thereto. It should be noted that each second object moves in the corresponding sub-area (track), and the moving direction may be opposite to the first moving direction.

In step S805, a target sub-region, which does not include the second object, is screened out from the preset number of sub-regions;

in step S807, in each target sub-area, an initial position is randomly determined, the initial position being within the target area.

As shown in fig. 9, 3 of the 5 sub-regions include the second object, and two of the 5 sub-regions do not include the second object, so that the sub-region not including the second object in fig. 9 may be the target sub-region, for example, the sub-regions where 901 and 902 are respectively located. Thus, an initial position can be randomly determined in the overlapping area of each target sub-area and the target area, for example, the initial positions can be 901 and 902 shown in fig. 9.

In step S809, a second velocity and a second moving direction corresponding to the target object are determined based on the preset velocity range and the first moving direction.

In this embodiment, a velocity may be randomly determined from a preset velocity range as a second velocity corresponding to the target object, and the second moving direction may be a direction pointing to the first area. For example, the second direction of movement may be parallel to and opposite the first direction of movement, which is not limited by the present disclosure. Thus, stereoscopic vision can be embodied and one-hand operation is convenient.

In step S811, a target velocity of the target object in the first area is determined according to the first velocity, the second velocity, and the second movement direction.

In step S813, the target object is dropped at the initial position, and is controlled to move at the target speed.

In this embodiment, the difference obtained by subtracting the first speed from the second speed may be used as the speed of the target speed, and the second moving direction may be used as the direction of the target speed. Therefore, the target object can be placed at the initial position, and the target object is controlled to move at the target speed. By setting the sub-region and setting the target speed of the second object as the relative speed, the real track of the object in the virtual space can be simulated by putting the target object, and the presentation effect of the virtual space is more vivid.

In one example, the step S813 may include:

acquiring quantity information and quantity weight corresponding to each target object;

determining the target delivery quantity of each target object according to the quantity information and the quantity weight;

determining an initial position corresponding to each target object;

and throwing target objects with target throwing quantity at the initial position corresponding to each target object.

In this embodiment, the quantity information corresponding to one target object may be one or more. When there are a plurality of target objects, which quantity information is selected in the specific delivery, the target delivery quantity of each target object may be determined according to the weight corresponding to each quantity information. The target delivery quantity is one of a plurality of quantity information. It is also possible to determine at which initial position each target object is placed, and therefore, the initial position corresponding to each target object may be determined, for example, the initial position corresponding to each target object may be determined in a random manner, which is not limited by the present disclosure.

Therefore, target objects with target delivery quantity can be delivered at the initial position corresponding to each target object, for example, 2 branches can be delivered at the initial position corresponding to the tree. Alternatively, the second object may be an image, which may be a three-dimensional model image, which may be presented in an initial position when the second object is delivered.

By setting the quantity information and the quantity weight corresponding to each target object, the same target object can be put in different quantities in different times, and the putting is more flexible.

Fig. 10 is a flowchart illustrating a method for screening out a target object from a full number of second objects based on object placement configuration information, according to an example embodiment. In a possible implementation manner, the step S207 may include: and screening out the target object from the full amount of second objects based on the number of the second objects in the first area, the threshold value of the number of the second objects and the object putting configuration information. Therefore, the screening of the target objects is not only related to the object delivery configuration information, but also related to the number of the second objects in the current first area and the dynamic user level information, and the flexibility of the screening of the target objects is improved.

In a possible implementation manner, the object placement configuration information may further include a mapping relationship between each second object and the refresh time point, the placement number threshold value in each refresh time period, the placement weight, and/or the priority. As an example, it can be shown in table 1 below:

TABLE 1

Referring to fig. 10, in one possible implementation, the steps may include:

in step S1001, a difference value between the number of second objects in the first area and a second object number threshold is taken as a target number;

in step S1003, acquiring a delivery number threshold of each second object in a target refresh time period and a target delivery number of each second object in the target refresh time period, where the target time period is a refresh time period matched with the current time;

in step S1005, screening out an initial second object set with a target number of impressions less than a corresponding number of impressions threshold from the full number of second objects;

in step S1007, a target number of second objects are screened from the initial second object set as target objects according to the delivery weight and/or priority of each object in the initial second object set.

Introducing the screening of the target objects based on table 1, as an example, it is assumed that the threshold of the number of the second objects corresponding to the level information of the target user is 20, that is, the upper limit of the number of the second objects that can be displayed on the game interface of the target user is 20, that is, the sub-area corresponding to the target user is 20; the number of second objects in the first area is 18, and it may be determined that the target number of second objects that can be delivered is 20-18-2. Assume that the full number of second objects are 3 second objects F1, F2, F3 in table 1;

assuming that the current time is 15 points, the number of impressions of each second object within the target refresh time period is as follows: f1/target refresh time period [14 points, 16 points)/release number threshold 50, F2/target refresh time period [14 points, 16 points)/release number threshold 100, F3/target refresh time period [8 points, 18 points)/release number threshold 100;

target number of impressions (number of impressions already) for each second object within the target refresh period: f1/target refresh period [14 points, 16 points)/target number of impressions 50, F2/target refresh period [14 points, 16 points)/target number of impressions 80, F3/target refresh period [8 points, 18 points)/target number of impressions 50.

Screening out an initial second object set with target putting times smaller than corresponding putting time threshold values from the full second objects: f2 and F3, because the target number of impressions 50 of F1 is equal to the corresponding number of impressions threshold 50, the target number of impressions of F2 and F3 is less than the corresponding number of impressions threshold.

Step S1007 may include: a target number of second objects with higher priority are selected as target objects, where the second objects may be the same, for example, F2 has higher priority, and F2 has a remaining number of impressions of 100-80 of 20, where 20 is greater than the target number of 2, so that 2 second objects may be selected as F2.

Alternatively, a target number of second objects may be screened from the initial set of second objects as target objects according to the delivery weight. For example, a random number may be generated based on the delivery weight, and the target object may be filtered based on the random number. Such as random numbers within a predetermined range. If the random numbers of F2 and F3 are both within the preset range, the target objects can be determined to be F2 and F3.

Or, the initial target objects may be screened based on the priority, and if the number of the screened initial target objects is smaller than the target number, it indicates that screening is still needed, and the selection may be continued based on the delivery weight until the target number of the target objects is screened.

The screening of the target objects is not only related to the object delivery configuration information, but also related to the number of second objects in the current first area and the dynamic user level information, so that the flexibility of the screening of the target objects is improved; and by setting the releasing weight/priority and detecting whether the releasing times threshold is reached, releasing of the second objects can be performed according to the priority sequence, and the releasing balance of the second objects can be realized.

Fig. 11 is a block diagram illustrating an apparatus for delivering an object according to an exemplary embodiment. Referring to fig. 11, the apparatus may include:

a position information and first moving direction acquisition module 1101 configured to perform acquisition of position information and a first moving direction of a first object in a first area showing a virtual space;

a target area determination module 1103 configured to perform determining a target area for delivering a second object based on the position information and the first motion direction, wherein the target area is outside the first area and located on one side of the first area along the first motion direction;

an object delivery configuration information obtaining module 1105 configured to perform obtaining object delivery configuration information;

a target object screening module 1107 configured to perform screening of a target object from a full amount of second objects based on the object delivery configuration information;

a delivering module 1109 configured to perform delivering the target object in the target area.

Determining a target area for launching a second object based on the position information and the first motion direction of the first object in the first area showing the virtual space, so that the determination of the target area is related to the position in the virtual space in real time, and the target area can change in real time along with the position of the first object in the virtual space, thereby ensuring that the launching position of the second object can change in real time and improving the flexibility of launching; in addition, the target area is arranged on one side of the edge of the first area, which points to the first motion direction, so that the target area thrown by the second object is relatively consistent with a real scene, the second object can be ensured to naturally enter the first area in the subsequent time, and the simulation effect of the virtual space is more real.

The device further comprises:

a number of second objects and level information acquisition periodicity acquisition module configured to execute the number of second objects in the first region and acquire level information of a target user corresponding to the virtual space;

a second object number threshold determination module configured to perform determining a second object number threshold corresponding to the level information;

the position information and first moving direction acquiring module includes:

a position information and first movement direction obtaining unit configured to perform obtaining position information and a first movement direction of a first object in a first area showing a virtual space when the number of second objects in the first area is less than the second object number threshold.

In one possible implementation, the target area determination module includes:

a first target area determination unit configured to perform determination of two straight lines which are located at both sides of the first object and are respectively parallel to the first movement direction and are a preset distance from the target position;

a target line segment acquisition unit configured to execute cutting a target line segment on each of the two straight lines, the target line segment being located on one side of the first area in the first movement direction;

a second target region determination unit configured to perform forming the target region by sequentially connecting end points of the target line segment.

In a possible implementation manner, the object delivery configuration information includes a preset rate range corresponding to each second object; the delivery module comprises:

a first rate acquisition unit configured to perform acquisition of a first rate of the first object;

a sub-region acquisition unit configured to perform determination of a preset number of sub-regions that match the level information; the preset number of sub-areas are obtained by dividing the second area along the first movement direction, and the second area is a spliced area of the first area and the target area;

a target sub-region screening unit configured to perform screening out a target sub-region not including the second object from the preset number of sub-regions;

an initial position determination unit configured to perform a random determination of an initial position in each target sub-area, the initial position being located within the target area;

a second velocity and second movement direction determination unit configured to perform determining a second velocity and a second movement direction corresponding to the target object based on the preset velocity range and the first movement direction;

a target speed determination unit configured to perform determining a target speed of the target object in the first region according to the first velocity, the second velocity, and the second movement direction;

a throwing unit configured to perform throwing of the target object at the initial position and control the target object to move at the target speed.

In one possible implementation, the delivery unit includes:

a quantity information and quantity weight acquisition subunit configured to perform acquisition of quantity information and quantity weight corresponding to each target object;

a target delivery quantity determining subunit configured to determine a target delivery quantity of each target object according to the quantity information and the quantity weight;

an initial position determining subunit configured to perform determining an initial position corresponding to each target object;

and the releasing subunit is configured to release the target objects of the target releasing quantity at the initial position corresponding to each target object.

In a possible implementation manner, the second moving direction is opposite to the first moving direction, and the first moving direction and the central axis of the first area have a preset included angle.

In one possible implementation, the target object filtering module includes:

and the target object screening unit is configured to perform screening of a target object from a total amount of second objects based on the number of second objects in the first area, the second object number threshold and the object delivery configuration information.

In a possible implementation manner, the object delivery configuration information further includes a mapping relationship between each second object and a refresh time point, a delivery number threshold value in each refresh time period, a delivery weight, and/or a priority; the target object screening unit includes:

a target number determination subunit configured to perform, as a target number, a difference of the number of second objects in the first area and the second object number threshold;

the releasing time threshold and target releasing time obtaining subunit is configured to perform obtaining of a releasing time threshold of each second object in a target refreshing time period and a target releasing time of each second object in the target refreshing time period, and the target time period is a refreshing time period matched with the current time;

an initial second object set screening subunit configured to perform screening of an initial second object set, from the full-scale second objects, of which the target delivery times are smaller than a corresponding delivery time threshold;

a target object screening subunit configured to perform screening of the target number of second objects from the initial second object set as the target objects according to the delivery weight and/or priority of each object in the initial second object set.

In one possible implementation, the apparatus further includes:

the interaction module is configured to execute preset operation when detecting that a second object in the first area is triggered;

and the alarm module is configured to perform alarm processing if the preset operation does not meet the operation condition.

With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.

Fig. 12 is a block diagram illustrating an electronic device for object delivery, which may be a terminal, according to an exemplary embodiment, and an internal structure diagram of the electronic device may be as shown in fig. 12. The electronic device comprises a processor, a memory, a network interface, a display screen and an input device which are connected through a system bus. Wherein the processor of the electronic device is configured to provide computing and control capabilities. The memory of the electronic equipment comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the electronic device is used for connecting and communicating with an external terminal through a network. The computer program is executed by a processor to implement a method of object delivery. The display screen of the electronic equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the electronic equipment, an external keyboard, a touch pad or a mouse and the like.

Those skilled in the art will appreciate that the architecture shown in fig. 12 is merely a block diagram of some of the structures associated with the disclosed aspects and does not constitute a limitation on the electronic devices to which the disclosed aspects apply, as a particular electronic device may include more or less components than those shown, or combine certain components, or have a different arrangement of components.

In an exemplary embodiment, there is also provided an electronic device including: a processor; a memory for storing the processor-executable instructions; wherein the processor is configured to execute the instructions to implement the object delivery method as in the embodiments of the present disclosure.

In an exemplary embodiment, a computer-readable storage medium is also provided, in which instructions, when executed by a processor of an electronic device, enable the electronic device to perform an object delivery method in the embodiments of the present disclosure. The computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.

In an exemplary embodiment, a computer program product containing instructions is also provided, which when run on a computer, causes the computer to perform the method of object delivery in embodiments of the present disclosure.

It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

27页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:游戏显示方法、装置、电子设备及存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类