Physical simulation synchronization method, system, medium and computer program product

Through the distributed synchronization method between user equipment, each user equipment physically simulates the core area in the virtual scene, solving the problem of online games in the existing technology that consumes a lot of server performance and cannot support large-scale players' participation, and achieving efficient physical simulation synchronization and natural physical performance.

CN114377382BActive Publication Date: 2025-04-15SHANGHAI LILITH COMPUTER TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210047664.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-17
Publication Date
2025-04-15
Estimated Expiration
2042-01-17

AI Technical Summary

Technical Problem

The prior art is difficult to realize physical simulation synchronization when server performance consumption is small, especially in online game scenarios where large-scale players participate, which cannot effectively reduce the amount of server computing.

Method used

Through distributed synchronization between user devices, each user device physically simulates different areas in the virtual scene, and each user device has a corresponding core area. The simulation results of the core area are sent to other user equipment. If the simulation results in the non-core area are inconsistent with the received results, the received results are used for correction.

Benefits of technology

With the full use of the computing power of user equipment, the amount of calculations of physical simulations by the server is greatly reduced, making physical online games possible, and improving the naturalness and rationality of physical performance in the game.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114377382B_ABST
    Figure CN114377382B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of virtual scene physical simulation technology, and in particular to a physical simulation synchronization method, system, medium and computer program product. The method is used for a second user device running a virtual scene, comprising: performing physical simulation on a first area in the virtual scene to obtain a first physical simulation result; receiving a second physical simulation result of the first area from the first user device; determining whether the second physical simulation result is consistent with the first physical simulation result, if not, outputting the second physical simulation result, and if consistent, outputting the first physical simulation result. The calculation of the server for physical simulation is greatly reduced without increasing the computing power of the user device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of virtual scene physical simulation, and in particular to a physical simulation synchronization method, system, medium and computer program product. Background Art

[0002] Physical simulation refers to the process of calculating the state changes of one or more virtual objects when they undergo physical motion behaviors through computers, such as vehicle acceleration and deceleration, vehicle collision, etc. The calculation results of this process need to be as close as possible to the physical laws of motion in the real world. With the widespread application of 3D virtual scenes, whether it is engineering simulation, animation effects or physical effects in games, a large amount of physical simulation operations are required, that is, calculating the physical state of the target object in the virtual scene.

[0003] Especially for electronic games, physical simulation calculations are all done on the client side (such as computers, mobile phones, etc.). However, due to the limitation of technical level, physical simulation calculations are mainly supported by stand-alone games, and there are few online games that support physical simulation. Even if there are, the calculation process needs to be completed on the server and the calculation results need to be synchronized to all participating clients. The server resource overhead is also very high, and it is impossible to support scenarios with large-scale player participation. There are also cases in the prior art where two machines are interconnected. In this case, no server participation is required, and one of them is used as the host to perform physical simulation calculations. It still cannot meet the physical simulation calculation requirements when a large number of clients participate.

[0004] Therefore, there is an urgent need for a physical simulation synchronization solution that has low server performance consumption and good physical simulation synchronization effect. Summary of the invention

[0005] The purpose of the present invention is to provide a physical simulation synchronization method, system, medium and computer program product, which greatly reduces the amount of calculation of the server for physical simulation while fully utilizing the computing power of the user device.

[0006] The embodiment of the present application discloses a physical simulation synchronization method, which is used for a second user device running a virtual scene, including:

[0007] Performing physical simulation on a first area in the virtual scene to obtain a first physical simulation result;

[0008] receiving a second physical simulation result of the first area from the first user equipment;

[0009] It is determined whether the second physical simulation result is consistent with the first physical simulation result. If not, the second physical simulation result is output; if consistent, the first physical simulation result is output.

[0010] Optionally, the first user equipment determines a core area of ​​the first user equipment in the virtual scene according to a predetermined rule, and the core area includes the first area.

[0011] Optionally, the predetermined rule includes: the core area is an area in the virtual scene within a predetermined range centered on a first virtual object controlled by the first user equipment in the virtual scene.

[0012] Optionally, the predetermined rule further includes: taking the center position of the first virtual object as the center of the sphere and a spherical area with a radius equal to the product of the movement speed of the first virtual object and the predetermined interval time as the core area.

[0013] Optionally, the predetermined rule further includes: determining, based on existing physical simulation results, associated virtual objects associated with the first virtual object, wherein the associated virtual objects include other virtual objects that the first virtual object will collide with within a predetermined time;

[0014] The area occupied by the other virtual objects in the virtual scene is classified as the core area.

[0015] Optionally, the method further comprises:

[0016] A physical simulation is performed on the second area in the virtual scene to obtain a third physical simulation result, the first area is an intersection area of ​​the second area and a core area of ​​the first user equipment, and the third physical simulation result includes the first physical simulation result.

[0017] Optionally, the method further comprises:

[0018] The physical simulation results other than the first physical simulation result in the third physical simulation result are output.

[0019] Optionally, the first physical simulation result and the second physical simulation result include frame data, and the frame data includes a frame number, a position, an angular velocity, a linear velocity, and a rotation posture of a virtual object in a virtual scene.

[0020] Optionally, perform a physical simulation, including:

[0021] At each predetermined interval, new frame data is calculated based on the existing frame data and in accordance with the physical constraints, wherein the frame number of the new frame data is increased by a predetermined value compared to the frame number of the previous frame data.

