Motion control method, device, electronic device and machine-readable storage medium

By establishing a target wrapping model and using smooth algorithm processing, the problem of low accuracy of motion control for irregular object observation in the existing technology is solved, and high-precision motion control and user experience improvement are achieved.

CN113082716BActive Publication Date: 2024-10-18NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110408602.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-15
Publication Date
2024-10-18
Estimated Expiration
2041-04-15

AI Technical Summary

Technical Problem

Existing motion control methods are prone to cross-mode phenomena when observing irregular objects, resulting in low motion control accuracy and inability to achieve close and accurate observation of the observed objects.

Method used

By establishing a target wrapping model based on the shape of the observed object, the motion trajectory is constrained, and the smoothing algorithm is used to process the initial wrapping model to obtain the target wrapping model, ensuring the coherence and accuracy of the motion trajectory and avoiding the phenomenon of mold penetration.

Benefits of technology

It improves the accuracy and effect of motion control, enhances the constraint control of moving objects, improves user experience, and enables high-precision observation of irregular objects while avoiding mold wear.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113082716B_ABST
    Figure CN113082716B_ABST
Patent Text Reader

Abstract

The present invention provides a motion control method, device, electronic device and machine-readable storage medium, which relate to the field of motion control technology. The method includes responding to a control instruction for controlling a first object to perform a target motion on a second object, determining a target wrapping model of the second object, the target wrapping model surrounds the second object, and the target wrapping model is a wrapping model pre-established according to the shape of the second object; based on the target wrapping model of the second object, constraining the motion trajectory of the first object when performing the target motion. The present invention improves the accuracy and effect of motion control while avoiding the phenomenon of penetrating the model, and further improves the user experience when constraining the motion object.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of motion control technology, and in particular to a motion control method, device, electronic device and machine-readable storage medium. Background Art

[0002] At present, when observing an object in motion, it is usually necessary to perform a circumferential observation around a certain anchor point of the observed object. The radius distance (a fixed value) from the observed object to the anchor point is determined, and the motion trajectory of the observed object is determined based on the fixed radius distance, so as to perform motion observation along the motion trajectory.

[0003] For irregular objects, such as some with prominent shapes (e.g., a cross-sea bridge), in order to prevent the object being observed from entering the interior of the object during observation, such as the camera in a game scene entering the interior of the object (i.e., the penetration phenomenon), it is usually necessary to determine the motion trajectory based on the maximum radius greater than the fixed radius distance. Therefore, during the observation process, the object being observed needs to be kept at a constant distance from the observed object. However, this method will make it impossible to observe the observed object at close range and more accurately from all angles, resulting in low accuracy of motion control during motion observation and poor motion control effect. Summary of the invention

[0004] The object of the present invention is to provide a motion control method, device, electronic device and machine-readable storage medium, which improve the accuracy and effect of motion control while avoiding the penetration phenomenon, and further improve the user experience when constraining the moving object.

[0005] In a first aspect, the present invention provides a motion control method, comprising: in response to a control instruction for controlling a first object to perform a target motion with respect to a second object, determining a target wrapping model of the second object, the wrapping model surrounding the second object, the wrapping model being a wrapping model pre-established according to the shape of the second object; based on the target wrapping model of the second object, constraining the motion trajectory of the first object when performing the target motion.

[0006] In an optional embodiment, the method further includes: determining an initial wrapping model having the same shape as the second object based on the shape of the second object; smoothing the initial wrapping model based on a predetermined model smoothing algorithm to obtain a target wrapping model; the model smoothing algorithm includes a meta ball operation.

[0007] In an optional embodiment, based on the shape of the second object, the step of determining an initial wrapping model having the same shape as the second object includes: calculating a first distance between a geometric center point of the second object and each first surface of the second object; and determining the initial wrapping model based on the first distance and a first preset coefficient.

[0008] In an optional embodiment, the step of determining the initial wrapping model based on the first distance and the first preset coefficient includes: determining the second distance based on the first distance and the first preset coefficient; and determining the second surface of the initial wrapping model based on the second distance.

[0009] In an optional embodiment, the first object is a virtual camera or a virtual aircraft, and the second object is a virtual object; or, the first object is a physical aircraft, and the second object is a physical object; the physical aircraft controls a flight trajectory based on a three-dimensional map, and the three-dimensional map includes a target package model of the second object.

[0010] In an optional implementation, the second object corresponds to at least one candidate wrapping model, and different candidate wrapping models surround the second object to different degrees.

[0011] In an optional embodiment, there is a correspondence between at least one alternative wrapping model and a motion type, and the correspondence is determined based on the degree of envelopment required for different motion types; determining the target wrapping model of the second object includes: based on the correspondence between at least one alternative wrapping model and the motion type, determining the target wrapping model corresponding to the motion type to which the target motion belongs in the at least one alternative wrapping model.

[0012] In an optional embodiment, the method further includes: determining at least one optional motion type of the second object based on the position attribute of the second object; and establishing at least one wrapping model of the second object based on the requirement of the at least one optional motion type on the degree of envelopment.

[0013] In an optional embodiment, based on the target wrapping model of the second object, constraining the motion trajectory of the first object when performing the target motion includes: repeatedly executing the following steps until it is determined that the target motion of the first object is terminated: based on the current position of the first object and a preset step size, randomly determining a next position on the target wrapping model of the second object; and controlling the first object to move to the next position.

[0014] In an optional embodiment, based on the target wrapping model of the second object, constraining the motion trajectory of the first object when performing the target motion includes: repeatedly executing the following steps until it is determined that the target motion of the first object is terminated: determining a next position on the target wrapping model of the second object; interpolating between the current position and the next position of the first object on the target wrapping model of the second object according to a preset step size to obtain a control point set, the control point set including the interpolation and the next position; and controlling the first object to move based on the control point set.

