Information synchronization method and apparatus, engine server and storage medium

By obtaining the absolute pose information of virtual objects and analyzing the numerical change characteristics of the serialization mechanism, relative pose information is obtained and written into the client data stream. This solves the problem of consuming a lot of bandwidth for pose information synchronization in virtual scenes and achieves more efficient data transmission.

WO2024227390A9PCT designated stage expired Publication Date: 2024-12-19TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/085432
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-05-04
Filing Date
2024-04-02
Publication Date
2024-12-19

AI Technical Summary

Technical Problem

During the display of a virtual scene, the pose information of virtual objects consumes a lot of bandwidth, resulting in low synchronization efficiency.

Method used

By obtaining the absolute pose information of the virtual object, analyzing the numerical change characteristics of the serialization mechanism, obtaining the relative pose information, and writing it into the client's attribute synchronization data stream, the amount of data for pose synchronization is reduced.

Benefits of technology

It effectively reduced bandwidth costs, improved the synchronization efficiency of pose information, and reduced the amount of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024085432_19122024_PF_FP_ABST
    Figure CN2024085432_19122024_PF_FP_ABST
Patent Text Reader

Abstract

The embodiments of the present application disclose an information synchronization method and apparatus, an engine server and a storage medium. The method comprises: acquiring absolute position and pose information of a virtual object in a virtual scene at the current moment; determining a serialization mechanism used for the absolute position and pose information; if it is determined that the serialization mechanism has the following numerical value change characteristic: the data volume of data obtained by using the serialization mechanism to serialize any position and pose information is in positive correlation with the numerical value of the corresponding position and pose information, on the basis of the numerical value change characteristic of the serialization mechanism, acquiring relative position and pose information of the virtual object at the current moment; and using the serialization mechanism to write the acquired relative position and pose information into an attribute synchronization data stream corresponding to a client, so as to transmit the attribute synchronization data stream to the corresponding client. The embodiments of the present application can reduce the data volume of position and pose synchronization, thus effectively decreasing bandwidth costs, and improving the synchronization efficiency of position and pose information.
Need to check novelty before this filing date? Find Prior Art

Description

Information synchronization method, device, engine server and storage medium

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on May 4, 2023, application number 202310490284.6, and application name “Information synchronization method, device, engine server and storage medium”, all contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of Internet technology, specifically to the field of communication technology, and especially to information synchronization technology. Background Art

[0003] Currently, during the display of a virtual scene, the engine server and client corresponding to the virtual scene frequently synchronize information related to the virtual objects (Actors) in the virtual scene. The pose information of the virtual objects accounts for a large proportion of this synchronized information, requiring approximately half, or even more, of the total bandwidth. During this information synchronization, the engine server serializes the absolute pose information of the virtual objects and synchronizes the serialized absolute pose information to the client. This synchronization method consumes a large amount of bandwidth, resulting in low synchronization efficiency.

[0004] Summary of the Invention

[0005] The embodiments of the present application provide an information synchronization method, device, engine server and storage medium, which can reduce the amount of data for posture synchronization, thereby effectively reducing bandwidth costs and improving the synchronization efficiency of posture information.

[0006] In one aspect, an embodiment of the present application provides an information synchronization method, the method being executed by a computer device, the method comprising:

[0007] Obtain the absolute pose information of the virtual object in the virtual scene at the current moment. The absolute pose information at the current moment refers to the pose information determined based on the reference object at the current moment, and the pose information is used to synchronize to the client in a serialized manner;

[0008] Determine the serialization mechanism to be used for absolute pose information;

[0009] If it is determined that the serialization mechanism has the following numerical variation characteristics: the amount of data obtained after serializing any pose information using the serialization mechanism is positively correlated with the numerical value of the corresponding pose information, based on the numerical variation characteristics of the serialization mechanism, the relative pose information of the virtual object at the current moment is obtained; wherein the obtained relative pose information is used to reflect the difference between the absolute pose information of the virtual object at the current moment and the absolute pose information of the virtual object at a previous moment, where the absolute pose information at the previous moment refers to the pose information determined at the previous moment based on a reference object;

[0010] The serialization mechanism is used to write the acquired relative posture information into the attribute synchronization data stream corresponding to the client, so as to transmit the attribute synchronization data stream to the corresponding client.

[0011] On the other hand, an embodiment of the present application provides an information synchronization device, which is deployed on a computer device and includes:

[0012] An acquisition unit, configured to acquire the absolute position information of a virtual object in a virtual scene at a current moment, wherein the absolute position information at a current moment refers to the position information determined based on a reference object at the current moment, and the position information is used to synchronize to a client in a serialized manner;

[0013] The acquisition unit is further configured to determine a serialization mechanism to be used for the absolute pose information;

[0014] The acquisition unit is further configured to, if it is determined that the serialization mechanism has the following numerical variation characteristics: the amount of data obtained after serializing any pose information using the serialization mechanism is positively correlated with the numerical value of the corresponding pose information, acquire the relative pose information of the virtual object at the current moment based on the numerical variation characteristics of the serialization mechanism; wherein the acquired relative pose information is used to reflect the difference between the absolute pose information of the virtual object at the current moment and the absolute pose information of the virtual object at a previous moment, the absolute pose information at the previous moment being the pose information determined at the previous moment based on a reference object;

[0015] The synchronization unit is used to write the acquired relative posture information into the attribute synchronization data stream corresponding to the client by adopting the serialization mechanism, so as to transmit the attribute synchronization data stream to the corresponding client.

[0016] In another aspect, an embodiment of the present application provides an engine server, the engine server including an input interface and an output interface, and the engine server further including:

[0017] a processor adapted to execute one or more computer programs; and

[0018] A computer storage medium stores one or more computer programs, wherein the one or more computer programs are suitable for being loaded by the processor and executing the above-mentioned information synchronization method.

[0019] On the other hand, an embodiment of the present application provides a computer storage medium, which stores one or more computer programs, and the one or more computer programs are suitable for being loaded by a processor and executing the above-mentioned information synchronization method.

[0020] On the other hand, an embodiment of the present application provides a computer program product, which includes a computer program; when the computer program is executed by a processor, it implements the above-mentioned information synchronization method.

[0021] In an embodiment of the present application, the numerical variation characteristics of the serialization mechanism used for the absolute posture information can be analyzed. If it is found that the serialization mechanism has the following numerical variation characteristics: the amount of data obtained after serializing any posture information using the serialization mechanism is positively correlated with the numerical value of the corresponding posture information. Therefore, after obtaining the absolute posture information of the virtual object in the virtual scene at the current moment, the relative posture information of the virtual object at the current moment can be obtained by considering the numerical variation characteristics of the serialization mechanism. Since the relative posture information obtained is used to refer to the difference between the absolute posture information of the virtual object at the current moment and the absolute posture information of the virtual object at the previous moment, the numerical value of the relative posture information will be much smaller than the numerical value of the absolute posture information, especially when the difference between the absolute posture information at two adjacent moments is small, the numerical value of the relative posture information can be a very small numerical value. Therefore, compared with serializing the absolute posture, by using the serialization mechanism to write the relative posture information into the attribute synchronization data stream, the amount of posture synchronization data can be effectively reduced, thereby effectively reducing bandwidth costs and improving the synchronization efficiency of posture information. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0023] FIG1a is a schematic diagram of communication between an engine server and a client provided in an embodiment of the present application;

[0024] FIG1b is a schematic diagram of a serialization format of a serialization mechanism provided in an embodiment of the present application;

[0025] FIG1c is a schematic diagram of a serialization result obtained by serializing the absolute position and relative position of a virtual object provided in an embodiment of the present application;

[0026] FIG1d is a schematic diagram of a serialization format of another serialization mechanism provided in an embodiment of the present application;

[0027] FIG2 is a flow chart of an information synchronization method provided in an embodiment of the present application;

[0028] FIG3 is a schematic diagram of the processing logic used by an engine server to obtain relative posture information according to an embodiment of the present application;

[0029] FIG4 is a flow chart of an information synchronization method provided in another embodiment of the present application;

[0030] FIG5a is a schematic diagram of a serialized data format provided in an embodiment of the present application;

[0031] FIG5 b is a schematic diagram of a historical posture information array provided in an embodiment of the present application;

[0032] FIG5c is a schematic diagram of synchronization of posture information between an engine server and a client provided in an embodiment of the present application;

[0033] FIG5 d is a schematic diagram of a processing process involved in applying an information synchronization method in a game scene according to an embodiment of the present application;

[0034] FIG5e is a schematic diagram of a processing logic involved in synchronizing relative posture information provided by an embodiment of the present application;

[0035] FIG6a is a schematic diagram of a test case provided in an embodiment of the present application;

[0036] FIG6 b is a schematic diagram of a test result provided in an embodiment of the present application;

[0037] FIG6c is a schematic diagram of another test result provided in an embodiment of the present application;

[0038] FIG6 d is a schematic diagram of a test case provided in another embodiment of the present application;

[0039] FIG6e is a schematic diagram of a test result provided in another embodiment of the present application;

[0040] FIG6f is a schematic diagram of a test case provided in yet another embodiment of the present application;

[0041] FIG6g is a schematic diagram of statistical results corresponding to absolute posture information provided in an embodiment of the present application;

[0042] FIG6h is a schematic diagram of statistical results corresponding to relative posture information provided in an embodiment of the present application;

[0043] FIG6i is a schematic diagram of another statistical result corresponding to absolute posture information provided in an embodiment of the present application;

[0044] FIG6j is a schematic diagram of another statistical result corresponding to relative posture information provided in an embodiment of the present application;

[0045] FIG6k is a schematic diagram of a statistical result provided by another embodiment of the present application;

[0046] FIG61 is a schematic diagram of another statistical result provided by another embodiment of the present application;

[0047] FIG7 is a schematic structural diagram of an information synchronization device provided in an embodiment of the present application;

[0048] FIG8 is a schematic diagram of the structure of an engine server provided in an embodiment of the present application. DETAILED DESCRIPTION

[0049] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application.

[0050] In the embodiments of the present application, AI (Artificial Intelligence) technology may be involved, and information synchronization may be automatically achieved through artificial intelligence technology. The embodiments of the present application mainly relate to the program processing engine in AI technology. The so-called program processing engine refers to an engine that can be used to develop applications and display virtual scenes in the applications. For example, when the application is an image display program, the program processing engine may be a graphics engine; for another example, when the application is a game program, the program processing engine may be a game engine, such as Unreal Engine (UE), which has multiple versions, such as UE4 (Unreal Engine 4, the fourth version of Unreal Engine), UE5 (Unreal Engine 5, the fifth version of Unreal Engine), etc. The server of the program processing engine may be referred to as the engine server. When the program processing engine is the game engine Unreal Engine, the engine server may be UE DS (UE Dedicated Server). UE DS can be used to synchronize relevant information in games with high real-time requirements (such as FPS (First Person Shooter) games), and the default network synchronization frame rate of UE DS is 30 Hz (that is, synchronization 30 times per second), which is also the default frame rate used by many online games. Competitive games even use higher synchronization frequencies, such as 60 Hz or even 120 Hz.

[0051] The engine server may provide one or more Actor Channels (communication channels used to establish communication connections with clients for information synchronization management), and communicate with corresponding clients based on each Actor Channel, as shown in Figure 1a. In addition, in the attribute synchronization mechanism adopted by the engine server, the communication channel (or connection) corresponding to each client will collect a list of attributes that have changed in the virtual objects (Actors) in the virtual scene at a certain frequency, and after the engine server serializes the attribute list, it will synchronize it to the client. Serialization is a process of converting an object into a sequence of bytes that can be transmitted over a network or saved in a local file. In an embodiment of the present application, since different platforms and systems may use different programming languages ​​and operating environments, directly transmitting objects may cause compatibility issues. Through serialization, objects can be converted into a universal, platform-independent format, thereby ensuring that information between different platforms can be correctly transmitted and parsed.

[0052] The attribute list may include multiple attributes of the Actor (such as movement attributes, style attributes, size attributes, etc.), as well as the attribute information of the Actor under each attribute; when synchronizing attributes, the bandwidth used to synchronize the attribute information of the Actor under the movement attribute occupies about half of the total bandwidth, or even more. Among them, the attribute information of the Actor under the movement attribute can be FRepMovement (a type of structure information); the information used for synchronization in FRepMovement mainly includes: absolute pose information, angular velocity, orientation information, and some tag values ​​related to physical simulation. The absolute pose information at a certain moment mentioned here refers to the pose information determined based on the reference object at that moment. The pose information may include linear velocity (referred to as velocity) and position information (referred to as position); accordingly, the absolute pose information may include: absolute velocity and absolute position; in addition, the orientation information mentioned here may include the following rotation angles: Pitch (pitch angle), Yaw (yaw angle), and Roll (roll angle), etc. The definition of each information used for synchronization in FRepMovement can be as follows:

[0053] / Absolute Speed /

[0054] UPROPERTY(Transient)

[0055] FVector LinearVelocity;

[0056] / angular velocity /

[0057] UPROPERTY(Transient)

[0058] FVector AngularVelocity;

[0059] / Absolute Position /

[0060] UPROPERTY(Transient)

[0061] FVector Location;

[0062] / Orientation Information /

[0063] UPROPERTY(Transient)

[0064] FRotator Rotation;

[0065] / Whether the virtual object is in physical simulation /

[0066] UPROPERTY(Transient)

[0067] unit8 bRepPhysics:1;

[0068] In the above definition, UPROPERTY is a macro that can be used to expose variables to the editor or blueprint, and it allows variables to be copied, serialized, and accessed from the blueprint; Transient can be used to indicate that the corresponding information is transient. The serialization mechanism is the specific method and process for implementing serialization. There are many serialization mechanisms, such as FVector and FRotator. Among them, FVector is a serialization mechanism based on a three-dimensional vector structure, and FRotator is a serialization mechanism based on rotation angles; LinearVelocity, AngularVelocity, Location, and Rotation are all fields that store information. Based on this, the meaning of "FVector LinearVelocity" in the above code is: use FVector to serialize the absolute velocity in the LinearVelocity field; the meaning of "FVector AngularVelocity" is: use the FVector serialization mechanism to serialize the angular velocity in the AngularVelocity field; the meaning of "FVector Location" is: use the FVector serialization mechanism to serialize the absolute position in the Location field; the meaning of "FRotator Rotation" is: use the FRotator serialization mechanism to serialize the orientation information in the Rotation field; the meaning of "unit8 bRepPhysics: 1" is: when the virtual object is in physical simulation, the value of the bRepPhysics tag is 1.

[0069] Since the amount of data required to synchronize the attribute information of an Actor under the movement attribute depends on the actual size of the data obtained after serialization, and based on the above definition, it can be seen that the serialization operation of the attribute information of a virtual object under the movement attribute mainly involves the two serialization mechanisms of FVector and FRotator. Therefore, the embodiment of the present application analyzes the numerical variation characteristics of these two serialization mechanisms, and based on the analyzed numerical variation characteristics of each serialization mechanism, improves the synchronization method of the attribute information of an Actor under the movement attribute, as follows:

[0070] (1) The serialization format of FVector can be seen in Figure 1b, which specifically includes the following fields:

[0071] The Bits field is used to store a value indicating the number of bits required to obtain the maximum absolute value of X, Y, and Z, or the maximum number of bits set by the program processing engine. For the default centimeter precision, the maximum number of bits set by the program processing engine (e.g., the UE) may be 24 - 1 = 23. X, Y, and Z all represent coordinate values ​​converted to integers, expressed in centimeters, and may be scaled up to meet different precision requirements. Figure 1b illustrates an example where the Bits field occupies 5 bits.

[0072] The Bias+X field is used to store the result of performing the Bias operation on X. The number of bits occupied by the Bias+X field is Bits+2.

[0073] The Bias+Y field is used to store the result of performing the Bias operation on Y. The number of bits occupied by the Bias+Y field is Bits+2.

[0074] The Bias+Z field is used to store the result of performing the Bias operation on Z. The number of bits occupied by the Bias+Z field is Bits+2.

[0075] It should be noted that the Bias operation mentioned above can be expressed as 1<<(Bits+1), which can specifically be an operation that shifts each bit in the binary value of the corresponding value to the left by (Bits+1) bits and pads the last bit with 0. In addition, Bits represents the number of bits required to obtain the maximum value of the absolute values ​​of X, Y, and Z. The specific formula is as follows: Here MaxBits is the maximum number of bits set additionally, and Clamp is a The value of is mapped to a function between 1 and MaxBits, Indicates that * is rounded up. For example, if the value of log2(1+max(|X|,"Y|,|Z|)) is 3.1, then The value of is 4.

[0076] As can be seen from the above, the absolute position of the virtual object corresponds to the Location field in FRepMovement, which is serialized using FVector. For absolute position, FVector can mainly contain three floating-point fields: X, Y, and Z. Moreover, as can be seen from the serialization format used by FVector shown in Figure 1b, when using FVector to serialize absolute position, the absolute value of the coordinate value, or the distance from the origin, will affect the data length of the serialized data:

[0077] 1) Assume that x is greater than 1000 meters, for example, x = 2 17=131072 cm, and the absolute value of x is larger than the absolute values ​​of y and z, then the data length of the data obtained after serializing the absolute position is 62 bits (5+19+19+19=62).

[0078] 2) Assume x is about 10 meters, for example x = 2 10 =1024 cm, and the absolute value of x is larger than the absolute values ​​of y and z, then the data length of the data obtained after serializing the absolute position is 41 bits (5+12+12+12=41).

[0079] 3) Assume x is about 1 meter, for example x = 2 7 =128 cm, and the absolute value of x is larger than the absolute values ​​of y and z, then the data length of the data obtained after serializing the absolute position is 32 bits (5+9+9+9=32).

[0080] Based on this, the embodiment of the present application takes into account that the value of the relative position (i.e., the difference between the absolute positions collected at two adjacent moments) is usually smaller than the value of the absolute position. Therefore, the embodiment of the present application proposes the following concept for position information: when synchronizing position information, the synchronization of the absolute position can be changed to the synchronization of the relative position, so that the number of bits required for the data obtained by serializing the relative position is much less than the number of bits required for the data obtained by serializing the absolute position (i.e., the amount of data is much smaller), thereby achieving a significant reduction in the amount of position synchronization data through algorithm optimization without affecting the mobile synchronization experience, thereby effectively reducing bandwidth costs. Further, in order to prove the feasibility of this concept, the embodiment of the present application also tests as follows:

[0081] For example, an Actor is an object such as a game character that moves at a normal speed, such as 6 meters per second, and the engine server synchronizes the position at a frequency of 30 Hz. In this case, the position change of the Actor in each frame is about 20 centimeters (horizontally). For example, if a circle is used to represent an Actor, then see Figure 1c: the Actor moves from (1000, 0, 0) to (1024, 0, 0) in the game screen, that is, the absolute position after the move is (1024, 0, 0) and the relative position is (24, 0, 0). Then, according to the description of each field in the FVector mentioned above, the following calculation can be performed based on the absolute position: 5+(10+2)+(10+2)+(10+2)=41; and the following calculation is performed based on the relative positions: 5+(4+2)+(4+2)+(4+2)=23. It can be seen that the data obtained by serializing the absolute position (1024, 0, 0) requires 41 bits, while the data obtained by serializing the relative position (24, 0, 0) requires only 23 bits.

[0082] For example, if the Actor is an object such as a car, and its moving speed is 120 km / h, and the engine server synchronizes the position at a frequency of 30 Hz, then the position of the Actor changes by about 111 cm in each frame. Therefore, we can calculate 5+(6+2)+(6+2)+(6+2)=29, that is, the data obtained by serializing the relative position only requires 29 bits. In other words, in this case, using relative position for synchronization only requires 29 bits of data.

[0083] To sum up, if the concept of synchronizing relative positions proposed in the embodiments of the present application is followed, the data length of the data obtained after serializing the positions can be effectively reduced, and the data length is positively correlated with the amount of data. Therefore, it can be seen that: if the relative positions are synchronized, less data can be used in the synchronization process, which is independent of the numerical size of the absolute position, and can effectively reduce bandwidth costs.

[0084] It should be understood that, from the foregoing, the absolute speed of the virtual object corresponds to the LinearVelocity field in FRepMovement, which is also serialized using FVector; then, similar to the absolute position, the embodiment of the present application also proposes the following concept for speed information: when synchronizing speed information, the synchronization of the absolute speed is replaced by the synchronization of the relative speed. Because when an Actor moves in a certain direction, the speed of the Actor in several consecutive frames is often constant or does not change much, so the value of the relative speed is usually smaller than the value of the absolute speed. Then, the number of bits required for the data obtained by serializing the relative position is much less than the number of bits required for the data obtained by serializing the absolute position. This achieves the goal of greatly reducing the amount of position synchronization data through algorithm optimization without affecting the mobile synchronization experience, thereby effectively reducing bandwidth costs.

[0085] (2) The serialization format of FRotator can be seen in Figure 1d, which specifically includes the following fields:

[0086] The Pitch field is used to store the pitch angle of the virtual object, that is, the angle of rotation of the virtual object around the X-axis, such as the angle when the virtual object's head rotates up or down;

[0087] The Yaw (yaw angle) field is used to store the yaw angle of the virtual object, that is, the angle at which the virtual object rotates around the Z axis, such as the angle at which the virtual object's head rotates left or right;

[0088] The Roll field is used to store the roll angle of the virtual object, that is, the angle at which the virtual object rotates around the Y axis, such as the angle at which the virtual object's head tilts left or right.

[0089] The P field (the first field) is used to store a value indicating whether the pitch angle needs to be written into the Pitch field. When the stored value is an invalid value (such as 0), it indicates that the pitch angle is not written into the Pitch field.

[0090] The Y field (the second field) is used to store a value. The stored value is used to indicate whether the yaw angle needs to be written in the Yaw field. When the stored value is an invalid value (such as 0), it indicates that the yaw angle is not written in the Yaw field.

[0091] The R field (the third field) is used to store a value. The stored value is used to indicate whether the pitch angle needs to be written in the Roll field. When the stored value is an invalid value (such as 0), it indicates that the roll angle is not written in the Roll field.

[0092] It should be noted that, in the embodiment of the present application, when storing the pitch, yaw, and roll angles, the integer values ​​of the angles can be mapped from [0, 360) to [0, 256). In this case, the Pitch, Yaw, and Roll fields each occupy 1 byte (i.e., 8 bits). Of course, 2 bytes or more can also be used to store the three angles to achieve higher precision.

[0093] From the above, it can be seen that the orientation information of the virtual object corresponds to the Rotation field in FRepMovement, which is serialized using FRotator. From the serialization format used by FRotator shown in Figure 1d, it can be seen that when FRotator is used to serialize the orientation information, the number of rotation angles in the orientation information will affect the data length of the data obtained after serialization. Research has shown that for most virtual scenes, the Actor's Pitch and Roll rotation angles are often zero; therefore, the embodiment of the present application proposes the following concept for orientation information: when synchronizing the orientation information, it is only necessary to synchronize the Yaw rotation angle on the horizontal plane, and since the integer value of the angle is mapped from [0, 360) to [0, 256), the synchronization of Yaw only requires 1 byte. Furthermore, considering that when an Actor moves in a certain direction, its Yaw in several consecutive frames may not change, the embodiment of the present application can also add a flag bit, so that when the Yaw of the virtual object at the current moment is the same as the Yaw of the previous synchronization, it is only necessary to set this flag bit, and no longer write Yaw data, so as to further reduce the amount of data required for synchronizing the orientation information, thereby further saving bandwidth costs and improving synchronization efficiency.

[0094] Based on the above description, the present application proposes an information synchronization method for reducing bandwidth costs based on the relative pose information of virtual objects. In a specific implementation, this information synchronization method can be executed by a computer device, which can be the aforementioned engine server; alternatively, the computer device can include both the engine server and a high-performance terminal to reduce the operating pressure on the engine server.

[0095] The engine server mentioned herein may be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or 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 (Content Delivery Network), and big data and artificial intelligence platforms, etc. The terminals that collaborate with the engine server to execute the information synchronization method may include, but are not limited to: smartphones, computers (such as tablets, laptops, desktop computers, etc.), smart wearable devices (such as smart watches, smart glasses, etc.), smart voice interaction devices, smart home appliances (such as smart TVs), vehicle-mounted terminals or aircraft, etc.

[0096] In addition, the terminal and engine server can be located outside or within the blockchain network, without limitation. The so-called blockchain network is a network composed of a peer-to-peer network and a blockchain, while blockchain refers to a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithm. It is essentially a decentralized database, a string of data blocks (or blocks) generated by cryptographic methods. When any device in the terminal and engine server is located within the blockchain network or has a communication connection with the blockchain network, either device can upload its internal data to the blockchain network for storage to prevent tampering with the internal data of the engine server, thereby improving the security of the internal data.

[0097] For ease of explanation, the information synchronization method proposed in the embodiment of the present application is described below using the example of an engine server independently executing the information synchronization method, and in conjunction with the flowchart shown in Figure 2. Referring to Figure 2, the information synchronization method may include the following S201-S204:

[0098] S201, obtaining the absolute position information of the virtual object in the virtual scene at the current moment.

[0099] In the embodiments of the present application, a virtual scene can be understood as a scene that can be displayed on a device screen. Specifically, the virtual scene can be a scene obtained by simulating a scene in the real world, such as a scene obtained by simulating an autonomous driving scene or a scenic spot scene in the real world; or the virtual scene can be a semi-simulated and semi-fictional scene, such as a scene in which fictional characters are superimposed on a simulated world corresponding to the real world; or the virtual scene can be a purely fictional scene, such as a scene in a game, a TV series, or a movie, etc.

[0100] The virtual scene may include at least one virtual object (Actor). The so-called virtual object may be an active object in the virtual scene, such as a virtual character in a game scene, a virtual animal in a game scene, etc.; or, the virtual object may be a static object element in the virtual scene, such as a virtual grass, a virtual building, etc. It should be understood that each virtual object in the virtual scene may be an active object, or may include both static object elements and active objects, without limitation. Moreover, the virtual object mentioned in S201 and subsequent steps in the embodiment of the present application may be any virtual object in the virtual scene. A virtual object may have multiple attributes (such as movement attributes, style attributes, size attributes, etc.), as well as attribute information of the virtual object under each attribute. Among them, the attribute information of the virtual object under the movement attribute may include absolute posture information, orientation information, etc.; the attribute information of the virtual object under the style attribute may include shape, appearance color, etc.; the attribute information of the virtual object under the size attribute may include size value.

[0101] Since the absolute pose information of a virtual object at any moment is stored in the FRepMovement (i.e., the attribute information under the movement attribute) of the virtual object (i.e., the Actor), the engine server can search the Actor's FRepMovement at the current moment in local space when executing S201, thereby obtaining the absolute pose information of the virtual object at the current moment from the found FRepMovement. The Actor's FRepMovement at the current moment can be stored in the virtual object's attribute list at the current moment, which includes multiple attributes of the virtual object and the attribute information of each attribute. Therefore, when the engine server obtains the Actor's FRepMovement from the local space, it can obtain the virtual object's attribute list at the current moment, search for the movement attribute in the obtained attribute list, and then obtain the absolute pose information of the virtual object at the current moment from the attribute information corresponding to the movement attribute in the attribute list. The absolute pose information at the current moment refers to the pose information determined based on the reference object at the current moment, and this pose information is synchronized to the client through a serialized manner.

[0102] Among them, the absolute posture information of the virtual object at the current moment may include: the absolute speed of the virtual object at the current moment (i.e., the speed determined based on the reference object at the current moment), and the absolute position of the virtual object at the current moment (i.e., the position determined based on the reference object at the current moment). In one possible implementation, if the engine server performs the information synchronization operation every time it detects a change in the attribute information of the virtual object, then the current moment mentioned here may refer to the moment when the attribute list of the virtual object is detected to have changed, or the moment when the absolute posture information of the virtual object is detected to have changed. In another possible implementation, if the engine server performs the information synchronization operation periodically, that is, performs the information synchronization operation at a certain synchronization frequency, then the current moment mentioned here may refer to the moment when the information synchronization operation needs to be performed based on the synchronization frequency; for example, assuming that the synchronization frequency is a frequency of synchronization every second, and the engine server performs an information synchronization operation at 10:25:26, then the current moment refers to the moment of 10:25:27.

[0103] S202: Determine a serialization mechanism to be used for the absolute pose information.

[0104] From the aforementioned attribute synchronization mechanism of the engine server, it can be seen that any type of posture information must be synchronized to the client in a serialized manner; that is, when the engine server synchronizes any type of posture information, it must serialize the posture information, thereby synchronizing the data obtained by the serialization process to the client. Based on this, after the engine server obtains the absolute posture information of the virtual object at the current moment through S201, it can determine the serialization mechanism adopted for the absolute posture information through S202. From the above, it can be seen that the serialization mechanism adopted by the engine server for the absolute posture information can be FVector (i.e., a serialization mechanism based on a three-dimensional vector structure).

[0105] S203, if it is determined that the serialization mechanism has the following numerical change characteristics: the amount of data obtained after serializing any posture information using the serialization mechanism is positively correlated with the numerical size of the corresponding posture information, based on the numerical change characteristics of the serialization mechanism, the relative posture information of the virtual object at the current moment is obtained.

[0106] The value variation characteristic refers to the property that changes in the value of pose information may cause changes in other information. For example, changes in the value of pose information may cause changes in the amount of serialized data. There are many possible serialization mechanisms, and different serialization mechanisms may have different value variation characteristics. Some serialization mechanisms may have the following value variation characteristics: the amount of data obtained after serializing any pose information using the serialization mechanism is positively correlated with the value of the corresponding pose information; that is, the larger the value of the serialized pose information, the larger the amount of data obtained after serialization. For example, when the serialization mechanism is FVector, it has this value variation characteristic.

[0107] Based on the numerical variation characteristics of the serialization mechanism, it can be seen that: when the value of the serialized pose information is larger, the amount of data obtained after serialization is larger; when the value of the serialized pose information is smaller, the amount of data obtained after serialization is smaller. Since the value of the relative pose information of a virtual object is usually smaller than the value of the absolute pose information of the virtual object, the engine server can obtain the relative pose information of the virtual object at the current moment based on the numerical variation characteristics of the serialization mechanism, so as to change the serialization of the absolute pose information to the serialization of the relative pose information, thereby reducing the amount of data obtained after serialization.

[0108] Among them, the acquired relative posture information is used to reflect the difference between the absolute posture information of the virtual object at the current moment and the absolute posture information of the virtual object at the previous moment. The absolute posture information at the previous moment refers to the posture information determined based on the reference object at the previous moment.

[0109] In an embodiment of the present application, the absolute posture information may include different parameters that reflect the posture. For example, the absolute posture information may include the absolute position. When the absolute posture information includes the absolute position, the obtained relative posture information may include the relative position of the virtual object at the current moment, and the relative position can be obtained by calculating the difference between the absolute position of the virtual object at the current moment and the absolute position of the virtual object at the previous moment. For example, the absolute posture information may include the absolute speed. When the absolute posture information includes the absolute speed, the obtained relative posture information may include the relative speed of the virtual object at the current moment, and the relative speed can be obtained by calculating the difference between the absolute speed of the virtual object at the current moment and the absolute speed of the virtual object at the previous moment. When executing S203, the engine server can calculate the relative posture information of the virtual object at the current moment in real time based on the absolute posture information of the virtual object at the current moment and the absolute posture information of the virtual object at the previous moment; it can also obtain the relative posture information of the virtual object at the current moment from the pending attribute information of the virtual object (FRepRelativeMovement, a type of structural information). The pending attribute information may be generated by the engine server or other devices before executing S203. The pending attribute information may also include: the yaw angle of the virtual object at the current moment, and does not include the pitch angle and roll angle of the virtual object at the current moment.

[0110] It should be noted that in one possible implementation, after determining the serialization mechanism in S202, the engine server can directly execute S203 to obtain the relative pose information of the virtual object at the current moment, thereby achieving synchronization of the relative pose information through subsequent S204. In another possible implementation, the virtual object may be in different states. Depending on the state of the virtual object, the relative pose information may have different effects on reducing the amount of synchronization data and bandwidth costs. Synchronizing relative pose information in some states can further reduce the amount of synchronization data and bandwidth costs. Based on this, in order to avoid introducing additional errors and excessive calculations and better reduce the amount of synchronization data and bandwidth costs, embodiments of the present application can set the state conditions that the virtual object must meet when using relative pose information. This requires that before executing S203, the engine server must first obtain the state information of the virtual object at the current moment and determine the state conditions that the virtual object must meet when using the relative pose information of the virtual object at the current moment. In combination with the above description, it can be seen that the state information can be located in the relevant fields within the virtual object's FRepMovement. Therefore, the engine server can obtain the virtual object's state information at the current moment from the virtual object's FRepMovement. Then, the engine server can determine whether the virtual object meets the status condition based on the status information; if it is determined based on the status information that the virtual object meets the status condition, it triggers the execution of S203; if it is determined based on the status information that the virtual object does not meet the status condition, it adopts the serialization mechanism to write the absolute position information of the virtual object at the current moment into the corresponding attribute synchronization data stream of the client.

[0111] The state information is used to refer to the state of the virtual object at the current moment, for example, whether the virtual object is attached to other virtual objects, whether the virtual object is in a physical simulation, and so on.

[0112] By using the above method, S203 can be executed only when the virtual object meets the status conditions, thereby avoiding the introduction of additional errors and excessive calculations, and better reducing the amount of synchronization data and bandwidth costs.

[0113] Practice has further proved that if the embodiment of the present application sets the relative posture information of the virtual object at the current moment to include at least one of the following: relative speed and relative position; then when the virtual object is in the following states, using the relative posture information for synchronization will introduce additional errors and excessive calculations: ① The virtual object is attached to other virtual objects, such as a virtual object, a game character, attached to a virtual object, a horse, that is, the game character is in a riding state, because at this time there is both the relative posture of the virtual object itself between the two moments, and the relative posture of the virtual object at the current moment with other virtual objects; ② The virtual object is in a physical simulation, because during physical simulation, the movement of the Actor will be subject to additional control of the physical system. Based on this, the state condition can be set to include at least one of the following: the virtual object is not attached to other virtual objects, and the virtual object is not in a physical simulation; accordingly, the state information includes at least one of the following: a state identifier for indicating whether the virtual object is attached to other virtual objects, and a state identifier for indicating whether the virtual object is in a physical simulation.

[0114] In one possible implementation, if the embodiment of the present application further sets the acquired relative posture information to be located in the to-be-processed attribute information of the virtual object, the subsequent implementation of S204 may be: writing the to-be-processed attribute information where the acquired relative posture information is located into the attribute synchronization data stream. Since the to-be-processed attribute information includes the pitch angle (Pitch) and roll angle (Roll) of the virtual object at the current moment, and does not include the pitch angle (Pitch) and roll angle (Roll) of the virtual object at the current moment, when the Pitch and Roll of the virtual object are non-zero values, using the to-be-processed attribute information for synchronization will introduce additional errors. Therefore, the state condition may also be set to include: the pitch angle and roll angle of the virtual object at the current moment are zero values; accordingly, the state information may also include the orientation information of the virtual object, and the orientation information includes the yaw angle, pitch angle, and roll angle of the virtual object at the current moment.

[0115] The embodiment of the present application is based on research and found that in the actual operation process of most virtual scenes, the time that the virtual objects are in the above-mentioned states is relatively short, so the relative posture information can be used for synchronization by default. That is to say, the embodiment of the present application uses the relative posture information for synchronization by default, which is suitable for situations where the virtual objects in the virtual scene are in the above-mentioned states for a relatively short time. However, there may be some virtual scenes that do not meet this situation, so the embodiment of the present application can also set a global optimization function; the so-called global optimization function can also be called a global optimization identifier, which means that any virtual object in the virtual scene can support the function of determining whether to synchronize the relative posture information of the corresponding virtual object by judging whether it meets the status conditions. In this case, if the virtual scene does not meet this situation, the global optimization function can be turned off, and the optimization can be selectively enabled according to the object type of the virtual object.

[0116] Therefore, before obtaining the virtual object's current state information, the engine server may first obtain the functional state of the global optimization function, which may be an on or off state. If the functional state of the global optimization function is on, the engine server is triggered to execute the step of obtaining the virtual object's current state information. If the functional state of the global optimization function is off, the object type of the virtual object is obtained, and if the virtual object's object type is a specified object type, the engine server is triggered to execute the step of obtaining the virtual object's relative position information at the current moment based on the movement attributes. It is understandable that if the virtual object's object type is not a specified object type, it indicates that the synchronization process of the virtual object's position information is not optimized, that is, the virtual object's absolute position information at the current moment is used for information synchronization. In other words, if the virtual object's object type is not a specified object type, a serialization mechanism is used to write the virtual object's absolute position information at the current moment into the client's corresponding attribute synchronization data stream. For example, the processing logic used by the engine server in this case when obtaining the virtual object's relative position information at the current moment can be seen in Figure 3.

[0117] S204 , using a serialization mechanism, writes the acquired relative posture information into the attribute synchronization data stream corresponding to the client, so as to transmit the attribute synchronization data stream to the corresponding client.

[0118] In one possible implementation, upon detecting a client's information synchronization request, the engine server can serialize the relative pose information in real time and write it to the client's corresponding attribute synchronization data stream. Specifically, when the engine server actively synchronizes the relative pose information with the client, it can be considered that the client has an information synchronization request; or when the engine server receives an information write request on the client's corresponding communication channel, it can be considered that the client has an information synchronization request.

[0119] In this specific implementation, when executing S204, the engine server can respond to the client's information synchronization request by using a serialization mechanism to serialize the acquired relative pose information to obtain relative pose serialized data. This relative pose serialized data is then written into the client's corresponding attribute synchronization data stream, thereby transmitting the attribute synchronization data stream to the corresponding client. This implementation eliminates the need to consume memory space to pre-store relative pose serialized data, improving memory utilization and engine server stability.

[0120] In another specific implementation, research has shown that: FRepMovement and FRepRelativeMovement are both shared serialization type information, and the absolute pose information is located in FRepMovement, and the relative pose information is located in FRepRelativeMovement. Therefore, it can be seen that any pose information belongs to the shared serialization type information; the so-called shared serialization type information refers to information with the following numerical change characteristics: the pose information within the same frame can be serialized first through the FRepLayout::BuildSharedSerialization method (that is, the method for serialization processing using a serialization mechanism), and the data obtained after serialization can be cached in the local space of the engine server, so that when the communication channel corresponding to other clients writes serialized data, it can be directly read from the shared serialized data cached in the local space. Based on this, after the engine server obtains the relative pose information through S203, it can use the serialization mechanism to serialize the obtained relative pose information to obtain relative pose serialized data, and cache the relative pose serialized data in the local space.

[0121] In this specific implementation, when executing S204, the engine server can respond to the client's information synchronization requirements by reading relative pose serialization data from the local space and writing the relative pose serialization data into the client's corresponding attribute synchronization data stream. Through this implementation, when the engine server needs to synchronize relative pose information to multiple clients, it is possible to perform only one serialization operation on the relative pose information, which can effectively save processing resources; and by caching the relative pose serialization data, when the client's information synchronization requirements are detected, the relative pose serialization data can be quickly written into the attribute synchronization data stream, thereby quickly transmitting the attribute synchronization data stream to the corresponding client, thereby improving the synchronization efficiency of the pose information.

[0122] The embodiment of the present application can analyze the numerical variation characteristics of the serialization mechanism used for absolute posture information and find that the serialization mechanism has the following numerical variation characteristics: the amount of data obtained after serializing any posture information using the serialization mechanism is positively correlated with the numerical value of the corresponding posture information. Therefore, after obtaining the absolute posture information of the virtual object in the virtual scene at the current moment, the relative posture information of the virtual object at the current moment can be obtained by considering the numerical variation characteristics of the serialization mechanism. Since the relative posture information obtained is used to refer to the difference between the absolute posture information of the virtual object at the current moment and the absolute posture information of the virtual object at the previous moment, the numerical value of the relative posture information will be much smaller than the numerical value of the absolute posture information, especially when the difference between the absolute posture information of two adjacent moments is small, the numerical value of the relative posture information can be a very small value. Therefore, compared with serializing the absolute posture, by using the serialization mechanism to write the relative posture information into the attribute synchronization data stream, the amount of posture synchronization data can be effectively reduced, thereby effectively reducing bandwidth costs and improving the synchronization efficiency of posture information.

[0123] Based on the description of the method embodiment shown in FIG2 , the present application also proposes an information synchronization method. The present application still uses the example of an engine server independently executing the information synchronization method. Referring to FIG4 , the information synchronization method may include the following steps S401-S408:

[0124] S401: Obtain a list of attributes of virtual objects in a virtual scene at the current moment.

[0125] The attribute list may include: multiple attributes of the virtual object and attribute information of the virtual object under each attribute. The multiple attributes may include but are not limited to: movement attributes, style attributes, size attributes, etc.; the attribute information of the virtual object under the movement attribute includes absolute posture information, the attribute information of the virtual object under the style attribute includes shape, appearance color, etc., and the attribute information of the virtual object under the size attribute may include size value. In addition, for any attribute information that has changed, the entire process of writing the attribute information into the attribute synchronization data stream for synchronization can be processed in the FRepLayout::SendProperties_r method (i.e., the method for writing attribute information).