[0022] Optionally, outputting the second physical simulation result further includes:

[0023] The second physical simulation result is frame-tracked, and the frame-tracking includes, based on the second physical simulation result, continuing the physical simulation until the frame number of the latest frame data is synchronized with the frame number of the latest frame data of the first physical simulation result.

[0024] The method according to claim 10, outputting the second physical simulation result further comprises:

[0025] The frame data in the second physical simulation result is smoothed, and the smoothing process includes interpolation process.

[0026] A physical simulation synchronization system includes a first user device and a second user device running a virtual scene, wherein:

[0027] The first user equipment determines a core area of ​​the first user equipment in the virtual scene according to a predetermined rule, where the core area includes the first area, and

[0028] Performing physical simulation on the first region to obtain a second physical simulation result, and

[0029] Sending the second physical simulation result;

[0030] The second user device performs physical simulation on the first area in the virtual scene to obtain a first physical simulation result, and

[0031] receiving a second physical simulation result, and

[0032] It is determined whether the second physical simulation result is consistent with the first physical simulation result. If not, the second physical simulation result is output; if consistent, the first physical simulation result is output.

[0033] Optionally, the predetermined rule includes: the core area is an area in the virtual scene within a predetermined range centered on a first virtual object controlled by the first user equipment in the virtual scene.

[0034] A computer storage medium stores instructions on the computer storage medium. When the instructions are executed on a computer, the computer is enabled to perform a physical simulation synchronization method according to an embodiment of the present invention.

[0035] A computer program product includes computer executable instructions, which are executed by a processor to implement a physical simulation synchronization method according to an embodiment of the present invention.

[0036] Compared with the prior art, the main differences and effects of the embodiments of the present invention are:

[0037] In the present invention, the first user device determines the core area of ​​the first user device in the virtual scene according to a predetermined rule, and the core area includes the first area, and performs physical simulation on the first area to obtain a second physical simulation result, and sends the second physical simulation result; the second user device performs physical simulation on the first area in the virtual scene to obtain the first physical simulation result, and receives the second physical simulation result, and determines whether the second physical simulation result is consistent with the first physical simulation result. If not, the second physical simulation result is output, and if consistent, the first physical simulation result is output. Distributed synchronization is adopted, and different user devices simulate different areas in the virtual scene, and each user device has a corresponding core area. For each client, the simulation result of the core area will be sent to other user devices, and if the simulation result in the non-core area conflicts with the simulation result of the area received from other user devices, the simulation result of the other user device received is used for correction (because the area belongs to the core area of ​​the other user device). Each user device only needs to simulate a part of the virtual scene, and the server only needs to be responsible for data distribution to achieve consistent simulation results on each user device. While fully utilizing the computing power of the user device, the server's calculation of physical simulation is greatly reduced, making physical online games possible. The local simulation strategy of the user device makes the physical performance of physical online games more natural and reasonable.

[0038] In the present application, the physical simulation result includes frame data, which includes frame number, position, angular velocity, linear velocity, and rotational posture of virtual objects in the virtual scene; performing physical simulation includes: calculating new frame data based on existing frame data and physical constraints every predetermined interval, wherein the frame number of the new frame data increases by a predetermined value compared to the frame number of the previous frame data. All states are stored as frame data, which is a comparison of physical states, reducing the impact of network delay on physical states and making the comparison of physical states more accurate.

[0039] In the present application, the second physical simulation result is frame-tracked, and the frame-tracking includes, based on the second physical simulation result, continuing the physical simulation until the frame number of the latest frame data is synchronized with the frame number of the latest frame data of the first physical simulation result. Frame tracking can return the object after the conflict to the correct state of the current frame, otherwise the network synchronization effect will not be good due to frame lag.

[0040] In the present application, the frame data in the second physical simulation result is smoothed, and the smoothing includes interpolation. The smoothing strategy makes the movement of the object smoother and more natural.

[0041] In the present application, the first user device determines the core area of ​​the first user device in the virtual scene according to a predetermined rule; the predetermined rule includes: the core area is an area within a predetermined range in the virtual scene centered on the first virtual object controlled by the first user device in the virtual scene; according to the existing physical simulation results, the associated virtual objects associated with the first virtual object are determined, wherein the associated virtual objects include other virtual objects that the first virtual object will collide with within a predetermined time; the area occupied by the other virtual objects in the virtual scene is classified into the core area. A good jurisdiction (i.e., the core area of ​​the user device) division algorithm makes objects belonging to different jurisdictions basically have no intersection, reducing the inconsistency caused by the simulation of objects belonging to different jurisdictions. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1A A schematic diagram showing an implementation scenario of a physical simulation synchronization method according to an embodiment of the present application.

[0043] Figure 1B A schematic diagram of a virtual scene of a physical simulation synchronization method according to an embodiment of the present application is shown.

[0044] Figure 2A A flow chart of a physical simulation synchronization method according to an embodiment of the present application is shown.

[0045] Figure 2B A flow chart of a physical simulation synchronization method according to an embodiment of the present application is shown.

[0046] Figure 3 A schematic diagram showing frame data of a physical simulation according to an embodiment of the present application.

[0047] Figure 4 A block diagram of a physical simulation synchronization system according to an embodiment of the present application is shown.

