CN113230661A - Data synchronization method and device, computer readable medium and electronic equipment - Google Patents

Data synchronization method and device, computer readable medium and electronic equipment Download PDF

Info

Publication number
CN113230661A
CN113230661A CN202110665749.8A CN202110665749A CN113230661A CN 113230661 A CN113230661 A CN 113230661A CN 202110665749 A CN202110665749 A CN 202110665749A CN 113230661 A CN113230661 A CN 113230661A
Authority
CN
China
Prior art keywords
task
data
information
node
receiving node
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110665749.8A
Other languages
Chinese (zh)
Inventor
马辰龙
毛乾隆
涂家业
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202110665749.8A priority Critical patent/CN113230661A/en
Publication of CN113230661A publication Critical patent/CN113230661A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/60Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor
    • A63F13/69Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor by enabling or updating specific game elements, e.g. unlocking hidden features, items, levels or versions
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/70Game security or game management aspects
    • A63F13/77Game security or game management aspects involving data related to game devices or game servers, e.g. configuration data, software version or amount of memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Computer Security & Cryptography (AREA)
  • General Business, Economics & Management (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the application provides a data synchronization method, a data synchronization device, a computer readable medium and electronic equipment. The data synchronization method comprises the following steps: receiving task allocation information sent by a task distributor; generating a data synchronization task according to the task allocation information, wherein the data synchronization task is used for indicating a designated data receiving node to synchronize target data from a designated data providing node, and the target data comprises a cloud game updating data packet; sending the data synchronization task to at least a designated data receiving node, and acquiring an execution result of the data synchronization task; and if the execution result shows that the designated data receiving node successfully synchronizes the target data, returning update information to the task distributor, wherein the update information is used for indicating that the designated data receiving node is changed into a data providing node, so that the task distributor sends the task distribution information again according to the updated information. According to the technical scheme, the cloud game updating efficiency can be improved, and the cloud game updating duration is greatly shortened.

Description

Data synchronization method and device, computer readable medium and electronic equipment
Technical Field
The present application relates to the field of computer and communication technologies, and in particular, to a data synchronization method, an apparatus, a computer-readable medium, and an electronic device.
Background
In the related art, an update scheme of a cloud game is that a server is used as a source machine at a server to monitor whether a game client is updated, when the game client needs to be updated, the source machine issues a game update package to each game client, and the cloud game is in a service stop stage in the period of time, and can be served after all clients are updated. However, the update time of the update scheme is long, and the 'instant play' of the cloud game cannot be ensured, so that the experience of a game player is influenced.
Disclosure of Invention
Embodiments of the present application provide a data synchronization method, an apparatus, a computer-readable medium, and an electronic device, so that update efficiency of a cloud game can be effectively improved at least to a certain extent, and a duration of data synchronization is greatly shortened.
Other features and advantages of the present application will be apparent from the following detailed description, or may be learned by practice of the application.
According to an aspect of an embodiment of the present application, there is provided a data synchronization method applied to a cloud game, including: receiving task allocation information sent by a task distributor, wherein the task allocation information comprises information of a data providing node and information of a data receiving node which are used for updating a cloud game; generating a data synchronization task according to the task allocation information, wherein the data synchronization task is used for indicating a designated data receiving node to synchronize target data from a designated data providing node, and the target data comprises a cloud game updating data packet; sending the data synchronization task to at least the designated data receiving node, and acquiring an execution result of the data synchronization task; and if the execution result shows that the designated data receiving node successfully synchronizes the target data, returning update information to the task distributor, wherein the update information is used for indicating that the designated data receiving node is changed into a data providing node, so that the task distributor sends the task distribution information again according to the updated information.
According to an aspect of an embodiment of the present application, there is provided a data synchronization method applied to a cloud game, including: generating task allocation information, wherein the task allocation information comprises information of a data providing node and information of a data receiving node which are used for updating a cloud game; sending the task allocation information to a task management component so that the task management component generates a data synchronization task according to the task allocation information and sends the data synchronization task to a designated data receiving node, wherein the data synchronization task is used for indicating the designated data receiving node to synchronize target data from a designated data providing node, and the target data comprises a cloud game update data packet; receiving update information returned by the task management component, wherein the update information is used for indicating that the designated data receiving node is changed into a data providing node; and after the designated data receiving node is changed into a data providing node, if a data receiving node still exists, the task allocation information is generated again.
According to an aspect of an embodiment of the present application, there is provided a data synchronization apparatus applied to a cloud game, including: the system comprises a first receiving unit, a second receiving unit and a third receiving unit, wherein the first receiving unit is configured to receive task allocation information sent by a task distributor, and the task allocation information comprises information of a data providing node and information of a data receiving node which are used for updating a cloud game; a first generating unit configured to generate a data synchronization task according to the task allocation information, wherein the data synchronization task is used for instructing a designated data receiving node to synchronize target data from a designated data providing node, and the target data comprises a cloud game update data packet; the first sending unit is configured to send the data synchronization task to at least the designated data receiving node and obtain an execution result of the data synchronization task; and the first processing unit is configured to, if the execution result indicates that the designated data receiving node successfully synchronizes the target data, return update information to the task distributor, where the update information is used to indicate that the designated data receiving node is changed to a data providing node, so that the task distributor sends the task allocation information again according to the updated information.
In some embodiments of the present application, based on the foregoing scheme, the first generating unit is configured to: analyzing the task allocation information to obtain the information of the data providing node and the information of the data receiving node; and generating the data synchronization task according to the information of the data providing node, the information of the data receiving node and a pre-configured task template.
In some embodiments of the present application, based on the foregoing scheme, the preconfigured task template includes task type information; the first generation unit is configured to: setting the task type information in the task template as a data synchronization type, and generating the data synchronization task according to the information of the designated data receiving node and the information of the designated data providing node.
In some embodiments of the present application, based on the foregoing scheme, the first sending unit is configured to: and sending the data synchronization task to a task publishing and subscribing platform so that the designated data receiving node acquires the data synchronization task by monitoring the task publishing and subscribing platform.
In some embodiments of the present application, based on the foregoing solution, the data synchronization apparatus further includes: the acquisition unit is configured to acquire state information of a data providing node and state information of a data receiving node from the task publishing and subscribing platform, wherein the state information is used for representing whether the data providing node and the data receiving node are in an online state or not; the first sending unit is further configured to: and returning the state information of the data providing node and the state information of the data receiving node to the task distributor.
In some embodiments of the present application, based on the foregoing scheme, the first generating unit is further configured to: generating a task to be executed, wherein the task to be executed comprises at least one of the following: task type information, task triggering condition information, task execution target information and task execution state information; the first sending unit is further configured to: and sending the task to be executed to the task publishing and subscribing platform so that the designated node in the data providing node and the data receiving node acquires the task to be executed for processing by monitoring the task publishing and subscribing platform.
In some embodiments of the present application, based on the foregoing solution, the data synchronization apparatus further includes: the testing unit is configured to call a target node completing data synchronization to perform simulation operation based on the synchronized data if the number of the nodes completing data synchronization is detected to reach a set number; capturing a cloud game interface of the target node during simulation operation; and if the cloud game interface is matched with the set game interface, providing cloud game service based on the node completing data synchronization.
In some embodiments of the present application, based on the foregoing solution, the data providing node and the data receiving node comprise a cloud game rendering server node.
According to an aspect of an embodiment of the present application, there is provided a data synchronization apparatus applied to a cloud game, including: the second generation unit is configured to generate task allocation information, wherein the task allocation information comprises information of a data providing node and information of a data receiving node, and the information is used for updating the cloud game; a second sending unit, configured to send the task allocation information to a task management component, so that the task management component generates a data synchronization task according to the task allocation information and sends the data synchronization task to a designated data receiving node, where the data synchronization task is used to instruct the designated data receiving node to synchronize target data from a designated data providing node, and the target data includes a cloud game update data packet; a second receiving unit configured to receive update information returned by the task management component, where the update information is used to indicate that the designated data receiving node is changed into a data providing node; and a second processing unit configured to, after changing the designated data receiving node to a data providing node, generate the task allocation information again if a data receiving node still exists.
In some embodiments of the present application, based on the foregoing solution, the second processing unit is further configured to: acquiring information of a data providing node and information of a data receiving node from a specified database, wherein the specified database comprises a first list and a second list, the first list is used for storing the information of the data providing node, and the second list is used for storing the information of the data receiving node; changing the designated data receiving node to a data providing node by moving the information of the designated data receiving node in the second list to the first list.
In some embodiments of the present application, based on the foregoing scheme, the second generating unit is configured to: generating the task allocation information when detecting that a data packet of the cloud game is updated; or when the set updating time is reached, generating the task allocation information.
According to an aspect of embodiments of the present application, there is provided a computer-readable medium on which a computer program is stored, the computer program, when executed by a processor, implementing the data synchronization method applied to a cloud game as described in the above embodiments.
According to an aspect of an embodiment of the present application, there is provided an electronic device including: one or more processors; a storage device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the data synchronization method applied to the cloud game as described in the above embodiments.
According to an aspect of embodiments herein, there is provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and executes the computer instructions, so that the computer device executes the data synchronization method applied to the cloud game provided in the various optional embodiments.
In the technical solutions provided in some embodiments of the present application, a data synchronization task is generated according to task allocation information to instruct a designated data receiving node to synchronize target data from a designated data providing node, then the data synchronization task is at least sent to the designated data receiving node, an execution result of the data synchronization task is obtained, and when the execution result indicates that the designated data receiving node succeeds in synchronizing the target data, update information is returned to a task distributor to instruct the designated data receiving node to change the designated data receiving node into the data providing node, so that the task distributor can send task allocation information again according to the updated information, and further, the updated node can be used as the data providing node to synchronize with other nodes, thereby effectively improving the update efficiency of a cloud game and greatly shortening the data synchronization time.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application. It is obvious that the drawings in the following description are only some embodiments of the application, and that for a person skilled in the art, other drawings can be derived from them without inventive effort. In the drawings:
FIG. 1 shows an architecture diagram of a cloud game;
FIG. 2 shows a schematic diagram of an exemplary system architecture to which aspects of embodiments of the present application may be applied;
FIG. 3 shows a flow diagram of a data synchronization method according to an embodiment of the present application;
FIG. 4 shows a flow diagram of a data synchronization method according to an embodiment of the present application;
FIG. 5 illustrates an update flow diagram for a cloud game according to one embodiment of the present application;
FIG. 6 illustrates a schematic diagram of a cloud game update according to an embodiment of the present application;
FIG. 7 shows a schematic interaction diagram of TaskFlow and TaskWorker according to an embodiment of the application;
FIG. 8 shows a block diagram of a data synchronization apparatus according to an embodiment of the present application;
FIG. 9 shows a block diagram of a data synchronization apparatus according to an embodiment of the present application;
FIG. 10 illustrates a schematic structural diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present application.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the application. One skilled in the relevant art will recognize, however, that the subject matter of the present application can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known methods, devices, implementations, or operations have not been shown or described in detail to avoid obscuring aspects of the application.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
It should be noted that: reference herein to "a plurality" means two or more. "and/or" describe the association relationship of the associated objects, meaning that there may be three relationships, e.g., A and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
Cloud technology refers to a hosting technology for unifying serial resources such as hardware, software, network and the like in a wide area network or a local area network to realize calculation, storage, processing and sharing of data.
The cloud technology is a general term of network technology, information technology, integration technology, management platform technology, application technology and the like applied based on a cloud computing business model, can form a resource pool, is used as required, and is flexible and convenient. Cloud computing is an important support of cloud technology, and a background system of the cloud computing technology needs a large amount of computing and storage resources, such as video websites, picture websites and more portal websites. With the high development and application of the internet industry, each article may have its own identification mark and needs to be transmitted to a background system for logic processing, data in different levels are processed separately, and various industrial data need strong system background support and can only be realized through cloud computing.
Cloud gaming (Cloud gaming), also known as game on demand (gaming), is an online gaming technology based on Cloud computing technology. Cloud game technology enables light-end devices (thin clients) with relatively limited graphics processing and data computing capabilities to run high-quality games. In a cloud game scene, a game client does not run in user equipment, but runs in a cloud server, and the cloud server renders the game scene into a video and audio stream which is transmitted to the user equipment through a network. The user equipment does not need to have strong graphic operation and data processing capacity, and only needs to have basic streaming media playing capacity and capacity of acquiring player input instructions and sending the instructions to the cloud server.
Specifically, in the application scenario shown in fig. 1, the game server is used for storing account information of a game player, services of a game backend, and the like, and is used for interacting with the rendering server. The game resource server is used for storing resource data of the game, such as game picture information, game video information and the like. The rendering server is the cloud server, the game client runs in the rendering server, the rendering server renders the game scene into audio and video streams, the audio and video streams are transmitted to the user equipment through the network, the user equipment displays the audio and video streams, and operation instructions of the user are sent to the rendering server through the control stream, so that the game role can be controlled.
Each server shown in fig. 1 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a Network service, cloud communication, a middleware service, a domain name service, a security service, a CDN (Content Delivery Network), a big data and artificial intelligence platform, and the like. The user device may be, but is not limited to, a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, and the like. The user equipment and the rendering server may be directly or indirectly connected through wired or wireless communication, and the application is not limited herein.
The cloud game updating scheme proposed in the related art is that a server is used as a source machine at a server to monitor whether a game client is updated or not, when the game client is monitored to be updated, the source machine issues a game updating package to each game client, and the cloud game is in a service stopping stage in the period of time, and can be served after all clients are updated. However, the update time of the update scheme is long, and the 'instant play' of the cloud game cannot be ensured, so that the experience of a game player is influenced. Based on this, the embodiment of the application provides a data synchronization scheme that can be applied to cloud game update, can effectively improve the efficiency of data synchronization, and then can shorten the duration of cloud game update, reduce the time that the game player waits for the service, be favorable to promoting game player's experience. The technical solution of the embodiments of the present application is explained in detail below:
as shown in fig. 2, in an exemplary system architecture of the embodiment of the present application, a task distributor 201, a task management component 202 and a node set 203 may be included. The node set 203 includes a plurality of nodes, and the nodes are nodes for performing data synchronization, and in a cloud game scene, for example, the nodes may be nodes operated by a cloud game client, that is, rendering server nodes. The task distributor 201 and the task management component 202 may run in the same physical entity, or may run in different physical entities, for example, may be implemented by different servers.
When detecting that there is data to be updated, for example, a cloud game client needs to be updated, the task distributor 201 may generate task allocation information, where the task allocation information includes information of a data providing node and information of a data receiving node. The data providing node is a node which already contains target data (such as an update package of a game client) needing synchronization, and the data receiving node is a node which needs to synchronize the target data. For example, the node 2031 already contains target data to be synchronized, and the node 2032 and other nodes are nodes to synchronize the target data, then the node 2031 is a data providing node, and the node 2032 and other nodes are data receiving nodes.
After generating the task allocation information, the task distributor 201 may send the task allocation information to the task management component 202, and the task management component 202 may generate a data synchronization task according to the task allocation information, where the data synchronization task is used to instruct a specified data receiving node to synchronize target data from a specified data providing node, such as instructing the node 2032 and other nodes to synchronize the target data from the node 2031.
The task management component 202, after generating the data synchronization task, can send the data synchronization task to at least the designated data receiving node to instruct the designated data receiving node to synchronize the target data from the designated data providing node. Of course, the task management component 202 may also send the data synchronization task to the designated data providing node together to instruct the designated data providing node to provide the target data to be synchronized to the designated data receiving node.
After obtaining the execution result of the data synchronization task, if the execution result indicates that the specified data receiving node succeeds in synchronizing the target data, the task management component 202 may return update information to the task distributor 201 to indicate that the specified data receiving node is changed to the data providing node, for example, if the node 2032 succeeds in synchronizing the target data, the node 2032 may be changed to the data providing node.
If the task distributor 201 determines that the data receiving nodes still exist, the task distribution information can be generated again, and when the task distribution information is generated again, the number of the data providing nodes is larger, so that the target data can be synchronized to the data receiving nodes through the larger number of the data providing nodes, the data synchronization efficiency is effectively improved, and the data synchronization duration is greatly shortened.
The implementation details of the technical solution of the embodiment of the present application are set forth in detail below:
FIG. 3 illustrates a flow diagram of a data synchronization method according to an embodiment of the present application, which may be performed by the task management component 202 shown in FIG. 2, which task management component 202 may run in the form of a service in a server. Referring to fig. 3, the data synchronization method at least includes steps S310 to S340, which are described in detail as follows:
in step S310, task allocation information sent by the task distributor is received, where the task allocation information includes information of the data providing node and information of the data receiving node. Optionally, the data providing node and the data receiving node may be for cloud gaming updates.
In one embodiment of the present application, the data providing node is a node that already contains target data to be synchronized (such as an update package of a game client, etc.), and the data receiving node is a node that needs to synchronize the target data. In the embodiment of the application, after the data receiving node completes synchronization of the target data, the role of the data receiving node is changed into the role of the data providing node. Alternatively, the information of the data providing node may be identification information, a network address, or the like of the data providing node. Similarly, the information of the data receiving node may be identification information, a network address, and the like of the data receiving node.
In an embodiment of the application, if the target data to be synchronized is cloud game update data, the data providing node and the data receiving node may be cloud game rendering server nodes, and after the cloud game rendering server nodes complete synchronization of the cloud game update data, a cloud game service may be provided.
Optionally, the information of the data providing node and the information of the data receiving node included in the task allocation information may be for the same area, for example, if there are nodes in multiple areas that need to perform data synchronization, the nodes in each area may perform data synchronization separately according to the data synchronization scheme of the embodiment of the present application.
In step S320, a data synchronization task for instructing the designated data receiving node to synchronize the target data from the designated data providing node is generated according to the task allocation information.
In an embodiment of the application, the process of generating the data synchronization task according to the task allocation information may be to analyze the task allocation information to obtain information of the data providing node and information of the data receiving node, and then generate the data synchronization task according to the information of the data providing node and the information of the data receiving node and a pre-configured task template. For example, the information of the data providing node and the information of the data receiving node may be filled in a task template to generate a data synchronization task.
Optionally, the pre-configured task template may include task type information, and then when the data synchronization task is generated, the task type information in the task template may be set as a data synchronization type, and then the data synchronization task is generated according to the information of the designated data receiving node and the information of the designated data providing node.
It should be noted that, if the task allocation information already includes which data providing nodes provide the target data to which data receiving nodes, the task allocation information may be generated directly according to the information when the task allocation information is generated. If the task allocation information only includes the information of the data providing node and the information of the data receiving node, and does not specify which data providing node provides the target data to which data receiving node, the task management component may perform the allocation according to the information of the data providing node and the information of the data receiving node. For example, the allocation may be performed according to the distance between the data providing node and the data receiving node and the communication status, so as to ensure the efficiency of data synchronization.
In step S330, the data synchronization task is sent to at least the designated data receiving node, and the execution result of the data synchronization task is obtained.
In this step, the data synchronization task is sent to at least the designated data receiving node, which may be instructed to synchronize the target data from the designated data providing node. Of course, the task management component may also send the data synchronization task to the designated data providing node together to instruct the designated data providing node to provide the target data to be synchronized to the designated data receiving node.
Optionally, in an embodiment of the present application, the task management component may send the data synchronization task to the task publishing and subscribing platform, and then the designated data receiving node (and the designated data providing node) may obtain the data synchronization task by monitoring the task publishing and subscribing platform. The task publish-subscribe platform may be a Kafka platform, which is a high-throughput distributed publish-subscribe messaging system that can handle all the action flow data of a consumer in a website.
In an embodiment of the application, the task management component may further obtain, from the task publishing and subscribing platform, state information of the data providing node and state information of the data receiving node, where the state information is used to characterize whether the data providing node and the data receiving node are in an online state, and then the task management component may return the state information of the data providing node and the state information of the data receiving node to the task distributor. Specifically, the data providing node and the data receiving node may autonomously report the heartbeat state to the task publishing and subscribing platform, and then the task management component may determine whether the node is in the online state according to the report time of the heartbeat state, for example, if the time of the heartbeat state reported by a certain node is too long from the current time, it may be determined that the node is in the offline state.
As shown in fig. 3, in step S340, if the execution result indicates that the designated data receiving node successfully synchronizes the target data, the task distributor returns update information indicating that the designated data receiving node is changed to the data providing node, so that the task distributor retransmits the task allocation information according to the updated information.
Specifically, after receiving the update information, the task distributor may determine whether there is a data receiving node, and if there is a data receiving node, the task distribution information may be generated again, and when the task distribution information is generated again, since the number of the data providing nodes is greater, the target data may be synchronized to the data receiving node through a greater number of data providing nodes, thereby effectively improving the efficiency of data synchronization, and greatly shortening the time length of data synchronization.
In an embodiment of the application, the task management component may generate, in addition to sending the data synchronization task to the task publishing and subscribing platform, another task to be executed, where the task to be executed includes at least one of the following: task type information, task trigger condition information, task execution target information and task execution state information. And then the task management component can send the generated task to be executed to the task publishing and subscribing platform, so that the designated node in the data providing node and the data receiving node obtains the task to be executed through monitoring the task publishing and subscribing platform for processing.
Optionally, the task type information may be, for example, a data modification task, a data deletion task, a data transmission task, or the like; the task trigger condition information is used for indicating under which condition the task is triggered, such as triggering after executing a set operation; the task execution target information is used for expressing a target which is expected to be reached by executing the task; the task execution state information is used to indicate the execution state of the task, such as not executed, execution failure, and the like.
In an embodiment of the application, if the task management component detects that the number of the nodes completing data synchronization reaches a set number, a target node completing data synchronization may be called to perform simulated operation based on the synchronized data, then an interface of the target node during simulated operation is captured, comparison is performed based on the interface and the set interface, and if the interface is matched with the set interface, service access service is provided based on the nodes completing data synchronization. The technical scheme of the embodiment can realize automatic test after data synchronization, and can provide service access service to the outside without waiting for all nodes to finish synchronization, thereby reducing the time for waiting for service.
For example, for a cloud game, when more than half of rendering servers in a certain area complete the update of a cloud game client, the rendering servers may be called to simulate and run the cloud game client, and capture an interface in a simulation process (for example, a cloud game node, specifically, an interface entering a game), and when the interface is matched with a set interface, the cloud game service may be provided through the rendering servers without waiting for all the rendering servers to complete the update and then open the service, thereby reducing the waiting time of the cloud game.
Fig. 4 shows a flowchart of a data synchronization method according to an embodiment of the present application, which may be performed by the task distributor 201 shown in fig. 2, and the task distributor 201 may run in the form of one service in a server. Referring to fig. 4, the data synchronization method at least includes steps S410 to S440, which are described in detail as follows:
in step S410, task assignment information is generated, and the task assignment information includes information of the data providing node and information of the data receiving node. Optionally, the data providing node and the data receiving node may be for cloud gaming updates.
In one embodiment of the present application, the task allocation information may be generated upon detecting an update to the data source. Alternatively, the task assignment information may be generated when the set update time is reached. That is, the task distributor may trigger the task allocation operation by detecting whether the data source is updated, or may trigger the task allocation operation according to a set time. For example, if it is determined that the cloud game client will be updated at a certain time point according to the information obtained in advance, the task allocation operation may be triggered at the time point.
In one embodiment of the present application, the data providing node is a node that already contains target data to be synchronized (such as an update package of a game client, etc.), and the data receiving node is a node that needs to synchronize the target data. In the embodiment of the application, after the data receiving node completes synchronization of the target data, the role of the data receiving node is changed into the role of the data providing node. Alternatively, the information of the data providing node may be identification information, a network address, or the like of the data providing node. Similarly, the information of the data receiving node may be identification information, a network address, and the like of the data receiving node.
In step S420, the task allocation information is sent to the task management component, so that the task management component generates a data synchronization task for instructing the designated data receiving node to synchronize the target data from the designated data providing node according to the task allocation information and sends the data synchronization task to the designated data receiving node.
Optionally, the process that the task management component generates the data synchronization task according to the task allocation information and sends the data synchronization task to the designated data receiving node may refer to the technical solution of the foregoing embodiment, and is not described again.
In step S430, update information returned by the task management component is received, the update information being used to indicate that the specified data receiving node is changed to the data providing node.
In an embodiment of the application, after receiving an execution result of the data synchronization task, the task management component may determine whether the designated data receiving node succeeds in synchronizing the target data according to the execution result, and if the synchronization succeeds, return update information to the task distributor.
In step S440, after the designated data receiving node is changed to the data providing node, if there is any data receiving node, the task assignment information is generated again.
Specifically, after receiving the update information, the task distributor may determine whether there is a data receiving node, and if there is a data receiving node, the task distribution information may be generated again, and when the task distribution information is generated again, since the number of the data providing nodes is increased, the target data may be synchronized to the data receiving node by a larger number of data providing nodes, thereby effectively improving the efficiency of data synchronization, for example, improving the update efficiency of a cloud game, and greatly shortening the time length of data synchronization.
In one embodiment of the application, the task distributor may obtain information of the data providing node and information of the data receiving node from a designated database, where the designated database includes a first list and a second list, the first list is used for storing information of the data providing node, the second list is used for storing information of the data receiving node, and then the information of the designated data receiving node in the second list is moved to the first list to change the designated data receiving node into the data providing node. The specified database may be a Redis database, a MySQL database, or the like.
The implementation details of the technical solution of the embodiment of the present application are described above from the perspective of the task management component and the task distributor, and the technical solution of the embodiment of the present application is described in detail in the application scenario of the cloud game as follows:
as shown in fig. 5, an update process of a cloud game according to an embodiment of the present application includes the following steps:
step S501, a cloud game maintenance notice is obtained. Optionally, the cloud game maintenance announcement may be cloud game update information or cloud game maintenance information issued by the game operation and maintenance party, where the cloud game update or maintenance information includes time information of the cloud game.
Step S502, setting timing maintenance. Alternatively, the time for the timed maintenance may be set according to updated or maintenance time information contained in the cloud game maintenance bulletin.
In step S503, the item group push game is updated. Optionally, the item group may be a game operation and maintenance party, and the item group pushes the game update, that is, issues a game update package or game maintenance data, and the like.
And step S504, triggering source machine updating. Alternatively, the source machine may be the first selected server to receive the game update package, for example, one source machine is provided for each area, and the source machine of each area is used to receive the game update package or the game maintenance data for upgrading the servers in the area.
Step S505, the file is distributed. Optionally, the distribution file is a synchronous game update package or game maintenance data, and when the distribution file is distributed, the data synchronization scheme in the foregoing embodiment of the present application may be used to improve the efficiency of data synchronization and shorten the time length for updating the cloud game.
Step S506, the game is tested automatically. Optionally, the game automation test may also adopt the test scheme in the foregoing embodiment of the present application, that is, the running interface is captured in a simulated running manner, and whether the update is successful is determined by comparing the running interface with the set interface.
In step S507, the game is started. Optionally, for the cloud game, for example, more than half of rendering servers in a certain region complete updating and pass the test, the cloud game service can be provided through the rendering servers without waiting for all rendering servers to complete updating and then open the service, so that the waiting time of the cloud game is reduced.
FIG. 6 shows a schematic diagram of a cloud game update according to an embodiment of the application. Specifically, the cloud game may be deployed in a plurality of areas (such as area 1, area 2, …, area n, etc.), and each area may be provided with a distribution source for obtaining a game update package. In each region, the stream host adapter is used to monitor whether the cloud game client needs to be updated, and if the cloud game client needs to be updated, the stream host (i.e. a distribution source machine) is called to obtain a game update package, perform self-updating operation, and then trigger a service 601 for initializing allocation resources.
In initializing the service 601 for allocating resources, by updating the platform game configuration, the business architecture may be a deployment architecture of servers (e.g., rendering servers of a cloud game), and the like, such as servers of which operators are deployed, and deployment locations, deployment numbers, and the like of the servers. The initialization resource list contains files needing to be updated, server list information needing to be updated and the like. The writing of the allocation status into Redis to write the role of the server into Redis, for example, when the server has not been updated, the role of the server may be a synchronized side (i.e., a game update package needs to be acquired from another server), and if the server has been updated, the role of the server may be set as a synchronized side (i.e., a game update package may be provided to another server).
The service 601 for initializing allocation resources may send task relationships between the sync end and the synchronized end (e.g., which synchronized ends obtain game update packages from which sync ends) to the TaskFlow (which may exist in the form of service) to perform task triggering operations. The TaskFlow can analyze the task relationship to generate a data synchronization task, and distributes the data synchronization task to the TaskWorker running in the rendering server in each area, and then the TaskWorker in each rendering server can perform the synchronization operation of the game update package according to the data synchronization task.
After the taskfaker completes the execution of the data synchronization task, the result may be reported to the taskfow, and the taskfow may perform result callback, adjust the update progress, and change the task state, that is, convert the role of the rendering server that has completed the update into a synchronization end (that is, may provide a game update package to other servers), and then write the synchronization end into the Redis.
The Redis may include a list of the synchronized end and a list of the synchronized end, and if the list of the synchronized end further includes information of the rendering server, it indicates that the rendering server does not complete the update operation, at this time, the service 601 initializing the allocation resource may trigger the next round of the synchronization task until the list of the synchronized end no longer includes the rendering server.
Meanwhile, when the number of rendering servers completing synchronization in a certain area reaches a certain number (for example, more than half), the TaskFlow can call a game automation test, and when the test result shows that the test is correct, the servers can be automatically on-line, so that a service is provided for game players, and the servers do not need to wait for the synchronization completion of all rendering servers. When the automatic test is carried out, a game picture can be grabbed in a simulation running mode, whether the game is normally pulled up (for example, whether the grabbed game picture is consistent with an expected picture) is judged through image recognition, the automatic test is carried out after the test is correct, manual intervention is not needed in the whole process, and the automation is really realized.
Alternatively, the service 601 for initializing resource allocation and the TaskFlow may be disposed in the same physical entity (e.g., a server) or disposed in different physical entities.
In one embodiment of the present application, as shown in fig. 7, the task issuing between the TaskFlow and the taskhinker may be implemented by an intermediate component Kafka. Specifically, the Taskflow end may create a task template by operation and maintenance personnel, and may perform task type selection, set trigger information, set task execution target information, and perform state writing in the task template. Optionally, the task type information may be, for example, a data modification task, a data deletion task, a data transmission task, or the like; the trigger information may be task trigger condition information indicating under which condition the task is triggered, such as triggering after executing a set operation; the task execution target information is used for expressing a target which is expected to be reached by executing the task; status writes are used to indicate the execution status of a task, such as not executed, failed to execute, and the like.
For the data synchronization task, the TaskFlow end pushes the task to the kafka queue after generating the game update task. And the task worker end monitors the task message in the kafka queue in real time, and if the task message exists, the task is consumed, namely the actual execution command is analyzed, and the task is operated in the rendering server. And after the rendering server finishes operating the command, returning an execution result message to the TaskFlow end through task callback, and rewriting the task state to finish by the TaskFlow end.
Meanwhile, the taskforker terminal can report the heartbeat state autonomously, the taskflowjudges whether the rendering server is offline according to the reporting time, and if the rendering server is offline, the rendering server with the problem can be skipped when the task is issued.
The game updating scheme of the embodiment of the application can improve the updating efficiency of the cloud game and greatly shorten the updating time of the cloud game. Of course, the data synchronization scheme of the embodiment of the present application may also be applied to other application scenarios of data synchronization.
The following describes embodiments of the apparatus of the present application, which may be used to perform the data synchronization method in the above embodiments of the present application. For details that are not disclosed in the embodiments of the apparatus of the present application, please refer to the embodiments of the data synchronization method described above in the present application.
Fig. 8 is a block diagram illustrating a data synchronization apparatus applied to a cloud game according to an embodiment of the present application, the data synchronization apparatus may be provided within the task management component 202 shown in fig. 2, and the task management component 202 may be run in the form of a service in a server.
Referring to fig. 8, a data synchronization apparatus 800 applied to a cloud game according to an embodiment of the present application includes: a first receiving unit 802, a first generating unit 804, a first transmitting unit 806 and a first processing unit 808.
The first receiving unit 802 is configured to receive task allocation information sent by a task distributor, where the task allocation information includes information of a data providing node and information of a data receiving node for performing cloud game update; the first generating unit 804 is configured to generate a data synchronization task according to the task allocation information, wherein the data synchronization task is used for instructing a designated data receiving node to synchronize target data from a designated data providing node, and the target data comprises a cloud game update data packet; the first sending unit 806 is configured to send the data synchronization task to at least the designated data receiving node, and obtain an execution result of the data synchronization task; the first processing unit 808 is configured to, if the execution result indicates that the designated data receiving node successfully synchronizes the target data, return update information to the task distributor, where the update information is used to indicate that the designated data receiving node is changed to a data providing node, so that the task distributor sends the task allocation information again according to the updated information.
In some embodiments of the present application, based on the foregoing scheme, the first generating unit 804 is configured to: analyzing the task allocation information to obtain the information of the data providing node and the information of the data receiving node; and generating the data synchronization task according to the information of the data providing node, the information of the data receiving node and a pre-configured task template.
In some embodiments of the present application, based on the foregoing scheme, the preconfigured task template includes task type information; the first generating unit 804 is configured to: setting the task type information in the task template as a data synchronization type, and generating the data synchronization task according to the information of the designated data receiving node and the information of the designated data providing node.
In some embodiments of the present application, based on the foregoing scheme, the first sending unit 806 is configured to: and sending the data synchronization task to a task publishing and subscribing platform so that the designated data receiving node acquires the data synchronization task by monitoring the task publishing and subscribing platform.
In some embodiments of the present application, based on the foregoing solution, the data synchronization apparatus 800 further includes: the acquisition unit is configured to acquire state information of a data providing node and state information of a data receiving node from the task publishing and subscribing platform, wherein the state information is used for representing whether the data providing node and the data receiving node are in an online state or not; the first sending unit 806 is further configured to: and returning the state information of the data providing node and the state information of the data receiving node to the task distributor.
In some embodiments of the present application, based on the foregoing scheme, the first generating unit 804 is further configured to: generating a task to be executed, wherein the task to be executed comprises at least one of the following: task type information, task triggering condition information, task execution target information and task execution state information; the first sending unit 806 is further configured to: and sending the task to be executed to the task publishing and subscribing platform so that the designated node in the data providing node and the data receiving node acquires the task to be executed for processing by monitoring the task publishing and subscribing platform.
In some embodiments of the present application, based on the foregoing solution, the data synchronization apparatus 800 further includes: the testing unit is configured to call a target node completing data synchronization to perform simulation operation based on the synchronized data if the number of the nodes completing data synchronization is detected to reach a set number; capturing a cloud game interface of the target node during simulation operation; and if the cloud game interface is matched with the set game interface, providing cloud game service based on the node completing data synchronization.
In some embodiments of the present application, based on the foregoing solution, the data providing node and the data receiving node comprise a cloud game rendering server node.
Fig. 9 illustrates a block diagram of a data synchronization apparatus applied to a cloud game according to an embodiment of the present application, which may be provided in the task distributor 201 illustrated in fig. 2, and the task distributor 201 may be operated in a server in the form of one service.
Referring to fig. 9, a data synchronization apparatus 900 applied to a cloud game according to an embodiment of the present application includes: a second generating unit 902, a second transmitting unit 904, a second receiving unit 906 and a second processing unit 908.
The second generating unit 902 is configured to generate task allocation information, where the task allocation information includes information of a data providing node and information of a data receiving node, which are used for performing cloud game update; the second sending unit 904 is configured to send the task allocation information to a task management component, so that the task management component generates a data synchronization task according to the task allocation information and sends the data synchronization task to a designated data receiving node, where the data synchronization task is used to instruct the designated data receiving node to synchronize target data from a designated data providing node, where the target data includes a cloud game update data packet; the second receiving unit 906 is configured to receive update information returned by the task management component, where the update information is used to indicate that the specified data receiving node is changed into a data providing node; the second processing unit 908 is configured to generate the task allocation information again if there is a data receiving node after changing the designated data receiving node to a data providing node.
In some embodiments of the present application, based on the foregoing solution, the second processing unit 908 is further configured to: acquiring information of a data providing node and information of a data receiving node from a specified database, wherein the specified database comprises a first list and a second list, the first list is used for storing the information of the data providing node, and the second list is used for storing the information of the data receiving node; changing the designated data receiving node to a data providing node by moving the information of the designated data receiving node in the second list to the first list.
In some embodiments of the present application, based on the foregoing scheme, the second generating unit 902 is configured to: generating the task allocation information when detecting that a data packet of the cloud game is updated; or when the set updating time is reached, generating the task allocation information.
FIG. 10 illustrates a schematic structural diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present application.
It should be noted that the computer system 1000 of the electronic device shown in fig. 10 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 10, the computer system 1000 includes a Central Processing Unit (CPU)1001 that can perform various appropriate actions and processes, such as performing the methods described in the above embodiments, according to a program stored in a Read-Only Memory (ROM) 1002 or a program loaded from a storage portion 1008 into a Random Access Memory (RAM) 1003. In the RAM 1003, various programs and data necessary for system operation are also stored. The CPU 1001, ROM 1002, and RAM 1003 are connected to each other via a bus 1004. An Input/Output (I/O) interface 1005 is also connected to the bus 1004.
The following components are connected to the I/O interface 1005: an input section 1006 including a keyboard, a mouse, and the like; an output section 1007 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; a storage portion 1008 including a hard disk and the like; and a communication section 1009 including a Network interface card such as a LAN (Local Area Network) card, a modem, or the like. The communication section 1009 performs communication processing via a network such as the internet. The driver 1010 is also connected to the I/O interface 1005 as necessary. A removable medium 1011 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 1010 as necessary, so that a computer program read out therefrom is mounted into the storage section 1008 as necessary.
In particular, according to embodiments of the application, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising a computer program for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication part 1009 and/or installed from the removable medium 1011. When the computer program is executed by a Central Processing Unit (CPU)1001, various functions defined in the system of the present application are executed.
It should be noted that the computer readable medium shown in the embodiments of the present application may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read-Only Memory (ROM), an Erasable Programmable Read-Only Memory (EPROM), a flash Memory, an optical fiber, a portable Compact Disc Read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with a computer program embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. Each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software, or may be implemented by hardware, and the described units may also be disposed in a processor. Wherein the names of the elements do not in some way constitute a limitation on the elements themselves.
As another aspect, the present application also provides a computer-readable medium, which may be contained in the electronic device described in the above embodiments; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by an electronic device, cause the electronic device to implement the method described in the above embodiments.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the application. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiments of the present application.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (15)

1. A data synchronization method applied to a cloud game is characterized by comprising the following steps:
receiving task allocation information sent by a task distributor, wherein the task allocation information comprises information of a data providing node and information of a data receiving node which are used for updating a cloud game;
generating a data synchronization task according to the task allocation information, wherein the data synchronization task is used for indicating a designated data receiving node to synchronize target data from a designated data providing node, and the target data comprises a cloud game updating data packet;
sending the data synchronization task to at least the designated data receiving node, and acquiring an execution result of the data synchronization task;
and if the execution result shows that the designated data receiving node successfully synchronizes the target data, returning update information to the task distributor, wherein the update information is used for indicating that the designated data receiving node is changed into a data providing node, so that the task distributor sends the task distribution information again according to the updated information.
2. The data synchronization method of claim 1, wherein generating a data synchronization task according to the task allocation information comprises:
analyzing the task allocation information to obtain the information of the data providing node and the information of the data receiving node;
and generating the data synchronization task according to the information of the data providing node, the information of the data receiving node and a pre-configured task template.
3. The data synchronization method of claim 2, wherein the pre-configured task template includes task type information;
generating the data synchronization task according to the information of the data providing node, the information of the data receiving node and a pre-configured task template, wherein the data synchronization task comprises the following steps:
setting the task type information in the task template as a data synchronization type, and generating the data synchronization task according to the information of the designated data receiving node and the information of the designated data providing node.
4. The data synchronization method of claim 1, wherein sending the data synchronization task to at least the designated data receiving node comprises:
and sending the data synchronization task to a task publishing and subscribing platform so that the designated data receiving node acquires the data synchronization task by monitoring the task publishing and subscribing platform.
5. The data synchronization method of claim 4, further comprising:
acquiring state information of a data providing node and state information of a data receiving node from the task publishing and subscribing platform, wherein the state information is used for representing whether the data providing node and the data receiving node are in an online state or not;
and returning the state information of the data providing node and the state information of the data receiving node to the task distributor.
6. The data synchronization method of claim 4, further comprising:
generating a task to be executed, wherein the task to be executed comprises at least one of the following: task type information, task triggering condition information, task execution target information and task execution state information;
and sending the task to be executed to the task publishing and subscribing platform so that the designated node in the data providing node and the data receiving node acquires the task to be executed for processing by monitoring the task publishing and subscribing platform.
7. The data synchronization method of claim 1, further comprising:
if the number of the nodes completing the data synchronization is detected to reach the set number, calling the target nodes completing the data synchronization to perform simulation operation based on the synchronized data;
capturing a cloud game interface of the target node during simulation operation;
and if the cloud game interface is matched with the set game interface, providing cloud game service based on the node completing data synchronization.
8. The data synchronization method according to any one of claims 1 to 7, wherein the data providing node and the data receiving node comprise cloud game rendering server nodes.
9. A data synchronization method applied to a cloud game is characterized by comprising the following steps:
generating task allocation information, wherein the task allocation information comprises information of a data providing node and information of a data receiving node which are used for updating a cloud game;
sending the task allocation information to a task management component so that the task management component generates a data synchronization task according to the task allocation information and sends the data synchronization task to a designated data receiving node, wherein the data synchronization task is used for indicating the designated data receiving node to synchronize target data from a designated data providing node, and the target data comprises a cloud game update data packet;
receiving update information returned by the task management component, wherein the update information is used for indicating that the designated data receiving node is changed into a data providing node;
and after the designated data receiving node is changed into a data providing node, if a data receiving node still exists, the task allocation information is generated again.
10. The data synchronization method of claim 9, further comprising:
acquiring information of a data providing node and information of a data receiving node from a specified database, wherein the specified database comprises a first list and a second list, the first list is used for storing the information of the data providing node, and the second list is used for storing the information of the data receiving node;
changing the designated data receiving node to a data providing node by moving the information of the designated data receiving node in the second list to the first list.
11. The data synchronization method according to claim 9 or 10, wherein generating task allocation information comprises:
generating the task allocation information when detecting that a data packet of the cloud game is updated; or
And when the set updating time is reached, generating the task allocation information.
12. A data synchronization device applied to a cloud game is characterized by comprising:
the system comprises a first receiving unit, a second receiving unit and a third receiving unit, wherein the first receiving unit is configured to receive task allocation information sent by a task distributor, and the task allocation information comprises information of a data providing node and information of a data receiving node which are used for updating a cloud game;
a first generating unit configured to generate a data synchronization task according to the task allocation information, wherein the data synchronization task is used for instructing a designated data receiving node to synchronize target data from a designated data providing node, and the target data comprises a cloud game update data packet;
the first sending unit is configured to send the data synchronization task to at least the designated data receiving node and obtain an execution result of the data synchronization task;
and the first processing unit is configured to, if the execution result indicates that the designated data receiving node successfully synchronizes the target data, return update information to the task distributor, where the update information is used to indicate that the designated data receiving node is changed to a data providing node, so that the task distributor sends the task allocation information again according to the updated information.
13. A data synchronization device applied to a cloud game is characterized by comprising:
the second generation unit is configured to generate task allocation information, wherein the task allocation information comprises information of a data providing node and information of a data receiving node, and the information is used for updating the cloud game;
a second sending unit, configured to send the task allocation information to a task management component, so that the task management component generates a data synchronization task according to the task allocation information and sends the data synchronization task to a designated data receiving node, where the data synchronization task is used to instruct the designated data receiving node to synchronize target data from a designated data providing node, and the target data includes a cloud game update data packet;
a second receiving unit configured to receive update information returned by the task management component, where the update information is used to indicate that the designated data receiving node is changed into a data providing node;
and a second processing unit configured to, after changing the designated data receiving node to a data providing node, generate the task allocation information again if a data receiving node still exists.
14. A computer-readable medium on which a computer program is stored, the computer program, when being executed by a processor, implementing the data synchronization method applied to a cloud game according to any one of claims 1 to 8, or implementing the data synchronization method applied to a cloud game according to any one of claims 9 to 11.
15. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the data synchronization method applied to the cloud game of any one of claims 1 to 8, or the data synchronization method applied to the cloud game of any one of claims 9 to 11.
CN202110665749.8A 2021-06-16 2021-06-16 Data synchronization method and device, computer readable medium and electronic equipment Pending CN113230661A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110665749.8A CN113230661A (en) 2021-06-16 2021-06-16 Data synchronization method and device, computer readable medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110665749.8A CN113230661A (en) 2021-06-16 2021-06-16 Data synchronization method and device, computer readable medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN113230661A true CN113230661A (en) 2021-08-10

Family

ID=77140012

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110665749.8A Pending CN113230661A (en) 2021-06-16 2021-06-16 Data synchronization method and device, computer readable medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN113230661A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114500571A (en) * 2022-02-16 2022-05-13 科来网络技术股份有限公司 Task synchronization method and device, computer equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114500571A (en) * 2022-02-16 2022-05-13 科来网络技术股份有限公司 Task synchronization method and device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN113181646A (en) Game data method and device, electronic equipment and storage medium
CN111159046A (en) Test method, test device, electronic equipment, test system and storage medium
CN111125057A (en) Service request processing method and device and computer system
Yadav et al. Adaptive GPU resource scheduling on virtualized servers in cloud gaming
CN112379963A (en) Remote application window control method and device and computer equipment
CN111259066A (en) Server cluster data synchronization method and device
CN113230661A (en) Data synchronization method and device, computer readable medium and electronic equipment
CN113204425B (en) Method, device, electronic equipment and storage medium for process management internal thread
CN111258902B (en) Performance test method and performance test system based on SockJS server
CN111506393B (en) ARM-based virtualization device and use method thereof
CN112044061A (en) Game picture processing method and device, electronic equipment and storage medium
CN113368506B (en) Game team control method, device, electronic equipment and medium
CN113099247B (en) Virtual resource processing method, device, server, storage medium and program product
CN112138372B (en) Data synchronization method in distributed system and related equipment
CN112802478B (en) Hybrid cloud fusion scheduling method and device
CN114139731A (en) Longitudinal federated learning modeling optimization method, apparatus, medium, and program product
CN113117340A (en) Game running method and device, storage medium and electronic equipment
CN115129323B (en) Method, device and equipment for processing data resource packet and storage medium
CN113434384A (en) Pressure testing method and device
CN115065866B (en) Video generation method, device, equipment and storage medium
CN113656268B (en) Performance test method and device for business service, electronic equipment and storage medium
CN114866821B (en) Data processing method, device, electronic equipment and storage medium
JP2013232035A (en) Information processing system, information processing device, information processing method, and program
US11277473B1 (en) Coordinating breaking changes in automatic data exchange
CN115297340A (en) Virtual space interaction method and device, electronic equipment, server and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40052214

Country of ref document: HK

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination