Target detection method and device, server and storage medium

CN115779431BActive Publication Date: 2026-10-16NETEASE (SHANGHAI) NETWORK CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211432952.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-16
Publication Date
2026-10-16
Estimated Expiration
2042-11-16

AI Technical Summary

Technical Problem

[0004]有鉴于此,本发明的目的在于提供一种目标检测方法、装置、服务器及存储介质,以解决在服务端上实现生成轨迹并检测轨迹与目标相交性的问题

Benefits of technology

[0016]The target detection method described above receives control operation data for a first target object sent by the client, and extracts the position key points and trajectory width of the first target object based on the control operation data. It then performs trajectory fitting based on the position key points and trajectory width to obtain the motion trajectory of the first target object, which includes at least one polygonal facet. Based on the motion trajectory, it determines a target search bounding box containing at least one second target object, and selects the second target object within the motion trajectory from the target search bounding box as the target object. This method uses facets to fit the motion trajectory of the first target object, constructs a target search bounding box based on the vertices of the facets on the motion trajectory, thereby determining the search range of the target object and identifying the target object within the motion trajectory. This not only gives the server absolute arbitration power over trajectory-related gameplay logic but also avoids the performance overhead of the server-side physics system and the client-side performance overhead in trajectory generation and target detection logic caused by using collision detection when detecting targets. It solves the problem of generating trajectories and detecting the intersection of trajectories and targets on the server side, improving the user's gaming experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115779431B_ABST
    Figure CN115779431B_ABST
Patent Text Reader

Abstract

The application provides a target detection method and device, a server and a storage medium. The method receives control operation data for a first target object sent by a client, extracts position key points and trajectory width of the first target object based on the control operation data, performs trajectory fitting processing according to the position key points and the trajectory width to obtain a motion trajectory of the first target object, the motion trajectory comprises at least one polygonal face, determines a target search bounding box containing at least one second target object according to the motion trajectory, and selects a second target object in the motion trajectory from the target search bounding box as a target object. The method reduces the performance overhead of trajectory generation and target detection logic, solves the problem of generating a trajectory and detecting the intersection of the trajectory and the target on the server, and thus guarantees the absolute arbitration right of the server in such a game in a competitive game.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of game technology, and in particular to a target detection method, device, server, and storage medium. Background Technology

[0002] As mobile games continue to be developed and optimized, players are paying more and more attention to the gaming experience, such as the realism and smoothness of special effects and scenes. While some issues can be addressed through hardware configuration, others cannot, such as gameplay. Many gameplay mechanics involve generating trajectories that affect targets within those trajectories, such as Batrider's fire flight and Spectre's Spectral Blade in Dota. These mechanics often require the ability to display the movement trajectory of a target, and this trajectory typically has a certain width to influence targets entering it. From a programming perspective, in games, because trajectories involve gameplay logic rather than just visual effects, implementing trajectory generation and target detection logic on the server-side is crucial.

[0003] Currently, to address this issue, game engines that support trajectory generation are used in development. However, after generating the trajectory, these engines perform object detection through collision detection. While this approach is relatively simple to implement on the client side, the server side often requires custom trajectory generation methods. When detecting objects, using overly complex and detailed collider meshes to match irregular trajectory shapes leads to significant performance overhead. Conversely, using simplified collider meshes (AABB bounding boxes, OBB bounding boxes, etc.) results in inaccurate object detection, causing a rapid decline in the player's gaming experience, especially when the trajectory shape deviates significantly from the collider shape. Summary of the Invention

[0004] In view of this, the purpose of the present invention is to provide a target detection method, apparatus, server and storage medium to solve the problem of generating a trajectory and detecting the intersection of the trajectory and the target on the server side.

[0005] In a first aspect, embodiments of the present invention provide a target detection method, the method comprising:

[0006] Receive control operation data for a first target object sent by the client, and extract the key points of the first target object's position and trajectory width based on the control operation data;

[0007] Based on the location key points and the trajectory width, trajectory fitting is performed to obtain the motion trajectory of the first target object, wherein the motion trajectory includes at least one polygonal patch.

[0008] Based on the motion trajectory, a target search bounding box containing at least one second target object is determined, and a second target object within the motion trajectory is selected from the target search bounding box as the target object.

[0009] Secondly, embodiments of the present invention provide a target detection device, the target detection device comprising:

[0010] The extraction module is used to receive control operation data for a first target object sent by the client, and extract the key points of the first target object's position and the trajectory width based on the control operation data;

[0011] The trajectory fitting module is used to perform trajectory fitting based on the location key points and the trajectory width to obtain the motion trajectory of the first target object, wherein the motion trajectory includes at least one polygonal patch.

[0012] The detection module is used to determine a target search bounding box containing at least one second target object based on the motion trajectory, and to select the second target object within the motion trajectory from the target search bounding box as the target object.

[0013] Thirdly, embodiments of the present invention provide a server, including a processor and a memory, wherein the memory stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the above-described target detection method.

[0014] Fourthly, embodiments of the present invention provide a machine-readable storage medium storing machine-executable instructions. When the machine-executable instructions are invoked and executed by a processor, the machine-executable instructions cause the processor to implement the above-described target detection method.

[0015] The embodiments of the present invention bring the following beneficial effects:

[0016] The target detection method described above receives control operation data for a first target object sent by the client, and extracts the position key points and trajectory width of the first target object based on the control operation data. It then performs trajectory fitting based on the position key points and trajectory width to obtain the motion trajectory of the first target object, which includes at least one polygonal facet. Based on the motion trajectory, it determines a target search bounding box containing at least one second target object, and selects the second target object within the motion trajectory from the target search bounding box as the target object. This method uses facets to fit the motion trajectory of the first target object, constructs a target search bounding box based on the vertices of the facets on the motion trajectory, thereby determining the search range of the target object and identifying the target object within the motion trajectory. This not only gives the server absolute arbitration power over trajectory-related gameplay logic but also avoids the performance overhead of the server-side physics system and the client-side performance overhead in trajectory generation and target detection logic caused by using collision detection when detecting targets. It solves the problem of generating trajectories and detecting the intersection of trajectories and targets on the server side, improving the user's gaming experience.

[0017] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention are realized and obtained in accordance with the structures particularly pointed out in the description, claims and drawings.

[0018] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0019] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0020] Figure 1 This is a schematic diagram of a first embodiment of the target detection method provided by the present invention;

[0021] Figure 2 This is a schematic diagram of a second embodiment of the target detection method provided by the present invention;

[0022] Figure 3 This is a schematic diagram of a third embodiment of the target detection method provided by the present invention;

[0023] Figure 4This is a schematic diagram of the overall process of trajectory generation and target detection provided in an embodiment of the present invention;

[0024] Figure 5 This is a schematic diagram illustrating the determination of vertex order when constructing a rectangular patch, as provided in an embodiment of the present invention.

[0025] Figure 6 This is a schematic diagram of a fourth embodiment of the target detection method provided by the present invention;

[0026] Figure 7 This is a schematic diagram of offline analysis of key points in a trajectory using a drawing method, provided by an embodiment of the present invention.

[0027] Figure 8 A schematic diagram of a target detection device provided in an embodiment of the present invention;

[0028] Figure 9 This is a schematic diagram of a server provided in an embodiment of the present invention. Detailed Implementation

[0029] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0030] This application uses the mobile game M as an example. In the game, users operate controls in the graphical user interface to control objects in the game to release corresponding skills. At the same time, the interface displays the movement trajectory of the object releasing the skill, as well as other objects on that trajectory. Specifically, in the prior art, when the user controls the player's corresponding object to release a skill or move, if it is necessary to determine other game objects affected by the trajectory, a collision detection method is used. However, this method greatly increases the server overhead, which is not conducive to the subsequent rendering and display, resulting in visual lag for the user. Based on the above defects, this application mainly solves the problem that the detection of target objects intersecting with the player character's movement trajectory in the game consumes too much overhead, resulting in display lag and affecting the user's gaming experience.

[0031] Based on the above, embodiments of the present invention provide a target detection method, equipment, and storage medium.

[0032] In one embodiment of the present invention, the target detection method runs on a server. Alternatively, it can be implemented and executed based on a cloud interaction system, which includes a server and a client device. The player controls a first target object in a graphical user interface displayed on the client device, collects control operation data generated by the control operation on the first target object, and then sends the control operation data to the server. The server performs position sampling based on the control operation data to obtain the motion trajectory of the first target object, constructs a target search bounding box based on the motion trajectory, and finally selects one of the second target objects in the target search bounding box as the target object, thereby achieving target detection.

[0033] In an optional implementation, various cloud applications, such as cloud gaming, can run under the cloud interaction system. Taking cloud gaming as an example, cloud gaming refers to a gaming method based on cloud computing. In the cloud gaming operation mode, the game program's execution entity and the game's graphical user interface are separated. The storage and execution of the target detection method are completed on the cloud gaming server. The client device is used to generate control operation data for the first target object, send data, and present the game scene. For example, the client device can be a display device with data transmission capabilities close to the user, such as a mobile terminal, television, computer, or PDA; however, the terminal device for information processing is the cloud gaming server in the cloud. During gameplay, the player operates the first target object displayed on the client device to generate corresponding control operation data, which is then transmitted to the cloud gaming server. The cloud gaming server detects the target object based on the received control operation data, returns the detection results to the client device via the network, and finally, the client device decodes the detection results and displays them in the graphical user interface.

[0034] See Figure 1 The diagram illustrates an embodiment of a target detection method. This embodiment is server-based, where the server detects targets by acquiring operation data of various target objects on a terminal device. The terminal device displays a graphical user interface (GUI), which includes a game scene and an operation interface. The game scene includes a map and a first target object and at least one second target object controlled by the terminal device. The target detection method includes the following steps:

[0035] Step S101: Receive control operation data for the first target object sent by the client, and extract the key points of the first target object's position and trajectory width based on the control operation data.

[0036] In this embodiment, during the game, the user performs control operations (i.e., touch operations on controls) on the graphical user interface based on the game task. The first target object moves in the interface under the control of the instruction corresponding to the control operation, and records the data generated during the movement to obtain control operation data. The server samples the position of the first target object from the control operation data based on a pre-set trajectory sampling frequency to obtain all the key points of the position when the control operation controls the first target object. At the same time, the server determines the trajectory width of the trajectory generated when the first target object moves based on the control parameters corresponding to the touch operation.

[0037] In practical applications, the key point of the position can also be understood as the position of the first target object in each frame under the control of the control operation. The first target object moves to each position point when releasing the corresponding skill by collecting time frames, and the key point set of the first target object's motion trajectory is obtained based on the collected position points.

[0038] Step S102: Perform trajectory fitting processing based on the key points of the position and the trajectory width to obtain the motion trajectory of the first target object, which includes at least one polygonal patch.

[0039] In this step, trajectory fitting refers to generating a motion trajectory with a certain range based on the movement trajectory line of the first target object. For example, controlling the first target object to release an attack skill with displacement, which will affect a second target object located within a specific range of the displacement path, such as causing damage. The special effects produced by this skill need to be displayed on the interface to reflect the player's gaming experience with this skill. To this end, this step determines a trajectory line based on all key points. Based on this trajectory line, a motion trajectory with a certain range is constructed according to the trajectory width. This trajectory width can be understood as the effective attack radius of the skill. A motion trajectory with a certain width is generated based on this effective attack radius and the trajectory line.

[0040] Specifically, in this embodiment, the process of moving the first target object according to the location key points is divided into multiple segments. Each segment consists of two location key points. A polygonal patch is generated based on the two location key points and the trajectory width. The polygonal patch can be a triangular patch, a rectangular patch, or even a pentagonal or hexagonal patch. After generating patches for all location key points, the motion trajectory of the first target object is obtained.

[0041] Step S103: Determine the target search bounding box containing at least one second target object based on the motion trajectory, and select the second target object within the motion trajectory from the target search bounding box as the target object.

[0042] In this embodiment, the target search bounding box is determined based on the vertices of the polygonal facets in the motion trajectory. The determined target search bounding box includes the search area containing all polygonal facets. Then, preliminary filtering is performed within this search area to obtain at least one second target object. Further, from the at least one second target object, the second target object within the motion trajectory is selected as the target object.

[0043] Specifically, the geometric relationship between at least one second target object initially selected and each polygon patch is calculated, and second target objects that meet the conditions are selected as target objects based on the geometric relationship.

[0044] The aforementioned target detection method, upon determining the movement of the first target object, collects key points at each position and the width of its trajectory during the movement process. Multiple facets are fitted based on the key points and trajectory width, and a motion trajectory is obtained from these facets. A target search bounding box is then determined based on the motion trajectory, and a second target object is selected from the target search bounding box as the target object. This method of generating trajectories and detecting targets simplifies existing collider networks, thereby reducing the performance overhead on the server when rendering the skill trajectories of game characters. It also improves the efficiency of detecting the intersection of trajectories and targets, reduces display stuttering, and enhances the user's gaming experience.

[0045] See Figure 2 The diagram shows another embodiment of a target detection method, which includes the following steps:

[0046] Step S201: Receive control operation data for the first target object sent by the client.

[0047] In this embodiment, a graphical user interface is displayed on the client. The graphical user interface includes a first target object and at least one second target object. The player controls the first target object to move within the interface by operating on the first target object on the graphical user interface, thereby generating corresponding control operation data.

[0048] Step S202: According to the preset sampling frequency, the position of the first target object is sampled based on the control operation data to obtain the key points of the position.

[0049] In this step, the control operation data can be understood as determining the corresponding skill by responding to the user's touch operation on the graphical user interface. The skill is specifically a skill with displacement, such as Batrider's Flame Flight or Spectre's Spectral Blade. Within this displacement, the target object in the surrounding area is searched and attacked. During the movement, the position information of the first target object is collected in real time according to the preset sampling frequency as it moves a distance, and the key position points are obtained.

[0050] Specifically, the location of the first target object is captured frame by frame in time, and the location key points are obtained. Alternatively, the location key points can be determined based on the movement distance of the first target object, according to the unit movement distance.

[0051] Step S203: Determine the trajectory width generated by the first target object during its movement.

[0052] This is applied to servers. The trajectory width is specifically determined by the attack radius of the skill corresponding to the movement of the first target object. Specifically, the corresponding target control is determined based on the touch operation; the corresponding skill is determined based on the correspondence between the target control and the skill; the attack range is determined based on the skill's relevant information; and the influence range of the position traversed by the first target object under the control of the touch operation is calculated. The trajectory width is then determined based on the pixels of this influence range. For example, Li Yuanfang's second skill moves a certain distance after being triggered, creating a crack effect along its trajectory. All game objects within this crack effect will suffer attack damage, and the width of this crack is recorded as the trajectory width.

[0053] Step S204: Based on the location key points and trajectory width, construct polygon patches between each key point of the trajectory using polygon fitting, and determine the motion trajectory of the first target object based on each polygon patch.

[0054] In this embodiment, the polygon fitting method is specifically a rectangle fitting method. Using this rectangle fitting method, rectangle fitting is performed based on the collected key points of position and trajectory width to obtain multiple rectangular patches and obtain the motion trajectory.

[0055] Specifically, based on the aforementioned key points, the magnitude of the displacement and the corresponding direction of displacement between two adjacent key points are calculated;

[0056] Based on the displacement magnitude, displacement direction, and trajectory width of two adjacent key points, the irregular trajectory of the first target object is divided into multiple polygonal patches using polygon fitting to obtain the motion trajectory.

[0057] In practical applications, the displacement vector between two adjacent key points and the distance between them are calculated based on geometric principles. Four edges are set on the displacement vector, two of which are parallel to the displacement vector and have a length equal to the distance between the two adjacent key points. Figure 4 AB and DC, EF and HG, and two other lines passing through two key points and perpendicular to the displacement vector are evenly divided by the key points, as shown in the figure. Figure 4 AD and BC, EH and FG in the diagram.

[0058] In some embodiments, the step of dividing the irregular trajectory of the first target object into multiple polygonal patches using polygon fitting based on the displacement magnitude, displacement direction, and trajectory width of two adjacent key points to obtain the motion trajectory includes:

[0059] The long side of the polygonal patch is determined based on the displacement magnitude of two adjacent key points, wherein the long side is parallel to the displacement direction;

[0060] The width of the polygonal facet is determined based on the trajectory width, wherein the width is bisected by the key point;

[0061] Based on the long and wide sides between two adjacent key points, construct the corresponding polygonal patch;

[0062] The motion trajectory is obtained by optimizing the edges of two adjacent polygonal patches that are located at the same key point. In practical applications, if the polygon fitting method is a rectangle fitting method, the constructed patch will be a rectangular patch.

[0063] Furthermore, the step of constructing the corresponding polygonal patch based on the long and wide sides between two adjacent key points includes:

[0064] The vertex positions of the polygonal facet are determined based on the long and wide sides between two adjacent key points.

[0065] The positions of each vertex are combined and sorted in sequence, and the area of ​​the closed region corresponding to each vertex position after the combination and sorting is calculated using Green's theorem.

[0066] The combination with the largest area is selected as the sorting order of the vertex positions, and a polygon patch is constructed based on the sorting order.

[0067] like Figure 5 As shown, taking the four vertices of a rectangular face as an example, the order of vertices B, C, F, and G is used to combine the four vertices to obtain multiple sorting orders. Based on the closed regions obtained by different sorting orders, the area is calculated using Green's formula. The sorting with the largest area is selected as the final face to be constructed, which is the final sorting BCGF. The shape of the face constructed based on it can be a quadrilateral, a triangle, or even a concave quadrilateral.

[0068] To ensure a better fit to the trajectory, after determining the motion trajectory based on the facets, the vertices of adjacent facets are reused and adjusted. The shape of the facets is determined in the following way:

[0069] Before the step of fitting the trajectory based on the key points and the trajectory width to obtain the motion trajectory of the first target object, the method further includes:

[0070] The shape of the motion trajectory of the first target object is determined based on key location points;

[0071] Determine whether the trajectory curvature of key points is greater than a preset value;

[0072] If so, a patch of the corresponding shape is selected based on the trajectory curvature, and the patch is used for trajectory fitting.

[0073] like Figure 4 As shown, for two edges BC and EH that pass through the same key point at the same location, vertices B and C are selected for reuse by vertex reuse priority, and the two patches are connected together to optimize the motion trajectory.

[0074] Step S205: Determine the target search bounding box based on the motion trajectory, and select the target object within the motion trajectory from at least one second target object in the target search bounding box.