[0048] Figure 5 A block diagram of a user equipment according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0049] The present application will be further described below in conjunction with specific embodiments and accompanying drawings. It will be appreciated that the specific embodiments described herein are only intended to explain the present application and are not intended to limit the present application. In addition, for ease of description, only some but not all structures or processes related to the present application are shown in the accompanying drawings. It should be noted that in this specification, similar reference numerals and letters represent similar items in the following accompanying drawings.

[0050] It should be understood that although the terms "first", "second", etc. may be used herein to describe various features, these features should not be limited by these terms. These terms are used only to distinguish and should not be understood as indicating or implying relative importance. For example, a first feature may be referred to as a second feature, and similarly a second feature may be referred to as a first feature without departing from the scope of the exemplary embodiments.

[0051] In the description of this application, it is also necessary to explain that, unless otherwise clearly specified and limited, the terms "set", "connected", and "connected" 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 this embodiment can be understood according to specific circumstances.

[0052] Illustrative embodiments of the present application include, but are not limited to, physical simulation synchronization methods, systems, media, and computer program products.

[0053] The various aspects of the illustrative embodiments will be described using terms commonly used by those skilled in the art to convey the essence of their work to other persons skilled in the art. However, it is apparent to those skilled in the art that some alternative embodiments may be implemented using the features described in part. For purposes of explanation, specific numbers and configurations are set forth to provide a more thorough understanding of the illustrative embodiments. However, it is apparent to those skilled in the art that alternative embodiments may be implemented without the specific details. In some other cases, some well-known features are omitted or simplified herein to avoid obscuring the illustrative embodiments of the present application.

[0054] In addition, various operations will be described as multiple separate operations in a manner that is most helpful for understanding the illustrative embodiments; however, the order of description should not be interpreted as implying that these operations must rely on the order of description, and many of the operations can be implemented in parallel, concurrently, or simultaneously. In addition, the order of the operations can also be rearranged. When the described operations are completed, the process can be terminated, but can also have additional steps not included in the drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.

[0055] References in the specification to "one embodiment," "an embodiment," "an illustrative embodiment," etc., indicate that the described embodiment may include a particular feature, structure, or property, but each embodiment may or may not necessarily include the particular feature, structure, or property. Moreover, these phrases are not necessarily referring to the same embodiment. In addition, when particular features are described in conjunction with a specific embodiment, the knowledge of those skilled in the art can affect the combination of these features with other embodiments, whether or not these embodiments are explicitly described.

[0056] Unless the context dictates otherwise, the terms "comprising," "having," and "including" are synonymous. The phrase "A and / or B" means "(A), (B), or (A and B)."

[0057] As used herein, the term "module" may refer to, be part of, or include: memory (shared, dedicated, or group) for running one or more software or firmware programs, application-specific integrated circuits (ASICs), electronic circuits and / or processors (shared, dedicated, or group), combinational logic circuits, and / or other suitable components that provide the described functionality.

[0058] In the accompanying drawings, some structural or method features may be shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order is not necessary. Instead, in some embodiments, these features may be described in a manner and / or order different from that shown in the illustrative drawings. In addition, the structural or method features included in a specific figure do not mean that all embodiments need to include such features. In some embodiments, these features may not be included or may be combined with other features.

[0059] In order to make the objectives, technical solutions and advantages of the present application more clear, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0060] Figure 1A A schematic diagram showing an implementation scenario of a physical simulation synchronization method according to an embodiment of the present application.

[0061] like Figure 1AAs shown, the scene includes user devices 101 and 103, and user devices 101 and 103 can be desktop user devices or mobile user devices. Mobile user devices can be, but are not limited to, various personal computers, laptops, smart phones, tablet computers, and portable wearable devices. User devices 101 and 103 can be installed with applications that can access remote services, such as browsers or clients. The application involved in the embodiments of the present application can be a software client, or a client such as a web page or a small program. If the application is a client such as a web page or a small program, the background server is a background server corresponding to the software or the web page, the small program, etc., without limiting the specific type of the client.

[0062] The scenario also includes a network device 105, which can be a background server corresponding to the application installed on the user devices 101 and 103. For example, it can be an independent physical server or a server cluster or distributed system composed of multiple servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, as well as big data and artificial intelligence platforms, but is not limited to these.

[0063] User devices 101 and 103 are connected to network device 105 via a network (not shown in the figure), which includes one or more and may include various connection types, such as wired, wireless communication links, cloud or fiber optic cables, etc. Specific examples of the above-mentioned network may include the Internet provided by the communication providers of user devices 101 and 103.

[0064] Figure 1B A schematic diagram of a virtual scene of a physical simulation synchronization method according to an embodiment of the present application is shown.

[0065] User devices 101 and 103 may be smart phones as clients, and virtual scenes 100 (for example, online game scenes) are respectively running on user devices 101 and 103, and virtual scenes 100 include one or more virtual objects. When user A and user B respectively operate user devices 101 and 103 to run virtual scenes 100 for online games, user devices 101 and 103 respectively perform physical simulations on the one or more virtual objects, wherein user A operates user device 101 to control virtual object 102a, and user B operates user device 103 to control virtual object 106a. Physical simulation may refer to kinematic or dynamic simulation of virtual objects in virtual scenes according to mechanical principles. In this scenario, the virtual scenes 100 respectively run by user devices 101 and 103 need to be synchronized, that is, the physical process states in the same scene are displayed consistently on different user devices. Current synchronization technologies all have certain problems. As described in the background technology, the method of mainly using server calculations and synchronizing calculation results to each client is difficult to support scenarios involving multiple users, and the computing resource consumption is very high.