[0015] In an optional embodiment, the step of constraining the motion trajectory of the first object when performing the target motion based on the target wrapping model of the second object further includes: determining a second preset coefficient according to a field of view requirement input by a user; and constraining the motion trajectory of the first object when performing the target motion based on the second preset coefficient and the target wrapping model of the second object.

[0016] In an optional implementation, the method further includes: monitoring the motion trajectory; and sending a warning signal to the first object when it is detected that the motion trajectory distance deviates from a preset distance threshold.

[0017] In a second aspect, the present invention provides a motion control device, comprising: a wrapping model determination module, for determining a target wrapping model of the second object in response to a control instruction for controlling a first object to perform a target motion with respect to a second object, the target wrapping model surrounding the second object, the target wrapping model being a wrapping model pre-established according to the shape of the second object; and a motion control module, for constraining a motion trajectory of the first object when performing the target motion based on the target wrapping model of the second object.

[0018] In a third aspect, the present invention provides an electronic device, 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 motion control method of any one of the aforementioned embodiments.

[0019] In a fourth aspect, the present invention provides a machine-readable storage medium storing machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the motion control method of any one of the aforementioned implementations.

[0020] The motion control method, device, electronic device and machine-readable storage medium provided by the present invention, the motion control method first determines the target wrapping model of the second object by responding to the control instruction of controlling the first object to perform target motion with respect to the second object, wherein the target wrapping model surrounds the second object, and the target wrapping model is a wrapping model pre-established according to the shape of the second object. Then, based on the target wrapping model of the second object, the motion trajectory of the first object when performing the target motion is constrained. The above method performs constraint control of the first object when performing the target motion through the determined target wrapping model. Compared with the method of directly determining a fixed observation distance according to the radius distance between the lens and the anchor point in the prior art, it can better fit the shape of the second object itself when the first object performs the target motion, so that the second object can be observed more accurately through a non-fixed observation distance, while avoiding the penetration phenomenon, improving the accuracy and effect of motion control, and further improving the user experience when constraining the moving object. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0022] Figure 1 A flow chart of a motion control method provided by an embodiment of the present invention is shown;

[0023] Figure 2 A schematic diagram of a circling motion provided by an embodiment of the present invention is shown;

[0024] Figure 3 A schematic diagram of a parallel motion provided by an embodiment of the present invention is shown;

[0025] Figure 4 A schematic diagram of motion control of a dynamic motion distance provided by an embodiment of the present invention is shown;

[0026] Figure 5 A schematic structural diagram of a motion control device provided by an embodiment of the present invention is shown;

[0027] Figure 6 A schematic structural diagram of an electronic device provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0028] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.

[0029] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0030] Considering that currently when observing the motion of objects, such as observing real objects (such as large buildings, scenes, etc.) in real scenes through the motion control of drones, or observing game terrain or characters in virtual scenes (such as game scenes) through the motion control of the camera, it is usually necessary for the drone or the camera in the game to perform surround observation around a certain anchor point of the observed object.

[0031] For example, in a game scene, the radius distance R from the camera to the anchor point is usually equal to a fixed value, and the radius distance R needs to be greater than the maximum radius of the object to prevent the camera from entering the object during observation (commonly known as penetration). Therefore, when observing some objects with prominent shapes (such as a cross-sea bridge), the camera needs to be kept at a constant distance. However, the camera controlled in this way will have a low accuracy problem for objects that need to be observed at close range, thus affecting the observation effect.

[0032] To improve the above problems, the embodiments of the present invention provide a motion control method, device, electronic device and machine-readable storage medium, which improve the accuracy and effect of observation and the user experience during observation. The embodiments of the present invention are described in detail below.

[0033] First, the embodiment of the present invention provides a motion control method, which can be executed by a gaming device, such as a mobile phone, a tablet computer, a PC, a game console, or any other electronic device that can run games. The method can also be executed by an electronic device such as a drone for observing motion objects. Figure 1 The flowchart of a motion control method shown in FIG. 1 mainly includes the following steps S102 to S106:

[0034] Step S102 , in response to a control instruction for controlling the first object to perform a target movement with respect to the second object, a target wrapping model of the second object is determined.

[0035] In actual applications, the control instruction can be triggered according to user needs. In specific implementation, the control instruction can be triggered by sliding operations, dragging operations, etc., or by clicking on a specific control.

[0036] The first object can be a virtual object, such as a lens (or camera) used to observe the game scene in the game, and the second object is an object in the game scene, such as a moving character, props, building, plant, etc. The first object can also be a physical object, such as a motion observation device such as a drone, and the second object is an object to be observed by the physical object, such as a shopping mall, square, mountain, cross-sea bridge, etc. in reality.

[0037] The above-mentioned target motion is the motion form adopted by the first object when observing the second object. It can be understood that for different second objects, the motion forms adopted may be different. For example, for a mountain range in a physical object, the first object observes it from the surface above the mountain range, while for a cross-sea bridge, it can be observed by shuttling between bridges, that is, it can be observed by the first object performing parallel motion; and when the second object is an object such as a sphere, the first object can adopt an orbiting motion (similar to the motion form of a satellite orbiting a planet); for some irregular second objects, both parallel motion and orbiting motion may be required when observing. Therefore, in specific implementation, the above-mentioned target motion may include parallel motion and / or orbiting motion.