[0075] This process mainly includes the following two steps: first, a filter is used to obtain the target set for initial screening; then, further filtering is performed to obtain all targets within the trajectory. The filter is a component that obtains all targets within a specified sphere in the game scene based on the input sphere center coordinates and radius. In the initial screening stage, the circumscribed sphere of the trajectory's AABB bounding box is used as the input to the filter. After obtaining the target set, each target is then individually determined to be within the trajectory, specifically whether it lies within any quadrilateral facet of the trajectory. This transforms the problem into a geometric question of whether a point lies within a finite plane in space. Furthermore, the center and radius of the circumscribed sphere surrounding the trajectory are updated when the quadrilateral facets on the trajectory are generated and destroyed.

[0076] In summary, the above method enables the generation of trajectories and the detection of targets within those trajectories on the server side. This not only gives the server absolute arbitration power over the gameplay logic related to the trajectory, but also avoids the performance overhead of the server's physical system caused by using collision detection when detecting targets, as well as the performance overhead of the client in trajectory generation and target detection logic.

[0077] The following section, using a specific motion trajectory as an example, details the generation of the motion trajectory of the first target object and the detection of the second target object in the graphical user interface. (See also...) Figure 3-6 As shown, the target detection method includes the following steps:

[0078] Step S301: Receive control operation data for the first target object sent by the client, and extract the key points of the first target object's position and trajectory width based on the control operation data;

[0079] Step S302: Perform trajectory fitting processing based on key points and trajectory width to obtain the motion trajectory of the first target object, wherein the motion trajectory includes at least one polygonal patch.

[0080] In this embodiment, the extraction of key location points and trajectory width is specifically achieved by sampling the position of the first target object at a preset sampling frequency during the movement of the first target object based on the control operation, thereby obtaining all key location points; and determining the trajectory width generated by the first target object during the movement.

[0081] Then, based on all the said location key points and the said trajectory width, polygon patches between each key point of the trajectory are constructed using polygon fitting, and the motion trajectory of the first target object is determined based on each of the said polygon patches.