[0066] In view of the above problems, the embodiment of the present application proposes a physical simulation synchronization method. Figure 1A and 1B An example is given. Figure 1A The user device 101 shown controls the virtual object 102a. The user device 101 controls the virtual object 102a according to a predetermined rule, such as Figure 1BIn the virtual scene 100 shown, a first core area 102 associated with a user device 101 (i.e., a first user device) is determined, and the first core area 102 includes virtual objects 102a, 102b, and 102c. The user device 101 will manipulate the virtual object 102a according to the instructions input by the user, and on this basis, perform physical simulation on all virtual objects in an area 104 (the area 104 can be determined based on the position of the virtual object 102a in the virtual scene 100 and the screen size of the user device 101, or can be determined based on the computing capacity of the user device 101, but is not limited thereto) in the virtual scene 100, wherein the area 104 includes the first core area 102. Then, the user device 101 sends the physical simulation results of the virtual objects 102a, 102b, and 102c in the first core area 102 to the server 105. Similarly, the user device 103 (i.e., the second user device) controls the virtual object 106a. The user device 103 determines the second core area 106 associated with the user device 103 in the virtual scene 100 according to a predetermined rule, and the second core area 106 includes the virtual object 106a. The user device 103 will manipulate the virtual object 106a according to the instructions input by the user, and on this basis, perform physical simulation on all virtual objects in an area 108 (i.e., the second area, which can be determined according to the position of the virtual object 106a in the virtual scene 100 and the screen size of the user device 103, or according to the computing capacity of the user device 103, but not limited thereto) in the virtual scene 100, wherein the area 108 includes the second core area 106. Among them, the intersection of area 108 and the first core area 102 is the intersection area 110 (i.e., the first area), the physical simulation result of the user device 103 on area 108 includes the first physical simulation result of the user device 103 on the intersection area 110, and the physical simulation result of the user device 101 on the first core area 102 includes the second physical simulation result of the user device 101 on the intersection area 110. Then, in other embodiments of the present invention, the user device 103 sends the physical simulation result of the virtual object 106a in the second core area 106 as another second physical simulation result to the server 105, so that other related user devices can receive and make judgments and comparisons.At the same time, the server 105 sends the second physical simulation result of the user device 101 to the user device 103, and the user device 103 compares the second physical simulation result with the first physical simulation result. If they are consistent, the user device 103 outputs its third physical simulation result for the area 108 (for example, generates an animation based on these physical simulation results, and then outputs the animation through the display screen). Obviously, the third physical simulation result includes the first physical simulation result, because the area 108 corresponding to the third physical simulation result includes the intersection area 110 corresponding to the first physical simulation result; if they are inconsistent, the second physical simulation result and the physical simulation results of the user device 103 for other areas in the area 108 other than the intersection area 110 are output. In this process, the second physical simulation result and the physical simulation results of other areas in the area 108 other than the intersection area 110 can be spliced ​​and output as a whole. Similarly, the user device 101 also performs similar operations as the user device 103.

[0067] It can be understood that two user devices are shown in the present application, but it is not limited to this. The number of user devices can be arbitrary, and the physical simulation synchronization method in the present application can be implemented between any two user devices.

[0068] In the present application, distributed synchronization is adopted, and different user devices simulate different areas in the virtual scene, and each user device has a corresponding core area. For each client, the simulation results of the core area will be sent to other user devices, and if the simulation results in the non-core area conflict with the simulation results of the area received from other user devices, the simulation results of the other user devices received will be used for correction (because the area belongs to the core area of ​​the other user devices). Each user device only needs to simulate a part of the area in the virtual scene, and the server only needs to be responsible for data distribution to achieve consistency in the simulation results on each user device. While making full use of the computing power of the user device, the server's calculation amount for physical simulation is greatly reduced, making physical online games possible. The local simulation strategy of the user device makes the physical performance of physical networked games more natural and reasonable.

[0069] Figure 2A and 2B FIG. 1 is a flow chart of a physical simulation synchronization method according to an embodiment of the present application. Figure 1A and 1B illustrate, Figure 2A The method shown in the flowchart is used for a second user device running a virtual scene, and the flowchart includes:

[0070] Step 202, perform physical simulation on the first area in the virtual scene to obtain a first physical simulation result; for example, the user device 103 (i.e., the second user device) will manipulate the virtual object 106a according to the instruction input by the user, and on this basis, perform physical simulation on all virtual objects in the area 108 (the area 108 can be determined according to the position of the virtual object 106a in the virtual scene 100 and the screen size of the user device 103, or according to the computing capacity of the user device 103, but not limited thereto) in the virtual scene 100, wherein the area 108 includes the second core area 106. The intersection of the area 108 and the first core area 102 is the intersection area 110 (i.e., the first area), and the physical simulation result of the user device 103 on the area 108 includes the first physical simulation result of the user device 103 on the intersection area 110.

[0071] Step 204, receiving a second physical simulation result of the first area from the first user device; for example, the user device 101 (i.e., the first user device) sends the physical simulation result of the first core area 102 to the server 105, wherein the physical simulation result of the user device 101 on the first core area 102 includes the second physical simulation result of the user device 101 on the intersection area 110; then the server 105 sends the second physical simulation result of the user device 101 to the user device 103.

[0072] Step 206, determining whether the second physical simulation result is consistent with the first physical simulation result,