[0038] The target wrapping model surrounds the second object. In one embodiment, the second object may be entirely within the target wrapping model, that is, the target wrapping model completely wraps the second object, such as the target wrapping model wraps the second object inside the model in a closed manner. In another embodiment, the second object may also be partially within the target wrapping model, that is, the target wrapping model wraps a designated portion of the second object. For example, when the second object is a mountain range, the target wrapping model can meet the observation requirements by wrapping the upper surface of the mountain range, so the target wrapping model only needs to wrap the upper surface of the mountain range. The designated portion may also be the lower surface, left surface, right surface or other surface of the second object, which may be set according to actual needs.

[0039] In order to improve the user's observation experience and observation accuracy, the above-mentioned target wrapping model is a wrapping model pre-established according to the shape of the second object. In one embodiment, the pre-established wrapping model can be a smooth model obtained by performing smoothing after generating a model based on the shape of the observed object.

[0040] Step S104: constraining a motion trajectory of the first object when performing target motion based on the target wrapping model of the second object.

[0041] It can be understood that since the target wrapping model has a corresponding relationship with the characteristics of the second object (such as shape), the determined target wrapping model can play the role of a constraint between the first object (the object performing the observation) and the second object (the object being observed). After the target wrapping model of the second object is determined, when the first object performs random motion with respect to the second object, the position of the first object can be constrained based on the determined target wrapping model to prevent the first object from penetrating the model. For example, when the first object performs a target motion with respect to the second object in a random manner, the first object can be constrained and controlled by multiple non-fixed distances between the target wrapping model and the first object, and further, the motion trajectory constraining the first object to perform the target motion can be obtained after the target motion.

[0042] Since the shape of the second object can be a regular shape or an irregular shape, the target motion can accordingly include a variety of motion forms. For example, when the first object needs to conduct an all-round observation of the second object, that is, when the above control instruction instructs the first object to conduct an all-round observation of the second object, the target motion is a circling motion at this time; or, when the first object needs to conduct a bird's-eye view observation of the second object, that is, when the above control instruction instructs the first object to conduct a bird's-eye view observation of the second object, the target motion is a circling motion at this time; or, when the second object is an irregular shape, when the first object observes the second object, the target motion can include both circling motion and parallel motion. In specific implementation, the corresponding target motion form can be selected according to actual needs and the instructions of the control instruction.

[0043] The motion control method provided by the embodiment of the present invention performs constraint control of the first object when performing target motion through a determined target wrapping model. Compared with the method of directly determining a fixed observation distance according to the radius distance between the lens and the anchor point in the prior art, it can better fit the shape of the second object itself when the first object performs target motion, so that the second object can be observed more accurately through a non-fixed observation distance, while avoiding the penetration phenomenon, improving the accuracy and effect of motion control, and further improving the user experience when constraining the moving object.

[0044] In order to ensure the accuracy of motion control, before performing motion control, it is first necessary to establish the target encapsulation model of the second object mentioned above. For the second object, different scenes have different object properties. For example, when the first object is a virtual object, the second object is the first observation object of the virtual object, and when the first object is a physical object, the second object is the second observation object of the physical object. The first object and the second object are determined correspondingly for the scene, wherein the first object in the same scene is the object to be motion controlled, and the second object is the observed object. In one embodiment, the target encapsulation model of the second object can be established based on the shape of the second object (that is, the observed object). In the specific implementation, the following steps 1 and 2 can be used to perform.

[0045] Step 1, based on the shape of the second object, determine an initial wrapping model that is the same as the shape of the second object. The shape of the second object may be a regular object shape or an irregular object shape, and the initial wrapping model may be a model that completely wraps the second object or a model that wraps a specified portion of the second object. For example, in a game scene, when the second object is a character in the game, the initial wrapping model may be a virtual wrapping model that is the same shape as the character; in a real scene, when the second object is a mountain range, the initial wrapping model only needs to be the same as the upper surface shape of the mountain range to ensure that the initial wrapping model is the same shape as the second object. When specifically determining the initial wrapping model, whether to wrap the entire object or a portion of the object can be specifically selected based on the shape of the second object (i.e., the observed object).

[0046] In one implementation, when determining the initial wrapping model having the same shape as the second object based on the shape of the second object, the following steps 1.1 and 1.2 may be performed:

[0047] Step 1.1, calculate the first distance between the geometric center point of the second object and each first surface of the second object. Since the shape of the second object may be regular or irregular, the distance between the geometric center point of the second object and the surfaces at different positions of the second object may not be a constant value. In a specific implementation, the surface of the second object can be first divided to obtain multiple first surfaces. It can be understood that when dividing, for the same first surface, the distance from any point on the surface to the geometric center point can be the same value or different values, which can be determined based on factors such as the actual amount of calculation for the division, and is not specifically limited here.

[0048] Step 1.2, determining the initial package model based on the first distance and the first preset coefficient. In one embodiment, the first preset coefficient can be understood as the proportional relationship between the second object and the package model, and the coefficient can be a value greater than or equal to 1. In addition, in order to meet different observation needs of users, such as when observing the same observed object, there may be a position that requires close observation, and some positions only require long-distance observation. Therefore, when determining the first preset coefficient, for the same second object, the first preset coefficient can be a variable coefficient.

[0049] The target model is a model with a corresponding proportional relationship with the second object, and the corresponding proportion can be determined by the above-mentioned first preset coefficient. In a specific implementation, in order to ensure that the initial package model and the second object have the same shape and avoid the phenomenon of mold penetration, the second distance can be determined based on the first distance and the first preset coefficient, and then the second surface of the initial package model is determined based on the second distance. For example, after determining the first distance, an extended line segment can be drawn outward from the geometric center point of the second object, and the extended line segment can be extended outward in a radial shape. The length of the extended line segment is also the second distance. In one embodiment, the second distance can be expressed by the following formula:

[0050] R2=R1+N / R1(1)

[0051] Among them, R2 is the second distance; R1 is the first distance, R1>0; N is the first preset coefficient, N>0.

[0052] After the second distance is calculated, the line segment extending outward can be intercepted according to the value of the second distance to meet the calculated second distance. After interception, for each second distance, another endpoint other than the center point of the set of second objects will be obtained. For the other endpoint obtained (hereinafter referred to as endpoint K), the following two methods can be used to determine the initial wrapping model:

[0053] (1) When the number of endpoints K is infinite, that is, when the number of extension lines radiating outward from the geometric center point of the second object is infinite, the model surface can be determined by connecting all the endpoints K. The model surface is also the second surface of the initial wrapping model mentioned above.

[0054] (2) When the number of endpoints K is finite, that is, when the number of extension lines radiating outward from the center point of the set of second objects is finite, a plurality of smaller surface areas can be firstly connected through the finite number of endpoints K, and then a final model surface is obtained by connecting the plurality of smaller surface areas, that is, the second surface of the above-mentioned initial wrapping model.

[0055] The above two methods for determining the second surface of the initial wrapping model can be selected according to actual needs and will not be described in detail here.

[0056] Step 2: Smoothing the initial package model based on a predetermined model smoothing algorithm to obtain a target package model.

[0057] Since the initial wrapping model obtained above is determined by linking an infinite number of endpoints or multiple surface areas, the initial wrapping model is an irregular model with multiple edges. In order to ensure the continuity of the motion trajectory when constraining the first object to perform the target motion, it is necessary to perform smoothing on the initial wrapping model determined above. The predetermined model smoothing algorithm includes a meta ball operation, such as the meta ball operation in CINEMA 4D (C4D), or other smoothing algorithms, which are not specifically limited here.

[0058] The first object and the second object of this embodiment can be applied to different scenes at the same time, such as virtual scenes and real scenes, so as to meet the motion control of objects in different scenes and improve the universality of the motion control method. In one embodiment, when in a virtual scene, the first object is a virtual camera or a virtual aircraft, and the second object is a virtual object. For example, when the virtual scene is a game scene, the first object can be a virtual camera used for perspective observation in the game scene, and the second object is the observed object corresponding to the perspective of the virtual camera observation, such as a game character, a game scene, etc.; or, the first object is a virtual aircraft moving in the game scene, and the second object is a virtual object around which the virtual aircraft flies. In another embodiment, when in a real scene, the first object can be a physical aircraft, and the corresponding second object is a physical object around which the physical aircraft flies, and the physical aircraft can control the flight trajectory based on a three-dimensional map, and the three-dimensional map includes a target package model of the second object, that is, the three-dimensional map can be determined by the above-mentioned method of determining the target package model, which will not be repeated here.

[0059] It is understandable that each surface of the second object can be displayed to the first object, or part of the surface can be displayed to the first object. Therefore, in order to improve the adaptability of the wrapping model to the second object, the second object corresponds to at least one alternative wrapping model, and different alternative wrapping models have different degrees of encirclement of the second object. For example, the alternative wrapping model can half-encircle or fully encircle the second object, where half-encirclement can also be divided into 90-degree encirclement, 180-degree encirclement, upper half encirclement, left half encirclement, etc. Through the different encirclement methods of the alternative wrapping model, the first object can be more specifically targeted and universal on the basis of the second object when constraining the first object to perform target movement based on the wrapping model, thereby improving the accuracy of the first object performing target movement on the second object.

[0060] In a specific implementation, the at least one alternative wrapping model corresponds to the motion type, and the corresponding relationship is determined based on the degree of envelopment required for different motion types. For example, one motion type can correspond to one alternative wrapping model, such as for a surrounding motion, the alternative wrapping model can completely envelop the second object; or one motion type can correspond to multiple wrapping models, such as for a non-surrounding motion, the degree of envelopment corresponding to the alternative wrapping model and the second object can be more than 180 degrees. In practical applications, when the degree of envelopment between the second object and the alternative wrapping model is more than 180 degrees, the first object can adopt parallel motion, such as the first object is a real drone in a real scene, and the second object is a mountain range that the drone flies over. The alternative wrapping model can wrap the upper surface of the mountain range, that is, wrap it 180 degrees downward. At this time, the real drone can be controlled to adopt a parallel motion method to move against the mountain range. Therefore, by having a corresponding relationship between at least one alternative wrapping model and the motion type, the target wrapping model corresponding to the motion type to which the target motion belongs is determined in at least one alternative wrapping model, so that the target wrapping model can correspond to the motion type, thereby improving the accuracy of the first object when it moves.

[0061] In order to ensure that the obtained target wrapping model can adapt to the second object of different shapes, the above target wrapping model surrounds the second object, that is, the target wrapping model can include the second object in the wrapping model by wrapping a specified part of the second object; or, the second object can be included in the wrapping model by wrapping the complete second object. That is, different model wrapping methods can be used for the second object in different scenes. For ease of understanding, you can refer to the following two examples of different scenes:

[0062] 1. In a virtual scene (such as a game scene), the first object is a camera (also called a lens) in the game scene. According to different relationships between the target wrapping model and the second object (i.e., wrapped in the model and partially wrapped in the model), the following two examples of the second object are provided:

[0063] 1) When the second object is a character in the game scene, the character can be observed from various angles by controlling the movement of the lens. The target wrapping object can be a target wrapping model that is the same shape as the character and is smoothed by using the above-mentioned method of establishing a target wrapping model. The target wrapping model completely wraps the character in the game scene. After receiving the control command, the lens can be controlled to move to the corresponding position according to the direction or angle to be observed carried in the control command.

[0064] Further, when the target enveloping model completely envelops the second object (the game character in this example), the motion control of the lens may be in the form of a surround motion.

[0065] 2) When the second object is a fixed building in the game scene, such as a mountain, the surface of the mountain can be observed by the movement of the camera, so the target wrapping model can be a model that has the same shape as the surface of the mountain and only wraps the surface of the mountain. At this time, after receiving the control command, the camera can be controlled to move to the corresponding position above the mountain.

[0066] Further, when the target wrapping model is to partially wrap the second object (a mountain in this example), the motion control of the lens may be in the form of parallel motion.

[0067] 2. In the real scene, the first object is a drone in the real scene. According to the different relationships between the target package model and the second object (i.e., wrapped in the model and partially wrapped in the model), the following two examples of the second object are provided:

[0068] 1) When the second object is an object in a real scene (such as a cross-sea bridge), the cross-sea bridge can be observed from various angles by controlling the movement of the drone. The target package object can be a target package model with the same shape as the cross-sea bridge and smoothed by the above-mentioned method of establishing the target package model. The target package model completely wraps the cross-sea bridge. After receiving the control command, the drone can be controlled to perform a circumferential movement at the corresponding position by the direction or angle to be observed carried in the control command.

[0069] 2) When the second object is a building in a certain community in the real scene, the outer surface of the community building can be observed by controlling the movement of the drone. The target wrapping object can be a target wrapping model with the same shape as the community building and smoothed. The target wrapping model wraps the outer surface of the community building. After receiving the control command, the drone can be controlled to move parallel to the corresponding position of the community building for observation.

[0070] By setting the above-mentioned target wrapping model and the second object, either full wrapping or partial wrapping can be used, and corresponding models can be established for different motion control methods. This can make the model establishment more targeted, and then when observing the motion control, it can be more in line with the observation standard of the second object, thereby improving the accuracy of the observation.

[0071] For the above different scenarios, the control instructions can also be adaptively matched accordingly, and the control instructions at least include a sliding control instruction, a dragging control instruction or a control instruction of clicking a preset control.

[0072] In one embodiment, when in a game scene, the control instructions may include sliding control instructions or dragging control instructions. For example, when observing a game character at any angle, the control instruction may be triggered by sliding or dragging the game character, and then the camera in the game scene may be controlled to move according to the control instruction.

[0073] In another embodiment, when in a display scene, the control instruction may be triggered by clicking a preset control, such as when a fighter needs to fly over a mountain for reconnaissance, the control instruction may be triggered by triggering a corresponding space so that the fighter performs corresponding movements according to the control instruction.

[0074] Through the above description, it can be understood that the motion type of the target motion may include circumferential motion and parallel motion. In one embodiment, at least one optional motion type of the second object can be determined based on the position attribute of the second object. The position attribute of the second object includes a suspended position and a landing position. For example, in a game scene, the position of the second object can be similar to the position of a game character relative to the game scene, or it can be similar to the position of a mountain relative to the game scene. The optional motion type can be circumferential motion, it can be parallel motion, and it can also include both circumferential motion and parallel motion. In the above manner, the motion type of the first object can be determined according to the position attribute of the second object, so as to establish at least one wrapping model of the second object based on the requirements of at least one optional motion type for the degree of encirclement. Since different degrees of encirclement correspond to different types of motion, the wrapping model established by the requirements of the motion type for the degree of encirclement can be more in line with the real form of the second object, thereby improving the accuracy of the first object in performing target motion for the second object.

[0075] It is understandable that the shape of the second object can be any shape, such as a regular shape and a special shape. Therefore, in one embodiment, after determining the requirements of the optional motion type for the degree of envelopment, when establishing at least one enveloping model of the second object, the target enveloping model can also be determined by the optional motion type and the shape of the second object. Since the shape of the second object and the requirements of the motion type for the degree of envelopment are comprehensively considered, the determined target enveloping model can be more suitable for the second object, thereby improving the accuracy of the motion control of the first object.

[0076] After determining the target wrapping model, the motion trajectory of the first object when performing the target motion can be constrained based on the target wrapping model of the second object. In order to prevent the first object (such as a lens) from penetrating the model when randomly moving, the motion trajectory of the first object when performing the target motion can be constrained in the following manner. For ease of understanding, the following two examples are used for illustration. In actual applications, adjustments can also be made according to actual needs, and no specific limitations are given here:

[0077] In one implementation, the next position may be randomly determined on the target package model of the second object based on the current position of the first object and a preset step size, and then the first object may be controlled to move to the next position.

[0078] The preset step length may be the distance between two points on the target package model, or may be the movement distance of the first object in a specified time period (such as 1 second, 2 seconds, etc.).

[0079] In the above random determination of the next position on the target package of the second object, in a specific implementation, after determining the current position and the preset step length of the first object, multiple positions on the target package model with the preset step length away from the current position can be determined based on the current position of the first object, and then the first object can be controlled to move to the next position. The above steps are repeated until it is determined that the first object is terminated from performing the target movement.

[0080] For ease of understanding, multiple positions on the target package model that are a preset step away from the current position can be positions that are a preset step away from the current position in different directions of the target package model based on the first object, and one position can be randomly selected from the multiple positions as the next position of the second object when performing the target movement.

[0081] In another embodiment, the next position can be first determined on the target package model of the second object, and then interpolation is performed on the target package model of the second object between the current position and the next position of the first object according to a preset step length to obtain a control point set, the control point set including the interpolation and the next position, and the first object is controlled to move based on the control point set. The above steps are repeatedly performed until it is determined that the first object is terminated from performing the target movement.

[0082] The next position determined in this method can be a randomly determined position in the second target wrapping model, or a specified position. In practical applications, it can be set according to actual needs. For example, when the distance between the current position and the next position of the first object is far, direct motion control may cause the first object to deviate or penetrate the model. Therefore, the first object is moved one by one through the points in the control point concentration until it reaches the next position.

[0083] For ease of understanding, this embodiment provides examples of motion trajectories under two target motion modes. In practical applications, adaptive adjustments can be made according to actual needs, which are not specifically limited here.

[0084] When the target motion is a circular motion, the form of the above motion trajectory can be seen in Figure 2 The dotted line with an arrow in the middle is for ease of understanding. This form of motion can be similar to the form of motion of a satellite orbiting a planet. The above-mentioned target package model based on the second object can be used to constrain the motion trajectory of the first object when performing the target motion. The constraint control can be performed by determining the geometric center point of the second object, the current position of the first object, and the target package model. There is a first connecting line between the geometric center point of the second object and the second object. The first connecting line will pass through the target package model, so the first intersection point of the first connecting line and the target package model will be obtained (that is, the current position of the first object located on the target package model when the motion trajectory is determined above). The first straight-line distance can be determined by the geometric center point of the second object and the first intersection point, so that when the first object performs random motion, it complies with the first straight-line distance as a constraint to prevent the occurrence of the mold penetration phenomenon. It can be understood that the random motion here refers to the motion of the next position of the first object as a random position when the motion form of the target motion is adopted.

[0085] When the above target motion is parallel motion, the motion trajectory can be seen from Figure 3 As shown by the dashed line with an arrow, the first object (such as a lens) is along Figure 3 The outer contour of the irregular shape shown is moved. For ease of understanding, the movement form can be a movement form similar to that of a fighter jet flying over a mountain range. At this time, when constraining the movement trajectory of the first object when performing the target movement based on the target package model of the second object, the constraint can be performed by determining the surface point of the second object, the current position of the first object, and the target package model. There is a second line between the surface point of the second object and the current position of the first object, the target package model is located on the second line between the surface point and the first object, and there is a second intersection between the second line and the target package model (that is, the current position of the first object located on the target package model when the movement trajectory is determined above). The second straight-line distance can be determined based on the geometric center point of the second object and the second intersection, so that the second object can be constrained according to the determined multiple second straight-line distances.

[0086] It can be understood that the above-mentioned first straight-line distance and second straight-line distance are the constraint distances for circumferential motion and parallel motion respectively. Since the target wrapping model is determined based on the second object, when the shape of the second object is irregular and when the first object is moving, the lengths of multiple constraint distances are non-fixed.

[0087] Since the first intersection point of the above-mentioned circumferential motion is determined by taking the geometric center point of the second object as a reference, and the second intersection point of the parallel motion is determined by taking the surface point of the second object as a reference, it can be more suitable for determining the constraint distance corresponding to each type of motion, making the determination of the constraint distance more targeted. For the above-mentioned circumferential motion and parallel motion, the first object and the second object can be objects in the display scene or objects in the virtual scene, which will not be described in detail here.

[0088] In one embodiment, in order to enhance the user's observation experience and enhance the variability of motion control, the field of view of observation can be adjusted according to the user's observation needs during actual observation, that is, the distance between the first object and the second object can be adjusted. For example, in a specific implementation, the second preset coefficient can be determined according to the field of view requirements input by the user. The field of view requirements can be triggered by the user's dragging operation, sliding operation, zooming operation, or clicking the corresponding control, and then the second preset coefficient is determined according to the field of view requirements, which can also be understood as the field of view zoom coefficient. And further based on the second preset coefficient and the target package model of the second object, the motion trajectory of the first object when performing the target motion is constrained, such as the target package model can be used to determine the constrained distance of the first object relative to the second object for non-constant distance motion, the constrained distance is also the non-constant first straight line distance or the second straight line distance mentioned above, the determination method is the same as above, and will not be repeated here.

[0089] For ease of understanding, Figure 4 A schematic diagram of motion control of a dynamic motion distance is shown. At this time, the first object is a lens. Since the second object itself is not always a regular sphere, the above-determined constraint distance is a non-constant value when the motion control of the lens is performed. Since the pre-established package model is a smooth model, the lens can adjust the constraint distance accordingly according to the non-fixed R value during the motion control of the lens, so that the observation of an irregular observed object can be performed at an adaptive distance, thereby improving the accuracy of the observation.

[0090] In actual application, when the drone is controlled to move according to the motion trajectory determined above, in order to prevent yaw in the motion control of the drone, such as when the second preset coefficient is readjusted, the drone may yaw or even hit an obstacle, the motion trajectory during motion control can also be monitored. When it is detected that the motion trajectory distance deviates from the preset distance threshold, a warning signal is sent to the first object, and the drone is controlled to calculate the dangerous range of the route and automatically avoid it, thereby ensuring that the drone can be monitored in real time and perform intelligent flight obstacle avoidance on the premise that the motion route has been set.

[0091] To sum up, the aforementioned motion control method provided by this embodiment can not only meet the observation and control needs of virtual scenes, but also improve the observation accuracy of virtual scenes while preventing penetration; it can also meet the observation, reconnaissance and other needs of real scenes, and in real scenes, while ensuring accurate observation, it can improve the safety of observation, and comprehensively consider the observation accuracy, observation effect and user experience of actual motion control.