[0082] In practical applications, such as Figure 4 As shown, during the trajectory fitting process, the target whose trajectory needs to be generated is sampled at its position (the sampling frequency is configurable, with a maximum of the server's logical frame rate) to obtain a series of key position points. First, the trajectory generation logic in the skill is configured in the skill editor, including the sampling frequency of the position, the width of the trajectory, the duration, the special effect texture, the type of target affected by the trajectory, and the frequency of target detection.

[0083] Using the current keypoint and the previous keypoint, a rectangle can be generated. The rule for generating the rectangle is that one side (denoted as side AB) is parallel to the displacement direction of the target (the vector formed by the two keypoints) and its length is equal to the displacement magnitude; the other side (denoted as side BC) is perpendicular to the displacement direction, its length is equal to the track width, and it is bisected by the keypoint. By fitting rectangles, the irregular trajectory is divided into rectangular patches.

[0084] Furthermore, the step of constructing polygonal patches between key points of the trajectory using polygon fitting based on all the said location key points and the trajectory width, and determining the motion trajectory of the first target object based on each of the said polygonal patches, includes:

[0085] Based on all the aforementioned key points, calculate the displacement magnitude and corresponding displacement direction of two adjacent key points;

[0086] The long side of the polygonal patch is determined based on the displacement magnitude of two adjacent key points, wherein the long side is parallel to the displacement direction;

[0087] The width of the polygonal facet is determined based on the trajectory width, wherein the width is bisected by the key point;

[0088] Based on the long and wide sides between two adjacent key points, construct the corresponding polygonal patch;

[0089] The edges of two adjacent polygonal patches located at the same key point are optimized to obtain the motion trajectory. Specifically, it is determined whether the trajectory curvature of the motion trajectory formed by two adjacent polygonal patches is greater than a preset value; if so, a corresponding patch shape is selected based on the trajectory curvature, and one of the two adjacent polygonal patches is adjusted to be a polygonal patch corresponding to the patch shape; two edges of the two adjusted adjacent patches located at the same key point are identified, and two vertices of the two edges are selected for reuse to obtain the final motion trajectory.

[0090] The process of constructing the corresponding polygonal patch includes: determining the vertex positions of the rectangular patch based on the long and wide sides between two adjacent key points; sequentially combining and sorting the vertex positions, and calculating the area of ​​the closed region corresponding to each vertex position after the combination and sorting using Green's formula; selecting the combination and sorting with the largest area as the arrangement order of the vertex positions, and constructing the polygonal patch based on the arrangement order.

[0091] like Figure 4 and 5 As shown, to make the fitting effect more closely match the trajectory shape, when generating a rectangle, the vertices of the previous rectangle are reused. That is, only the side of the rectangle calculated based on the current keypoint perpendicular to the displacement direction (side FG) is connected to the side calculated from the previous keypoint (side BC) to form a quadrilateral BFGC. Due to the irregular nature of the trajectory shape, when the trajectory curvature is large, special cases such as concave quadrilaterals or even triangles need to be considered when reusing vertices, such as... Figure 5 As shown. In order to obtain the correct vertex order (BFGC or CFGB), this method uses Green's theorem to calculate the double integral of the quadrilateral region enclosed by the four vertices as the evaluation criterion, and finally selects the larger result as the vertex index order of the quadrilateral face.

[0092] Step S303: Determine the boundary range of the trajectory based on the vertices of all polygonal patches in the motion trajectory, and construct a target search bounding box that surrounds the motion trajectory based on the boundary range, wherein at least one second target object is displayed in the target search bounding box.

[0093] In this step, the target search bounding box is an AABB bounding box, which is an axis-aligned rectangular bounding box, referring to a cuboid that encloses the model and whose faces are perpendicular to the world coordinate axes.

[0094] Step S304: Calculate the radius and origin of the trajectory coverage area based on the target search bounding box, and input the radius and origin into the filter to search, thereby obtaining preliminary filtered targets, wherein the preliminary filtered targets include at least one second target object;

[0095] Step S305: Determine whether the initially screened target is within the motion trajectory to obtain the target object.

[0096] This step involves calculating the positional relationship between the initially screened target and the motion trajectory, and determining the target object based on the positional relationship.

[0097] like Figure 4 As shown, based on the fitted motion trajectory, the edge vertices of the trajectory are selected, and an AABB bounding box that can contain all vertices is calculated based on the edge vertices. Using the diagonal of the AABB bounding box as the diameter, and the midpoint of the diagonal as the center, the circumscribed sphere region is determined, obtaining the target search range. All second target objects within this search range are then searched. Specifically, the diameter and center information are output to a filter to select second target objects whose position information falls within the target search range from the background data. Then, it is determined whether each target is located within the trajectory, i.e., whether the target is located within any quadrilateral facet of the trajectory, thus transforming the problem into a geometric problem of whether a point lies within a finite plane in space.

[0098] For example, calculating the relationship between the second target object selected by each filter and the facet yields the spatial relationship between them. Figure 4 As shown in the figure, “□” represents the second target object. The second target object within the patch is selected as the target object again by the filter, as shown in 1 and 2 in the figure.

[0099] Step S306: Send the motion trajectory to the client and display it on the graphical user interface;

[0100] Step S307: Based on the preset special effects polling time, detect whether each polygonal facet in the motion trajectory has reached its corresponding lifespan;

[0101] Step S308: If yes, update the motion trajectory displayed on the graphical user interface.

[0102] Specifically, by managing and polling continuously generated quadrilateral patches for target detection, the lifecycle of each quadrilateral patch is independently controlled. When a quadrilateral patch is generated or destroyed, the client is notified to display / destroy trajectory effects, and the trajectory's AABB bounding box and its circumsphere are updated. In the target detection polling logic, the latest circumsphere data is input into a filter to obtain the target set, which is then further filtered to obtain the set of targets located within the trajectory. For targets entering or leaving the trajectory for the first time, the client is notified to perform corresponding animations and effects. The client receives the trajectory generation / destruction and target entry / exit logic from the server, and also adapts to restore the above effects upon client reconnection. The overall flow of all logic is as follows: Figure 6 As shown.

[0103] Furthermore, adding program logs to critical logic points such as trajectory generation / destruction and target entry / exit from the trajectory allows for the collection and recording of key data. Offline analysis of the collected trajectory key points, vertices, target positions, and other key data can effectively uncover vulnerabilities in the code. Offline analysis uses Python's Matplotlib plotting library to draw key points, quadrilaterals, and target positions in the trajectory, making the debugging process more intuitive. For example... Figure 7 As shown, key data of the generated trajectory and the detected target are collected and plotted when the target of the generated trajectory rotates around a point. The figure shows the positional relationship between each key point, quadrilateral and the detected target in the trajectory, as well as the order of each quadrilateral vertex.

[0104] In summary, by receiving control operation data for the first target object sent by the client, and extracting the key points and trajectory width of the first target object based on the control operation data; performing trajectory fitting processing based on all key points and trajectory width to obtain the motion trajectory of the first target object, the motion trajectory including at least one polygonal patch; determining the target search bounding box based on the motion trajectory, and selecting the target object within the motion trajectory from at least one second target object in the target search bounding box. This approach not only gives the server absolute arbitration power over trajectory-related gameplay logic, but also avoids the performance overhead of the server's physics system and the client's performance overhead in trajectory generation and target detection logic caused by using collision detection when detecting targets. It simplifies the process of target detection through collider meshes in existing technologies and improves the user's gaming experience.

[0105] For the corresponding method embodiments described above, see [link to relevant documentation]. Figure 8 The diagram shows a target detection device, displaying a graphical user interface on a client. The graphical user interface includes a first target object and at least one second target object. The target detection device includes:

[0106] The extraction module 801 is used to receive control operation data for the first target object sent by the client, and extract the position key points and trajectory width of the first target object based on the control operation data;

[0107] The trajectory fitting module 802 is used to perform trajectory fitting processing based on the location key points and the trajectory width to obtain the motion trajectory of the first target object, wherein the motion trajectory includes at least one polygonal patch.

[0108] The detection module 803 is used to determine a target search bounding box containing at least one second target object based on the motion trajectory, and to select the second target object within the motion trajectory from the target search bounding box as the target object.

[0109] The extraction module 801 described above is specifically used for:

[0110] According to the preset sampling frequency, the first target object is sampled based on the control operation data to obtain all key points of the position;

[0111] Determine the width of the trajectory generated by the first target object during its movement.

[0112] The trajectory fitting module 802 mentioned above is specifically used for:

[0113] Based on the location key points and the trajectory width, polygon patches are constructed between each key point of the trajectory using polygon fitting, and the motion trajectory of the first target object is determined based on each polygon patch.

[0114] The trajectory fitting module 802 mentioned above is specifically used for:

[0115] Based on the aforementioned key points, calculate the magnitude of the displacement and the corresponding direction of the displacement between two adjacent key points;

[0116] Based on the displacement magnitude, displacement direction, and trajectory width of two adjacent key points, the irregular trajectory of the first target object is divided into multiple polygonal patches using polygon fitting to obtain the motion trajectory.

[0117] The trajectory fitting module 802 mentioned above is specifically used for:

[0118] The long side of the polygonal rectangular patch is determined based on the displacement magnitude of two adjacent key points, wherein the long side is parallel to the displacement direction;

[0119] The width of the polygonal facet is determined based on the trajectory width, wherein the width is bisected by the key point;

[0120] Based on the long and wide sides between two adjacent key points, construct the corresponding polygonal patch;

[0121] The motion trajectory is obtained by optimizing the edges of two adjacent polygonal patches that are located at the same key point.

[0122] The trajectory fitting module 802 mentioned above is specifically used for:

[0123] The vertex positions of the polygonal facet are determined based on the long and wide sides between two adjacent key points.

[0124] The positions of each vertex are combined and sorted in sequence, and the area of ​​the closed region corresponding to each vertex position after the combination and sorting is calculated using Green's theorem.

[0125] The combination with the largest area is selected as the sorting order of the vertex positions, and a polygon patch is constructed based on the sorting order.

[0126] The trajectory fitting module 802 mentioned above is also used for:

[0127] The shape of the motion trajectory of the first target object is determined based on the key location points;

[0128] Determine whether the trajectory curvature of the key points at the location is greater than a preset value;

[0129] If so, a patch of the corresponding shape is selected based on the trajectory curvature, and the patch is used for trajectory fitting.

[0130] The aforementioned detection module 803 is specifically used for:

[0131] The boundary range of the trajectory is determined based on the vertices of all polygonal patches in the trajectory, and a target search bounding box is constructed based on the boundary range to surround the trajectory, wherein at least one second target object is displayed in the target search bounding box;

[0132] Based on the target search bounding box, the radius and origin of the trajectory coverage area are calculated, and the radius and origin are input into the filter to search for preliminary filtered targets, wherein the preliminary filtered targets include at least one second target object;

[0133] Determine whether the initially screened target is located within the motion trajectory to obtain the target object.

[0134] The aforementioned detection module 803 is specifically used for:

[0135] Calculate the positional relationship between the preliminary screening target and the motion trajectory, and determine the target object based on the positional relationship.

[0136] The aforementioned target detection device also includes a display module 804, which is specifically used for:

[0137] The motion trajectory is sent to the client and displayed on the graphical user interface;

[0138] Based on a preset special effects polling time, it is detected whether each polygonal facet in the motion trajectory has reached its corresponding lifespan;

[0139] If so, update the motion trajectory displayed on the graphical user interface.

[0140] In summary, this method involves receiving control operation data for a first target object from the client, extracting the key points and trajectory width of the first target object based on the control operation data, performing trajectory fitting based on all key points and trajectory widths to obtain the motion trajectory of the first target object, which includes at least one polygonal facet. A target search bounding box is then determined based on the motion trajectory, and a target object within the motion trajectory is selected from at least one second target object within the target search bounding box. This method uses facets to fit the motion trajectory of the first target object, constructs a target search bounding box based on the vertices of the facets on the motion trajectory, thereby determining the search range of the target object and identifying the target object within the motion trajectory. This not only gives the server absolute arbitration power over trajectory-related gameplay logic but also avoids the performance overhead of the server's physics system caused by using collision detection when detecting targets, as well as the performance overhead of the client in trajectory generation and target detection logic. It solves the problem of generating trajectories and detecting the intersection of trajectories and targets on the server side.

[0141] This embodiment also provides a server, including a processor and a memory. The memory stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the above-described target detection method.

[0142] See Figure 9 As shown, the server includes a processor 900 and a memory 901. The memory 901 stores machine-executable instructions that can be executed by the processor 900. The processor 900 executes the machine-executable instructions to implement the control method of the interface described above.

[0143] Furthermore, Figure 9 The server shown also includes a bus 902 and a communication interface 903. The processor 900, the communication interface 903, and the memory 901 are connected via the bus 902.

[0144] The memory 901 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 903 (which can be wired or wireless), such as the Internet, wide area network, local area network, or metropolitan area network. The bus 902 may be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 9 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.

[0145] The processor 900 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the processor 900 or by instructions in software form. The processor 900 may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this invention can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 901. The processor 900 reads the information from memory 901 and, in conjunction with its hardware, completes the following steps:

[0146] Receive control operation data for a first target object sent by the client, and extract the key points of the first target object's position and trajectory width based on the control operation data;

[0147] Based on the location key points and the trajectory width, trajectory fitting is performed to obtain the motion trajectory of the first target object, wherein the motion trajectory includes at least one polygonal patch.

[0148] Based on the motion trajectory, a target search bounding box containing at least one second target object is determined, and a second target object within the motion trajectory is selected from the target search bounding box as the target object.

[0149] The steps described above for extracting the location key points and trajectory width of the first target object based on the control operation data include:

[0150] According to the preset sampling frequency, the first target object is sampled for position based on the control operation data to obtain key position points;

[0151] Determine the width of the trajectory generated by the first target object during its movement.

[0152] The above-described steps for obtaining the motion trajectory of the first target object by performing trajectory fitting based on the key points and the trajectory width include:

[0153] Based on the location key points and the trajectory width, polygon patches are constructed between each key point of the trajectory using polygon fitting, and the motion trajectory of the first target object is determined based on each polygon patch.

[0154] The steps described above, which involve constructing polygonal patches between key points of the trajectory using polygon fitting based on the location key points and the trajectory width, and determining the motion trajectory of the first target object based on each polygonal patch, include:

[0155] Based on the aforementioned key points, calculate the magnitude of the displacement and the corresponding direction of the displacement between two adjacent key points;

[0156] Based on the displacement magnitude, displacement direction, and trajectory width of two adjacent key points, the irregular trajectory of the first target object is divided into multiple polygonal patches using polygon fitting to obtain the motion trajectory.

[0157] The above-mentioned step of dividing the irregular trajectory of the first target object into multiple polygonal patches using polygon fitting based on the displacement magnitude, displacement direction, and trajectory width of two adjacent key points to obtain the motion trajectory includes:

[0158] The long side of the polygonal patch is determined based on the displacement magnitude of two adjacent key points, wherein the long side is parallel to the displacement direction;

[0159] The width of the polygonal facet is determined based on the trajectory width, wherein the width is bisected by the key point;

[0160] Based on the long and wide sides between two adjacent key points, construct the corresponding polygonal patch;

[0161] The motion trajectory is obtained by optimizing the edges of two adjacent polygonal patches that are located at the same key point.

[0162] The steps described above for constructing corresponding polygonal patches based on the long and wide sides between two adjacent key points include:

[0163] The vertex positions of the polygonal facet are determined based on the long and wide sides between two adjacent key points.

[0164] The positions of each vertex are combined and sorted in sequence, and the area of ​​the closed region corresponding to each vertex position after the combination and sorting is calculated using Green's theorem.

[0165] The combination with the largest area is selected as the sorting order of the vertex positions, and a polygon patch is constructed based on the sorting order.

[0166] Before the step of fitting the trajectory based on the key points and the trajectory width to obtain the motion trajectory of the first target object, the method further includes:

[0167] The shape of the motion trajectory of the first target object is determined based on the key location points;

[0168] Determine whether the trajectory curvature of the key points at the location is greater than a preset value;

[0169] If so, a patch of the corresponding shape is selected based on the trajectory curvature, and the patch is used for trajectory fitting.

[0170] The steps described above, including determining a target search bounding box containing at least one second target object based on the motion trajectory and selecting a second target object within the motion trajectory from the target search bounding box as the target object, include:

[0171] The boundary range of the trajectory is determined based on the vertices of all polygonal patches in the trajectory, and a target search bounding box is constructed based on the boundary range to surround the trajectory, wherein at least one second target object is displayed in the target search bounding box;

[0172] Based on the target search bounding box, the radius and origin of the trajectory coverage area are calculated, and the radius and origin are input into the filter to search for preliminary filtered targets, wherein the preliminary filtered targets include at least one second target object;

[0173] Determine whether the initially screened target is located within the motion trajectory to obtain the target object.

[0174] The above-mentioned step of determining whether the initially screened target is located within the motion trajectory to obtain the target object includes:

[0175] Calculate the positional relationship between the preliminary screening target and the motion trajectory, and determine the target object based on the positional relationship.

[0176] Furthermore, after the steps of determining a target search bounding box containing at least one second target object based on the motion trajectory, and selecting the second target object within the motion trajectory from the target search bounding box as the target object, the method further includes:

[0177] The motion trajectory is sent to the client and displayed on the graphical user interface;

[0178] Based on a preset special effects polling time, it is detected whether each polygonal facet in the motion trajectory has reached its corresponding lifespan;

[0179] If so, update the motion trajectory displayed on the graphical user interface.

[0180] In summary, this method uses facets to fit the motion trajectory of the first target object, and constructs a target search bounding box based on the vertices of the facets on the motion trajectory to determine the search range of the target object. This not only gives the server absolute arbitration power over the trajectory-related gameplay logic, but also avoids the performance overhead of the server-side physics system caused by using collision detection when detecting targets, as well as the performance overhead of the client in trajectory generation and target detection logic. It solves the problem of generating trajectories and detecting the intersection of trajectories and targets on the server side, thus improving the user's gaming experience.

[0181] This embodiment also provides a machine-readable storage medium storing machine-executable instructions. When the machine-executable instructions are invoked and executed by a processor, the machine-executable instructions cause the processor to perform the following steps:

[0182] Receive control operation data for a first target object sent by the client, and extract the key points of the first target object's position and trajectory width based on the control operation data;

[0183] Based on the location key points and the trajectory width, trajectory fitting is performed to obtain the motion trajectory of the first target object, wherein the motion trajectory includes at least one polygonal patch.

[0184] Based on the motion trajectory, a target search bounding box containing at least one second target object is determined, and a second target object within the motion trajectory is selected from the target search bounding box as the target object.

[0185] The steps described above for extracting the location key points and trajectory width of the first target object based on the control operation data include:

[0186] According to the preset sampling frequency, the first target object is sampled based on the control operation data to obtain all key points of the position;

[0187] Determine the width of the trajectory generated by the first target object during its movement.

[0188] The above-described steps for obtaining the motion trajectory of the first target object by performing trajectory fitting based on the key points and the trajectory width include:

[0189] Based on the location key points and the trajectory width, polygon patches are constructed between each key point of the trajectory using polygon fitting, and the motion trajectory of the first target object is determined based on each polygon patch.

[0190] The steps described above, which involve constructing polygonal patches between key points of the trajectory using polygon fitting based on the location key points and the trajectory width, and determining the motion trajectory of the first target object based on each polygonal patch, include:

[0191] Based on the aforementioned key points, calculate the magnitude of the displacement and the corresponding direction of the displacement between two adjacent key points;

[0192] Based on the displacement magnitude, displacement direction, and trajectory width of two adjacent key points, the irregular trajectory of the first target object is divided into multiple rectangular patches using the rectangular fitting method to obtain the motion trajectory.

[0193] The above-mentioned step of dividing the irregular trajectory of the first target object into multiple polygonal patches using polygon fitting based on the displacement magnitude, displacement direction, and trajectory width of two adjacent key points to obtain the motion trajectory includes:

[0194] The long side of the polygonal patch is determined based on the displacement magnitude of two adjacent key points, wherein the long side is parallel to the displacement direction;

[0195] The width of the polygonal facet is determined based on the trajectory width, wherein the width is bisected by the key point;

[0196] Based on the long and wide sides between two adjacent key points, construct the corresponding polygonal patch;

[0197] The motion trajectory is obtained by optimizing the edges of two adjacent polygonal patches that are located at the same key point.

[0198] The steps described above for constructing the corresponding rectangular patch based on the long and wide sides between two adjacent key points include:

[0199] The vertex positions of the polygonal facet are determined based on the long and wide sides between two adjacent key points.

[0200] The positions of each vertex are combined and sorted in sequence, and the area of ​​the closed region corresponding to each vertex position after the combination and sorting is calculated using Green's theorem.

[0201] The combination with the largest area is selected as the sorting order of the vertex positions, and a polygon patch is constructed based on the sorting order.

[0202] Before the step of fitting the trajectory based on all the said location key points and the trajectory width to obtain the motion trajectory of the first target object, the method further includes:

[0203] The shape of the motion trajectory of the first target object is determined based on the key location points;

[0204] Determine whether the trajectory curvature of the key points at the location is greater than a preset value;

[0205] If so, a patch of the corresponding shape is selected based on the trajectory curvature, and the patch is used for trajectory fitting.

[0206] The steps described above, including determining a target search bounding box containing at least one second target object based on the motion trajectory and selecting a second target object within the motion trajectory from the target search bounding box as the target object, include:

[0207] The boundary range of the trajectory is determined based on the vertices of all polygonal patches in the trajectory, and a target search bounding box is constructed based on the boundary range to surround the trajectory, wherein at least one second target object is displayed in the target search bounding box;

[0208] Based on the target search bounding box, the radius and origin of the trajectory coverage area are calculated, and the radius and origin are input into the filter to search for preliminary filtered targets, wherein the preliminary filtered targets include at least one second target object;

[0209] Determine whether the initially screened target is located within the motion trajectory to obtain the target object.

[0210] The above-mentioned step of determining whether the initially screened target is located within the motion trajectory to obtain the target object includes:

[0211] Calculate the positional relationship between the preliminary screening target and the motion trajectory, and determine the target object based on the positional relationship.

[0212] Furthermore, after the steps of determining a target search bounding box containing at least one second target object based on the motion trajectory, and selecting the second target object within the motion trajectory from the target search bounding box as the target object, the method further includes:

[0213] The motion trajectory is sent to the client and displayed on the graphical user interface;

[0214] Based on a preset special effects polling time, it is detected whether each polygonal facet in the motion trajectory has reached its corresponding lifespan;

[0215] If so, update the motion trajectory displayed on the graphical user interface.

[0216] In summary, this method receives control operation data for a first target object sent by the client, and extracts the key points and trajectory width of the first target object based on the control operation data. Trajectory fitting is then performed based on all key points and trajectory widths to obtain the motion trajectory of the first target object, which includes at least one polygonal patch. A target search bounding box is determined based on the motion trajectory, and a target object within the motion trajectory is selected from at least one second target object within the target search bounding box. This method reduces the performance overhead of trajectory generation and target detection logic, solves the problem of generating trajectories and detecting trajectory-target intersection on the server side, thereby improving the user's gaming experience.

[0217] The computer program product of the target detection method and related equipment provided in the embodiments of the present invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the preceding method embodiments. For specific implementation, please refer to the method embodiments, which will not be repeated here.

[0218] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system and apparatus described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0219] Furthermore, in the description of the embodiments of the present invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in the present invention based on the specific circumstances.