[0073] If yes, then in step 208, the first physical simulation result is output.

[0074] Otherwise, the second physical simulation result is output in step 210. For example, the user device 103 compares the second physical simulation result with the first physical simulation result. If they are consistent, the user device 103 outputs its own third physical simulation result for the area 108 (for example, generates an animation based on these physical simulation results, and then outputs the animation through the display screen). Obviously, the third physical simulation result includes the first physical simulation result, because the area 108 corresponding to the third physical simulation result includes the intersection area 110 corresponding to the first physical simulation result; if they are inconsistent, the second physical simulation result and the physical simulation results of other areas in the area 108 other than the intersection area 110 are output. In this process, the second physical simulation result and the physical simulation results of other areas in the area 108 other than the intersection area 110 can be spliced ​​and output as a whole.

[0075] Combination Figure 1A and 1B illustrate, Figure 2BThe method shown in the flowchart is used for a first user device running a virtual scene, and the flowchart includes:

[0076] Step 212, according to a predetermined rule, determine the core area of ​​the first user device in the virtual scene, the core area includes the first area; for example, the user device 101 (i.e., the first user device) controls the virtual object 102a, and the user device 101 determines the first core area 102 associated with the user device 101 in the virtual scene 100 according to the predetermined rule, and the first core area 102 includes virtual objects 102a, 102b, and 102c. Among them, the intersection of area 108 and the first core area 102 is the intersection area 110 (i.e., the first area).

[0077] Step 214, perform physical simulation on the first area to obtain a second physical simulation result; for example, the user device 101 will manipulate the virtual object 102a according to the instruction input by the user, and on this basis, perform physical simulation on all virtual objects in the area 104 (the area 104 can be determined according to the position of the virtual object 102a in the virtual scene 100 and the screen size of the user device 101, or according to the computing capacity of the user device 101, but not limited thereto) in the virtual scene 100, wherein the area 104 includes the first core area 102. Among them, the intersection of the area 108 and the first core area 102 is the intersection area 110 (i.e., the first area), and the physical simulation result of the user device 101 on the first core area 102 includes the second physical simulation result of the user device 101 on the intersection area 110.

[0078] Step 216, the second physical simulation result is sent to the second user device. For example, the user device 101 sends the physical simulation results of the virtual objects 102a, 102b and 102c in the first core area 102 to the server 105. Later, the server 105 sends the second physical simulation result of the user device 101 to the user device 103.

[0079] In this application, the distributed synchronization method is adopted to greatly reduce the amount of calculation for physical simulation by the server while making full use of the computing power of the user device, making physical online games possible. The local simulation strategy of the user device makes the physical performance of physical online games more natural and reasonable.

[0080] According to some embodiments of the present application, the physical simulation result includes frame data, which includes a frame number, a position of a virtual object in a virtual scene, an angular velocity, a linear velocity, and a rotational posture, wherein the parameters of the rotational posture include a vector direction of the rotation axis and an angular velocity of rotation. When the above parameters in two physical simulation results are exactly the same, they are deemed to be consistent. The calculation process of the physical simulation includes: after each predetermined interval, based on the existing frame data and according to the physical constraints, new frame data is calculated, wherein the frame number of the new frame data is increased by a predetermined value compared to the frame number of the previous frame data. For example, Figure 3 A schematic diagram showing frame data of a physical simulation according to an embodiment of the present application is shown. Figure 3 As shown, frame data 301 is the calculation result obtained by the user device at 0ms by performing kinematic or dynamic simulation calculation on the virtual object in the virtual scene according to the principle of mechanics, including the position, angular velocity, linear velocity, and rotation posture of the virtual object in the virtual scene, and the frame number is 1. After a predetermined interval (for example, 0.016ms is taken as an example here), the user device performs another physical simulation based on frame data 201 at 0.016ms to obtain frame data 202, and the frame number of frame data 202 increases by a predetermined value (for example, 1 is taken as an example here) compared with the frame number of frame data 201, that is, the frame number is 2. Then, at 0.032ms, another physical simulation is performed based on frame data 201 and frame data 202 to obtain frame data 203 with a frame number of 3. This is repeated, and the figure shows that frame data 212 is simulated at 0.176ms.

[0081] In this application, each virtual object can be assigned separate frame data and frame number. All states are stored as frame data to facilitate the comparison of physical states, reduce the impact of network delay on physical states, and make the comparison of physical states more accurate.

[0082] According to some embodiments of the present application, outputting the second physical simulation result further includes: performing frame tracking on the second physical simulation result, the frame tracking process including, based on the second physical simulation result, continuing physical simulation until the frame number of the latest frame data is synchronized with the frame number of the latest frame data of the first physical simulation result; and outputting the second physical simulation result after frame tracking. Figure 1A , 1B and Figure 3For example, the user device 103 receives a second physical simulation result of the intersection area 110 from the user device 101, and the second physical simulation result includes frame data 201', 203', 205', 207', and 209'. The user device 103 itself has a first physical simulation result of the intersection area 110 including frame data 201-212. The second physical simulation result is compared with the first physical simulation result and inconsistencies are found. For example, the frame data 201', 205', 207', and 209' are respectively consistent with the frame data 201, 205, 207, and 209, but the frame data 203' is inconsistent with the frame data 203. It can be seen that the frame number of the latest frame data 209' of the second physical simulation result is 9, while the frame number of the latest frame data 212 of the first physical simulation result is 12, so the user device 103 continues to perform physical simulation on the intersection area 110 based on the frame data 201', 203', 205', 207', 209', and obtains frame data 210', 211', 212', that is, until the frame number of frame data 212' is synchronized with frame data 212, which is 12. Then, the frame data 201', 203', 205', 207', 209', 210', 211', 212' of the second physical simulation result after frame tracking and its own physical simulation results for other areas in area 108 other than the intersection area 110 are output.

