Data synchronization method and system
By using the target configuration table to parse the data and policies to be synchronized in the MMO RPG, directly synchronize the data, solving the problem of time-consuming game data synchronization logic, and improving development efficiency and data transmission reliability.
Patent Information
- Application Number
- CN202510477066.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-16
- Publication Date
- 2025-07-18
AI Technical Summary
In large-scale multiplayer online role-playing games (MMO RPGs), the synchronization logic of game data takes a long time to independently develop, resulting in inefficient game development.
By analyzing the data to be synchronized and the target synchronization policy from the target configuration table, using data indexes and configuration items to update the original configuration table, generating the target configuration table, and directly synchronizing data according to the target synchronization policy, reducing the operation of manually developing synchronization code.
It improves the efficiency of data synchronization, reduces manual development operation time, ensures the reliability and consistency of data transmission, and improves development efficiency and response speed.
Smart Images

Figure CN120336430A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and particularly to data synchronization methods and systems. Background Art
[0002] With the progress and popularization of Internet technology, online games have gradually evolved into a form that can support a large number of players to interact online simultaneously. In today's digital age, technology is reshaping the global industrial pattern at an unprecedented speed, and Massively Multiplayer Online Role-Playing Games (MMO RPGs) are one of the core areas in this wave of transformation.
[0003] Currently, during the development of MMO RPGs, it is necessary to independently develop synchronization logic for different game data and use the independently developed synchronization logic code to achieve the synchronization of game data. However, with the explosive growth of game data, independently developing synchronization logic for game data is very time-consuming, resulting in low game development efficiency. Summary of the Invention
[0004] In view of this, embodiments of this application provide a data synchronization method to solve the technical defects existing in the prior art. Embodiments of this application also provide a data synchronization device, a data synchronization system, a computing device, a computer-readable storage medium, and a computer program product.
[0005] According to a first aspect of embodiments of this application, a data synchronization method is provided, which is applied to a data synchronization platform and includes: In response to a data synchronization instruction, parse out the data to be synchronized and the target synchronization policy of the data to be synchronized from a target configuration table, where the target configuration table is obtained by the data configuration platform updating an original configuration table using the data index of the data to be configured and the item to be configured corresponding to the data index, and the target configuration table includes configuration data and the data synchronization policy of the configuration data; Synchronize the data to be synchronized according to the target synchronization policy.
[0006] According to a second aspect of embodiments of this application, a data synchronization method is provided, which is applied to a data configuration platform and includes: In response to a configuration instruction for the data to be configured, parse the data to be configured to determine the data index of the data to be configured and the item to be configured corresponding to the data index; Update the original configuration table according to the data index and the item to be configured to obtain a target configuration table, where the target configuration table is used in the synchronization process of the data to be configured.
[0007] According to a third aspect of the embodiments of the present application, a data synchronization system is provided, including: A data configuration platform, configured to parse the data to be configured in response to a configuration instruction for the data to be configured, determine the data index of the data to be configured and the item to be configured corresponding to the data index; update the original configuration table according to the data index and the item to be configured to obtain a target configuration table, where the target configuration table is used in the synchronization process of the data to be configured; A data synchronization platform, configured to parse the data to be synchronized and the target synchronization policy of the data to be synchronized from the target configuration table in response to a data synchronization instruction, where the target configuration table includes the configuration data and the data synchronization policy of the configuration data; synchronize the data to be synchronized according to the target synchronization policy.
[0008] According to a fourth aspect of the embodiments of the present application, a computing device is provided, including: a memory and a processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer programs / instructions are executed by the processor, the steps of the data synchronization method provided in the first aspect or the data synchronization method provided in the second aspect are implemented.
[0009] According to a fifth aspect of the embodiments of the present application, a computer-readable storage medium is provided, which stores computer programs / instructions. When the computer programs / instructions are executed by a processor, the steps of the data synchronization method provided in the first aspect or the data synchronization method provided in the second aspect are implemented.
[0010] According to a sixth aspect of the embodiments of the present application, a computer program product is provided, including computer programs / instructions. When the computer programs / instructions are executed by a processor, the steps of the data synchronization method provided in the first aspect or the data synchronization method provided in the second aspect are implemented.
[0011] The data synchronization method provided by the present application, by parsing the data to be synchronized and the target synchronization policy of the data to be synchronized from the target configuration table in response to a data synchronization instruction, where the target configuration table is obtained by the data configuration platform updating the original configuration table using the data index of the data to be configured and the item to be configured corresponding to the data index, and the target configuration table includes the configuration data and the data synchronization policy of the configuration data; synchronize the data to be synchronized according to the target synchronization policy. Since the target configuration table stores the configuration data and the target synchronization policy of the configuration data, the target synchronization policy can be directly read and used to synchronize the data to be synchronized during synchronization, without separately developing code for the target synchronization policy, reducing manual development operations and improving development efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1It is a flowchart of a data synchronization method provided by an embodiment of this specification; Figure 2 It is a flowchart of another data synchronization method provided by an embodiment of this specification; Figure 3 It is a structural diagram of a data synchronization system provided by an embodiment of this specification; Figure 4 It is a schematic structural diagram of a target configuration table provided by an embodiment of this specification; Figure 5 It is a schematic structural diagram of another data synchronization system provided by an embodiment of this specification; Figure 6 It is a schematic structural diagram of a data synchronization device provided by an embodiment of this specification; Figure 7 It is a schematic structural diagram of another data synchronization device provided by an embodiment of this specification; Figure 8 It is a structural block diagram of a computing device provided by an embodiment of this specification. Detailed implementation manners
[0013] Many specific details are set forth in the following description in order to provide a thorough understanding of the present application. However, the present application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar generalizations without departing from the connotation of the present application. Therefore, the present application is not limited by the specific implementations disclosed below.
[0014] The terms used in one or more embodiments of the present application are for the purpose of describing specific embodiments only and are not intended to limit one or more embodiments of the present application. The singular forms "a", "the", and "said" used in one or more embodiments of the present application and the appended claims are also intended to include the plural forms unless the context clearly dictates otherwise. It should also be understood that the term "and / or" used in one or more embodiments of the present application refers to and includes any or all possible combinations of one or more of the associated listed items.
[0015] In addition, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data that have been authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with relevant laws, regulations, and standards of relevant countries and regions, and corresponding operation entrances are provided for users to select to authorize or refuse.
[0016] It should be understood that although the terms first, second, etc. may be used in one or more embodiments of this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of one or more embodiments of this application, the first may also be referred to as the second, and similarly, the second may also be referred to as the first.
[0017] First, the noun terms related to one or more embodiments of the present invention are explained.
[0018] Hypertext Transfer Protocol and its secure version (HTTP / HTTPS, HyperText Transfer Protocol / HyperText Transfer Protocol Secure): It is an application layer protocol for distributed, collaborative, and hypermedia information systems. It is the fundamental protocol of the World Wide Web and is used to transfer hypertext, such as HTML documents, on the Web. HTTP works based on the request-response model. The client sends a request to the server, and after the server processes the request, it returns a response to the client. Each request and response is independent, which means that HTTP itself is stateless. However, session state can be maintained by using technologies such as Cookies and Sessions.
[0019] WebSocket: It is a communication protocol that provides the ability for full-duplex communication over a single TCP connection. It aims to overcome the limitations of the HTTP protocol and provide a more efficient real-time communication mechanism, especially suitable for application scenarios that require continuous two-way data exchange, such as online chat, real-time games, and financial transactions.
[0020] Real-time Transport Protocol and its control protocol (RTP / RTCP, Real-time Transport Protocol / Real-time Transport Control Protocol): RTP is mainly used to transmit real-time data, such as audio and video streams. It supports data transmission in multicast and unicast network services and is applicable to various application scenarios such as voice calls, video conferencing, and online games. RTCP is used in conjunction with RTP to provide functions for service quality monitoring and participant information. It periodically sends control packets to all members in the session to convey transmission performance statistics and other relevant information.
[0021] Message Queuing Telemetry Transport (MQTT): It is a lightweight publish / subscribe message transport protocol designed to work efficiently in low-bandwidth, unreliable networks or environments with high latency. It is very suitable for connecting small devices in remote locations, such as sensors and mobile devices, especially in Internet of Things (IoT) applications.
[0022] Massively Multiplayer Online Role-Playing Game (MMO RPG): Such games allow a large number of players to interact and explore simultaneously in a virtual game world. Each player usually controls a character and develops the character's abilities and storyline by completing tasks, fighting monsters, interacting with other players, etc. Players can also experience the story from the perspective of the character, make choices, and interact with the game environment, non-player characters (NPCs), and other players, influencing the progress and outcome of the game world.
[0023] Currently, in large-scale data development interactions, such as MMO RPG games, sometimes new gameplays, skill set designs, etc. need to be added, and the newly added gameplays and skill set designs need to be synchronized between the server and the client. In the conventional approach, for the update of gameplays, first, a skill list needs to be defined for the data to be added, such as skills. Then, for this skill list, the synchronization strategy corresponding to each skill and the code block (code structure) for synchronizing the skill according to the synchronization strategy are defined. Synchronizing the skill list to the server or the client according to the code block requires a large amount of manual code processing, and each modification to the skill requires manual changes to the code block. The manual processing content is extensive and time-consuming, reducing the project development efficiency.
[0024] In this application, a data synchronization method is provided. This application is also related to a data synchronization device, a data synchronization system, a computing device, a computer-readable storage medium, and a computer program product, which will be described in detail one by one in the following embodiments.
[0025] Figure 1 The flowchart of a data synchronization method provided in an embodiment of this specification may include the following steps: Step 102: In response to a data synchronization instruction, parse out the data to be synchronized and the target synchronization policy for the data to be synchronized from the target configuration table, where the target configuration table is obtained by the data configuration platform updating the original configuration table using the data index of the data to be configured and the item to be configured corresponding to the data index, and the target configuration table includes configuration data and the data synchronization policy of the configuration data. The configuration data refers to the data stored in the target configuration table.
[0026] It should be noted that the data synchronization instruction can be a synchronization instruction in different scenarios, such as game scenarios, data service scenarios, communication scenarios, application programs, etc. The data synchronization instruction refers to a request instruction for synchronizing the data to be synchronized, indicating that the data synchronization platform synchronizes the data to be synchronized to the data receiving platform. The data to be synchronized refers to the configuration data that needs to be synchronized corresponding to the data synchronization instruction, which can be game data, service data, communication data, application program data, etc., and the embodiments of this specification do not limit this. The target synchronization policy for the data to be synchronized refers to the data synchronization policy that needs to be adopted for synchronizing the data to be synchronized. The target synchronization policies corresponding to different data to be synchronized can be the same or different. The data synchronization policy is the policy that needs to be adopted to synchronize the data to the data receiving platform, and the data synchronization policy can be overwrite synchronization, queue synchronization, or other synchronization methods.
[0027] The configuration table is a table that stores the data index of the data to be configured and one or more configuration items corresponding to the data index. According to the data index, the configuration item and the configuration item attribute information corresponding to the data to be configured can be found in the configuration table. The original configuration table refers to the configuration table before the data to be configured is updated, and the target configuration table is the configuration table obtained by updating the original configuration table using the data index of the data to be configured and the item to be configured corresponding to the data index. Therefore, the target configuration table stores the configuration items of the updated data to be configured, and according to the target configuration table, the configuration item corresponding to the data to be configured and the data attribute corresponding to the configuration item can be found, such as at least one of data attribute, data synchronization policy, data storage policy, data life cycle, etc. Further, the item to be configured is the configuration item that needs to be added to the configuration table to complete the data update. According to actual needs, the item to be configured can include at least one of data attribute, data synchronization policy, data storage policy, data life cycle. The configuration item is a table item that stores the attribute of the data and / or the processing method of multiple data. The data attribute is recorded under the configuration item. According to the configuration item, the data attribute, data synchronization policy, or disk storage policy, expiration mechanism, etc. corresponding to the configuration data can be found. The configuration item corresponds to the configuration item attribute information, which is used to indicate the attribute information of the configuration item, such as the specific value of the data attribute, the data synchronization policy is overwrite synchronization or queue synchronization, and the data storage policy is temporary storage or persistent storage, etc.
[0028] The data index is used to indicate the specific location of the data in the configuration table. The data index can be of various types, such as numerical data index, character data index, combined data type index, etc., which is specifically selected according to the actual situation. The embodiments of this specification do not make any limitations in this regard.
[0029] Exemplarily, the data index is represented in the form of Group and / or Key. Group is used to indicate the data set corresponding to the configuration table. For example, "Group: 1001 / Skill_System" indicates that this configuration table corresponds to the data set of the skill system numbered 1001, which is used to record configuration data and its corresponding configuration items. Key is used to indicate the configuration data and configuration items recorded in the configuration table. Taking the vertical axis Key to record configuration data, such as skills or skill numbers, and the horizontal axis Key to record the configuration items corresponding to the skills as an example, the vertical axis can record skills or skill numbers in the form of "attack skill", "healing skill", "defense skill" or "100", "101", "102", etc., and the horizontal axis can record the configuration items corresponding to the skills in the form of "skill value", "cooling time", "synchronization method". Thus, the indication of the specific location of the data in the configuration table is achieved according to the above method. In practical applications, the data configuration table can be one or more. It can save the data to be configured and configuration items in multiple Groups in one configuration table, or one configuration table can correspond to saving the data to be configured and configuration items in one Group, which is specifically selected according to the actual situation. The embodiments of this specification do not make any limitations in this regard.
[0030] In practical applications, parsing the data to be synchronized and the target synchronization policy of the data to be synchronized from the target configuration table can be done by searching according to the data index, or by manually reading the target configuration table, or by using database statements, which is specifically selected according to the actual situation. The embodiments of this specification do not make any limitations in this regard. Updating the original configuration table can be adding the items to be configured to the original configuration table according to a computer language, or modifying the original configuration table by manual input. Similarly, it is specifically selected according to the actual situation. The embodiments of this specification do not make any limitations in this regard.
[0031] Step 104: Synchronize the data to be synchronized according to the target synchronization policy.
[0032] After determining the target synchronization policy, the data synchronization platform can synchronize the data to be synchronized to the data receiving platform according to the target synchronization policy.
[0033] It should be noted that the data receiving platform is the platform for receiving the data to be synchronized, which can be a client, a server or other platforms that require data synchronization. This embodiment does not make any limitations in this regard. Similarly, the above process can be synchronizing the data to the client or synchronizing the data to the server.
[0034] When applying the solution of the embodiments of this specification to synchronize the data to be synchronized, it is possible to directly read and synchronize the data to be synchronized according to the target synchronization policy, without the need to separately develop synchronization code for the data to be synchronized, reducing the manual operations for data synchronization, greatly reducing the synchronization time, and improving the development efficiency.
[0035] In practical applications, there are various ways to synchronize data to the data receiving platform. For example, data synchronization can be performed according to the Internet, local area network, or direct network cable connection. The specific choice depends on the actual situation, and the embodiments of this specification do not make any limitations in this regard. Optionally, when synchronizing data based on the Internet or local area network, the data to be synchronized can be synchronized based on the Internet data synchronization protocol.
[0036] In a possible implementation manner of the embodiments of this specification, synchronizing the data to be synchronized according to the target synchronization policy may include the following steps: Synchronize the data to be synchronized to the data receiving platform through the data synchronization protocol of the data receiving platform and the target synchronization policy.
[0037] It should be noted that the data synchronization protocol is a protocol used for data synchronization between the data synchronization platform and the data receiving platform. The data synchronization protocol can be one or more of various protocols, such as the HyperText Transfer Protocol and its secure version (HTTP / HTTPS, HyperText Transfer Protocol / HyperText Transfer Protocol Secure), WebSocket, the Real-time Transport Protocol and its control protocol (RTP / RTCP, Real-time Transport Protocol / Real-time Transport Control Protocol), Message Queuing Telemetry Transport (MQTT), Advanced Message Queuing Protocol (AMQP), Extensible Messaging and Presence Protocol (XMPP), Synchronization Markup Language (SyncML). The specific choice depends on the application requirements, the type of data, and the requirements for transmission efficiency, security, etc. The embodiments of this specification do not make any limitations in this regard.
[0038] In an alternative embodiment of this specification, before synchronizing the data to be synchronized to the data receiving platform through the data synchronization protocol and the target synchronization strategy of the data receiving platform, the data synchronization protocol of the data receiving platform may also be determined. There are various ways to determine the data synchronization protocol of the data receiving platform, which are specifically selected according to the actual situation, and this specification embodiment does not make any limitations in this regard. In a possible implementation manner of this specification, the data synchronization protocol may be determined according to whether the data synchronization is real-time. In another possible implementation manner of this specification, the data synchronization protocol may be determined according to the amount of data to be synchronized. In another possible implementation manner of this specification, the data synchronization protocol may be determined according to the device for data synchronization. No limitations are made here.
[0039] It should be noted that the determination of the data synchronization protocol and the determination of the target synchronization strategy are not in a specific order. It may be that the target synchronization strategy is determined first and then the data synchronization protocol is determined, or it may be that the data synchronization protocol is determined first and then the target synchronization strategy is determined. No limitations are made here.
[0040] By applying the solution of this specification embodiment, the data to be synchronized can be synchronized using the Internet data synchronization protocol, without the need to develop synchronization code specifically for the data to be synchronized, reducing the manual operations for data synchronization, greatly reducing the synchronization time, and improving the development efficiency. Moreover, by synchronizing the data to be synchronized using the Internet data synchronization protocol, the consistency of the data can be ensured, the reliability and effectiveness of data transmission can be improved, and at the same time, the response efficiency and fault tolerance rate during the data synchronization process can also be enhanced.
[0041] In an alternative embodiment of this specification, the target synchronization strategy includes at least one of an overwrite synchronization strategy and an incremental synchronization strategy. Synchronizing the data to be synchronized according to the target synchronization strategy may include the following steps: When the target synchronization strategy is the overwrite synchronization strategy, determine the data to be overwritten in the data receiving platform and use the data to be synchronized to overwrite the data to be overwritten; When the target synchronization strategy is the incremental synchronization strategy, add the data to be synchronized to the incremental data queue, and based on the incremental data queue, synchronize the data to be synchronized to the data receiving platform.
[0042] It should be noted that the overwrite synchronization strategy refers to an update strategy for overwriting synchronization of the data to be synchronized. Overwrite synchronization means completely overwriting the data to be overwritten with the data to be synchronized. The data to be overwritten is the data originally stored in the data receiving platform that needs to be overwritten by the data to be synchronized.
[0043] In practical applications, the data to be overwritten in the data receiving platform can be the primary key of the query data, and the data to be overwritten is determined based on the primary key. It can also be manual comparison of data to determine the data to be overwritten corresponding to the data to be synchronized. The embodiments of this specification do not make any limitations in this regard.
[0044] In the case where the target synchronization policy is the overwrite synchronization policy, the data receiving platform receives the data to be synchronized and the target synchronization policy according to the data synchronization protocol, determines that the target synchronization policy is the overwrite synchronization policy, determines the data to be overwritten in the data receiving platform corresponding to the data to be synchronized, and uses the received data to be synchronized to overwrite the data to be overwritten to complete the data synchronization.
[0045] Exemplarily, taking game data as an example, the overwrite synchronization policy is applicable to situations where direct overwriting is possible and historical data does not need to be retained, such as the character's health, remaining energy, etc.
[0046] It should be noted that the incremental synchronization policy refers to an update policy in which the data to be synchronized is saved in the incremental data queue and the original data is replaced according to the order of the incremental data queue. The incremental data queue is a queue that stores changed data in incremental form. According to the incremental data queue, the original data can be replaced with the data to be synchronized in sequence.
[0047] In the case where the target synchronization policy is the incremental synchronization policy, the data receiving platform receives the data to be synchronized and the target synchronization policy according to the data synchronization protocol, determines that the target synchronization policy is the incremental synchronization policy, determines the data to be incrementally synchronized in the data receiving platform corresponding to the data to be synchronized, determines the corresponding incremental data queue, adds the data to be synchronized to the incremental data queue, and sets the data synchronization trigger condition based on system requirements. This trigger condition can be a time point, a trigger signal, or an active request. The embodiments of this application do not make any limitations in this regard. When the trigger condition is met, the data receiving platform synchronizes the data to be synchronized to the data receiving platform based on this incremental data queue.
[0048] In practical applications, taking game data as an example, the incremental synchronization policy is applicable to situations where data changes need to be sensed, such as the gradual reduction of the skill cooldown time, etc.
[0049] By applying the solution of the embodiments of this specification, the synchronization policy of the data to be synchronized can be determined according to the target configuration table, and different synchronization methods can be adopted for different synchronization policies for synchronization, avoiding developing synchronization code for the synchronization policy corresponding to the data to be synchronized separately every time data is updated, reducing manual operations in the synchronization process, improving the data update and synchronization efficiency. At the same time, the embodiments of this specification can adopt different synchronization methods for different data synchronization situations, improving the flexibility of the synchronization processing of the data to be synchronized.
[0050] In an alternative embodiment of this specification, the target configuration table further includes a data storage policy for configuration data. The above method may further include the following steps: In response to a data storage instruction, parse out the data to be stored and the target storage policy for the data to be stored from the target configuration table; Store the data to be stored according to the target storage policy.
[0051] A data storage instruction refers to an operation instruction in a computer used to indicate writing data into a memory. The target storage policy refers to the policy that needs to be adopted for storing the data to be stored. Storage refers to the method and process of saving data. Since the target configuration table includes the data storage policy for configuration data, after receiving a data storage instruction, the data synchronization platform can respond to the data storage instruction, parse out the data to be stored and the target storage policy for the data to be stored from the target configuration table, and store the data to be stored according to the target storage policy. Of course, the disk storage policy of the data can also be set not to store the data. When the disk storage policy is not to store the data, the data is not stored.
[0052] In practical applications, parsing may be to determine the data to be stored corresponding to the data storage instruction according to the data storage instruction, and determine the target storage policy for the data to be stored according to the data index of the data to be stored. Parsing out the data to be stored and the target storage policy for the data to be stored from the target configuration table may be to search according to the data index, or to search by manually reading the target configuration table, or to search using database statements, which is specifically selected according to the actual situation. This specification embodiment does not make any limitations in this regard.
[0053] Applying the solution of this specification embodiment, configuring the data storage policy of the data in the configuration table eliminates the need to manually configure the data storage policy and write the corresponding protocol code block when the data is updated. When storing data, only the data storage policy can be determined according to the configuration table, and the data can be stored, greatly reducing the storage time consumption and improving the development efficiency.
[0054] It should be noted that the target storage policy includes at least one of a temporary storage policy and a persistent storage policy. Therefore, in a possible implementation manner of this specification embodiment, storing the data to be stored according to the target storage policy may include the following steps: When the target storage policy is a temporary storage policy, store the data to be stored in a temporary storage device; When the target storage policy is a persistent storage policy, store the data to be stored in a persistent storage device.
[0055] It should be noted that the temporary storage strategy refers to the solutions and rules for short-term data storage to meet specific requirements during data processing, transmission, or calculation. Its main purpose is to save data within a limited time to support certain intermediate operations, caching requirements, or temporary calculation tasks, while avoiding overloading the main storage system. When the target storage strategy is temporary storage, storing the data to be stored can be to store the data to be stored in a temporary storage device. The temporary storage device can be a central processing unit cache, random access memory, solid-state drive, etc., and the embodiments of this specification do not limit this.
[0056] Taking the game scenario as an example, temporary session data, such as player status, skill cooldown time, etc., is recorded in the target configuration table as the target storage strategy being the temporary storage strategy, and is managed by the temporary memory manager during temporary storage. Therefore, storing data such as player status and skill cooldown time can be to determine that the target storage strategy corresponding to the data is the temporary storage strategy, store the data in the temporary storage device, and be managed by the temporary memory manager.
[0057] It should be noted that the persistent storage strategy is used to instruct the data synchronization platform to perform persistent storage on the data to be stored. The persistent storage strategy refers to the solutions and rules for long-term data storage to meet specific requirements during data processing, transmission, or calculation. Its main purpose is to store data for a long time to ensure that the data is still available after link reconnection, system restart, crash, or other interruptions.
[0058] When the target storage strategy is persistent storage, storing the data to be stored can be to store the data to be stored in a persistent storage device. The persistent storage device can be a hard disk drive, solid-state drive, SD card (Secure Digital Card), etc., and the embodiments of this specification do not limit this.
[0059] Taking the game scenario as an example, data that needs to be saved for a long time, such as player level, item backpack, achievement progress, etc., are all managed by the save data manager and are recorded in the target configuration table as the target storage strategy being the persistent storage strategy. Therefore, storing player level, item backpack, achievement progress, etc. can be to determine that the target storage strategy corresponding to the data is the long-term storage strategy, store the data in the persistent storage device, and be managed by the save database manager.
[0060] By applying the solution of the embodiments of this specification, the data storage policy of the data is configured in the configuration table, and the temporary storage policy and the persistent storage policy are divided. There is no need to manually configure the storage policy for the configuration data and write the corresponding protocol code block when the configuration data is updated. When storing the configuration data, only according to the configuration table can it be determined whether the data storage policy of the configuration data is the temporary storage policy or the persistent storage policy, so as to store the configuration data according to the different storage requirements of different configuration data, reducing the storage time while improving the pertinence and effectiveness of storing the configuration data, and improving the development efficiency and development effect.
[0061] In an optional embodiment of this specification, the target configuration table further includes the data life cycle of the configuration data. Therefore, the above method may further include the following steps: Determine the data to be cleared from the target configuration table according to the data life cycle, and delete the data to be cleared.
[0062] The data life cycle refers to the cycle from the creation of the data to its final deletion or archiving. Therefore, according to the data life cycle of the configuration data, the configuration data whose data life cycle reaches the end can be determined from the target configuration table, that is, the data to be cleared, and the data to be cleared is deleted. Taking game data as an example, the data life cycle of the configuration data can be defined in the configuration table as cleared daily, cleared weekly, cleared at a custom clearance time, or never cleared, and the data is cleared according to the data life cycle of the configuration data. Taking cleared weekly as an example, when the data storage duration reaches one week, the data is cleared. Or, for the data whose data life cycle is never cleared, no clearing process is performed.
[0063] Exemplarily, there is a daily reward in the game. For the daily reward, it is limited to be claimed only on the same day. The data life cycle configuration item corresponding to this data can be configured as "Daily Reward Data Life Cycle: 24 hours", update this configuration item to the configuration table at 0:00 on this day, and clear the daily reward according to the data life cycle at 24:00 on this day.
[0064] In practical applications, the method of determining the data life cycle and the data to be cleared can be to monitor the target configuration table using a monitoring interface, determine the configuration item corresponding to the data life cycle of the configuration data and the configuration item attribute information, and determine the data life cycle and whether the configuration data needs to be cleared according to the configuration item attribute information. It can also be to manually determine the data life cycle corresponding to the configuration data and determine whether the configuration data needs to be cleared according to the data life cycle, and specifically select according to the actual situation. The embodiments of this specification do not make any limitations on this.
[0065] Applying the solution of the embodiments of this specification, the data life cycle of the configuration data is configured in the configuration table. When the configuration data is updated, there is no need to manually configure the data life cycle of the configuration data and write corresponding code blocks for defining the data life cycle and clearing the data. When determining the data life cycle and clearing the data for the configuration data, only the configuration table needs to be referred to determine the data life cycle of the configuration data and determine whether to clear the data, reducing the time-consuming for the configuration data life cycle and the code blocks for clearing the data, and also reducing the time-consuming for the life cycle judgment and data clearing process, improving the development efficiency and development effect.
[0066] In an optional embodiment of this specification, the target configuration table can be monitored through a data monitoring platform. Therefore, the above method may further include the following steps: In response to the data monitoring instruction of the data monitoring platform, parse the updated configuration data from the target configuration table and send the updated configuration data to the data monitoring platform.
[0067] The data monitoring platform is any platform with a monitoring requirement for the data of the data synchronization platform or the data configuration platform, and can be a server, a client or other devices. The data monitoring platform can, through the data monitoring instruction, call the pre-reserved data monitoring port, parse the updated configuration data from the target configuration table, and send the updated configuration data to the data monitoring platform, so as to monitor the updated configuration data.
[0068] In practical applications, parsing the updated configuration data from the target configuration table can be done by searching according to the data index, or by manually reading the target configuration table, or by using database statements. The specific method is selected according to the actual situation, and the embodiments of this specification do not make any limitation in this regard. The method of sending the updated configuration data to the data monitoring platform can be sending through a network connection or through a hardware wired connection. The embodiments of this specification do not make any limitation in this regard.
[0069] Applying the solution of the embodiments of this specification, record the updated configuration data in the configuration table, and there is no need to manually search for the configuration data after the configuration data is updated. The time for determining the updated configuration data is greatly reduced, and the monitoring efficiency is improved.
[0070] Figure 2 The following is a flowchart of another data synchronization method provided by an embodiment of this specification, which may include the following steps: Step 202: In response to a configuration instruction for the data to be configured, parse the data to be configured to determine the data index of the data to be configured and the item to be configured corresponding to the data index.
[0071] It should be noted that the data configuration platform is a platform that can update the data in the configuration table. The data to be configured can be the configuration data that originally existed in the original configuration table and needs to update related configuration items, or the configuration data that originally did not exist in the original configuration table and needs to be added to the original configuration table and configured with configuration items. The item to be configured is the configuration item that the data to be configured needs to update in the original configuration table, such as adding to the target configuration table or modifying in the target configuration table, etc., which is not limited here. Therefore, the data configuration platform can receive configuration instructions for the data to be configured, parse the data to be configured, and determine the data index of the data to be configured and the item to be configured corresponding to the data index. Configure according to the data index of the data to be configured and the item to be configured corresponding to the data index.
[0072] In practical applications, the method of parsing the data to be configured can be to use a function to parse the data to be configured to obtain the data index of the data to be configured and the item to be configured corresponding to the data index, or to determine the data index of the data to be configured and the item to be configured corresponding to the data index by manually reading the code. The embodiments of this specification do not make any limitations on this.
[0073] Step 204: Update the original configuration table according to the data index and the item to be configured to obtain a target configuration table, where the target configuration table is used in the synchronization process of the data to be configured.
[0074] It should be noted that the original configuration table refers to the configuration table that has not updated the configuration data and configuration items according to the configuration instructions of the above-mentioned data to be configured. The target configuration table is the configuration table obtained by updating the original configuration table. Therefore, the target configuration table stores the updated data to be configured, the configuration items of the data to be configured, and the configuration item attribute information. It should be explained that the update can specifically refer to various operations on the configuration table such as adding, modifying, deleting, and maintaining, and the embodiments of this specification do not make any limitations on this. After determining the data index of the data to be configured and the item to be configured corresponding to the data index, the original configuration table can be updated according to the data index and the item to be configured.
[0075] Applying the solution of the embodiments of this specification, the original configuration table can be updated according to the data index and the item to be configured, which facilitates the update and use of the configuration table and improves the processing efficiency of the configuration table.
[0076] In practical applications, updating the original configuration table according to the data index and the item to be configured can be to update the configuration items existing in the original configuration table, or to update the configuration items that do not exist in the original configuration table. Therefore, in an optional embodiment of the specification of this application, updating the original configuration table according to the data index and the item to be configured to obtain a target configuration table may include the following steps: Search for the original configuration item corresponding to the data index from the original configuration table; Update the original configuration item according to the item to be configured to obtain the target configuration table.
[0077] It should be noted that the original configuration item refers to the unupdated configuration item corresponding to the data index existing in the original configuration table. Therefore, to update the original configuration table, it can be to first check whether there is an original configuration item corresponding to the data index in the original configuration table. If the original configuration item corresponding to the data index is found, then update the original configuration item according to the item to be configured in the data to be configured to obtain the target configuration table.
[0078] Applying the solution of the embodiment of this specification, searching for and updating the original configuration item corresponding to the data index to obtain the target configuration table, and updating the original configuration item according to the item to be configured can quickly obtain the target configuration table, facilitating the update and use of the configuration table and improving the processing efficiency of the configuration table.
[0079] In practical applications, since the data to be configured can be that both the data index and the configuration item corresponding to the data index originally exist in the original configuration table and the data of the corresponding configuration item needs to be updated, or the data index exists in the original configuration table and new configuration item data needs to be added, or it can also mean that it originally does not exist in the original configuration table and the data index needs to be added to the original configuration table and the configuration item corresponding to the data index needs to be configured. Therefore, in an optional embodiment of the specification of this application, after searching for the original configuration item corresponding to the data index from the original configuration table, the following steps may further be included: In the case that the original configuration table does not include the data index, add the data index and the item to be configured to the original configuration table to obtain the target configuration table; In the case that the original configuration table includes the data index but does not include the original configuration item, add the item to be configured to the original configuration table based on the data index to obtain the target configuration table.
[0080] In the case that the original configuration table does not include the data index, that is, the original configuration table does not include the data to be configured, the data index of the data to be configured, and the item to be configured, add the data index and the item to be configured to the original configuration table to obtain the target configuration table; while in the case that the original configuration table includes the data index but does not include the original configuration item, that is, the original configuration table has the data index of the data to be configured but does not include one or more of the items to be configured, add the item to be configured to the corresponding position in the original configuration table based on the data index to obtain the target configuration table.
[0081] Exemplarily, the data to be configured is "blood volume", and the items to be configured are "blood volume value: 500, synchronization method: 1 (1 represents overwrite synchronization, 0 represents queue synchronization), data life cycle: 24 hours (the data expires after 24 hours)". In the first case, there is a data index for "blood volume" in the original configuration table, and the original configuration item for the data index of "blood volume" is "blood volume value: 300, synchronization method: 1, data life cycle: 48 hours". Then, when the data index and the corresponding original configuration item are found, the original configuration item is updated according to the items to be configured for the data to be configured. In the updated target configuration table, the corresponding data and items are "blood volume, blood volume value: 500, synchronization method: 1, data life cycle: 24 hours". In the second case, there is a data index corresponding to "blood volume" in the original configuration table, but there is no corresponding data item, or only one of them is included, such as "blood volume value 300". Then, when only the data index is found and the corresponding original configuration item does not exist or is incomplete, the existing original configuration item is updated according to the items to be configured for the data to be configured, the original configuration item corresponding to the item to be configured that does not exist is created, and the configuration item value is updated, or the item to be configured is directly added to the original configuration table. The updated target configuration table has corresponding data and items of "blood volume, blood volume value: 500, synchronization method: 1, data life cycle: 24 hours". In the third case, neither the data index corresponding to "blood volume" nor the corresponding original configuration item exists in the original configuration table. Then, a data index for "blood volume" is created in the original configuration table, the configuration item corresponding to the data index is established, the configuration item value is updated, or the data index and the items to be configured corresponding to the data index are directly added to the original configuration table. The updated target configuration table has corresponding data and items of "blood volume, blood volume value: 500, synchronization method: 1, data life cycle: 24 hours".
[0082] Applying the solution of the embodiment of this specification to find the original configuration item corresponding to the data index and update it to obtain the target configuration table, and update the original configuration item according to the items to be configured can quickly obtain the target configuration table, facilitate the update and use of the configuration table, improve the processing efficiency of the configuration table, and moreover, different configuration methods are adopted for different situations, effectively realizing the flexible update of the configuration table.
[0083] Figure 3 The structure diagram of a data synchronization system provided by an embodiment of this specification. The data synchronization system 300 may include a data configuration platform 302 and a data synchronization platform 304; The data configuration platform 302 is configured to, in response to a configuration instruction for the data to be configured, parse the data to be configured, determine the data index of the data to be configured and the item to be configured corresponding to the data index; and update the original configuration table according to the data index and the item to be configured to obtain a target configuration table, where the target configuration table is used in the synchronization process of the data to be configured. The data synchronization platform 304 is configured to, in response to a data synchronization instruction, parse out the data to be synchronized and the target synchronization policy of the data to be synchronized from the target configuration table, where the target configuration table includes configuration data and the data synchronization policy of the configuration data; and synchronize the data to be synchronized according to the target synchronization policy.
[0084] Applying the solution of the embodiments of this specification, the data index of the data to be configured and the item to be configured corresponding to the data index are saved according to the target configuration table, and the target synchronization policy of the data to be synchronized is directly determined during synchronization to synchronize the data. There is no need to develop independently for each type of data, which reduces the manual development operations in the synchronization process, reduces the time consumption, and improves the development efficiency.
[0085] Among them, a connection is established between the data configuration platform 302 and the data synchronization platform 304 through a network. The network provides a medium for the communication link between the data configuration platform 302 and the data synchronization platform 304. The network may include various connection types, such as wired, wireless communication links, or fiber optic cables, etc. The data transmitted by the data configuration platform 302 may need to be processed such as encoded, transcoded, compressed, etc. before being published to the data synchronization platform 304.
[0086] The data configuration platform 302 can be a server or a client.
[0087] The server may include servers that provide various services, such as a server that provides communication services for multiple data configuration platforms, or a server for background training that supports the models used on the data configuration platform, or a server that processes the data sent by the data configuration platform, etc. It should be noted that the server can be implemented as a distributed server cluster composed of multiple servers, or can be implemented as a single server. The server can also be a server of a distributed system, or a server combined with a blockchain. The server can also be a cloud server of 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, content delivery networks (CDNs, Content Delivery Network), and big data and artificial intelligence platforms, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology.
[0088] The client can be a browser, an application (APP), or a web application such as a HyperText Markup Language 5 (H5) application, or a light application (also known as a mini-program, a lightweight application), or a cloud application, etc. It can be developed based on the software development kit (SDK) of the corresponding service, such as developed based on the Real Time Communication (RTC) SDK. The client can be deployed in an electronic device and needs to rely on the device or certain APPs in the device to run. For example, the electronic device can have a display screen and support information browsing, etc., and can be a personal mobile terminal such as a mobile phone, a tablet computer, a personal computer, etc. Various other types of applications can usually be configured in the electronic device, such as human-computer dialogue applications, model training applications, text processing applications, web browser applications, shopping applications, search applications, instant messaging tools, mailbox data configuration platforms, social platform software, etc.
[0089] Figure 4 FIG. is a schematic structural diagram of a target configuration table provided for an embodiment of this specification. The data index, configuration data, configuration items, and configuration item attribute information in the target configuration table are stored in the form of Group-Key-Value, including: Group: Group, which is used to indicate data grouping in the embodiments of this specification and is used to define the set to which the data saved in the target configuration table belongs. Taking a game as an example, the data grouping can be grouping of gameplay, or grouping of skills, or grouping of game functions, depending on the specific situation, and this specification does not make any limitations in this regard. The data grouping is configured with a grouping ID in the target configuration table, which is used to index the target configuration table corresponding to this data grouping.
[0090] Key: Key, which is used to indicate configuration data or configuration items in the embodiments of this specification and is used to define the configuration data corresponding to each row in the target configuration table and the configuration items corresponding to each column of the configuration data in this row. Taking the skill grouping under a game as an example, the configuration data can be multiple skills, such as attack skills, defense skills, healing skills, etc., and the configuration items are the specific value of the attack skill damage, whether to synchronize, the synchronization method, whether to save, the save method, etc.
[0091] Value: Value, which is used to indicate the specific values of the configuration data and the configuration items corresponding to the configuration data in the embodiments of this specification. For example, the attack skill damage is 50, whether to synchronize is 1 (0 means not synchronized, 1 means synchronized), the synchronization method is 1 (0 means overwrite synchronization, 1 means list synchronization), etc.
[0092] When constructing the target configuration table, configuration data of the same type can be defined as configuration data under a data group. Each configuration item of the configuration data can be set under the data group, and the configuration item attribute information corresponding to each configuration item can be set. Taking the "skill" module as an example, the target configuration table corresponding to the skill type data group is defined as group: 1001 / Skill_System. Set the configuration data (key) corresponding to the skills under the group: attack skill, defense skill, healing skill, and the configuration items (key): cooldown time, damage value, whether to synchronize, synchronization method, whether to store, storage method, whether to clear, clear time (data life cycle), etc. Set the configuration item attribute information. The system will automatically synchronize the configuration data to the client, server, or other process ends according to the target configuration table and the synchronization method, etc. When a new skill needs to be added, only the key and configuration item attribute information in the target configuration table need to be added, and there is no need to develop the code blocks corresponding to the synchronization and disk storage for individual configuration data, etc.
[0093] By applying the target configuration table of the embodiments of this specification, the data group, the configuration data under the data group, the configuration items corresponding to the configuration data, and the configuration item attribute information can be saved according to the target configuration table, so as to record the multiple configuration item attribute information of each configuration data. Therefore, when updating the configuration data, only the target configuration table needs to be modified, without having to return to the code of the configuration data and modify the multiple code blocks corresponding to the configuration data, which greatly reduces the development time and improves the development efficiency.
[0094] Figure 5 The structural schematic diagram of another data synchronization system provided by an embodiment of this specification is shown in Figure 5 , the data configuration platform can be server 5022, server 5024, client 5042, client 5044, or other servers, clients, or other process ends. Similarly, the data receiving platform can be server 5022, server 5024, client 5042, client 5044, or other servers, clients, or other process ends. The data synchronization platform can be the central manager 506. The following will be introduced with the data configuration platform being server 5022, the data receiving platform being client 5042, and the data synchronization platform being the central manager 506: It should be noted that the target configuration table introduced in the above embodiments is stored in the central manager 506. The central manager 506 can call the content of the target configuration table and perform necessary operations, including data synchronization, data storage, configuration table management, etc. The data in the central manager 506 can be general integer data (int), string data, and support converting integer data or string data into JSON (JavaScript Object Notation), Lua script, or ProtocolBuffer format according to general conversion interfaces, such as tojson (converting an object into a JSON format representation), tolua (converting an object into a Lua script format representation), toprotobuf (converting a data structure into a Protocol Buffers format).
[0095] Exemplarily, taking data synchronization as an example, after receiving a data synchronization instruction, the central manager responds to the data synchronization instruction, parses the data to be synchronized corresponding to the data synchronization instruction and the target synchronization policy of the data to be synchronized from the target configuration table, generates a synchronization list 5062 according to the target synchronization policy. The synchronization list 5062 includes the data to be synchronized and its synchronization policy. Taking overwrite synchronization as an example, the synchronization list includes that the synchronization policy is overwrite synchronization, the index information of the data to be synchronized, and specific configuration items, etc. Taking queue synchronization as an example, the synchronization list includes a list composed of the synchronization policy being queue synchronization, the index information of the data to be synchronized, and specific configuration items. The central manager can send the data to be synchronized to other processes of the client according to the protocol based on the synchronization list, and create a synchronization event in the way of group or group+key according to other processes, and synchronize the data to the client 5042. Among them, sending the data to be synchronized to other processes of the client according to the protocol based on the synchronization list can be sending according to a synchronization frame, that is, setting the synchronization frame as a certain moment, a certain processing frame, or a special processing packet, and performing synchronization according to the synchronization list when the synchronization frame arrives; it can also be synchronizing in an active synchronization manner, that is, receiving a synchronization instruction from the system or the user and performing synchronization according to the synchronization instruction.
[0096] It should be noted that the expiration mechanism is also a mechanism for clearing data according to the data life cycle. The central manager 506 can obtain configuration items such as the data life cycle and data expiration method corresponding to the data expiration mechanism, determine whether to expire the data and / or the expiration method, and expire the data according to the expiration method. The specific steps have been described in the above embodiments and will not be limited here.
[0097] Exemplarily, taking data management as an example, the central manager 506 can determine whether data is stored and the storage method of the data according to the target configuration table. If it is determined that the data storage method is temporary storage, the temporary memory manager 5082 is used to manage the data, and it can be stored in the temporary storage device; if it is determined that the data storage method is persistent storage, the disk data manager 5084 is used to manage the data, and it can be stored in the persistent storage device.
[0098] In practical applications, the way for the central manager to obtain the configuration items and the attribute information of the configuration items in the target configuration table can be to read the content of the target configuration table by using code, or to manually retrieve the target configuration table. The embodiments of this specification do not limit this.
[0099] In addition, a general interface is set in the central manager 506, such as SetDataInt \SetDataString\SetDataTable\ SetDataBuff, GetDataInt\GetDataString\GetDataTable\GetDataBuff, etc., which are used for the data configuration platform to manage the data of the central manager 506. Taking the data configuration platform as the server 5024 as an example, the server 5024 can call setdataint / setdatastring when it is necessary to set the specific value of the configuration item of the data, and update the content of the configuration table according to the requirements.
[0100] The central manager 506 can also support disk saving and resume from breakpoint. Specifically, taking the game scenario as an example, when a player has a need to save data to the cloud archive, when the player triggers the "save" operation, the central manager 506 can write all active data, such as skills, items, task progress, etc. into the disk file or database. When it is detected that there is a problem with the network connection and the data cannot be synchronized to the data receiving end, the central manager 506 can automatically temporarily store the data that needs to be synchronized in the incremental queue, and after the network connection is restored, re-send the data to the data receiving end.
[0101] The data configuration platform can synchronize the data managed by the central manager 506 and update the data content of the central manager according to the general interface and the synchronization instruction.
[0102] In addition, the data configuration platform and the data receiving platform can register a sensing interface to sense the data changes of the central manager 506 in real time. For example, taking the data receiving platform as the client 5042, after the client 5042 registers the sensing interface for the central manager 506, when the data of the central manager 506 changes, it can automatically obtain the change notification and the changed data, and operate on the data in the client 5042. For example, the user interface (UI) system in the client 5042 can register the change notification for the target configuration table in the central manager 506. When the data of the target configuration table changes, it automatically obtains the data change notification, updates the data, and automatically displays the updated data content in the user interface.
[0103] By applying the system according to the embodiments of the specification of the present application, the target configuration table can be quickly configured according to the data configuration platform, and the data can be flexibly and quickly synchronized according to the data synchronization platform. There is no need to re-develop the code block corresponding to the configuration data when the configuration data is updated, which improves the development and synchronization efficiency of the configuration data.
[0104] Corresponding to the above method embodiments, the present application also provides an embodiment of a data synchronization device. Figure 6 The structural schematic diagram of a data synchronization device provided by an embodiment of the present specification is shown. As Figure 6 shown, the device includes: A first parsing module 602, configured to parse out the data to be synchronized and the target synchronization policy of the data to be synchronized from the target configuration table in response to a data synchronization instruction, where the target configuration table is obtained by the data configuration platform updating the original configuration table by using the data index of the data to be configured and the item to be configured corresponding to the data index, and the target configuration table includes configuration data and the data synchronization policy of the configuration data; A synchronization module 604, configured to synchronize the data to be synchronized according to the target synchronization policy.
[0105] Optionally, the synchronization module 604 is further configured to synchronize the data to be synchronized to the data receiving platform through the data synchronization protocol and the target synchronization policy of the data receiving platform.
[0106] Optionally, the target synchronization policy includes at least one of an overwrite synchronization policy and an incremental synchronization policy; the synchronization module 604 is further configured to determine the data to be overwritten in the data receiving platform and use the data to be synchronized to overwrite the data to be overwritten when the target synchronization policy is an overwrite synchronization policy; when the target synchronization policy is an incremental synchronization policy, add the data to be synchronized to the incremental data queue, and synchronize the data to be synchronized to the data receiving platform based on the incremental data queue.
[0107] Optionally, the target configuration table further includes a data storage policy for the configuration data; the apparatus further includes a storage module configured to, in response to a data storage instruction, parse out the data to be stored and the target storage policy of the data to be stored from the target configuration table; and store the data to be stored according to the target storage policy.
[0108] Optionally, the target storage policy includes at least one of a temporary storage policy and a persistent storage policy; the storage module is further configured to store the data to be stored to a temporary storage device when the target storage policy is a temporary storage policy; and store the data to be stored to a persistent storage device when the target storage policy is a persistent storage policy.
[0109] Optionally, the target configuration table further includes a data life cycle of the configuration data; the apparatus further includes a clearing module configured to determine the data to be cleared from the target configuration table according to the data life cycle, and delete the data to be cleared.
[0110] Optionally, the apparatus further includes a monitoring module configured to, in response to a data monitoring instruction of a data monitoring platform, parse out the updated configuration data from the target configuration table, and send the updated configuration data to the data monitoring platform.
[0111] The above is a schematic solution of a data synchronization apparatus according to this embodiment. It should be noted that the technical solution of this data synchronization apparatus and the technical solution of the above data synchronization method belong to the same concept. For the details not described in detail in the technical solution of the data synchronization apparatus, reference can be made to the description of the technical solution of the above data synchronization method. In addition, each component in the apparatus embodiment should be understood as a functional module that must be established to implement each step of the program flow or each step of the method. Each functional module is not an actual functional division or separation limitation. The apparatus defined by such a set of functional modules should be understood as mainly implementing the functional module framework of the solution through the computer program recorded in the specification, rather than being understood as mainly implementing the entity apparatus of the solution through hardware means.
[0112] Corresponding to the above method embodiment, the present application further provides an embodiment of a data configuration apparatus, Figure 7 showing a schematic structural diagram of another data synchronization apparatus provided by an embodiment of this specification. As Figure 7 shown, the apparatus includes: A second parsing module 702 configured to, in response to a configuration instruction for the data to be configured, parse the data to be configured, and determine a data index of the data to be configured and a to-be-configured item corresponding to the data index.
[0113] An update module 704, configured to update an original configuration table according to a data index and an item to be configured, to obtain a target configuration table, where the target configuration table is used in the synchronization process of the data to be configured.
[0114] Optionally, the update module 704 is further configured to find an original configuration item corresponding to the data index from the original configuration table; update the original configuration item according to the item to be configured, to obtain the target configuration table.
[0115] Optionally, the device further includes an indexing module, configured to add the data index and the item to be configured to the original configuration table to obtain the target configuration table when the original configuration table does not include the data index; add the item to be configured to the original configuration table based on the data index to obtain the target configuration table when the original configuration table includes the data index but does not include the original configuration item.
[0116] The above is a schematic solution of a data configuration device according to this embodiment. It should be noted that the technical solution of this data configuration device and the technical solution of the above data configuration method belong to the same concept. For the details not described in detail in the technical solution of the data configuration device, reference can be made to the description of the technical solution of the above data configuration method. In addition, each component in the device embodiment should be understood as a functional module that must be established to implement each step of the program flow or each step of the method. Each functional module is not an actual functional division or separation limitation. The device defined by such a set of functional modules should be understood as mainly implementing the functional module framework of the solution through the computer program recorded in the specification, rather than being understood as mainly implementing the entity device of the solution through hardware means.
[0117] Figure 8 The structural block diagram of a computing device provided by an embodiment of this specification is shown. The components of the computing device 800 include but are not limited to a memory 810 and a processor 820. The processor 820 is connected to the memory 810 through a bus 830, and a database 850 is used to store data.
[0118] The computing device 800 also includes an access device 840, which enables the computing device 800 to communicate via one or more networks 860. Examples of such networks include the Public Switched Telephone Network (PSTN), Local Area Network (LAN), Wide Area Network (WAN), Personal Area Network (PAN), or a combination of communication networks such as the Internet. The access device 840 may include one or more of any type of wired or wireless network interfaces (e.g., Network Interface Card (NIC)), such as IEEE 802.11 Wireless Local Area Networks (WLAN) wireless interface, World Interoperability for Microwave Access (Wi-MAX) interface, Ethernet interface, Universal Serial Bus (USB) interface, cellular network interface, Bluetooth interface, Near Field Communication (NFC) interface, and so on.
[0119] In one embodiment of the present application, the above components of the computing device 800 and Figure 8 other components not shown therein may also be connected to each other, for example, via a bus. It should be understood that Figure 8 the block diagram of the computing device shown is for illustrative purposes only and is not a limitation on the scope of the present application. Those skilled in the art may add or replace other components as needed.
[0120] The computing device 800 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or personal computers (PCs). The computing device 800 can also be a mobile or stationary server.
[0121] Among them, the processor 820 is used to execute the computer-executable instructions of the data synchronization method.
[0122] The above is a schematic solution of a computing device according to this embodiment. It should be noted that the technical solution of this computing device and the technical solution of the above data synchronization method belong to the same concept. For the details not described in detail in the technical solution of the computing device, reference can be made to the description of the technical solution of the above data synchronization method.
[0123] An embodiment of the present application further provides a computer-readable storage medium, which stores computer programs / instructions that are executed by a processor for a data synchronization method.
[0124] The above is a schematic solution of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium and the technical solution of the above data synchronization method belong to the same concept. For the details not described in detail in the technical solution of the storage medium, reference can be made to the description of the technical solution of the above data synchronization method.
[0125] An embodiment of the present application further provides a computer program product, including computer programs / instructions that are executed by a processor for a data synchronization method.
[0126] The above is a schematic solution of a computer program product according to this embodiment. It should be noted that the technical solution of this computer program product and the technical solution of the above data synchronization method belong to the same concept. For the details not described in detail in the technical solution of the computer program product, reference can be made to the description of the technical solution of the above data synchronization method.
[0127] The computer programs / instructions include computer program code, and the computer program code can be in the form of source code, object code, executable file, or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, ROM (Read-Only Memory), RAM (Random Access Memory), electrical carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content included in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.
[0128] It should be noted that, for the foregoing method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations. However, those skilled in the art should know that this application is not limited by the described action sequence, because according to this application, some steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0129] In the above embodiments, the descriptions of the respective embodiments have their own focuses. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0130] The preferred embodiments of the present application disclosed above are only used to help explain the present application. The alternative embodiments do not describe all the details in detail, nor do they limit the invention to the specific embodiments described. Obviously, many modifications and variations can be made according to the content of the present application. The present application selects and specifically describes these embodiments to better explain the principle and practical application of the present application, so that those skilled in the art can well understand and utilize the present application. The present application is only limited by the claims and their full scope and equivalents.
Claims
1. A data synchronization method, characterized in that, Applied to a data synchronization platform, the method includes: In response to a data synchronization instruction, parse out the data to be synchronized and the target synchronization policy of the data to be synchronized from a target configuration table, where the target configuration table is obtained by the data configuration platform updating an original configuration table using a data index of the data to be configured and the item to be configured corresponding to the data index, and the target configuration table includes configuration data and a data synchronization policy of the configuration data; Synchronize the data to be synchronized according to the target synchronization policy.
2. The method according to claim 1, wherein The step of synchronizing the data to be synchronized according to the target synchronization policy includes: Synchronize the data to be synchronized to the data receiving platform through a data synchronization protocol of the data receiving platform and the target synchronization policy.
3. The method according to claim 1, wherein The target synchronization policy includes at least one of an overwrite synchronization policy and an incremental synchronization policy; The step of synchronizing the data to be synchronized according to the target synchronization policy includes: In the case where the target synchronization policy is an overwrite synchronization policy, determine the data to be overwritten in the data receiving platform, and use the data to be synchronized to overwrite the data to be overwritten; In the case where the target synchronization policy is an incremental synchronization policy, add the data to be synchronized to an incremental data queue, and based on the incremental data queue, synchronize the data to be synchronized to the data receiving platform.
4. The method according to any one of claims 1 to 3, characterized in that, The target configuration table further includes a data storage policy of the configuration data; The method further includes: In response to a data storage instruction, parse out the data to be stored and the target storage policy of the data to be stored from the target configuration table; Store the data to be stored according to the target storage policy.
5. The method according to claim 4, wherein The target storage policy includes at least one of a temporary storage policy and a persistent storage policy; The step of storing the data to be stored according to the target storage policy includes: In the case where the target storage policy is a temporary storage policy, store the data to be stored in a temporary storage device; In the case where the target storage policy is a persistent storage policy, store the data to be stored in a persistent storage device.
6. The method according to any one of claims 1 to 3, characterized in that The target configuration table further includes a data life cycle of the configuration data; The method further includes: Determine the data to be cleared from the target configuration table according to the data life cycle, and delete the data to be cleared.
7. The method according to any one of claims 1 to 3, characterized in that The method further includes: In response to a data monitoring instruction from a data monitoring platform, parse out the updated configuration data from the target configuration table, and send the updated configuration data to the data monitoring platform.
8. A data synchronization method, characterized in that, Applied to a data configuration platform, the method includes: In response to a configuration instruction for data to be configured, parse the data to be configured to determine a data index of the data to be configured and an item to be configured corresponding to the data index; Update an original configuration table according to the data index and the item to be configured to obtain a target configuration table, where the target configuration table is used in the synchronization process of the data to be configured.
9. The method according to claim 8, characterized in that, The step of updating the original configuration table according to the data index and the item to be configured to obtain a target configuration table includes: Find the original configuration item corresponding to the data index from the original configuration table; Update the original configuration item according to the item to be configured to obtain the target configuration table.
10. The method according to claim 9, wherein After finding the original configuration item corresponding to the data index from the original configuration table, it further includes: In the case that the original configuration table does not include the data index, add the data index and the item to be configured to the original configuration table to obtain the target configuration table; In the case that the original configuration table includes the data index but does not include the original configuration item, add the item to be configured to the original configuration table based on the data index to obtain the target configuration table.
11. A data synchronization system, characterized in that, It includes a data configuration platform and a data synchronization platform; The data configuration platform is configured to, in response to a configuration instruction for data to be configured, parse the data to be configured to determine the data index of the data to be configured and the item to be configured corresponding to the data index; update the original configuration table according to the data index and the item to be configured to obtain a target configuration table, where the target configuration table is used in the synchronization process of the data to be configured; The data synchronization platform is configured to, in response to a data synchronization instruction, parse out the data to be synchronized and the target synchronization policy of the data to be synchronized from the target configuration table, where the target configuration table includes the configuration data and the data synchronization policy of the configuration data; synchronize the data to be synchronized according to the target synchronization policy.
12. A computing device, characterized in that, It includes: A memory and a processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer programs / instructions are executed by the processor, the method according to any one of claims 1 to 10 is implemented.
13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer programs / instructions. When the computer programs / instructions are executed by a processor, the method according to any one of claims 1 to 10 is implemented.
14. A computer program product, characterized in that, It includes computer programs / instructions. When the computer programs / instructions are executed by a processor, the method according to any one of claims 1 to 10 is implemented.