[0126] In one possible implementation, if the engine server performs information synchronization operations each time it detects that the attribute list of a virtual object has changed, then the attribute list obtained through S401 is essentially the attribute list after the change, that is, the attribute information under at least one attribute in the attribute list is different from the attribute information under the corresponding attribute generated by the virtual object at the previous moment; wherein, the changed attribute list can be determined by comparing the object memory snapshot (that is, comparing the current attribute list with the attribute list stored in the memory snapshot), or by using the push mode mark, and there is no limitation on this. In another possible implementation, if the engine server performs information synchronization operations at a certain synchronization frequency, then the attribute list obtained through S401 may be the attribute list after the change, or it may be the attribute list that has not changed, and there is no limitation on this.

[0127] S402: Search for a mobile attribute from a plurality of attributes included in the attribute list.

[0128] As can be seen above, absolute pose information is located in FRepMovement (the virtual object's attribute information under the movement attribute). FRepMovement is a shared serialization type attribute. When the program processing engine processes shared serialization type attribute information, the corresponding attribute's attribute type is ERepLayoutCmdType::RepMovement (called the base attribute type). Therefore, when an attribute's attribute type is ERepLayoutCmdType::RepMovement, it is considered a movement attribute.

[0129] Based on this, when executing S402, the engine server may determine the baseline attribute type, which is a mobile attribute. Next, it traverses each attribute in the attribute list in sequence and obtains the attribute type of the currently traversed attribute. It then compares the obtained attribute type with the baseline attribute type. If the obtained attribute type is the same as the baseline attribute type, the currently traversed attribute is determined to be a mobile attribute. If the obtained attribute type is different from the baseline attribute type, it continues traversing until all attributes in the attribute list have been traversed.

[0130] S403 : Obtain the absolute position information of the virtual object at the current moment from the attribute information corresponding to the movement attribute in the attribute list.

[0131] S404: Determine a serialization mechanism to be used for the absolute pose information.

[0132] S405. If it is determined that the serialization mechanism has the following numerical variation characteristics: the amount of data obtained after serializing any posture information using the serialization mechanism is positively correlated with the numerical size of the corresponding posture information, the relative posture information of the virtual object at the current moment is obtained based on the numerical variation characteristics of the serialization mechanism.

[0133] S406: Serialize the acquired relative posture information using a serialization mechanism to obtain relative posture serialization data.

[0134] The present embodiment proposes a new serialized data format for relative pose information. As shown in FIG5a , the new serialized data format may include at least one of the following fields:

[0135] The first flag bit (represented by Flag1) can also be called the static flag bit; the value of the first flag bit can be determined based on whether the absolute speed is zero. When the value is a valid value (such as the value 1), it means that the absolute speed is zero. When the client parses, if the value of this field is read as a valid value (such as the value 1), the absolute speed can be directly set to FVector (0, 0, 0). It can be seen that by setting this first flag bit, it can be effectively prevented that when the virtual object in the engine server is stationary, the absolute speed calculated by the client using the relative speed has errors, and it is still a non-zero smaller speed value. In actual applications, the number of bits occupied by this field is 1 bit.

[0136] The second flag bit (represented by Flag2) can also be called the absolute speed unchanged flag bit; the value of the second flag bit can be determined according to whether the relative speed is zero. When the value is a valid value (such as the value 1), it means that the relative speed is zero, that is, the absolute speed of this synchronization has not changed relative to the absolute speed involved in the previous synchronization, and there is no need to write the relative speed subsequently. When the client parses, if the value of this field is read as a valid value (such as the value 1), the current linear speed (that is, the absolute speed) does not need to be updated. It can be seen that by setting the second flag bit, when the relative speed is zero, the value of the second flag bit can be used to efficiently indicate whether the client needs to update the absolute speed, thereby improving the processing efficiency on the client side. In actual applications, the number of bits occupied by this field is 1 bit.

[0137] The third flag bit (indicated by Flag3) is also called the Yaw unchanged flag bit; the value of the third flag bit can be determined based on whether the yaw angle (Yaw) of the virtual object has changed. When the value is a valid value (such as the value 1), it indicates that the yaw angle (Yaw) of this synchronization has not changed relative to the Yaw involved in the previous synchronization. When the client parses, if the value of this field is read as a valid value (such as the value 1), the current Yaw does not need to be updated. It can be seen that by setting the third flag bit, the value of the third flag bit can be used to efficiently indicate whether the client needs to update Yaw when Yaw has not changed, thereby improving the processing efficiency on the client side. In actual applications, the number of bits occupied by this field is 1 bit.

[0138] The client synchronization sequence number field is used to store the posture information sequence number, which is used to indicate the number of times the relative posture information of the virtual object is used continuously for information synchronization. In addition, the maximum value that is allowed to be filled in this field can represent the threshold value of the number of times the relative posture information is allowed to be used continuously for information synchronization, and the maximum value that is allowed to be filled in this field can be determined according to the number of bits occupied by this field. In actual applications, the number of bits occupied by this field can be set according to business needs. For example, the field can be set to occupy 5 bits, which indicates that the maximum value allowed to be filled in this field is 32, that is, the number of times the relative posture information is used continuously for information synchronization can be constrained to not exceed 32, thereby preventing the cumulative error calculated on the client side from being too large.

[0139] The heading storage field stores the yaw angle. When storing the yaw angle, the value obtained by mapping the integer value of the yaw angle from [0, 360) to [0, 256) is stored. If the value of the third flag bit indicates that the virtual object's yaw angle has not changed at the current moment, the heading storage field does not contain the yaw angle; that is, the heading storage field is empty. In practical applications, this field occupies one bit.

[0140] The relative position storage field is used to store the serialized result of the relative position, that is, to store the FVector serialized data of the relative position indicating the absolute position change.

[0141] The relative speed storage field is used to store the serialized result of the relative speed, that is, to store the FVector serialized data of the relative speed indicating the absolute speed change. When the value of Flag 1 (the first flag bit) or Flag 2 (the second flag bit) is a valid value (such as the value 1), the relative speed is not written to this field; that is, when the value of the first flag bit indicates that the absolute speed of the virtual object at the current moment is zero, or when the value of the second flag bit indicates that the relative speed of the virtual object at the current moment is zero, the relative speed storage field is empty.

[0142] Absolute pose storage field, which is used to store the serialized result of absolute pose information.

[0143] As can be seen from the above, the virtual scene is presented through an application. Then, in order to ensure the accuracy of information synchronization using relative posture information, the embodiment of the present application can be set to configure the application with a synchronization optimization function. The so-called synchronization optimization function refers to the function of using relative posture information for data synchronization, and a verification mode is set for the synchronization optimization function. The so-called verification mode refers to a mode of verifying whether the relative posture information is accurate through absolute posture information. Through this operation, the accuracy of the synchronization optimization function of the application can be verified through the verification mode before the synchronization optimization function is put online to ensure the reliability of the subsequent synchronization optimization function. Based on this, the embodiment of the present application can be set: if the synchronization optimization function is in the testing phase and the verification mode is turned on, then when filling the serialized data format, the absolute posture storage field needs to be filled with the serialized result of the absolute posture information of the virtual object at the current moment; if the synchronization optimization function is in the testing phase and the verification mode is not turned on, or the synchronization optimization function is in the application phase, then when filling the serialized data format, the absolute posture storage field does not write the absolute posture information, that is, the absolute posture storage field is empty.

[0144] In one possible implementation, the absolute pose storage field can be subdivided into an absolute position storage field and an absolute speed storage field. The absolute position storage field is used to store the serialized result of the absolute position (i.e., the FVector serialized data of the absolute position), and is only written to the absolute position when the verification mode of the application's synchronization optimization function is enabled. Similarly, the absolute speed storage field is used to store the serialized result of the absolute speed (i.e., the FVector serialized data of the absolute speed), and is only written to the absolute speed when the verification mode of the application's synchronization optimization function is enabled.

[0145] Based on the above description of the serialized data format, when executing S406, the engine server can obtain the serialized data format and fill in at least one field in the serialized data format according to the serialization mechanism and the obtained relative posture information to obtain relative posture serialized data.

[0146] When the relative position information of the virtual object at the current moment includes relative speed, since the serialized data format includes the following fields: a first flag bit, a second flag bit, and a relative speed storage field, based on the above description of the first flag bit, the second flag bit, and the relative speed storage field, it can be seen that when the engine server fills at least one field of the serialized data format according to the serialization mechanism and the acquired relative position information, it can first determine whether the absolute speed of the virtual object at the current moment is zero. If it is zero, fill the first flag bit with a valid value (such as a value of 1); otherwise, fill the first flag bit with an invalid value (such as a value of 0); and then determine whether the relative speed of the virtual object at the current moment is zero. If it is zero, fill the second flag bit with a valid value (such as a value of 1); otherwise, fill the second flag bit with an invalid value (such as a value of 0). Then, detect whether the value of one of the first flag bit and the second flag bit is a valid value. If so, prohibit filling the relative speed storage field. If it does not exist, the serialization mechanism (i.e., FVector) is used to serialize the relative speed of the virtual object at the current moment. Specifically, the relative speed can be filled into the data format of the serialization mechanism (i.e., FVector) (i.e., the data format shown in Figure 1b) to obtain the serialization result; then, the corresponding serialization result is written into the relative speed storage field.

[0147] When the relative posture information of the virtual object at the current moment also includes the relative position, since the serialization data format includes the following fields: relative position storage field, based on the above description of the relative position storage field, it can be seen that when the engine server fills at least one field of the serialization data format according to the serialization mechanism and the acquired relative posture information, the serialization mechanism (i.e., FVector) can be used to serialize the relative position of the virtual object at the current moment. Specifically, the relative position can be filled into the data format of the serialization mechanism (i.e., FVector) (i.e., the data format shown in Figure 1b) to obtain the serialization result; then, the corresponding serialization result is written into the relative speed storage field.

[0148] As can be seen from the above, the relative posture information obtained by the engine server through S405 includes: the yaw angle of the virtual object at the current moment. In this case, not only the obtained relative posture information needs to be written into the attribute synchronization data stream, but also the yaw angle of the virtual object at the current moment needs to be written into the attribute synchronization data stream. Based on this, when the engine server fills at least one field in the serialized format according to the relative posture information of the virtual object at the current moment, it can also fill at least one field in the serialized data format according to the yaw angle of the virtual object at the current moment. Specifically, based on the above description of the orientation storage field and the third flag bit, it can be seen that the engine server can first determine whether the yaw angle of the virtual object at the current moment has changed compared to the yaw angle of the virtual object at the previous moment. If it has changed, the orientation storage field is used to store the yaw angle, for example, a valid value (such as a value 1) is filled into the third flag bit, otherwise the orientation storage field is empty, for example, an invalid value (such as a value 0) is filled into the third flag bit. When the third flag bit is filled with an invalid value, the yaw angle of the virtual object at the current moment is mapped from [0, 360) to [0, 256) to obtain a mapping value, and the mapping value is filled into the orientation storage field.

[0149] If the serialized data format includes a client synchronization sequence number field, then since the posture information sequence number in the client synchronization sequence number field is used to constrain the number of times the relative posture information is continuously used for information synchronization, thereby preventing the cumulative error calculated on the client side from being too large, after the engine server obtains the serialized data format, it can first update the posture information sequence number in the client synchronization sequence number field in the serialized data format by adding one; wherein, if the posture information sequence number before the update is equal to the maximum value allowed to be filled in the client synchronization sequence number field, then the posture information sequence number update fails. For example, assume that the client synchronization sequence number field in the obtained serialized data format occupies a total of 5 bits, that is, the maximum value allowed to be filled in the client synchronization sequence number field is 32 (25=32), that is, the threshold number of times the relative posture of the virtual object is allowed to be continuously used for information synchronization is 32. If the posture information sequence number in the client synchronization sequence number field in the obtained serialized data format is 16, then since 16 is less than the maximum value, the posture information sequence number can be successfully updated to 17 through the addition operation; if the posture information sequence number in the client synchronization sequence number field in the obtained serialized data format is 32, then since 32 is equal to the maximum value, the posture information sequence number in the client synchronization sequence number field cannot be updated through the addition operation.

[0150] If the update is successful, it means that the number of times the relative posture information has been used continuously for information synchronization has not exceeded the number threshold, so the relative posture information of the virtual object at the current moment can continue to be synchronized, so the step of filling at least one field in the serialization data format according to the serialization mechanism and the acquired relative posture information can be triggered to obtain the relative posture serialization data; if the update fails, it means that the number of times the relative posture information has been used continuously for information synchronization has reached the number threshold, so it can be determined that the relative posture serialization data cannot be obtained at this time, and the serialization mechanism is used to write the absolute posture information of the virtual object at the current moment into the attribute synchronization data stream corresponding to the client, and reset the client synchronization sequence number field in the serialization data format, so that the posture information sequence number in the reset client synchronization sequence number field is zero.

[0151] The method for using a serialization mechanism to write the absolute position information of the virtual object at the current moment into the corresponding attribute synchronization data stream of the client is as follows: the absolute position information of the virtual object at the current moment is serialized using a serialization mechanism to obtain absolute position serialized data, and the absolute position serialized data is written into the corresponding attribute synchronization data stream of the client. Furthermore, the absolute position serialized data includes absolute position serialized data and absolute velocity serialized data, and the absolute position serialized data is obtained by filling the absolute position into the data format shown in Figure 1b, and the absolute velocity serialized data is obtained by filling the absolute velocity into the data format shown in Figure 1b.

[0152] S407: Cache the relative pose serialization data into the local space.

[0153] S408, in response to the client's information synchronization requirements, read the relative posture serialization data from the local space, and write the relative posture serialization data into the client's corresponding attribute synchronization data stream, so as to transmit the attribute synchronization data stream to the corresponding client.

[0154] In one possible implementation, the engine server may directly read the relative pose serialization data from the local space in response to the client's information synchronization requirements, and write the relative pose serialization data into the client's corresponding attribute synchronization data stream.

[0155] Taking into account that for the same Actor, the absolute positions synchronized by the engine server to different clients may be different. For example, when a client is displaying a certain frame of the picture, the downlink bandwidth data is saturated, and no attribute information of the Actor will be synchronized at that time, that is, the absolute pose information about the virtual object will not be synchronized at that time. Then, when the client calculates the relative pose information of the virtual object, the absolute pose information based on it and the absolute pose information based on the engine server will be different. In this case, the absolute pose information stored by the client is not the latest absolute pose information, that is, the stored absolute pose information is invalid information. If the relative pose information of the virtual object at the current moment is still synchronized to the client, the absolute pose information calculated by the client based on the relative pose information and the invalid absolute pose information will be inaccurate.

[0156] To this end, after detecting the client's information synchronization needs, the engine server can first obtain the historical information identifier from the communication channel corresponding to the client; the communication channel corresponding to the client may include description information (FSendingRepState, a type of structure information) used to describe the information synchronization situation. The description information (FSendingRepState) stores relevant information about a certain Actor synchronizing data to a client, such as the historical information identifier, so the historical information identifier can be obtained from the FSendingRepState in the communication channel corresponding to the client. The so-called historical information identifier refers to the information identifier of the reference absolute pose information in the client, and the reference absolute pose information refers to the absolute pose information of the virtual object that the client last received before the current moment. Then, by judging whether the historical information identifier meets the preset identification conditions, it is determined whether the reference absolute pose information in the client is valid absolute pose information. If the historical information identifier meets the preset identification conditions, the reference absolute pose information in the client is determined to be valid absolute pose information, and S408 can be triggered at this time; if the historical information identifier does not meet the preset identification conditions, the reference absolute pose information in the client is determined to be invalid absolute pose information, and a serialization mechanism can be used to write the absolute pose information of the virtual object at the current moment into the corresponding attribute synchronization data stream of the client.

[0157] In one embodiment, the engine server can use a circular buffer to save a certain amount of absolute pose information generated by the virtual object at historical moments, thereby marking the valid absolute pose information through the valid starting pose index (HistoryMoveStart) and the valid ending pose index (HistoryMoveEnd), thereby determining whether the reference absolute pose information in the client is valid absolute pose information. In this embodiment, the engine server's local space caches an array of historical pose information of the virtual object, and the historical pose information array includes multiple pose indexes and a storage location indicated by each pose index; the storage locations indicated by different pose indexes are used to store the absolute pose information of the virtual object at different moments, and there is at least one storage location that stores the absolute pose information of the virtual object.

[0158] Among them, the posture index corresponding to the first storage position in the at least one existing storage position is the valid starting posture index, and the posture index corresponding to the last storage position in the at least one existing storage position is the valid ending posture index. For example, suppose that the historical posture information array includes 10 posture indices, namely HistoryMove1, HistoryMove2, ..., HistoryMove9, HistoryMove10; the storage position corresponding to each posture index can be represented by a rectangular box, and a solid rectangular box is used to represent the storage position where the absolute posture information is stored, and a dotted box is used to represent the storage position where the absolute posture information is not stored. Then, referring to Figure 5b, the first 7 storage positions in the historical posture information array all store absolute posture information, so the valid starting posture index is HistoryMove1, and the valid ending posture index is HistoryMove7. It should be noted that the method of determining the valid starting posture index and the valid ending posture index is only listed here by way of example and is not limited to this; for example, the posture index corresponding to the second-to-last storage position in the at least one existing storage position can also be used as the valid ending posture index.

[0159] It should be understood that after obtaining the absolute posture information and corresponding relative posture information of the virtual object at the current moment, the engine server determines whether to synchronize the relative posture information of the virtual object at the current moment to the client based on the historical posture information array. Every time an absolute posture information of a virtual object is generated, the generated absolute posture information can be stored in the historical posture information array. Therefore, the historical posture information array mentioned in the embodiment of the present application may include the absolute posture information of the virtual object at the current moment, and the absolute posture information is located in the last storage position of at least one storage position in the historical posture information array (that is, the storage position where the absolute posture information is stored).

[0160] It can be seen that when the valid ending pose index is the pose index of the last storage position in at least one storage position, the valid ending pose index is the pose index of the absolute pose information of the virtual object at the current moment; in this case, if the valid ending pose index is the same as the valid starting pose index, it indicates that the historical pose information array only stores the absolute pose information of the virtual object at the current moment, and does not store valid historical absolute pose information (i.e., the absolute pose information generated before the current moment). It should also be noted that the historical pose information array may also only store the absolute pose information of the virtual object obtained before the current moment, and not store the absolute pose information of the virtual object at the current moment; in this case, if the valid ending pose index is the same as the valid starting pose index, it indicates that the historical pose information array only stores one valid historical absolute pose information.

[0161] Accordingly, when the local space of the engine server caches an array of historical pose information of the virtual object, the historical information identifier obtained from the communication channel corresponding to the client may include a historical pose index, that is, the pose index of the absolute pose information of the virtual object that the client most recently received before the current moment. In this case, the identification condition may include: the historical pose index must be between the valid starting pose index and the valid ending pose index. It is worth noting that the meaning of "the historical pose index must be between the valid starting pose index and the valid ending pose index" mentioned here can be understood as: the historical pose index is greater than the valid starting pose index and less than the valid ending pose index; in a possible implementation method, when the historical pose index is equal to the valid starting pose index, it can also be considered to be between the valid starting pose index and the valid ending pose index, and the embodiment of the present application does not limit this.

[0162] In another embodiment, due to memory size considerations, the number of absolute pose information retained by the engine server for each Actor will not be too many, for example, set to 8, 16 or 32 (customizable); it can be seen that the number of storage locations in the historical pose information array of the virtual object is limited. The historical pose information array uses a circular buffer to save the absolute pose information of the virtual object. The so-called circular buffer is a first-in-first-out data buffer method. The circular buffer method allows when there are no free storage locations in the historical pose information array, each time an absolute pose information needs to be written to the historical pose information array, the absolute pose information in the first storage location in the historical pose information array will be popped up, and the remaining absolute pose information will be moved forward one storage location in turn, so that the absolute pose information to be written is written to the last storage location in the historical pose information array. Based on this, it can be seen that as the absolute pose information is continuously written, the absolute pose information stored in each storage location in the historical pose information array will change. Since the pose index of the absolute pose information is determined according to the corresponding storage location, it is possible that after a period of time, the absolute pose information pointed to by the historical pose index saved in the communication channel corresponding to the client is not the same as the absolute pose information synchronized to the client by the engine server last time.

[0163] In order to prevent this situation, the embodiment of the present application can add an information version number to the absolute posture information in each attribute information (FRepMovement) of the virtual object under the movement attribute; that is, the absolute posture information of the virtual object at any moment has an information version number. Moreover, if no version number change event is detected at the i-th moment, the information version number of the absolute posture information of the virtual object at the i-th moment is consistent with the information version number of the absolute posture information of the virtual object at the i-1-th moment, and i is an integer greater than 1. Among them, the version number change event refers to the event of detecting the need to synchronize the absolute posture information; it can be seen that if the information version numbers of the absolute posture information of two adjacent moments are consistent, it can be indicated that the posture information synchronized at the latter of the two adjacent moments is relative posture information, which can indicate that the absolute posture information most recently synchronized before the latter moment is valid.

[0164] It can be seen from this that the embodiment of the present application can determine whether the reference absolute pose information in the client is valid absolute pose information by comparing the information version number on the client side with the latest information version number cached in the local space (that is, the information version number of the absolute pose information of the virtual object at the current moment). Accordingly, the historical information identifier obtained from the communication channel corresponding to the client may include the historical information version number, that is, the information version number of the absolute pose information of the virtual object that the client last received before the current moment. In this case, the identification conditions may include: the historical information version number is the same as the information version number cached in the local space; the information version number cached in the local space refers to the latest information version number, that is, the information version number of the absolute pose information of the virtual object at the current moment.

[0165] The version number change event mentioned above may include any of the following:

[0166] 1) Events in which the state information of a virtual object changes, that is, the version number changes when the state of the virtual object changes. For example, the state information indicating that the virtual object has changed from being attached to other virtual objects to being not attached to other virtual objects; another example is the state information indicating that the virtual object has changed from being in a physical simulation to being not in a physical simulation, and so on. If the state information of a virtual object changes, the relationship between the virtual object and the state condition will change. For example, if the virtual object is not attached to other actors but is attached to other actors, then the relationship between the virtual object and the state condition will change from one in which the virtual object has the state condition to one in which the virtual object does not have the state condition, thereby changing from synchronizing relative pose information to synchronizing absolute pose information, which can invalidate the previously used absolute pose information. Therefore, at this time, the version number of the absolute pose information can be changed so that subsequent version number comparison can accurately identify that the previous absolute pose information is invalid.