[0083] In this application, frame chasing can be global frame chasing for a certain area, or frame chasing for a certain virtual object (for example, when a user device is simulating a virtual object entering the core area of ​​another user device, frame chasing can be performed to avoid problems such as pullback and jitter). Frame chasing can return the object after the conflict to the correct state of the current frame, otherwise it will produce a poor network synchronization effect due to frame lag.

[0084] According to some embodiments of the present application, outputting the second physical simulation result further includes:

[0085] The frame data in the second physical simulation result is smoothed, and the smoothing process adopts a progressive strategy, and the smoothing process may include interpolation. Figure 3 For example, the second physical simulation result includes frame data 201', 203', 205', 207', and 209', on the basis of which interpolation is performed to insert new frame data 202', 204', 206', and 208'.

[0086] In this application, the smoothing strategy makes the object's movement smoother and more natural.

[0087] According to some embodiments of the present application, the predetermined rule includes: the core area is an area within a predetermined range in the virtual scene, centered on the first virtual object controlled by the user device in the virtual scene. Specifically, the center position of the first virtual object controlled by the user device in the virtual scene is the center of the sphere, and the spherical area with the product of the movement speed of the first virtual object and the predetermined interval time as the radius is the core area of ​​the user device. In conjunction with Figure 1, for example, the user device 103 controls the virtual object 106a, and the user device 103 determines the radius r=v×Δt according to the product of the movement speed v of the virtual object 106a and the unit interval time Δt. Then, with the position of the virtual object 106a as the center of the sphere and r as the radius, the spherical second core area 106 associated with the user device 103 in the virtual scene 100 is determined, and the second core area 106 includes the virtual object 106a. Similarly, the spherical first core area 102 associated with the user device 101 can be determined, and the first core area 102 includes the first virtual object 102a.

[0088] According to some embodiments of the present application, the predetermined rule further includes: determining the associated virtual objects associated with the first virtual object according to the existing physical simulation results, wherein the associated virtual objects include other virtual objects that the first virtual object will collide with within the predetermined time; and classifying the area occupied by the other virtual objects in the virtual scene into the core area. In conjunction with FIG. 1 , for example, the user device 103 controls the virtual object 106a, and the user device 103 predicts that the virtual object 106a will collide with the virtual object 106b, then the area occupied by the virtual object 106b is also classified into the second core area 106. Similarly, the user device 101 controls the first virtual object 102a, and the user device 101 predicts that the virtual object 102a will collide with the virtual object 102d, then the area occupied by the virtual object 102d is also classified into the first core area 102. The existing physical simulation results refer to the physical simulation results calculated by the user device 101 or the user device 103 in the previous frame, such as the physical simulation results for the area 104 or the area 108.

[0089] In the present application, a good jurisdiction division algorithm ensures that objects belonging to different jurisdictions have almost no intersection, thereby reducing the inconsistency caused by the simulation of objects belonging to different jurisdictions.

[0090] According to some embodiments of the present application, the physical simulation results are forwarded by a network device, and the network device extracts part of the physical simulation results and compares them with the corresponding physical simulation results of the network device itself. If it is found that the physical simulation results from a specific user device are always inconsistent with the corresponding physical simulation results of the network device itself, the user device is determined to be cheating and the user device is taken offline.

[0091] In this application, cheating sampling can exclude cheating user devices and ensure the fairness of the game in a distributed environment.

[0092] Figure 4 A physical simulation synchronization system according to an embodiment of the present application is shown.

[0093] like Figure 4 As shown, the system 400 includes a first user device 402 and a second user device 404 running a virtual scene, wherein:

[0094] The first user device 402 determines a core area of ​​the first user device 402 in the virtual scene according to a predetermined rule, the core area including the first area, and

[0095] Performing physical simulation on the first region to obtain a second physical simulation result, and

[0096] Sending the second physical simulation result;

[0097] The second user device 404 performs physical simulation on the first area in the virtual scene to obtain a first physical simulation result, and

[0098] receiving a second physical simulation result, and

[0099] It is determined whether the second physical simulation result is consistent with the first physical simulation result. If not, the second physical simulation result is output; if consistent, the first physical simulation result is output.

[0100] The first embodiment is a method implementation method corresponding to the present embodiment, and the present embodiment can be implemented in conjunction with the first embodiment. The relevant technical details mentioned in the first embodiment are still valid in the present embodiment, and are not repeated here to reduce repetition. Accordingly, the relevant technical details mentioned in the present embodiment can also be applied in the first embodiment.

[0101] Figure 5 It is a hardware structure block diagram of an electronic device implementing the physical simulation synchronization method according to an embodiment of the present invention.

[0102] like Figure 5 As shown, the electronic device 500 may include one or more processors 502, a system motherboard 508 connected to at least one of the processors 502, a system memory 504 connected to the system motherboard 508, a non-volatile memory (NVM) 506 connected to the system motherboard 508, and a network interface 510 connected to the system motherboard 508.