[0092] For the aforementioned method embodiment, the present invention provides a motion control device, such as Figure 5 As shown, the device comprises:

[0093] A wrapping model determination module 502 is used to determine a target wrapping model of the second object in response to a control instruction for controlling the first object to perform a target motion with respect to the second object, wherein the target wrapping model surrounds the second object and is a pre-established smooth model;

[0094] The motion control module 504 is used to constrain the motion trajectory of the first object when performing the target motion based on the target wrapping model of the second object.

[0095] The above-mentioned motion control device provided by the embodiment of the present invention responds to the control instruction of controlling the first object to perform target motion with respect to the second object through the wrapping model determination module, and then constrains the motion trajectory of the first object when performing the target motion based on the target wrapping model of the second object through the motion control module. The device performs constraint control of the first object when performing the target motion through the determined target wrapping model. Compared with the method of directly determining a fixed observation distance according to the radius distance between the lens and the anchor point in the prior art, it can better fit the shape of the second object itself when the first object performs the target motion, so that the second object can be observed more accurately through a non-fixed observation distance, while avoiding the penetration phenomenon, improving the accuracy and effect of motion control, and further improving the user experience when constraining the moving object.

[0096] In some embodiments, the above-mentioned device also includes: a model building module, the model building module is used to: determine an initial wrapping model with the same shape as the second object based on the shape of the second object; smooth the initial wrapping model based on a predetermined model smoothing algorithm to obtain a target wrapping model; the model smoothing algorithm includes a meta ball operation.

[0097] In some embodiments, the model building module is further used to: calculate a first distance between a geometric center point of the second object and each first surface of the second object; and determine an initial wrapping model based on the first distance and a first preset coefficient.

[0098] In some embodiments, the model building module is further used to: determine a second distance based on the first distance and a first preset coefficient; and determine a second surface of the initial wrapping model based on the second distance.

[0099] In some embodiments, the first object is a virtual object, and the second object is a first observation object of the virtual object; or, the first object is a physical object, and the second object is a second observation object of the physical object.

[0100] In some embodiments, the target wrapping model includes the second object in the wrapping model by wrapping a designated portion of the second object; or includes the second object in the wrapping model by wrapping the entire second object.

[0101] In some implementations, the control instruction includes at least a sliding control instruction, a dragging control instruction, or a control instruction for clicking a preset control.

[0102] In some embodiments, the motion control module 504 is further used to: constrain the motion trajectory of the first object when performing target motion based on the target package model of the second object, including: repeatedly executing the following steps until it is determined that the target motion of the first object is terminated: based on the current position of the first object and a preset step size, randomly determining the next position on the target package model of the second object; and controlling the first object to move to the next position.

[0103] In some embodiments, the motion control module 504 is further used to: constrain the motion trajectory of the first object when performing target motion based on the target package model of the second object, including: repeatedly executing the following steps until it is determined that the first object is to terminate the target motion: determining a next position on the target package model of the second object; interpolating between the current position and the next position of the first object on the target package model of the second object according to a preset step size to obtain a control point set, the control point set including the interpolation and the next position; and controlling the first object to move based on the control point set.

[0104] In some embodiments, the motion control module 504 is further used to: determine a second preset coefficient according to a field of view requirement input by a user; and constrain a motion trajectory of the first object when performing target motion based on the second preset coefficient and a target wrapping model of the second object.

[0105] In some embodiments, the above-mentioned device further includes: a monitoring and early warning module; the monitoring and early warning module is used to: monitor the motion trajectory; when it is detected that the motion trajectory distance deviates from a preset distance threshold, send a warning signal to the first object.

[0106] The implementation principle and technical effects of the device provided in this embodiment are the same as those of the aforementioned embodiments. For the sake of brief description, for matters not mentioned in the device embodiment, reference may be made to the corresponding contents in the aforementioned method embodiment.

[0107] See also Figure 6 The electronic device 100 includes a memory 60 and a processor 61; the memory 60 is a machine-readable storage medium for storing one or more computer instructions, and the one or more computer instructions are executed by the processor to implement the steps of the above motion control method. Mobile terminals, wearable devices, and other proprietary gaming devices and servers can all refer to the following. Figure 6 The electronic device shown implements or has a Figure 6 The electronic device shown may have more or fewer components, which is not intended to be limiting.

[0108] further, Figure 6 The electronic device shown further includes a bus 62 and a communication interface 63 , and the processor 61 , the communication interface 63 and the memory 60 are connected via the bus 62 .

[0109] The memory 60 may include a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 63 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used. The bus 62 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0110] The processor 61 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 61. The above processor 61 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can 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 gates or transistor logic devices, discrete hardware components. The various methods, steps and logic block diagrams of the invention in the embodiment of the present invention can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method invented in combination with the embodiment of the present invention can be directly embodied as a hardware decoding processor to be executed, or a combination of hardware and software modules in the decoding processor can be executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 60, and the processor 61 reads the information in the memory 60 and completes the steps of the method of the aforementioned embodiment in combination with its hardware.

[0111] Furthermore, this embodiment also provides a computer-readable storage medium, on which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, the steps of any of the aforementioned motion control methods are executed.

[0112] The computer program products of the motion control method, device, electronic device and machine-readable storage medium provided in the embodiments of the present invention include 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 previous method embodiments. The specific implementation can be found in the method embodiments, which will not be repeated here.

[0113] If the functions are implemented in the form of 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 the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.

[0114] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "inner", "outer", etc. indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, or the positions or positional relationships in which the product of the invention is usually placed when in use. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific position, be constructed and operated in a specific position, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", etc. are only used to distinguish the description, and cannot be understood as indicating or implying relative importance.