[0167] 2) An event in which the relative posture information has been synchronized K times in a row, that is, the version number is changed when the relative posture information is used for information synchronization K times in a row (K is a positive integer). That is to say, the embodiment of the present application can be set to force the use of absolute posture information synchronization once after the relative posture information is used K times in a row, so that the absolute posture information used before is invalid. At this time, the version number of the absolute posture information can be changed so that the previous absolute posture information can be accurately identified as invalid absolute posture information through subsequent version number comparison. This processing method can prevent the client from using relative posture information for multiple times in a row to determine the absolute posture information, resulting in excessive cumulative errors.

[0168] Based on the version number change event mentioned above, it can be seen that after multiple information synchronizations, the posture information synchronization status between the engine server and the client can be exemplified as shown in Figure 5c: During the long-term attribute synchronization process, the absolute posture information and relative posture information of the virtual object can appear at intervals, and the number of relative posture information used continuously each time is not fixed. This is due to the timing of the change of the information version number mentioned above.

[0169] It should be noted that packet loss is prone to occur during the synchronization of attribute information. If packet loss occurs, the UActorChannel (i.e., the communication channel) corresponding to the client can set the associated sent changed attribute list to a retransmission state, so that when the next information synchronization is performed, the attribute list that needs to be retransmitted will also be added when the changed attribute list is synchronized. Based on this, if packet loss occurs on the client, the historical information identifier in the communication channel corresponding to the client is reset to an invalid value; wherein, when the historical information identifier is an invalid value, the historical information identifier does not meet the preset identification condition. In other words, when packet loss occurs, the client can be set to reset the cached historical information version number and historical posture index and other historical information identifiers to invalid values, so that the next time the information is synchronized, the historical information version number and historical posture index will inevitably fail to meet the corresponding identification conditions, so that the absolute posture information will be used the next time the information is synchronized. As can be seen from the foregoing, the serialized data format used to serialize relative pose information includes a client synchronization sequence number field, which is used to store the pose information sequence number. Therefore, it can be seen that each time relative pose information is synchronized to the client, a pose information sequence number is synchronized to the client. This pose information sequence number is used to indicate the number of consecutive times the relative pose information of the virtual object is used for information synchronization. Then, each time the client receives a pose information sequence number, it can calculate the difference between the currently received pose information sequence number and the last received pose information sequence number. If the difference is greater than a threshold (such as a value of 1), it is determined that packet loss has occurred.

[0170] It should also be noted that S408 in the embodiment of the present application is an implementation of S204 in the method embodiment shown in Figure 2 above; the processing logic mentioned here for determining whether to synchronize relative posture information by judging whether the reference absolute posture information in the client is valid absolute posture information is also applicable to the method embodiment shown in Figure 2 above. That is to say, in the method embodiment shown in Figure 2, before executing S204, a historical information identifier can be obtained from the communication channel corresponding to the client. If the historical information identifier meets the preset identification condition, the reference absolute posture information in the client is determined to be valid absolute posture information, and the execution of S204 is triggered. Otherwise, a serialization mechanism is used to write the absolute posture information of the virtual object at the current moment into the attribute synchronization data stream corresponding to the client.

[0171] The embodiment of the present application can analyze the numerical variation characteristics of the serialization mechanism used for absolute posture information and find that the serialization mechanism has the following numerical variation characteristics: the amount of data obtained after serializing any posture information using the serialization mechanism is positively correlated with the numerical value of the corresponding posture information. Therefore, after obtaining the absolute posture information of the virtual object in the virtual scene at the current moment, the relative posture information of the virtual object at the current moment can be obtained by considering the numerical variation characteristics of the serialization mechanism. Since the relative posture information obtained is used to reflect the difference between the absolute posture information of the virtual object at the current moment and the absolute posture information of the virtual object at the previous moment, the numerical value of the relative posture information will be much smaller than the numerical value of the absolute posture information. In particular, when the difference between the absolute posture information of two adjacent moments is small, the numerical value of the relative posture information can be a very small value. Therefore, compared with serializing the absolute posture, by using the serialization mechanism to write the relative posture information into the attribute synchronization data stream, the amount of posture synchronization data can be effectively reduced, thereby effectively reducing bandwidth costs and improving the synchronization efficiency of posture information.

[0172] In practical applications, the information synchronization method shown in Figures 2 and 4 can be used in various virtual scenes, such as game scenes, scenes in film and television dramas, etc. Among them, applying this information synchronization method to the game scene can make it possible for the server-side connection object (i.e., the virtual object operated by the player in the virtual scene) corresponding to the client used by the game player (i.e., the game client) to be associated with the network synchronization of other Actors through the UActorChannel class management, and collect the changed attribute information of other surrounding Actors at a certain frequency (if the corresponding Actor has not yet calculated the changed attribute list at the current moment, it will be calculated once first). If the collected attribute information is attribute information under the movement attribute and meets the state conditions for using relative posture information, the relative posture information is calculated based on the collected attribute information, and the relative posture information is written into the attribute synchronization data stream corresponding to the client (the original absolute posture information is no longer written).

[0173] For example, as shown in FIG5d , the application process of the information synchronization method in a game scene is roughly as follows:

[0174] First, you can obtain a list of the Actor's attributes that have changed at the current moment. This attribute list includes n attributes and the attribute information of the Actor under each attribute, where n is a positive integer. Then, you can traverse each attribute in the attribute list. If the attribute currently traversed is a movement attribute, the Actor's absolute pose information at the current moment (such as absolute velocity, absolute position, etc.) is obtained from the attribute information (FRepMovement) corresponding to the movement attribute in the attribute list.