[0103] The processor 502 may include one or more single-core or multi-core processors. The processor 502 may include any combination of general-purpose processors and special-purpose processors (e.g., graphics processors, application processors, baseband processors, etc.). In an embodiment of the present invention, the processor 502 may be configured to execute the following operations: Figure 2A and 2B One or more of the various embodiments shown.

[0104] In some embodiments, system board 508 may include any suitable interface controller to provide any suitable interface to at least one of processors 502 and / or any suitable device or component in communication with system board 508 .

[0105] In some embodiments, the system board 508 may include one or more memory controllers to provide an interface to the system memory 504. The system memory 504 may be used to load and store data and / or instructions. In some embodiments, the system memory 504 of the electronic device 500 may include any suitable volatile memory, such as a suitable dynamic random access memory (DRAM).

[0106] NVM 506 may include one or more tangible, non-transitory computer-readable media for storing data and / or instructions. In some embodiments, NVM 506 may include any suitable non-volatile memory such as flash memory and / or any suitable non-volatile storage device, such as at least one of a HDD (Hard Disk Drive), a CD (CompactDisc) drive, and a DVD (Digital Versatile Disc) drive.

[0107] NVM 506 may include a portion of storage resources installed on a device of electronic device 500, or it may be accessible by the device but not necessarily a portion of the device. For example, NVM 506 may be accessed over a network via network interface 510.

[0108] In particular, system memory 504 and NVM 506 may include, respectively, a temporary copy and a permanent copy of instructions 520. Instructions 520 may include instructions that, when executed by at least one of processors 502, cause electronic device 500 to implement the following: Figure 2A and 2B In some embodiments, instructions 520, hardware, firmware and / or software components thereof may additionally / alternatively be located in system board 508, network interface 510 and / or processor 502.

[0109] The network interface 510 may include a transceiver for providing a radio interface for the electronic device 500, thereby communicating with any other suitable device (e.g., a front-end module, an antenna, etc.) through one or more networks. In some embodiments, the network interface 510 may be integrated with other components of the electronic device 500. For example, the network interface 510 may be integrated with at least one of the processor 502, the system memory 504, the NVM 506, and a firmware device (not shown) having instructions. When at least one of the processors 502 executes the instructions, the electronic device 500 implements Figure 2A and 2B One or more of the various embodiments shown.

[0110] The network interface 510 may further include any suitable hardware and / or firmware to provide a multiple-input multiple-output radio interface. For example, the network interface 510 may be a network adapter, a wireless network adapter, a telephone modem, and / or a wireless modem.

[0111] In one embodiment, at least one of the processors 502 may be packaged together with one or more controllers for the system motherboard 508 to form a system in package (SiP). In one embodiment, at least one of the processors 502 may be integrated on the same die with one or more controllers for the system motherboard 508 to form a system on a chip (SoC).

[0112] The electronic device 500 may further include an input / output (I / O) device 512 connected to the system motherboard 508. The I / O device 512 may include a user interface to enable a user to interact with the electronic device 500; the design of the peripheral component interface enables the peripheral components to interact with the electronic device 500. In some embodiments, the electronic device 500 further includes a sensor for determining at least one of an environmental condition and location information related to the electronic device 500.

[0113] In some embodiments, I / O device 512 may include, but is not limited to, a display (e.g., a liquid crystal display, a touch screen display, etc.), a speaker, a microphone, one or more cameras (e.g., a still image camera and / or a video camera), a flashlight (e.g., an LED flash), and a keyboard.

[0114] In some embodiments, the peripheral component interface may include, but is not limited to, a non-volatile memory port, an audio jack, and a power interface.

[0115] In some embodiments, the sensors may include, but are not limited to, gyroscope sensors, accelerometers, proximity sensors, ambient light sensors, and positioning units. The positioning unit may also be part of or interact with the network interface 510 to communicate with components of a positioning network (e.g., global positioning system (GPS) satellites).

[0116] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 500. In other embodiments of the present application, the electronic device 500 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0117] Program code can be applied to input instructions to perform the functions described in the present invention and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, a system for processing instructions including processor 502 includes any system having a processor such as a digital signal processor (DSP), a microcontroller, an application specific integrated circuit (ASIC), or a microprocessor.

[0118] Program code can be implemented with high-level programming language or object-oriented programming language to communicate with the processing system. When necessary, program code can also be implemented with assembly language or machine language. In fact, the mechanism described in the present invention is not limited to the scope of any specific programming language. In either case, the language can be a compiled language or an interpreted language.

[0119] One or more aspects of at least one embodiment may be implemented by instructions stored on a computer-readable storage medium, which, when read and executed by a processor, enables an electronic device to implement the method of the embodiment described in the present invention.

[0120] According to some embodiments of the present application, a computer storage medium is disclosed, on which instructions are stored. When the instructions are executed on a computer, the computer is enabled to execute any possible method of the first embodiment described above.

[0121] The first embodiment is a method implementation method corresponding to the present embodiment, and the present embodiment can be implemented in conjunction with the first embodiment. The relevant technical details mentioned in the first embodiment are still valid in the present embodiment, and are not repeated here to reduce repetition. Accordingly, the relevant technical details mentioned in the present embodiment can also be applied in the first embodiment.

[0122] According to some embodiments of the present application, a computer program product is disclosed, including computer executable instructions, where the instructions are executed by a processor to implement a physical simulation synchronization method according to an embodiment of the present invention.