[0115] In addition, the terms "horizontal", "vertical", "overhanging" and the like do not mean that the components are required to be absolutely horizontal or overhanging, but can be slightly tilted. For example, "horizontal" only means that its direction is more horizontal than "vertical", and does not mean that the structure must be completely horizontal, but can be slightly tilted.

[0116] In the description of the present invention, it is also necessary to explain that, unless otherwise clearly specified and limited, the terms "set", "install", "connect", and "connect" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0117] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A motion control method, It is characterized in that The method comprises: In response to a control instruction for controlling a first object to perform a target motion with respect to a second object, a target wrapping model of the second object is determined, the target wrapping model surrounds the second object, the target wrapping model is a wrapping model pre-established according to the shape of the second object, the target motion is a motion form adopted by the first object when observing the second object, and the target motion includes parallel motion and / or circumferential motion; wherein, based on the shape of the second object, an initial wrapping model having the same shape as the second object is determined; and the initial wrapping model is smoothed based on a predetermined model smoothing algorithm to obtain a target wrapping model; Based on the target wrapping model of the second object, the motion trajectory of the first object when performing the target motion is constrained to prevent penetration; wherein, when the second object is not a regular sphere, the motion trajectory of the first object is constrained and controlled through a plurality of non-fixed distances formed between the target wrapping model and the first object.

2. The motion control method according to claim 1, It is characterized in that The model smoothing algorithm includes a meta-sphere operation.

3. The motion control method according to claim 1, It is characterized in that The step of determining an initial wrapping model having the same shape as the second object based on the shape of the second object comprises: calculating a first distance between a geometric center point of the second object and each first surface of the second object; The initial packaging model is determined based on the first distance and a first preset coefficient.

4. The motion control method according to claim 3, It is characterized in that The step of determining the initial packaging model based on the first distance and a first preset coefficient includes: determining a second distance based on the first distance and a first preset coefficient; A second surface of the initial wrapping model is determined based on the second distance.

5. The motion control method according to claim 1, It is characterized in that The first object is a virtual camera or a virtual aircraft, and the second object is a virtual object; or, the first object is a physical aircraft, the second object is a physical object, the physical aircraft controls a flight trajectory based on a three-dimensional map, and the three-dimensional map includes a target package model of the second object.

6. The motion control method according to claim 1, It is characterized in that The second object corresponds to at least one candidate wrapping model, and different candidate wrapping models surround the second object to different degrees.

7. The motion control method according to claim 6, It is characterized in that The at least one candidate wrapping model corresponds to the motion type, and the correspondence is determined based on the degree of envelopment required for different motion types; and determining the target wrapping model of the second object includes: Based on the correspondence between the at least one candidate package model and the motion type, a target package model corresponding to the motion type to which the target motion belongs is determined from the at least one candidate package model.

8. The motion control method according to claim 6, It is characterized in that The method further comprises: determining at least one selectable motion type of the second object based on the position attribute of the second object; At least one wrapping model of the second object is established based on the requirement of the at least one selectable motion type on the degree of enclosure.

9. The method according to claim 1, It is characterized in that The target wrapping model based on the second object constrains the motion trajectory of the first object when performing the target motion, including: Repeat the following steps until it is determined that the first object is terminated from performing the target movement: Based on the current position of the first object and a preset step size, randomly determining a next position on the target package model of the second object; The first object is controlled to move to a next position.

10. The method according to claim 1, It is characterized in that The target wrapping model based on the second object constrains the motion trajectory of the first object when performing the target motion, including: Repeat the following steps until it is determined that the first object is terminated from performing the target movement: determining a next position on the target package model of the second object; On the target package model of the second object, interpolation is performed between the current position of the first object and the next position according to a preset step length to obtain a control point set, wherein the control point set includes the interpolation and the next position; The first object is controlled to move based on the control point set.

11. The motion control method according to claim 1, It is characterized in that The step of constraining the motion trajectory of the first object when performing the target motion based on the target wrapping model of the second object further includes: Determining a second preset coefficient according to a visual field requirement input by a user; Based on the second preset coefficient and the target encapsulation model of the second object, the motion trajectory of the first object when performing the target motion is constrained.

12. The motion control method according to claim 1, It is characterized in that The method further comprises: monitoring the movement trajectory; When it is detected that the motion trajectory distance deviates from a preset distance threshold, a warning signal is sent to the first object.

13. A motion control device, It is characterized in that The device comprises: a wrapping model determination module, configured to determine a target wrapping model of a second object in response to a control instruction for controlling a first object to perform a target motion with respect to a second object, wherein the target wrapping model surrounds the second object, the target wrapping model is a wrapping model pre-established according to the shape of the second object, the target motion is a motion form adopted by the first object when observing the second object, and the target motion includes parallel motion and / or circumferential motion; wherein, based on the shape of the second object, an initial wrapping model having the same shape as the second object is determined; and the initial wrapping model is smoothed based on a predetermined model smoothing algorithm to obtain a target wrapping model; A motion control module is used to constrain the motion trajectory of the first object when performing the target motion based on the target package model of the second object to prevent penetration; wherein, when the second object is not a regular sphere, the motion trajectory of the first object is constrained and controlled by a plurality of non-fixed distances formed between the target package model and the first object.

14. An electronic device, It is characterized in that The invention comprises 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 motion control method according to any one of claims 1 to 12.

15. A machine-readable storage medium, It is characterized in that The machine-readable storage medium stores machine-executable instructions, and when the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the motion control method according to any one of claims 1 to 12.