[0175] Then, it can be determined whether the absolute pose information can be replaced with relative pose information. Specifically, it can be determined based on the Actor's current state information whether the Actor has the state conditions for using relative pose information. If so, it can be determined that the absolute pose information can be replaced with relative pose information. If not, it can be determined that the absolute pose information cannot be replaced with relative pose information.

[0176] If the absolute pose information can be replaced with relative pose information, the relative pose information of the Actor at the current moment can be obtained from the Actor's pending attribute information (FRepRelativeMovement), so that when it is subsequently written, the serialized data of the absolute pose information can be replaced with the serialized data of the relative pose information. In one possible implementation, the obtained relative pose information can be serialized using the FVector serialization mechanism to obtain relative pose serialized data (i.e., serialized data of relative pose information), and the relative pose serialized data can be cached in the local space so that the relative pose serialized data can be subsequently written to the attribute synchronization data stream of one or more clients.

[0177] For any client, such as client 1 or client 2 in Figure 5d; when the information synchronization demand of any client is detected, it can be determined whether the relative pose serialization data can be written to the communication channel (Actor Channel) corresponding to any client based on the network status and other information on the client side. For example, if the network status indicates that the downlink bandwidth of any client is saturated, or the network connection with any client is disconnected, it is determined that the relative pose serialization data cannot be written; if the network status indicates that the downlink bandwidth of any client is not saturated, or the network connection with any client is not disconnected, it is determined that the relative pose serialization data can be written. If it is determined that the relative pose serialization data can be written, the relative pose serialization data can be written to the attribute synchronization data stream corresponding to any client through the RreplicateActor (a function name for attribute replication) method, and the attribute synchronization data stream can be written to the communication channel corresponding to any client, so as to transmit the attribute synchronization data stream to the corresponding client through the corresponding network connection.

[0178] The communication channel of any client may include FSendingRepState (description information), and each FSendingRepState records the historical pose index and historical information version number used for the most recent synchronization of absolute pose information. In this case, see Figure 5e: when the information synchronization requirement of any client is detected, the historical pose index and historical information version number can be obtained from the communication channel of any client first. By judging whether the historical pose index (such as HistoryMove3 shown in Figure 5e) is located between the valid starting pose index (such as HistoryMove2 shown in Figure 5e) and the valid ending pose index (such as HistoryMove n-1 shown in Figure 5e) in the historical pose information array, it is determined whether the historical pose index is a valid pose index; and, whether the historical information version number is the same as the information version number stored in the local space of the engine server.

[0179] If both conditions are met (i.e. the information version number is the same and the historical pose index is a valid pose index), it is possible to detect whether the relative pose serialization data is cached in the local space. If it is cached, the aforementioned step of writing the relative pose serialization data into the attribute synchronization data stream through the RreplicateActor (a function name for attribute replication) method is triggered. If it is not cached, the relative pose serialization data is calculated and written into the attribute synchronization data stream; specifically, the relative pose serialization data can be calculated based on the absolute pose information in the attribute information (FHistoryRepMovement) under the movement attribute of the virtual object at the previous moment (the absolute pose information in the storage location indicated by HistoryMove3 in Figure 5e), and based on the absolute pose information of the virtual object at the current moment (i.e. the absolute pose information in the attribute information under the movement attribute obtained at the current moment as shown in Figure 5e), and serialized to obtain the relative pose serialization data.

[0180] If at least one of the historical pose index and the historical information version number does not meet the corresponding conditions, the virtual object's absolute pose information at the current moment may be written to the attribute synchronization data stream. Furthermore, the pose information sequence number in the communication channel may be reset to zero, the historical pose index may be reset to the pose index of the virtual object's absolute pose information at the current moment, and the historical information version number may be reset to the information version number of the virtual object's absolute pose information at the current moment.

[0181] In an embodiment of the present application, the synchronized absolute posture information in the default implementation of the program processing engine (UE DS) can be replaced with a combination of absolute posture information and relative posture information; since the relative posture information obtained is used to reflect the difference between the absolute posture information of the virtual object at the current moment and the absolute posture information of the virtual object at the previous moment, the value of the relative posture information will be much smaller than the value of the absolute posture information, especially when the difference between the absolute posture information at two adjacent moments is small, the value of the relative posture information can be a very small value. Then, compared with serializing the absolute posture, by adopting a serialization mechanism to write the relative posture information into the attribute synchronization data stream, the amount of posture synchronization data can be effectively reduced, thereby effectively reducing bandwidth costs, improving the synchronization efficiency of the posture information, thereby improving the rendering efficiency of the game screen on the client side, and thus improving the smoothness of the game operation.

[0182] To further illustrate the feasibility of the information synchronization method proposed in the embodiment of the present application in a gaming scenario, the embodiment of the present application conducted a performance test on the information synchronization method in a gaming scenario, and obtained the following test results:

[0183] (1) It can significantly reduce the bandwidth cost required for posture synchronization.

[0184] (1) Test case 1: The server network synchronization frame rate is 30. Let the NPC (non-player character, i.e., a game character not controlled by a real player) move along a rectangle at a certain distance (i.e., N meters) from the origin at a certain speed, and pause at a certain distance (e.g., change direction and wait 0.3 seconds), and then move along the rectangle in a certain direction. That is, by pausing once, the change of direction and speed is increased, thereby increasing the amount of synchronized data, as shown in Figure 6a.

[0185] ① The maximum speed of the NPC during directional movement was set to 6 meters per second, with pauses every 5 meters. Various scenarios were tested with N of 5, 10, 20, 50, 100, 200, 500, and 1000 meters, yielding the results shown in Figure 6b. The right-hand plot in Figure 6b shows that as the NPC's distance from the origin increases, its absolute position increases, and the number of bits required to synchronize the absolute pose information (including the absolute position) increases. However, the number of bits required to synchronize the relative pose information (including the relative position) remains relatively stable, less than half the original number. The left-hand plot in Figure 6b shows that the optimized pose bandwidth ratio (i.e., the ratio of the bandwidth required to synchronize the relative pose information to the bandwidth required to synchronize the absolute pose information) is less than 1. This indicates that the bandwidth required to synchronize the relative pose information is lower than that of the default implementation (i.e., synchronizing the absolute pose information). In particular, when the distance from the origin is greater than 100 meters, the bandwidth required to synchronize the relative pose information is only 40% of the default implementation, or even less.

[0186] ② Set the maximum speed of the NPC during directional movement to 6 meters per second, and pause every 2.5 meters. We tested various situations where N was 5 meters, 10 meters, 20 meters, 50 meters, 100 meters, 200 meters, 500 meters, and 1000 meters, and obtained the results shown in Figure 6c. By comparing Figures 6b and 6c, we can see that compared to pausing every 5 meters, pausing every 2.5 seconds increases the frequency of direction and speed changes, thereby increasing the amount of synchronized pose information required. As a result, the optimization effect shown in Figure 6c is slightly lower than that shown in Figure 6b. However, when the NPC is more than 50 meters away from the origin, the bandwidth required to synchronize relative pose information is still only 50% of the default implementation, or even less.

[0187] (2) Test case 2: The server network synchronization frame rate is 30, and the NPC is asked to move randomly (such as randomly changing the direction and speed) around a rectangle at a certain distance (i.e., N meters) from the origin, as shown in Figure 6d.

[0188] We set the maximum speed of the NPC during random movement to 6 meters per second, and tested various scenarios with N of 5, 10, 20, 50, 100, 200, 500, and 1000 meters, yielding the results shown in Figure 6e. The right-hand graph in Figure 6e shows that as the NPC moves farther from the origin, the number of bits required to synchronize absolute pose information increases, while the number of bits required to synchronize relative pose information remains relatively stable, less than half the bandwidth required for synchronization. The left-hand graph in Figure 6e shows that the bandwidth required to synchronize relative pose information is less than 50% of that required by the default implementation, indicating that the bandwidth required to synchronize relative pose information is low relative to the bandwidth of the default implementation.

[0189] (2) No additional CPU (Central Processing Unit) overhead is added.

[0190] Test case: The server's network synchronization frame rate is 30, and an NPC is randomly moved around a rectangle approximately 1000 meters from the origin, as shown in Figure 6f. Statistics are collected for each frame, including the overall network synchronization time (NetDriver TickFlush) and attribute synchronization time (Replicate Actor Time).

[0191] ① Set 100 NPCs to move randomly and log in 20 game players.

[0192] When absolute posture information is used for information synchronization, the corresponding statistical results can be seen in Figure 6g. Based on Figure 6g, it can be seen that when synchronizing absolute posture information, the average time consumed by the overall network synchronization is 9.347 milliseconds, and the average time consumed by attribute synchronization is 7.717 milliseconds. In addition, the data volume (Out Rate) of the overall network synchronization in this case was also counted, and it was found that its minimum value was approximately 777K bytes / second, the average value was approximately 836K bytes / second, and the maximum value was approximately 873K bytes / second. In addition, the data volume required for synchronizing absolute posture information (RepMovement Origin Bits) was counted, and it was found that its minimum value was approximately 2911399Kbits, the average value was approximately 3046768Kbits, and the maximum value was approximately 3181405Kbits.

[0193] When using relative pose information for information synchronization, the corresponding statistical results can be seen in Figure 6h. Based on Figure 6h, when synchronizing relative pose information, the average time required for overall network synchronization is 9.186 milliseconds, and the average time required for attribute synchronization is 7.391 milliseconds. In addition, the data volume of overall network synchronization in this case was also counted, and the minimum value was approximately 432K bytes / second, the average value was approximately 452K bytes / second (approximately 54% of the default implementation), and the maximum value was approximately 471K bytes / second. Furthermore, the data volume required for synchronizing relative pose information (RepMovement Optimized Bits) was counted, and the minimum value was approximately 1158585216Kbits, the average value was approximately 1212244bits, and the maximum value was approximately 1265747Kbits. This shows that the average data volume required for synchronization using relative pose information is approximately 39.7% of the average data volume required for synchronizing absolute pose information in the default implementation.

[0194] ② Set 100 NPCs to move randomly and log in 32 game players.

[0195] When absolute posture information is used for information synchronization, the corresponding statistical results can be seen in Figure 6i. Based on Figure 6i, it can be seen that when synchronizing absolute posture information, the average time consumed by the overall network synchronization is 15.487 milliseconds, and the average time consumed by attribute synchronization is 12.711 milliseconds. In addition, the data volume of the overall network synchronization in this case was also counted, and it was found that its minimum value was approximately 1280K bytes / second, the average value was approximately 1342K bytes / second, and the maximum value was approximately 1398K bytes / second. In addition, the data volume required for synchronizing absolute posture information was counted, and it was found that its minimum value was approximately 676293Kbits, the average value was approximately 891129Kbits, and the maximum value was approximately 1105786Kbits.

[0196] When relative posture information is used for information synchronization, the corresponding statistical results can be seen in Figure 6j. Based on Figure 6j, it can be seen that when synchronizing relative posture information, the average time consumed for overall network synchronization is 14.711 milliseconds, and the average time consumed for attribute synchronization is 11.868 milliseconds. In addition, the data volume of the overall network synchronization in this case was also counted, and it was found that its minimum value was approximately 684K bytes / second, the average value was approximately 718K bytes / second (approximately 54% of the default implementation), and the maximum value was approximately 755K bytes / second. In addition, the amount of data required to synchronize relative posture information was counted, and it was found that its minimum value was approximately 269092Kbits, the average value was approximately 354722Kbits, and the maximum value was approximately 440082Kbits. It can be seen that the average amount of data required for synchronization using relative posture information is approximately 39.8% of the average amount of data required to synchronize absolute posture information in the default implementation.

[0197] Based on the descriptions of Figures 6g and 6j above, we can see that the time required to use relative pose information is similar to that required to use absolute pose information, and the time required to use relative pose information is even slightly lower. Therefore, although using relative pose information for synchronization increases the calculation of relative pose information, the amount of data required for synchronization is reduced, and the overall amount is still slightly lower. Therefore, using relative pose information for synchronization does not incur additional CPU overhead.

[0198] (3) The error caused by information synchronization based on relative posture information is small, and is in the single-digit centimeter level.

[0199] Test case: The server network synchronization frame rate is 30, and the NPC is asked to move randomly around a rectangle about 1000 meters away from the origin, as shown in Figure 6f above.

[0200] ① Set 100 NPCs to move randomly and log in 20 game players.

[0201] In the statistics-enabled verification mode, the position error and velocity error information brought about by the synchronization of relative posture information are analyzed, and the statistical results shown in Figure 6k are obtained. Based on Figure 6k, it can be seen that the average position error (Relative Location Diff) is 1.69 cm, and the maximum position error is 8.46 cm. The average velocity error (Relative Velocity Diff) is 0.71 cm / s, and the maximum velocity error is 4.47 cm / s. In addition, the number of packet losses (Relative Count Unordered) is also counted, and it is found that the minimum, maximum, and average value of the packet loss number are all 0.

[0202] ② Set 100 NPCs to move randomly and log in 32 game players.

[0203] In statistics-enabled verification mode, the position error and velocity error information generated by synchronizing relative pose information yield the statistical results shown in Figure 61. Figure 61 shows that the average position error (Relative Location Diff) is 1.81 cm, with a maximum position error of 7.15 cm. The average velocity error (Relative Velocity Diff) is 0.60 cm / s, with a maximum velocity error of 3.61 cm / s.

[0204] Based on the description of the above information synchronization method embodiment, the present application also discloses an information synchronization device; the information synchronization device can be a computer program (including program code) running on an engine server, and the information synchronization device can execute each step of the method flow shown in Figure 2 or Figure 4. Referring to Figure 7, the information synchronization device can run the following units:

[0205] An acquisition unit 701 is configured to acquire absolute position information of a virtual object in a virtual scene at a current moment. The absolute position information at a current moment refers to the position information determined based on a reference object at the current moment, and the position information is used to synchronize to a client in a serialized manner.

[0206] The acquisition unit 701 is further configured to determine a serialization mechanism to be used for the absolute pose information;