[0220] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0221] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0222] Finally, it should be noted that the above embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A target detection method, characterized in that, The target detection method includes: Receive control operation data for the first target object sent by the client, and extract the position key points and trajectory width of the first target object based on the control operation data, wherein the position key points are the position points of the first target object during the movement process when releasing a skill with displacement. The motion trajectory of the first target object is obtained by fitting the trajectory based on the key points and the trajectory width, wherein the motion trajectory includes at least one polygonal patch; the polygonal patch is constructed in the following way: the vertex positions of the polygonal patch are determined based on the long side and the wide side between two adjacent key points; the vertex positions are sequentially combined and sorted, and the area of ​​the closed region corresponding to each vertex position after the combination and sorting is calculated using Green's theorem; the combination and sorting with the largest area is selected as the arrangement order of the vertex positions, and the polygonal patch is constructed based on the arrangement order; Based on the motion trajectory, a target search bounding box containing at least one second target object is determined, and a second target object within the motion trajectory is selected from the target search bounding box as the target object.

2. The target detection method according to claim 1, characterized in that, The step of extracting the location key points and trajectory width of the first target object based on the control operation data includes: According to the preset sampling frequency, the first target object is sampled for position based on the control operation data to obtain key position points; Determine the width of the trajectory generated by the first target object during its movement.