[0123] The first embodiment is a method implementation method corresponding to the present embodiment, and the present embodiment can be implemented in conjunction with the first embodiment. The relevant technical details mentioned in the first embodiment are still valid in the present embodiment, and are not repeated here to reduce repetition. Accordingly, the relevant technical details mentioned in the present embodiment can also be applied in the first embodiment.

[0124] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented in the form of instructions or programs carried or stored on one or more transient or non-transient machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors, etc. When the instructions or programs are run by the machine, the machine may perform the aforementioned various methods. For example, the instructions may be distributed via a network or other computer-readable medium. Therefore, the machine-readable medium may include, but is not limited to, any mechanism for storing or transmitting information in a machine (e.g., computer) readable form, such as a floppy disk, an optical disk, a compact disk read-only memory (CD-ROMs), a magneto-optical disk, a read-only memory (ROM), a random access memory (RAM), an erasable programmable read-only memory (EPROM), an electronically erasable programmable read-only memory (EEPROM), a magnetic card or an optical card, or a flash memory or a tangible machine-readable memory for transmitting network information via electrical, optical, acoustic, or other forms of signals (e.g., carrier waves, infrared signals, digital signals, etc.). Accordingly, machine-readable media includes any form of machine-readable media suitable for storing or transmitting electronic instructions or information readable by a machine (eg, a computer).

[0125] The embodiments of the present application are described in detail above in conjunction with the accompanying drawings, but the use of the technical solution of the present application is not limited to the various applications mentioned in the embodiments of the present patent. Various structures and variations can be easily implemented with reference to the technical solution of the present application to achieve the various beneficial effects mentioned herein. Various changes made within the knowledge of ordinary technicians in the field without departing from the purpose of the present application should all fall within the scope of the patent application.

Claims

1. A physical simulation synchronization method, for a second user device running a virtual scene, characterized in that: include: Performing physical simulation on a first area in the virtual scene to obtain a first physical simulation result; Receiving a second physical simulation result of the first area from a first user device; The first user equipment determines, according to a predetermined rule, a core area of ​​the first user equipment in the virtual scene, the core area being an area within a predetermined range centered on a first virtual object controlled by the first user equipment, and the core area including the first area; It is determined whether the second physical simulation result is consistent with the first physical simulation result. If they are inconsistent, the second physical simulation result is output; if they are consistent, the first physical simulation result is output.

2. The method according to claim 1, characterized in that The predetermined rule also includes: a spherical area with a center position of the first virtual object as the center of the sphere and a radius of the product of the movement speed of the first virtual object and a predetermined interval time as the core area.

3. The method according to claim 2, characterized in that The predetermined rule further includes: determining, based on the existing physical simulation results, associated virtual objects associated with the first virtual object, wherein the associated virtual objects include other virtual objects that the first virtual object will collide with within a predetermined time; The area occupied by the other virtual objects in the virtual scene is classified into the core area.

4. The method according to claim 1, characterized in that: The method further comprises: The second user device performs physical simulation on the second area in the virtual scene to obtain a third physical simulation result, the first area is the intersection area of ​​the second area and the core area of ​​the first user device, and the third physical simulation result includes the first physical simulation result.

5. The method according to claim 4, characterized in that The method further comprises: The physical simulation results other than the first physical simulation result in the third physical simulation result are output.

6. The method according to claim 1, characterized in that The first physical simulation result and the second physical simulation result include frame data, and the frame data includes a frame number, a position, an angular velocity, a linear velocity, and a rotation posture of a virtual object in the virtual scene.

7. The method according to claim 6, characterized in that The physical simulation comprises: At every predetermined interval, new frame data is calculated based on the existing frame data and in accordance with physical constraints, wherein the frame number of the new frame data is increased by a predetermined value compared to the frame number of the previous frame data.

8. The method according to claim 7, characterized in that The outputting the second physical simulation result further includes: The second physical simulation result is frame-tracked, and the frame-tracking includes, based on the second physical simulation result, continuing the physical simulation until the frame number of the latest frame data is synchronized with the frame number of the latest frame data of the first physical simulation result.

9. The method according to claim 8, characterized in that The outputting the second physical simulation result further includes: The frame data in the second physical simulation result is smoothed, and the smoothing process includes interpolation process.

10. A physical simulation synchronization system, characterized in that: It includes a first user device and a second user device running a virtual scene, wherein: The first user device determines a core area of ​​the first user device in the virtual scene according to a predetermined rule, the core area being an area within a predetermined range centered on a first virtual object controlled by the first user device, the core area including a first area, and Performing physical simulation on the first region to obtain a second physical simulation result, and Sending the second physical simulation result; The second user equipment performs physical simulation on the first area in the virtual scene to obtain a first physical simulation result, and receiving the second physical simulation result, and It is determined whether the second physical simulation result is consistent with the first physical simulation result. If they are inconsistent, the second physical simulation result is output; if they are consistent, the first physical simulation result is output.

11. A computer storage medium, characterized in that: Instructions are stored on the computer storage medium, and when the instructions are executed on a computer, the computer is enabled to execute the physical simulation synchronization method according to any one of claims 1 to 9.

12. A computer program product comprising computer executable instructions, characterized in that: The instructions are executed by a processor to implement the physical simulation synchronization method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Physical effect simulation method and device, storage medium, processor and electronic device

    CN110694276A

  • State synchronization method and device for virtual carrier in game

    CN111298429A