[0207] The acquiring unit 701 is further configured to, if it is determined that the serialization mechanism has the following numerical variation characteristics: the amount of data obtained after serializing any pose information using the serialization mechanism is positively correlated with the numerical value of the corresponding pose information, acquire relative pose information of the virtual object at the current moment based on the numerical variation characteristics of the serialization mechanism; wherein the acquired relative pose information is used to reflect the difference between the absolute pose information of the virtual object at the current moment and the absolute pose information of the virtual object at a previous moment, where the absolute pose information at the previous moment refers to the pose information determined based on the reference object at the previous moment;

[0208] The synchronization unit 702 is configured to write the acquired relative posture information into the attribute synchronization data stream corresponding to the client by adopting the serialization mechanism, so as to transmit the attribute synchronization data stream to the corresponding client.

[0209] In one embodiment, the acquiring unit 701 may further be configured to:

[0210] Acquiring state information of the virtual object at the current moment, and determining state conditions that the virtual object must meet when the relative position information of the virtual object at the current moment is used;

[0211] If it is determined according to the state information that the virtual object meets the state condition, triggering the step of executing the numerical value change characteristic based on the serialization mechanism to obtain the relative posture information of the virtual object at the current moment;

[0212] If it is determined according to the state information that the virtual object does not meet the state condition, the serialization mechanism is used to write the absolute position information of the virtual object at the current moment into the attribute synchronization data stream corresponding to the client.

[0213] In one embodiment, the relative posture information of the virtual object at the current moment includes at least one of the following: relative speed and relative position;

[0214] The state information includes at least one of the following: a state flag indicating whether the virtual object is attached to another virtual object, and a state flag indicating whether the virtual object is in a physical simulation;

[0215] The state condition includes at least one of the following: the virtual object is not attached to other virtual objects, and the virtual object is not in physical simulation.

[0216] In one embodiment, the acquired relative posture information is located in the to-be-processed attribute information of the virtual object, and the to-be-processed attribute information also includes: the yaw angle of the virtual object at the current moment, but does not include the pitch angle and roll angle of the virtual object at the current moment; the synchronization unit 702 is configured to:

[0217] Writing the attribute information to be processed containing the acquired relative posture information into the attribute synchronization data stream;

[0218] The state information also includes orientation information of the virtual object, and the orientation information includes the yaw angle, pitch angle and roll angle of the virtual object at the current moment; the state condition includes: the pitch angle and roll angle of the virtual object at the current moment are zero.

[0219] In another embodiment, before obtaining the state information of the virtual object at the current moment, the obtaining unit 701 may further be used to:

[0220] Obtaining a function state of a global optimization function, wherein the function state includes an on state or an off state;

[0221] If the function state of the global optimization function is the on state, triggering the step of obtaining the state information of the virtual object at the current moment;

[0222] If the functional state of the global optimization function is off, the object type of the virtual object is obtained, and when the object type of the virtual object is a specified object type, the numerical change characteristics based on the serialization mechanism are triggered to execute, and the relative posture information of the virtual object at the current moment is obtained.

[0223] In another embodiment, when the acquiring unit 701 is used to acquire the absolute position information of the virtual object in the virtual scene at the current moment, it can be specifically used to:

[0224] Obtaining an attribute list of the virtual object in the virtual scene at the current moment, the attribute list including multiple attributes of the virtual object and attribute information of the virtual object under each attribute;

[0225] A movement attribute is searched from a plurality of attributes included in the attribute list, and absolute position information of the virtual object at the current moment is acquired from attribute information corresponding to the movement attribute in the attribute list.

[0226] In another embodiment, when the acquiring unit 701 is used to search for the mobile attribute from the multiple attributes included in the attribute list, it can be specifically used to:

[0227] Determine a base attribute type, where the attribute under the base attribute type is a mobile attribute;

[0228] Traverse each attribute in the attribute list in turn and obtain the attribute type of the currently traversed attribute;

[0229] If the acquired attribute type is the same as the reference attribute type, determining the currently traversed attribute as the movement attribute;

[0230] If the acquired attribute type is different from the reference attribute type, the traversal continues until all attributes in the attribute list are traversed.

[0231] In another embodiment, any pose information is of a shared serialization type; accordingly, after the acquisition unit 701 acquires the relative pose information of the virtual object at the current moment, the synchronization unit 702 may further be configured to: serialize the acquired relative pose information using the serialization mechanism to obtain relative pose serialized data, and cache the relative pose serialized data in a local space;

[0232] Correspondingly, when the synchronization unit 702 is used to adopt the serialization mechanism to write the acquired relative posture information into the attribute synchronization data stream corresponding to the client, it can be specifically used to: respond to the client's information synchronization requirements, read the relative posture serialization data from the local space, and write the relative posture serialization data into the attribute synchronization data stream corresponding to the client.

[0233] In another embodiment, the relative posture information of the virtual object at the current moment includes a relative speed; when the synchronization unit 702 is used to serialize the acquired relative posture information using the serialization mechanism to obtain relative posture serialized data, it can be specifically used to:

[0234] Obtain a serialized data format, the serialized data format including the following fields: a first flag bit, a second flag bit, and a relative speed storage field; the value of the first flag bit is determined based on whether the absolute speed is zero, the value of the second flag bit is determined based on whether the relative speed is zero, and the relative speed storage field is used to store a serialized result of the relative speed;

[0235] Filling at least one field in the serialized data format according to the serialization mechanism and the acquired relative pose information to obtain relative pose serialized data;

[0236] Among them, when the value of the first flag bit indicates that the absolute speed of the virtual object at the current moment is zero, or when the value of the second flag bit indicates that the relative speed of the virtual object at the current moment is zero, the relative speed storage field is empty.

[0237] In another embodiment, the relative posture information of the virtual object at the current moment further includes a relative position;

[0238] The serialized data format further includes a relative position storage field, and the relative position storage field is used to store the serialization result of the relative position.

[0239] In another embodiment, the relative position information of the virtual object at the current moment includes the yaw angle of the virtual object at the current moment;

[0240] The serialized data format also includes: a third flag bit and a direction storage field; the value of the third flag bit is determined according to whether the yaw angle of the virtual object has changed, and the direction storage field is used to store the yaw angle; wherein, when the value of the third flag bit indicates that the yaw angle of the virtual object at the current moment has not changed, the direction storage field is empty.

[0241] In another embodiment, the serialized data format further includes a client synchronization sequence number field, which is used to store a posture information sequence number, and the posture information sequence number is used to indicate the number of times the relative posture information of the virtual object is continuously used for information synchronization; accordingly, after obtaining the serialized data format, the synchronization unit 702 can also be used to:

[0242] Updating the posture information sequence number in the client synchronization sequence number field by adding one; wherein, if the posture information sequence number before the update is equal to the maximum value allowed to be filled in the client synchronization sequence number field, the posture information sequence number update fails;

[0243] If the update is successful, the step of filling at least one field in the serialized data format according to the serialization mechanism and the acquired relative pose information to obtain relative pose serialized data is triggered;

[0244] If the update fails, the serialization mechanism is used to write the absolute posture information of the virtual object at the current moment into the attribute synchronization data stream corresponding to the client; and the client synchronization sequence number field is reset, and the posture information sequence number in the reset client synchronization sequence number field is zero.

[0245] In another embodiment, the serialized data format further includes an absolute posture storage field, and the absolute posture storage field is used to store the serialized result of the absolute posture information;

[0246] The virtual scene is presented through an application, and the application is configured with a synchronization optimization function, wherein the synchronization optimization function refers to a function of performing information synchronization using relative posture information;

[0247] If the synchronization optimization function is in the testing phase and the verification mode is turned on, then when filling the serialized data format, the absolute posture storage field needs to be filled with the serialized result of the absolute posture information of the virtual object at the current moment; the verification mode refers to a mode in which the absolute posture information is used to verify whether the relative posture information is accurate;

[0248] If the synchronous optimization function is in the testing phase and the verification mode is not turned on, or the synchronous optimization function is in the application phase, the absolute posture storage field is empty when filling the serialized data format.

[0249] In another implementation, the synchronization unit 702 may also be configured to:

[0250] Obtaining a historical information identifier from a communication channel corresponding to the client, wherein the historical information identifier refers to an information identifier of reference absolute pose information in the client; the reference absolute pose information refers to the absolute pose information of the virtual object most recently received by the client before the current moment;

[0251] If the historical information identifier satisfies a preset identification condition, the reference absolute pose information in the client is determined to be valid absolute pose information, and the step of using the serialization mechanism to write the acquired relative pose information into the attribute synchronization data stream corresponding to the client is triggered;

[0252] If the historical information identifier does not meet the preset identification conditions, the reference absolute pose information in the client is determined to be invalid absolute pose information, and the serialization mechanism is used to write the absolute pose information of the virtual object at the current moment into the attribute synchronization data stream corresponding to the client.

[0253] In another embodiment, an array of historical pose information of the virtual object is cached in the local space;

[0254] The historical pose information array includes a plurality of pose indexes and a storage location indicated by each pose index, the storage locations indicated by different pose indexes are used to store the absolute pose information of the virtual object at different times, and there is at least one storage location storing the absolute pose information of the virtual object;

[0255] The pose index corresponding to the first storage position in the at least one storage position is a valid starting pose index, and the pose index corresponding to the last storage position in the at least one storage position is a valid ending pose index;

[0256] The historical information identifier includes a historical posture index; and the identification condition includes: the historical posture index is located between the valid starting posture index and the valid ending posture index.

[0257] In another embodiment, the absolute position information of the virtual object at any moment has an information version number;

[0258] If no version number change event is detected at the i-th moment, the information version number of the absolute position information of the virtual object at the i-th moment is consistent with the information version number of the absolute position information of the virtual object at the i-1 moment, where i is an integer greater than 1; the version number change event includes any of the following: an event in which the state information of the virtual object changes, or an event in which the relative position information has been synchronized K times consecutively, where K is a positive integer;

[0259] Among them, the historical information identifier includes a historical information version number, and the information version number of the absolute posture information of the virtual object at the current moment is cached in the local space; the identification condition includes: the historical information version number is the same as the information version number cached in the local space.

[0260] In another embodiment, if packet loss occurs on the client, the historical information identifier in the communication channel corresponding to the client is reset to an invalid value; wherein, when the historical information identifier is an invalid value, the historical information identifier does not meet the preset identification condition; the synchronization unit 702 may also be used to:

[0261] Synchronizing a posture information sequence number of the relative posture to the client, where the posture information sequence number is used to indicate the number of times the relative posture information of the virtual object is continuously used for information synchronization;

[0262] The client is used to calculate the difference between the sequence number of the currently received posture information and the sequence number of the last received posture information. If the difference is greater than a threshold, it is determined that packet loss has occurred.

[0263] According to another embodiment of the present application, the various units in the information synchronization device shown in Figure 7 can be individually or all combined into one or several other units to form, or one (or some) of the units can be further divided into multiple functionally smaller units to form, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application. The above-mentioned units are divided based on logical functions. In actual applications, the functions of one unit can also be implemented by multiple units, or the functions of multiple units can be implemented by one unit. In other embodiments of the present application, other units can also be included based on the information synchronization device. In actual applications, these functions can also be implemented with the assistance of other units, and can be implemented by the collaboration of multiple units.

[0264] According to another embodiment of the present application, an information synchronization device as shown in FIG7 can be constructed, and the information synchronization method of the embodiment of the present application can be implemented by running a computer program (including program code) capable of executing the steps involved in the corresponding method as shown in FIG2 or FIG4 on a general-purpose computing device such as a computer including processing elements and storage elements such as a central processing unit (CPU), a random access memory medium (RAM), and a read-only memory medium (ROM). The computer program can be recorded on, for example, a computer-readable recording medium, and loaded into the above-mentioned computing device through the computer-readable recording medium and run therein.

[0265] The embodiment of the present application can analyze the numerical variation characteristics of the serialization mechanism used for absolute posture information and find that the serialization mechanism has the following numerical variation characteristics: the amount of data obtained after serializing any posture information using the serialization mechanism is positively correlated with the numerical value of the corresponding posture information. Therefore, after obtaining the absolute posture information of the virtual object in the virtual scene at the current moment, the relative posture information of the virtual object at the current moment can be obtained by considering the numerical variation characteristics of the serialization mechanism. Since the relative posture information obtained is used to reflect the difference between the absolute posture information of the virtual object at the current moment and the absolute posture information of the virtual object at the previous moment, the numerical value of the relative posture information will be much smaller than the numerical value of the absolute posture information. In particular, when the difference between the absolute posture information of two adjacent moments is small, the numerical value of the relative posture information can be a very small value. Therefore, compared with serializing the absolute posture, by using the serialization mechanism to write the relative posture information into the attribute synchronization data stream, the amount of posture synchronization data can be effectively reduced, thereby effectively reducing bandwidth costs and improving the synchronization efficiency of posture information.

[0266] Based on the description of the above-mentioned method embodiment and device embodiment, the embodiment of the present application also provides an engine server. Please refer to Figure 8, the engine server includes at least a processor 801, an input interface 802, an output interface 803 and a computer storage medium 804. Among them, the processor 801, input interface 802, output interface 803 and computer storage medium 804 in the engine server can be connected via a bus or other means. The computer storage medium 804 can be stored in the memory of the engine server, and the computer storage medium 804 is used to store a computer program, and the computer program includes program instructions, and the processor 801 is used to execute the program instructions stored in the computer storage medium 804. The processor 801 (or CPU (Central Processing Unit)) is the computing core and control core of the engine server, which is suitable for implementing one or more computer programs, and is specifically suitable for loading and executing one or more computer programs to realize the corresponding method flow or corresponding function.

[0267] In one embodiment, the processor 801 described in the embodiment of the present application can be used to perform a series of information synchronization processing, specifically including: obtaining absolute pose information of a virtual object in a virtual scene at a current moment, where the absolute pose information at the current moment refers to pose information determined based on a reference object at the current moment, and the pose information is used to synchronize to a client through serialization; determining a serialization mechanism used for the absolute pose information, where the serialization mechanism has the following numerical variation characteristics: the amount of data obtained after serializing any pose information using the serialization mechanism is positively correlated with the numerical size of the corresponding pose information; based on the numerical variation characteristics of the serialization mechanism, obtaining relative pose information of the virtual object at the current moment; wherein the obtained relative pose information is used to reflect the difference between the absolute pose information of the virtual object at the current moment and the absolute pose information of the virtual object at a previous moment, where the absolute pose information at the previous moment refers to pose information determined based on the reference object at the previous moment; using the serialization mechanism, writing the obtained relative pose information into the attribute synchronization data stream corresponding to the client to transmit the attribute synchronization data stream to the corresponding client, and so on.

[0268] The embodiment of the present application also provides a computer storage medium (Memory), which is a memory device in the engine server for storing programs and data. It can be understood that the computer storage medium here can include both the built-in storage medium in the engine server and, of course, the extended storage medium supported by the engine server. The computer storage medium provides a storage space, which stores the operating system of the engine server. In addition, one or more instructions suitable for being loaded and executed by the processor 801 are also stored in the storage space. These instructions can be one or more computer programs (including program codes). It should be noted that the computer storage medium here can be a high-speed RAM memory, or a non-volatile memory (non-volatile memory), such as at least one disk storage; optionally, it can also be at least one computer storage medium located away from the aforementioned processor.

[0269] In one embodiment, one or more computer programs stored in a computer storage medium can be loaded and executed by a processor to implement the corresponding steps in the above-mentioned method embodiments shown in Figure 2 or Figure 4; in a specific implementation, one or more computer programs in a computer storage medium can be loaded and executed by a processor to implement the information synchronization method provided in the above-mentioned embodiment.

[0270] It should be noted that, according to one aspect of the present application, a computer program product or computer program is also provided, which includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the methods provided in the various optional embodiments of the method embodiments shown in Figures 2 or 4 above. It should be understood that the above disclosure is only a preferred embodiment of the present application, and of course it cannot be used to limit the scope of the rights of the present application. Therefore, equivalent changes made in accordance with the claims of the present application are still within the scope covered by the present application.

Claims

1. An information synchronization method, the method being executed by a computer device, comprising: Obtaining absolute position information of a virtual object in a virtual scene at a current moment, wherein the absolute position information at a current moment refers to position information determined based on a reference object at the current moment, and the position information is used to synchronize to a client in a serialized manner; Determine the serialization mechanism to be used for absolute pose information; If it is determined that the serialization mechanism has the following numerical variation characteristics: the amount of data obtained after serializing any pose information using the serialization mechanism is positively correlated with the numerical value of the corresponding pose information, based on the numerical variation characteristics of the serialization mechanism, the relative pose information of the virtual object at the current moment is obtained; wherein the relative pose information obtained is used to refer to the difference between the absolute pose information of the virtual object at the current moment and the absolute pose information of the virtual object at the previous moment, and the absolute pose information at the previous moment refers to the pose information determined based on the reference object at the previous moment; The serialization mechanism is adopted to write the acquired relative posture information into the attribute synchronization data stream corresponding to the client, so as to transmit the attribute synchronization data stream to the corresponding client.

2. The method of claim 1, further comprising: Acquire state information of the virtual object at the current moment, and determine the state condition that the virtual object needs to meet when the relative position information of the virtual object at the current moment is used; If it is determined according to the state information that the virtual object meets the state condition, triggering the step of executing the numerical value change characteristic based on the serialization mechanism to obtain the relative position information of the virtual object at the current moment; If it is determined according to the state information that the virtual object does not meet the state condition, the serialization mechanism is used to write the absolute position information of the virtual object at the current moment into the attribute synchronization data stream corresponding to the client.

3. The method according to claim 2, wherein the relative posture information of the virtual object at the current moment includes at least one of the following: relative speed and relative position; The state information includes at least one of the following: a state flag indicating whether the virtual object is attached to other virtual objects, and a state flag indicating whether the virtual object is in physical simulation; The state condition includes at least one of the following: the virtual object is not attached to other virtual objects, and the virtual object is not in physical simulation.

4. The method according to claim 3, wherein the acquired relative posture information is located in the to-be-processed attribute information of the virtual object, and the to-be-processed attribute information further includes: The yaw angle of the virtual object at the current moment, excluding the pitch angle and roll angle of the virtual object at the current moment; The step of writing the acquired relative posture information into the attribute synchronization data stream corresponding to the client includes: Writing the to-be-processed attribute information containing the acquired relative posture information into the attribute synchronization data stream; The state information also includes orientation information of the virtual object, and the orientation information includes the yaw angle, pitch angle and roll angle of the virtual object at the current moment; the state condition includes: the pitch angle and roll angle of the virtual object at the current moment are zero.

5. The method according to claim 2, before obtaining the state information of the virtual object at the current moment, the method further comprises: Obtaining a function state of a global optimization function, wherein the function state includes an on state or an off state; If the function state of the global optimization function is the on state, triggering the step of obtaining the state information of the virtual object at the current moment; If the functional state of the global optimization function is off, the object type of the virtual object is obtained, and when the object type of the virtual object is a specified object type, the step of triggering the execution of the numerical change characteristics based on the serialization mechanism to obtain the relative posture information of the virtual object at the current moment is triggered.

6. The method according to claim 1, wherein obtaining the absolute position information of the virtual object in the virtual scene at the current moment comprises: Acquire an attribute list of the virtual object in the virtual scene at the current moment, wherein the attribute list includes multiple attributes of the virtual object and attribute information of the virtual object under each attribute; The moving attribute is searched from the multiple attributes included in the attribute list, and the absolute position information of the virtual object at the current moment is acquired from the attribute information corresponding to the moving attribute in the attribute list.

7. The method according to claim 6, wherein searching for a mobile attribute from a plurality of attributes included in the attribute list comprises: Determine a base attribute type, where the attribute under the base attribute type is a mobile attribute; Traverse each attribute in the attribute list in turn, and obtain the attribute type of the currently traversed attribute; If the acquired attribute type is the same as the reference attribute type, determining the currently traversed attribute as the mobile attribute; If the acquired attribute type is different from the reference attribute type, the traversal continues until all attributes in the attribute list are traversed.

8. The method according to claim 1, wherein any pose information is information of a shared serialization type, and after obtaining the relative pose information of the virtual object at the current moment, the method further comprises: The acquired relative posture information is serialized using the serialization mechanism to obtain relative posture serialization data, and the relative posture serialization data is cached in the local space; The serialization mechanism is used to write the acquired relative posture information into the attribute synchronization data stream corresponding to the client, including: In response to the information synchronization demand of the client, the relative posture serialization data is read from the local space, and the relative posture serialization data is written into the attribute synchronization data stream corresponding to the client.

9. The method of claim 8, wherein the relative position information of the virtual object at the current moment includes a relative speed; and the serialization mechanism is used to serialize the acquired relative position information to obtain relative position serialization data, comprising: Acquire a serialized data format, wherein the serialized data format includes the following fields: a first mark bit, a second mark bit, and a relative speed storage field; The value of the first flag bit is determined according to whether the absolute speed is zero, the value of the second flag bit is determined according to whether the relative speed is zero, and the relative speed storage field is used to store the serialization result of the relative speed; Filling at least one field in the serialized data format according to the serialization mechanism and the acquired relative posture information to obtain the relative posture serialized data; Among them, when the value of the first flag bit indicates that the absolute speed of the virtual object at the current moment is zero, or when the value of the second flag bit indicates that the relative speed of the virtual object at the current moment is zero, the relative speed storage field is empty.

10. The method according to claim 9, wherein the relative posture information of the virtual object at the current moment further includes a relative position; The serialized data format further includes a relative position storage field, and the relative position storage field is used to store the serialization result of the relative position.

11. The method according to claim 9, wherein the relative position information of the virtual object at the current moment comprises a yaw angle of the virtual object at the current moment; The serialized data format also includes: a third flag bit and a direction storage field; the value of the third flag bit is determined according to whether the yaw angle of the virtual object has changed, and the direction storage field is used to store the yaw angle; wherein, when the value of the third flag bit indicates that the yaw angle of the virtual object at the current moment has not changed, the direction storage field is empty.

12. The method of claim 9, wherein the serialized data format further comprises a client synchronization sequence number field, wherein the client synchronization sequence number field is used to store a posture information sequence number, wherein the posture information sequence number is used to indicate the number of times the relative posture information of the virtual object is continuously used for information synchronization; After obtaining the serialized data format, the method further includes: By adding one, the posture information sequence number in the client synchronization sequence number field is updated; wherein, if the posture information sequence number before the update is equal to the maximum value allowed to be filled in the client synchronization sequence number field, the posture information sequence number update fails; If the update is successful, the step of filling at least one field in the serialized data format according to the serialization mechanism and the acquired relative posture information to obtain relative posture serialized data is triggered; If the update fails, the serialization mechanism is used to write the absolute posture information of the virtual object at the current moment into the attribute synchronization data stream corresponding to the client; and the client synchronization sequence number field is reset, and the posture information sequence number in the reset client synchronization sequence number field is zero.

13. The method according to any one of claims 9 to 12, wherein the serialized data format further comprises an absolute posture storage field, wherein the absolute posture storage field is used to store the serialized result of the absolute posture information; The virtual scene is presented through an application, and the application is configured with a synchronization optimization function, wherein the synchronization optimization function refers to a function of performing information synchronization using relative posture information; If the synchronization optimization function is in the testing phase and the verification mode is turned on, when filling the serialized data format, the absolute posture storage field needs to be filled with the serialized result of the absolute posture information of the virtual object at the current moment; the verification mode refers to a mode in which the relative posture information is verified to be accurate through the absolute posture information; If the synchronization optimization function is in the testing phase and the verification mode is not turned on, or the synchronization optimization function is in the application phase, the absolute posture storage field is empty when filling the serialized data format.

14. The method of claim 1, further comprising: Acquire a historical information identifier from a communication channel corresponding to the client, wherein the historical information identifier refers to an information identifier of reference absolute posture information in the client; The reference absolute pose information refers to the absolute pose information of the virtual object most recently received by the client before the current moment; If the historical information identifier satisfies a preset identification condition, the reference absolute posture information in the client is determined to be valid absolute posture information, and the step of using the serialization mechanism to write the acquired relative posture information into the attribute synchronization data stream corresponding to the client is triggered; If the historical information identifier does not meet the preset identification conditions, the reference absolute pose information in the client is determined to be invalid absolute pose information, and the serialization mechanism is used to write the absolute pose information of the virtual object at the current moment into the attribute synchronization data stream corresponding to the client.

15. The method according to claim 14, wherein an array of historical position information of the virtual object is cached in the local space; The historical posture information array includes multiple posture indexes and storage locations indicated by each posture index, the storage locations indicated by different posture indexes are used to store the absolute posture information of the virtual object at different times, and there is at least one storage location storing the absolute posture information of the virtual object; The pose index corresponding to the first storage position in the at least one storage position is a valid starting pose index, and the pose index corresponding to the last storage position in the at least one storage position is a valid ending pose index; in, The historical information identifier includes a historical posture index; the identification condition includes: the historical posture index is located between the valid starting posture index and the valid ending posture index.

16. The method according to claim 14 or 15, wherein the absolute position information of the virtual object at any time has an information version number; If no version number change event is detected at the i-th moment, the information version number of the absolute position information of the virtual object at the i-th moment is consistent with the information version number of the absolute position information of the virtual object at the i-1th moment, where i is an integer greater than 1; the version number change event includes any of the following: an event in which the state information of the virtual object changes, or an event in which the relative position information has been synchronized for K consecutive times, where K is a positive integer; Among them, the historical information identifier includes a historical information version number, and the information version number of the absolute posture information of the virtual object at the current moment is cached in the local space; the identification condition includes: the historical information version number is the same as the information version number cached in the local space.

17. The method according to claim 14 or 15, wherein if packet loss occurs at the client, the historical information identifier in the communication channel corresponding to the client is reset to an invalid value; wherein, When the historical information identifier is an invalid value, the historical information identifier does not meet a preset identification condition; the method further includes: Synchronizing a posture information sequence number of the relative posture to the client, wherein the posture information sequence number is used to indicate the number of times the relative posture information of the virtual object is continuously used for information synchronization; The client is used to calculate the difference between the currently received posture information sequence number and the last received posture information sequence number. If the difference is greater than a threshold, it is determined that packet loss has occurred.

18. An information synchronization device, the device being deployed on a computer device, comprising: An acquisition unit, used to acquire absolute position information of a virtual object in a virtual scene at a current moment, wherein the absolute position information at the current moment refers to the position information determined based on a reference object at the current moment, and the position information is used to synchronize to a client in a serialized manner; The acquisition unit is further used to determine a serialization mechanism adopted for the absolute posture information; The acquisition unit is further used for, if it is determined that the serialization mechanism has the following numerical variation characteristics: the amount of data obtained after serializing any pose information using the serialization mechanism is positively correlated with the numerical value of the corresponding pose information, based on the numerical variation characteristics of the serialization mechanism, acquiring the relative pose information of the virtual object at the current moment; wherein the acquired relative pose information is used to reflect the difference between the absolute pose information of the virtual object at the current moment and the absolute pose information of the virtual object at a previous moment, and the absolute pose information at the previous moment refers to the pose information determined based on the reference object at the previous moment; The synchronization unit is used to adopt the serialization mechanism to write the acquired relative posture information into the attribute synchronization data stream corresponding to the client, so as to transmit the attribute synchronization data stream to the corresponding client.

19. An engine server, comprising an input interface and an output interface, and further comprising: processor and computer storage media; The processor is suitable for implementing one or more computer programs; the computer storage medium stores one or more computer programs, and the one or more computer programs are suitable for being loaded by the processor and executing the information synchronization method as described in any one of claims 1-17.

20. A computer storage medium storing one or more computer programs, wherein the one or more computer programs are suitable for being loaded by a processor and executing the information synchronization method according to any one of claims 1 to 17.

21. A computer program product, comprising a computer program, and when the computer program is run on a computer, the computer is enabled to execute the information synchronization method according to any one of claims 1 to 17.