3. The target detection method according to claim 1, characterized in that, The step of fitting the trajectory based on the key points and the trajectory width to obtain the motion trajectory of the first target object includes: Based on the key points of the location and the trajectory width, polygon patches are constructed between the key points of the trajectory using polygon fitting, and the motion trajectory of the first target object is determined based on each polygon patch.

4. The target detection method according to claim 3, characterized in that, The step of constructing polygonal patches between key points of the trajectory using polygon fitting based on the key points of the location and the trajectory width, and determining the motion trajectory of the first target object based on each polygonal patch, includes: Based on the aforementioned key points, calculate the magnitude of the displacement and the corresponding direction of the displacement between two adjacent key points; Based on the displacement magnitude, displacement direction, and trajectory width of two adjacent key points, the irregular trajectory of the first target object is divided into multiple polygonal patches using polygon fitting to obtain the motion trajectory.

5. The target detection method according to claim 4, characterized in that, The step of dividing the irregular trajectory of the first target object into multiple polygonal patches using polygon fitting based on the displacement magnitude, displacement direction, and trajectory width of two adjacent key points to obtain the motion trajectory includes: The long side of the polygonal patch is determined based on the displacement magnitude of two adjacent key points, wherein the long side is parallel to the displacement direction; The width of the polygonal patch is determined based on the trajectory width, wherein the width is bisected by the location key points; Based on the long and wide sides between two adjacent key points, construct the corresponding polygonal patch; The motion trajectory is obtained by optimizing the edges of two adjacent polygonal patches that are located at the same key point.

6. The target detection method according to claim 1, characterized in that, Before the step of fitting the trajectory based on the key points and the trajectory width to obtain the motion trajectory of the first target object, the method further includes: The shape of the motion trajectory of the first target object is determined based on the key location points; Determine whether the trajectory curvature of the key points at the location is greater than a preset value; If so, a patch of the corresponding shape is selected based on the trajectory curvature, and the patch is used for trajectory fitting.

7. The target detection method according to any one of claims 1-6, characterized in that, The step of determining a target search bounding box containing at least one second target object based on the motion trajectory, and selecting a second target object within the motion trajectory from the target search bounding box as the target object, includes: The boundary range of the trajectory is determined based on the vertices of all polygonal patches in the trajectory, and a target search bounding box is constructed based on the boundary range to surround the trajectory, wherein at least one second target object is displayed in the target search bounding box; Based on the target search bounding box, the radius and origin of the trajectory coverage area are calculated, and the radius and origin are input into the filter to search for preliminary filtered targets, wherein the preliminary filtered targets include at least one second target object; Determine whether the preliminary target is located within the motion trajectory to obtain the target object.

8. The target detection method according to claim 7, characterized in that, The step of determining whether the preliminary target is located within the motion trajectory to obtain the target object includes: Calculate the positional relationship between the preliminary screening target and the motion trajectory, and determine the target object based on the positional relationship.

9. The target detection method according to any one of claims 1-6, characterized in that, After the steps of determining a target search bounding box containing at least one second target object based on the motion trajectory, and selecting the second target object within the motion trajectory from the target search bounding box as the target object, the method further includes: The motion trajectory is sent to the client and displayed on the graphical user interface; Based on a preset special effects polling time, it is detected whether each polygonal facet in the motion trajectory has reached its corresponding lifespan; If so, update the motion trajectory displayed on the graphical user interface.

10. A target detection device, characterized in that, The target detection device includes: The extraction module is used to receive control operation data for the first target object sent by the client, and extract the position key points and trajectory width of the first target object based on the control operation data, wherein the position key points are the position points of the first target object during the movement process when the skill with displacement is released. A trajectory fitting module is used to fit a trajectory based on the key points and the trajectory width to obtain the motion trajectory of the first target object, wherein the motion trajectory includes at least one polygonal patch; the polygonal patch is constructed in the following way: determining the vertex positions of the polygonal patch based on the long side and the wide side between two adjacent key points; sequentially combining and sorting the vertex positions, and calculating the area of ​​the closed region corresponding to each vertex position after the combination and sorting using Green's theorem; selecting the combination with the largest area as the arrangement order of the vertex positions, and constructing the polygonal patch based on the arrangement order; The detection module is used to determine a target search bounding box containing at least one second target object based on the motion trajectory, and to select the second target object within the motion trajectory from the target search bounding box as the target object.

11. A server, characterized in that, It includes a processor and a memory, the memory storing machine-executable instructions that can be executed by the processor, the processor executing the machine-executable instructions to implement the target detection method according to any one of claims 1-9.

12. A machine-readable storage medium, characterized in that, The machine-readable storage medium stores machine-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the target detection method according to any one of claims 1-9.

Citation Information

Patent Citations

  • Grid and bounding box-based collision detection method

    CN112669434A