CN114443124A - Distributed data processing method, apparatus, system, device and medium - Google Patents

Distributed data processing method, apparatus, system, device and medium Download PDF

Info

Publication number
CN114443124A
CN114443124A CN202210113565.5A CN202210113565A CN114443124A CN 114443124 A CN114443124 A CN 114443124A CN 202210113565 A CN202210113565 A CN 202210113565A CN 114443124 A CN114443124 A CN 114443124A
Authority
CN
China
Prior art keywords
version number
client
instruction
response
server
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
CN202210113565.5A
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.)
Beijing Taiqi Graphics Technology Co ltd
Original Assignee
Beijing Taiqi Graphics Technology 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 Beijing Taiqi Graphics Technology Co ltd filed Critical Beijing Taiqi Graphics Technology Co ltd
Priority to CN202210113565.5A priority Critical patent/CN114443124A/en
Publication of CN114443124A publication Critical patent/CN114443124A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

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

Abstract

A distributed data processing method, apparatus, system, device and medium. The method comprises the following steps: in response to receiving from a first client of the plurality of clients a modification instruction for the first object and a first version number for the first object corresponding in the first client, comparing a second version number stored in the log server for the first object with the first version number; and in response to determining that the first version number is not lower than the second version number, assigning a third version number to the modification instruction, wherein the third version number is higher than the first version number; sending the modification instruction and the third version number to other clients except the first client in the plurality of clients; sending a third version number to the first client for updating a corresponding first version number of the first object in the first client based on the third version number; and in response to determining that the modification instruction does not include an add or delete operation for the first object, retaining a second version number of the first object stored in the log server.

Description

Distributed data processing method, apparatus, system, device and medium
Technical Field
The present disclosure relates to the field of computers, and in particular, to a distributed data processing method, apparatus, system, electronic device, non-transitory computer readable storage medium, and computer program product.
Background
A three-dimensional editor is a tool for designing and fabricating a three-dimensional digital asset, which is used to improve the efficiency of fabricating the three-dimensional digital asset, in which various asset resources are integrated to generate the three-dimensional digital asset that supports the functions of combining, rotating, moving, zooming, etc. of various objects. Compared with a common two-dimensional designer, the three-dimensional editor has complex interactive operation, when a three-dimensional scene is edited, the traditional process can be divided into a plurality of stages, different processing software is needed among different stages, a very long tool chain is formed, and the process is complex. Under the requirement, a multi-user cooperation mode is generated, a plurality of users edit the same object on line at the same time, the upstream and downstream dependence can be broken, the manufacturing period of the three-dimensional digital assets is shortened, and the whole set of manufacturing process is simplified. Therefore, it is very important how to implement a synchronization mechanism for multi-terminal operation in multi-user collaboration and how to solve conflicts that may be caused by multi-user operation.
The approaches described in this section are not necessarily approaches that have been previously conceived or pursued. Unless otherwise indicated, it should not be assumed that any of the approaches described in this section qualify as prior art merely by virtue of their inclusion in this section. Similarly, unless otherwise indicated, the problems mentioned in this section should not be considered as having been acknowledged in any prior art.
Disclosure of Invention
The present disclosure provides a distributed data processing method, apparatus, system, electronic device, non-transitory computer readable storage medium, and computer program product.
According to an aspect of the present disclosure, there is provided a distributed data processing method, the method being performed on a server side, the method comprising: in response to receiving, from a first client of a plurality of clients, a modification instruction for a first object and a first version number of the first object corresponding in the first client, comparing a second version number stored in a log server for the first object with the first version number; and in response to determining that the first version number is not lower than the second version number, assigning a third version number to the modify instruction, wherein the third version number is higher than the first version number; sending the modification instruction and the third version number to other clients of the plurality of clients except the first client; sending the third version number to the first client for updating a corresponding first version number of the first object in the first client based on the third version number; and in response to determining that the modification instruction does not include an add or delete operation for the first object, retaining the second version number for the first object stored in the log server.
According to another aspect of the present disclosure, there is provided a distributed data processing method, which is performed at a client, the method including: in response to generating a modification instruction for a first object, sending the modification instruction and a corresponding first version number of the first object in the client to a log server; in response to receiving a second version number for the first object from the log server, updating the first version number based on the second version number, wherein the second version number is higher than the first version number.
According to another aspect of the present disclosure, there is provided a distributed data processing apparatus, the apparatus comprising a log server configured to: in response to receiving, from a first client of a plurality of clients, a modification instruction for a first object and a corresponding first version number of the first object in the first client, comparing the stored second version number for the first object with the first version number; and in response to determining that the first version number is not lower than the second version number, assigning a third version number to the modify instruction, wherein the third version number is higher than the first version number; sending the modification instruction and the third version number to other clients of the plurality of clients except the first client; sending the third version number to the first client for updating a corresponding first version number of the first object in the first client based on the third version number; and in response to determining that the modification instruction does not include an add or delete operation for the first object, retaining the stored second version number for the first object.
According to another aspect of the present disclosure, there is provided a distributed data processing apparatus, the apparatus comprising a client configured to: in response to generating a modification instruction for a first object, sending the modification instruction and a corresponding first version number of the first object in the client to a log server; in response to receiving a second version number for the first object from the log server, updating the first version number based on the second version number, wherein the second version number is higher than the first version number.
According to another aspect of the present disclosure, there is provided a distributed data processing system comprising: a client cluster comprising a plurality of clients; and a log server; wherein the distributed data processing system is configured to perform the following operations: in response to a first client of the plurality of clients generating a modification instruction for a first object, sending, by the first client, the modification instruction and a corresponding first version number of the first object in the first client to the log server; in response to receiving the modification instruction, comparing, by the log server, the first version number and a second version number stored in the log server for the first object; in response to determining that the first version number is not lower than the second version number, assigning, by the log server, a third version number to the modification instruction, wherein the third version number is higher than the first version number; sending, by the log server, the modification instruction and the third version number to other clients in the cluster of clients except the first client; sending, by the log server, the third version number to the first client for updating a corresponding first version number of the first object in the first client based on the third version number; and in response to determining that the modification instruction does not include an add or delete operation for the first object, retaining, by the log server, the second version number for the first object stored in the log server.
According to another aspect of the present disclosure, there is provided an electronic device including: at least one processor, wherein each of the at least one processor comprises: caching by a processor; and a memory communicatively coupled to the at least one processor, wherein the memory stores instructions executable by the at least one processor, the instructions being executable by the at least one processor to enable the at least one processor to perform the above-described distributed data processing method.
According to another aspect of the present disclosure, there is provided a non-transitory computer readable storage medium storing computer instructions for causing a computer to execute the above-described distributed data processing method.
According to another aspect of the disclosure, a computer program product is provided, comprising a computer program, wherein the computer program realizes the distributed data processing method when executed by a processor.
These and other aspects of the disclosure will be apparent from and elucidated with reference to the embodiments described hereinafter.
Drawings
Further details, features and advantages of the disclosure are disclosed in the following description of exemplary embodiments, which is to be read in connection with the accompanying drawings. The illustrated embodiments are for purposes of illustration only and do not limit the scope of the claims. Throughout the drawings, identical reference numbers designate similar, but not necessarily identical, elements.
FIG. 1 is a schematic diagram illustrating an exemplary system in which various methods described herein may be implemented, according to an exemplary embodiment;
FIG. 2 is a flowchart illustrating a distributed data processing method in accordance with an illustrative embodiment;
FIG. 3 is a flowchart illustrating a distributed data processing method in accordance with an illustrative embodiment;
FIG. 4 is a block diagram illustrating the structure of a distributed data processing apparatus according to an exemplary embodiment;
FIG. 5 is a block diagram illustrating the structure of a distributed data processing apparatus according to an exemplary embodiment;
FIG. 6 is a block diagram illustrating the structure of a distributed data processing system in accordance with the illustrative embodiments;
FIG. 7 is a schematic diagram illustrating a distributed data processing system in accordance with an illustrative embodiment; and
FIG. 8 is a block diagram illustrating an exemplary computer device that can be used in exemplary embodiments.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
In the present disclosure, unless otherwise specified, the use of the terms "first", "second", etc. to describe various elements is not intended to limit the positional relationship, the timing relationship, or the importance relationship of the elements, and such terms are used only to distinguish one element from another. In some examples, a first element and a second element may refer to the same instance of the element, and in some cases, based on the context, they may also refer to different instances.
The terminology used in the description of the various described examples in this disclosure is for the purpose of describing particular examples only and is not intended to be limiting. Unless the context clearly indicates otherwise, if the number of elements is not specifically limited, the elements may be one or more. As used herein, the term "plurality" means two or more, and the term "based on" should be interpreted as "based, at least in part, on". Further, the terms "and/or" and at least one of "… …" encompass any and all possible combinations of the listed items.
In the related art, synchronization in multi-user cooperative operation is realized by means of a distributed synchronization algorithm and a Data structure including a confl-free Replicated Data Type (CRDT) and an Operational Transformation (OT). The problem of realizing synchronization by means of the two methods is that the complexity of the data structure is high, the data structure is difficult to design and realize, and the service data of the application program can be completely matched with the data structure required by the two algorithms, so that the adaptability is poor.
To solve the above problem, the present disclosure achieves synchronization of collaborative editing and handling of potential conflicts by providing a centralized server. Specifically, the centralized server determines whether to receive incremental changes from multiple clients by setting a version number for reference, and pushes the received incremental changes to other clients, so as to realize synchronization. In addition, the server determines whether to update the version number for reference according to the type of the incremental change from the client so as to solve the conflict between concurrent requests in different scenes. The distributed data processing method provided by the disclosure enables multiple users to edit the same object on line at the same time without adapting the instruction data, can support the instruction data of different data types, and has strong applicability.
Exemplary embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
Fig. 1 illustrates a schematic diagram of an exemplary system 100 in which various methods and apparatus described herein may be implemented in accordance with embodiments of the present disclosure. Referring to fig. 1, the system 100 includes one or more client devices 101, 102, 103, and 104, a server 120, and one or more communication networks 110 coupling the one or more client devices to the server 120. Client devices 101, 102, 103, and 104 may be configured to execute one or more application programs.
In embodiments of the present disclosure, the server 120 may run one or more services or software applications that enable the distributed data processing method to be performed.
In some embodiments, the server 120 may also provide other services or software applications that may include non-virtual environments and virtual environments. In some embodiments, these services may be provided as web-based services or cloud services, for example, provided to users of client devices 101, 102, 103, and 104 under a software as a service (SaaS) model.
In the configuration shown in fig. 1, server 120 may include one or more components that implement the functions performed by server 120. These components may include software components, hardware components, or a combination thereof, which may be executed by one or more processors. Users operating client devices 101, 102, 103, and 104 may, in turn, utilize one or more client applications to interact with server 120 to take advantage of the services provided by these components. It should be understood that a variety of different system configurations are possible, which may differ from system 100. Accordingly, fig. 1 is one example of a system for implementing the various methods described herein and is not intended to be limiting.
A user may use client devices 101, 102, 103, and 104 to perform a distributed data processing method for a client. The client device may provide an interface that enables a user of the client device to interact with the client device. The client device may also output information to the user via the interface. Although fig. 1 depicts only four client devices, those skilled in the art will appreciate that any number of client devices may be supported by the present disclosure.
Client devices 101, 102, 103, and 104 may include various types of computer devices, such as portable handheld devices, general purpose computers (such as personal computers and laptop computers), workstation computers, wearable devices, smart screen devices, self-service terminal devices, service robots, gaming systems, thin clients, various messaging devices, sensors or other sensing devices, and so forth. These computer devices may run various types and versions of software applications and operating systems, such as MICROSOFT Windows, APPLE iOS, UNIX-like operating systems, Linux, or Linux-like operating systems (e.g., GOOGLE Chrome OS); or include various Mobile operating systems such as MICROSOFT Windows Mobile OS, iOS, Windows Phone, Android. Portable handheld devices may include cellular telephones, smart phones, tablets, Personal Digital Assistants (PDAs), and the like. Wearable devices may include head-mounted displays (such as smart glasses) and other devices. The gaming system may include a variety of handheld gaming devices, internet-enabled gaming devices, and the like. The client device is capable of executing a variety of different applications, such as various Internet-related applications, communication applications (e.g., email applications), Short Message Service (SMS) applications, and may use a variety of communication protocols.
Network 110 may be any type of network known to those skilled in the art that may support data communications using any of a variety of available protocols, including but not limited to TCP/IP, SNA, IPX, etc. By way of example only, one or more networks 110 may be a Local Area Network (LAN), an ethernet-based network, a token ring, a Wide Area Network (WAN), the internet, a virtual network, a Virtual Private Network (VPN), an intranet, an extranet, a Public Switched Telephone Network (PSTN), an infrared network, a wireless network (e.g., bluetooth, WIFI), and/or any combination of these and/or other networks.
The server 120 may include one or more general purpose computers, special purpose server computers (e.g., PC (personal computer) servers, UNIX servers, mid-end servers), blade servers, mainframe computers, server clusters, or any other suitable arrangement and/or combination. The server 120 may include one or more virtual machines running a virtual operating system, or other computing architecture involving virtualization (e.g., one or more flexible pools of logical storage that may be virtualized to maintain virtual storage for the server). In various embodiments, the server 120 may run one or more services or software applications that provide the functionality described below.
The computing units in server 120 may run one or more operating systems including any of the operating systems described above, as well as any commercially available server operating systems. The server 120 may also run any of a variety of additional server applications and/or middle tier applications, including HTTP servers, FTP servers, CGI servers, JAVA servers, database servers, and the like.
In some implementations, the server 120 may include one or more applications to analyze and consolidate data feeds and/or event updates received from users of the client devices 101, 102, 103, and 104. Server 120 may also include one or more applications to display data feeds and/or real-time events via one or more display devices of client devices 101, 102, 103, and 104.
In some embodiments, the server 120 may be a server of a distributed system, or a server incorporating a blockchain. The server 120 may also be a cloud server, or a smart cloud computing server or a smart cloud host with artificial intelligence technology. The cloud Server is a host product in a cloud computing service system, and is used for solving the defects of high management difficulty and weak service expansibility in the traditional physical host and Virtual Private Server (VPS) service.
The system 100 may also include one or more databases 130. In some embodiments, these databases may be used to store data and other information. For example, one or more of the databases 130 may be used to store information such as audio files and video files. The database 130 may reside in various locations. For example, the database used by the server 120 may be local to the server 120, or may be remote from the server 120 and may communicate with the server 120 via a network-based or dedicated connection. The database 130 may be of different types. In certain embodiments, the database used by the server 120 may be, for example, a relational database. One or more of these databases may store, update, and retrieve data to and from the database in response to the command.
In some embodiments, one or more of the databases 130 may also be used by applications to store application data. The databases used by the application may be different types of databases, such as key-value stores, object stores, or regular stores supported by a file system.
The system 100 of fig. 1 may be configured and operated in various ways to enable application of the various methods and apparatus described in accordance with the present disclosure.
Fig. 2 is a flowchart illustrating a distributed data processing method, which is performed on the server side, according to an exemplary embodiment. As shown in fig. 2, a distributed data processing method 200 includes: step S201, in response to receiving a modification instruction for a first object from a first client of a plurality of clients and a corresponding first version number of the first object in the first client, comparing a second version number for the first object stored in a log server with the first version number; step S202, responding to the fact that the first version number is not lower than the second version number, and distributing a third version number to the modification instruction, wherein the third version number is higher than the first version number; step S203, sending the modification instruction and the third version number to other clients except the first client in the plurality of clients; step S204, sending the third version number to the first client, so as to update the corresponding first version number of the first object in the first client based on the third version number; and step S205, in response to determining that the modification instruction does not include an add or delete operation for the first object, retaining the second version number for the first object stored in the log server.
The log server stores therein a version number of a corresponding reference set for each object. When a modification instruction for the first object and a first version number of the first object corresponding to the first object in the first client are received from the first client, the log server queries a version number, i.e., a second version number, of a reference corresponding to the first object, and compares the version number with the first version number to determine whether to accept the modification of the first object by the first client. When the first version number is not lower than the second version number, indicating that the first object in the first client is updated, the log server may accept the modification for the first object, otherwise the log server may refuse to accept the modification. For example, when the log server rejects the modification instruction from the first client, a corresponding prompt message may be sent to the first client to indicate that the current version number of the first object in the first client is lower, and the modification operation on the first object needs to be continued after the update.
In step S202, after receiving the modification instruction from the first client, the log server assigns a third version number higher than the first version number to the modification instruction to indicate the update of the first object, and in step S203, sends the modification instruction and the third version number corresponding to the update to the other clients so that the other clients perform synchronous update. Meanwhile, in step S204, the third version number is sent to the first client to update the version number of the first object in the first client.
According to some embodiments, the method further comprises: updating the second version number based on the third version number in response to determining that the modification instruction includes an add or delete operation for the first object. The log server updates the second version number only according to the adding or deleting operation aiming at the first object, the second version number is not updated for other modification instructions, and the updating control aiming at the second version number can automatically solve the conflict among a plurality of modification instructions and is beneficial to the cooperation among a plurality of clients.
How the update control of the second version number resolves conflicts between multiple modification instructions will be described below by two examples.
In one example, when two clients respectively send a modification instruction to change the object location to the log server at the same time: the final consistency cannot be influenced by the sequence of the two changes, and therefore compatibility in the collaborative editing process is improved.
In one example, one client sends a modification instruction A to the log server to alter the location of an object, and another client sends a modification instruction B to the log server to delete the object. In this example, if the log server receives a first and then B, deleting modification instruction B for the object does not affect the result of modification instruction a. If the log server receives B first and then a, assuming that B is accepted by the log server, the log server updates the second version number. At the same time, the log server needs to deny any subsequent operations on the object. If the version number in the modification instruction a is lower than the second version number, it indicates that the client sending the modification instruction a has not received the message that the object has been deleted, and at this time, the modification instruction a will be rejected. Conversely, if the client already knows that the object has been deleted, the client will not issue any modification instructions to modify the object other than adding the object. Thereby, conflict handling between multiple modification instructions is achieved.
Meanwhile, the distributed data processing method provided by the disclosure realizes synchronization of collaborative editing and processing of potential conflicts by setting the centralized log server, so that multiple users can edit the same object online at the same time without adapting the instruction data, the instruction data of different data types can be supported, and the applicability is strong.
According to some embodiments, the log server may generate a global sequence from modification instructions received from the clients, where a third version number corresponding to each modification instruction determines a position of the modification instruction in the global sequence, and the global sequence is sequentially pushed to the clients to be updated for synchronous updating, so that each client may obtain, via the log server, the first object of the latest version updated by the other clients.
According to some embodiments, the log server may be composed of a plurality of instances, and data submission, backup and main service election are performed among the instances through the ETCD service, so that a high-availability cluster is formed. At any time, only the master log server in the cluster can accept modification instructions sent by the client. After a modification is accepted, the log server can carry out data submission and multi-copy backup through the ETCD so as to meet the requirement of high availability.
According to some embodiments, the method further comprises: in response to the first version number not being lower than the second version number, storing the modification instruction and the third version number in the log server. Therefore, all the accepted modification histories and the corresponding version numbers corresponding to the first objects can be acquired through the log server.
According to some embodiments, the method further comprises: comparing the third version number with a fourth version number corresponding to the first object in a storage server; and in response to the third version number being higher than the fourth version number, storing the modification instruction in the storage server and updating the fourth version number based on the third version number. Therefore, the storage server performs persistent storage on each object by subscribing to the log of the log server, specifically, stores modification instructions from the log server, which are higher than the current version of the storage server, so as to perform version control on the first object and perform persistent storage on the first object, so as to avoid data loss.
According to some embodiments, the method further comprises: in response to receiving a request from the first client that includes a number corresponding to the first object, determining the first object based on the number; and sending a modification instruction in the log server and/or the first object in the storage server corresponding to the fourth version number, wherein the corresponding version number of the first object in the log server is higher than the fourth version number, to the first client.
It will be appreciated that a storage server may serve objects for multiple clients. In the starting stage of the first client, when the first client needs to load the first object, a request for acquiring the first object needs to be sent to the storage server, the storage server determines the first object requested by the first client according to a number attached in the request, and sends a fourth version number corresponding to the first object in the storage server back to the first client, and the first client requests a modification instruction, aiming at the first object, higher than the fourth version number from the log server according to the fourth version number. Therefore, the first client can acquire the first object with the version number up to the fourth version number from the storage server and acquire the modification instructions with the version number higher than the fourth version number up to the latest version from the log server, so that the first client can perform rendering operation based on the two parts of data to rebuild the current latest version of the first object.
According to some embodiments, the method further comprises: creating, in the storage server, at preset time intervals, a snapshot corresponding to the first object based on the modification instructions stored in the storage server and the first object corresponding to the fourth version number. It can be understood that, periodically instantiating the plurality of discrete modification instructions as a snapshot of a full amount of the first object, so that the first client may directly obtain the snapshot corresponding to the first object when requesting the first object from the storage server, and compared with a process of obtaining the plurality of discrete modification instructions and locally integrating the plurality of discrete modification instructions by the client to reconstruct the first object, snapshots created in the storage server at preset time intervals may enable the first client to directly obtain the integrated snapshot, thereby accelerating the process of reconstructing the first object by the first client.
According to some embodiments, the storage server may also provide a service of thumbnail generation of objects, such that each object is visible to the client before being requested by the client, for the user to choose different objects to meet different requirements.
According to some embodiments, the log server, the storage server, and the plurality of clients are in data communication via a streaming Remote Procedure Call (Remote Procedure Call). For example, the plurality of clients and the storage server make a request for subscribing the message to the log server, and after receiving the request, the log server establishes a streaming RPC connection with each of the plurality of clients and the storage server, and then sends the request to the subscriber, that is, each of the plurality of clients and the storage server, through the connection in sequence via the received modification instruction. Thus, the use of remote procedure calls makes communication between multiple endpoints simpler, transparent, and improves interoperability between the endpoints.
According to another aspect of the present disclosure, a distributed data processing method is provided, the method being performed at a client. As shown in fig. 3, the distributed data processing method 300 includes: step S301, responding to a modification instruction generated for a first object, and sending the modification instruction and a first version number corresponding to the first object in the client to a log server; step S302, in response to receiving a second version number for the first object from the log server, updating the first version number based on the second version number, where the second version number is higher than the first version number.
In step S301, when a first user corresponding to the client modifies the first object, the client sends a modification instruction to the log server for the modification, and a first version number of the first object currently corresponding to the client, so that the log server can determine whether the modification is to be accepted. In step S302, when the second version number for the first object is received from the log server, the modification instruction is accepted by the log server, and the first version number of the local first object is updated according to the second version number returned by the log server. When the first object in the client is updated, the client only needs to send a modification instruction for the first object to the log server, and does not need to send the modified first object, so that the transmitted data volume can be greatly reduced, the communication delay is reduced, the communication efficiency is improved, and the updating process is simplified.
According to some embodiments, the method further comprises: in response to generating the modification instruction, a rendering operation is performed based on the modification instruction to generate a first video stream for display. It can be understood that, in order to ensure the fluency and low latency of the client, the modification instruction is first rendered through the 3D scene editing module and the renderer, and the rendered result is directly presented to the user in the user interface of the client. For example, the editing and rendering operations for the modification instructions may be implemented via a server corresponding to the client, or may be performed locally by the client. The execution location of the editing and rendering operations may be determined based on the specific needs and the context of the application, which is not limited by this disclosure.
According to some embodiments, the method further comprises: in response to generating the modification instruction for the first object, generating a reverse instruction of the modification instruction and storing the reverse instruction in a undo stack of the client, wherein the reverse instruction corresponds to a reverse operation of an operation corresponding to the modification instruction; determining whether the second version number is received from the log server in response to an undo operation on the modification instruction; and in response to receiving the second version number from the log server, executing the inverse instruction and sending the inverse instruction to the log server.
According to some embodiments, the method further comprises: in response to the undo operation, generating a reverse instruction of the reverse instruction, and storing the generated reverse instruction of the reverse instruction in a redo stack of the client for restoring the undo operation.
Therefore, the corresponding undo operation can be realized for each modification operation, and the redo selection is provided for each undo operation, so that intuitive undo and redo operations are provided for the user in the scene of collaborative editing. Illustratively, after the undo operation, the redo stack in the client is flushed in response to a completely new operation.
According to some embodiments, the method further comprises: sending a request for acquiring the first object to a storage server, wherein the request comprises a number corresponding to the first object; receiving a third version number corresponding to the first object in the storage server from the storage server; sending the third version number to the log server; receiving the first object corresponding to the third version number from the storage server and/or receiving modification instructions for the first object having a corresponding version number higher than the third version number from the log server; and rendering to display a current latest version of the first object based on the received first object corresponding to a third version number and/or a modification instruction for the first object whose corresponding version number is higher than the third version number.
It will be appreciated that a storage server may serve objects for multiple clients. In the starting stage of the client, when the client needs to load the first object, a request for acquiring the first object needs to be sent to the storage server, the storage server determines the first object requested by the client according to a number attached to the request, and sends a fourth version number corresponding to the first object in the storage server back to the client, and the client requests a modification instruction, aiming at the version number of the first object, higher than the fourth version number from the log server according to the fourth version number. Therefore, the client can acquire the first object with the version number up to the fourth version number from the storage server and acquire modification instructions with the version number higher than the fourth version number to the latest version from the log server, so that the client can perform rendering operation based on the two parts of data to rebuild the current latest version of the first object.
According to some embodiments, the method further comprises: in response to receiving an instruction from the log server for a modify operation of the first object, performing a rendering operation based on the instruction to generate a second video stream for display. Therefore, the client can monitor modification operations generated by other clients for the first object through the log server and sequentially apply the received modification operations to the first object currently maintained by the client, so as to ensure that each client can obtain the latest version of the first object.
According to another aspect of the present disclosure, there is provided a distributed data processing apparatus, as shown in fig. 4, the distributed data processing apparatus 400 includes a log server 401, and the log server 401 is configured to perform the following operations: in response to receiving, from a first client of a plurality of clients, a modification instruction for a first object and a corresponding first version number of the first object in the first client, comparing the stored second version number for the first object with the first version number; and in response to determining that the first version number is not lower than the second version number, assigning a third version number to the modify instruction, wherein the third version number is higher than the first version number; sending the modification instruction and the third version number to other clients of the plurality of clients except the first client; sending the third version number to the first client for updating a corresponding first version number of the first object in the first client based on the third version number; and in response to determining that the modification instruction does not include an add or delete operation for the first object, retaining the stored second version number for the first object.
The log server 401 stores therein a version number of a corresponding reference set for each object. When receiving a modification instruction for the first object from the first client and a first version number of the first object corresponding to the first client, the log server 401 queries a version number, i.e. a second version number, of a reference corresponding to the first object, and compares the version number with the first version number to determine whether to accept the modification of the first object by the first client. When the first version number is not lower than the second version number, indicating that the first object in the first client is updated, the log server 401 may accept the modification for the first object, otherwise the log server 401 may refuse to accept the modification. For example, when the log server 401 rejects the modification instruction from the first client, a corresponding prompt message may be sent to the first client to indicate that the current version number of the first object in the first client is lower, and the modification operation on the first object needs to be continued after the update.
After receiving the modification instruction from the first client, the log server 401 allocates a third version number higher than the first version number to the modification instruction to represent the update of the first object, and sends the modification instruction corresponding to the update and the third version number to other clients, so that the other clients perform synchronous update. Meanwhile, the log server 401 sends the third version number to the first client to update the version number of the first object in the first client.
According to some embodiments, the log server 401 is further configured to: updating the second version number based on the third version number in response to determining that the modification instruction includes an add or delete operation for the first object. The log server 401 updates the second version number only according to the adding or deleting operation for the first object, and does not update the second version number for other modification instructions, and the update control for the second version number can automatically solve the conflict among a plurality of modification instructions, thereby facilitating the cooperation among a plurality of clients.
How the update control of the second version number by the log server 401 resolves the conflict between the plurality of modification instructions will be described below by two examples.
In one example, when two clients respectively send a modification instruction to change the object location to the log server at the same time: the final consistency cannot be influenced by the sequence of the two changes, and therefore compatibility in the collaborative editing process is improved.
In one example, one client sends a modification instruction A to the log server to alter the location of an object, and another client sends a modification instruction B to the log server to delete the object. In this example, if the log server receives a first and then B, deleting modification instruction B for the object does not affect the result of modification instruction a. If the log server receives B first and then a, assuming that B is accepted by the log server, the log server updates the second version number. At the same time, the log server needs to deny any subsequent operations on the object. If the version number in the modification instruction a is lower than the second version number, it indicates that the client sending the modification instruction a has not received the message that the object has been deleted, and at this time, the modification instruction a will be rejected. Conversely, if the client already knows that the object has been deleted, the client will not issue any modification instructions to modify the object other than adding the object. Thereby, conflict handling between multiple modification instructions is achieved.
Meanwhile, the distributed data processing apparatus 400 realizes synchronization of collaborative editing and processing of potential conflicts by setting the centralized log server 401, so that multiple users can edit the same object online at the same time without adapting instruction data, and can support instruction data of different data types, and the applicability is strong.
According to some embodiments, the log server 401 may generate a global sequence from a plurality of modification instructions received from a plurality of clients, where a third version number corresponding to each modification instruction determines a position of the modification instruction in the global sequence, and this global sequence is sequentially pushed to the clients to be updated for synchronous update, so that each client may obtain the first object of the latest version updated by other clients via the log server.
According to some embodiments, the log server 401 may be composed of a plurality of instances, and data submission, backup and main service election are performed among the instances through the ETCD service, so that a high-availability cluster is formed. At any time, only the master log server in the cluster can accept modification instructions sent by the client. After a modification is accepted, the log server can carry out data submission and multi-copy backup through the ETCD so as to meet the requirement of high availability.
According to some embodiments, the distributed data processing apparatus 400 further comprises a storage server, wherein the storage server has stored therein the first object corresponding to a fourth version number, and wherein the storage server is configured to: comparing the third version number to the fourth version number; and in response to the third version number being higher than the fourth version number, storing the modification instruction and updating the fourth version number based on the third version number. Therefore, the storage server performs persistent storage on each object by subscribing to the log of the log server, specifically, stores modification instructions from the log server, which are higher than the current version of the storage server, so as to perform version control on the first object and perform persistent storage on the first object, so as to avoid data loss.
According to some embodiments, the log server 401 is further configured to: in response to the first version number not being less than the second version number, storing the modification instruction and the third version number. Thus, all the accepted modification histories and their corresponding version numbers corresponding to the first object can be acquired by the log server 401.
According to some embodiments, the storage server is further configured to: in response to receiving a request from the first client that includes a number corresponding to the first object, determining the first object based on the number; sending the first object corresponding to the fourth version number to the first client; and wherein the log server 401 is further configured to: sending a modification instruction to the first client that the corresponding version number for the first object is higher than the fourth version number.
It will be appreciated that a storage server may serve objects for multiple clients. In the starting phase of the first client, when the first client needs to load the first object, it needs to send a request for obtaining the first object to the storage server, the storage server determines the first object requested by the first client according to the number attached in the request, and sends a fourth version number corresponding to the first object in the storage server back to the first client, and the first client requests the log server 401 for a modification instruction that the version number of the first object is higher than the fourth version number according to the fourth version number. Thus, the first client may obtain the first object up to the fourth version number from the storage server, and obtain the modification instruction from the log server 401 to the latest version higher than the fourth version number, so that the first client may perform a rendering operation based on the two parts of data to rebuild the current latest version of the first object.
According to some embodiments, the storage server is further configured to: creating a snapshot corresponding to the first object based on the stored modification instructions and the first object corresponding to the fourth version number at preset time intervals.
It can be understood that, the storage server periodically instantiates the plurality of discrete modification instructions as a snapshot of a full amount of the first object, so that the first client can directly obtain the snapshot corresponding to the first object when requesting the first object from the storage server, and compared with a process of obtaining the plurality of discrete modification instructions and locally integrating the plurality of discrete modification instructions by the client to reconstruct the first object, snapshots created at preset time intervals in the storage server can enable the first client to directly obtain the integrated snapshot, thereby accelerating the process of reconstructing the first object by the first client.
According to some embodiments, the transmission of data between the log server, the storage server and the plurality of clients is by streaming remote procedure calls. Illustratively, the plurality of clients and the storage server make a request for subscribing the message to the log server 401, and after receiving the request, the log server establishes a streaming RPC connection with each of the plurality of clients and the storage server, and then sends the received modification instruction to the subscriber, that is, each of the plurality of clients and the storage server, through the connection in sequence. Thus, the use of remote procedure calls makes communication between the multiple endpoints simpler, transparent, and improves interoperability between the endpoints.
According to another aspect of the present disclosure, there is provided a distributed data processing apparatus, as shown in fig. 5, the distributed data processing apparatus 500 includes a client 501, the client 501 is configured to perform the following operations: in response to generating a modification instruction for a first object, sending the modification instruction and a corresponding first version number of the first object in the client to a log server; and in response to receiving a second version number for the first object from the log server, updating the first version number based on the second version number, wherein the second version number is higher than the first version number.
When a first user corresponding to the client 501 modifies the first object, the client 501 sends a modification instruction to the log server for the modification, and a first version number of the first object currently corresponding to the client 501, so that the log server can confirm whether the modification is to be accepted. When the second version number for the first object is received from the log server, the modification instruction is accepted by the log server, and the first version number of the local first object is updated according to the second version number returned by the log server. When the first object in the client 501 is updated, the client 501 only needs to send a modification instruction for the first object to the log server, and does not need to send the modified first object, so that the transmitted data volume can be greatly reduced, the communication delay is reduced, the communication efficiency is improved, and the update process is simplified.
According to some embodiments, the client 501 is further configured to: in response to generating the modification instruction, a rendering operation is performed based on the modification instruction to generate a first video stream for display. It can be understood that, in order to ensure the fluency and low latency of the client, the modification instruction is first rendered through the 3D scene editing module and the renderer, and the rendered result is directly presented to the user in the user interface of the client. For example, the editing and rendering operations for the modification instructions may be implemented via a server corresponding to the client, or may be performed locally by the client. The execution location of the editing and rendering operations may be determined based on the specific needs and the context of the application, which is not limited by this disclosure.
According to some embodiments, the client 501 is further configured to perform the following operations: in response to generating the modification instruction for the first object, generating a reverse instruction of the modification instruction and storing the reverse instruction in a undo stack of the client, wherein the reverse instruction corresponds to a reverse operation of an operation corresponding to the modification instruction; determining whether the second version number is received from the log server in response to an undo operation on the modification instruction; and in response to receiving the second version number from the log server, executing the inverse instruction and sending the inverse instruction to the log server.
According to some embodiments, the client 501 is further configured to: in response to the undo operation, generating a reverse instruction of the reverse instruction, and storing the generated reverse instruction of the reverse instruction in a redo stack of the client for restoring the undo operation.
Therefore, the corresponding undo operation can be realized for each modification operation, and the redo selection is provided for each undo operation, so that intuitive undo and redo operations are provided for the user in the scene of collaborative editing. Illustratively, after the undo operation, the redo stack in client 501 is flushed in response to a completely new operation.
According to some embodiments, the client 501 is further configured to perform the following operations: sending a request for acquiring the first object to a storage server, wherein the request comprises a number corresponding to the first object; receiving a third version number corresponding to the first object in the storage server from the storage server; sending the log server with the third version number; and receiving the first object corresponding to the third version number from the storage server and/or receiving modification instructions for the first object having a corresponding version number higher than the third version number from the log server; and rendering to display a current latest version of the first object based on the received first object corresponding to a third version number and/or a modification instruction for the first object whose corresponding version number is higher than the third version number.
It will be appreciated that a storage server may serve objects for multiple clients. In the starting phase of the client, when the client 501 needs to load the first object, it needs to send a request for obtaining the first object to the storage server, the storage server determines the first object requested by the first client according to the number attached in the request, and sends a fourth version number corresponding to the first object in the storage server back to the client 501, and the client 501 then requests a modification instruction for the version number of the first object higher than the fourth version number from the log server according to the fourth version number. Thus, the client 501 may obtain the first object up to the fourth version number from the storage server and obtain the modification instruction from the journal server higher than the fourth version number to the latest version, so that the client 501 may perform a rendering operation based on the two parts of data to rebuild the current latest version of the first object.
According to some embodiments, the client 501 is further configured to: in response to receiving an instruction from the log server for a modify operation of the first object, performing a rendering operation based on the instruction to generate a second video stream for display. Therefore, the client can monitor modification operations generated by other clients for the first object through the log server and sequentially apply the received modification operations to the first object currently maintained by the client, so as to ensure that each client can obtain the latest version of the first object.
According to another aspect of the present disclosure, there is provided a distributed data processing system, as shown in fig. 6, the distributed data processing system 600 including: a client cluster 601, the client cluster comprising a plurality of clients; and a log server 602; wherein the distributed data processing system is configured to perform the following operations: in response to a first client of the plurality of clients generating a modification instruction for a first object, sending, by the first client, the modification instruction and a corresponding first version number of the first object in the first client to the log server; in response to receiving the modification instruction, comparing, by the log server, the first version number and a second version number stored in the log server for the first object; in response to determining that the first version number is not lower than the second version number, assigning, by the log server, a third version number to the modification instruction, wherein the third version number is higher than the first version number; sending, by the log server, the modification instruction and the third version number to other clients in the cluster of clients except the first client; sending, by the log server, the third version number to the first client for updating a corresponding first version number of the first object in the first client based on the third version number; and in response to determining that the modification instruction does not include an add or delete operation for the first object, retaining, by the log server, the second version number for the first object stored in the log server.
The log server 602 stores therein a version number of a corresponding reference set for each object. When a modification instruction for a first object and a first version number of the first object corresponding to the first object are received from a first client in the client cluster 601, the log server 602 queries a version number of a reference corresponding to the first object, that is, a second version number, for comparison with the first version number to determine whether to accept the modification of the first object by the first client. When the first version number is not lower than the second version number, indicating that the first object in the first client is updated, then the log server 602 may accept the modification for the first object, otherwise the log server may refuse to accept the modification. For example, when the log server 602 rejects the modification instruction from the first client, a corresponding prompt message may be sent to the first client to indicate that the current version number of the first object in the first client is lower, and the modification operation on the first object needs to be continued after the update.
After receiving the modification instruction from the first client, the log server 602 assigns a third version number higher than the first version number to the modification instruction to represent the update of the first object, and sends the modification instruction corresponding to the update and the third version number to other clients, so that the other clients perform synchronous update. And meanwhile, sending the third version number to the first client so as to update the version number of the first object in the first client.
The log server 602 updates the second version number only according to the adding or deleting operation for the first object, and does not update the second version number for other modification instructions, and the update control for the second version number can automatically solve the conflict among a plurality of modification instructions, thereby facilitating the cooperation among a plurality of clients.
The distributed data processing system 600 implements synchronization of collaborative editing and processing of potential conflicts by setting the centralized log server 602, so that multiple users can edit the same object online at the same time without adapting instruction data, and can support instruction data of different data types, and the applicability is strong.
According to some embodiments, the log server 602 may generate a global sequence of modification instructions received from a plurality of clients of the client cluster 601, where a third version number corresponding to each modification instruction will determine a position of the modification instruction in the global sequence, and this global sequence will be sequentially pushed to the clients to be updated for synchronous update, so that each client may obtain the latest version of the first object updated by other clients via the log server.
According to some embodiments, the log server 602 may be composed of a plurality of instances, and data submission, backup and main service election are performed among the instances through the ETCD service, so that a high-availability cluster is formed. At any time, only the master log server in the cluster can accept modification instructions sent by the client. After a modification is accepted, the log server can carry out data submission and multi-copy backup through the ETCD so as to meet the requirement of high availability.
According to some embodiments, the distributed data processing system further comprises: a storage server storing the first object corresponding to a fourth version number; wherein the distributed data processing system is further configured to perform the following operations: sending, by the log server, the modification instruction and the third version number to the storage server; comparing, by the storage server, the third version number and the fourth version number in response to receiving the modification instruction and the third version number; and in response to the third version number being higher than the fourth version number, storing, by the storage server, the modification instruction and updating the fourth version number based on the third version number. Therefore, the storage server performs persistent storage on each object by subscribing to the log of the log server, specifically, stores modification instructions from the log server, which are higher than the current version of the storage server, so as to perform version control on the first object and perform persistent storage on the first object, so as to avoid data loss.
FIG. 7 is a schematic diagram illustrating a distributed data processing system in accordance with an illustrative embodiment. As shown in fig. 7, distributed data processing system 700 includes one or more client devices 701, 702, and 703, engine servers 721, 722, and 723 corresponding to the one or more client devices, log server 724, storage server 730, and one or more communication networks 711, 712, and 713 that couple the one or more client devices to the corresponding engine servers, respectively. The multiple users can edit and modify the same object through multiple client devices, respectively, determine whether to accept modification instructions from the clients through the log server 724, and push the accepted modification instructions to other clients to implement synchronous operation among the multiple clients. The client, upon receiving the update instructions from the log server 724, may render via the corresponding engine server based on the received modification instructions to obtain a video stream for display in the client's page. In addition, after a user performs a modification operation on an object in a client, the client may render the corresponding modification operation via the corresponding engine server, so as to instantly display the modification operation on the object by the user in a page of the client. It is to be understood that the rendering for the editing or modifying operation of the object may be implemented by a corresponding engine server of the client, or may be locally rendered by the client, which is not limited in this disclosure. Meanwhile, a plurality of objects are stored by the storage server 730, and modification instructions, i.e., updates corresponding to the objects, are received from the log server, so that the modification history of each object is completely recorded and the objects are permanently stored.
Although specific functionality is discussed above with reference to particular modules, it should be noted that the functionality of the various modules discussed herein may be divided into multiple modules and/or at least some of the functionality of multiple modules may be combined into a single module. Performing an action by a particular module as discussed herein includes the particular module itself performing the action, or alternatively the particular module invoking or otherwise accessing another component or module that performs the action (or performs the action in conjunction with the particular module). Thus, a particular module that performs an action can include the particular module that performs the action itself and/or another module that the particular module invokes or otherwise accesses that performs the action. As used herein, the phrase "entity a initiates action B" may refer to entity a issuing instructions to perform action B, but entity a itself does not necessarily perform that action B.
It should also be appreciated that various techniques may be described herein in the general context of software, hardware elements, or program modules. The various modules described above with respect to fig. 4, 5, and 6 may be implemented in hardware or in hardware in combination with software and/or firmware. For example, the modules may be implemented as computer program code/instructions configured to be executed in one or more processors and stored in a computer-readable storage medium. Alternatively, the modules may be implemented as hardware logic/circuitry.
According to an aspect of the disclosure, an electronic device is provided that includes at least one processor and a memory communicatively coupled to the at least one processor. Each of the at least one processor includes a processor cache. The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the steps of any of the method embodiments described above.
According to an aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, having stored thereon a computer program which, when executed by a processor, implements the steps of any of the method embodiments described above.
According to an aspect of the present disclosure, a computer program product is provided, having stored thereon computer instructions, comprising a computer program which, when executed by a processor, carries out the steps of any of the method embodiments described above.
Illustrative examples of such computer devices, non-transitory computer-readable storage media, and computer program products are described below in connection with FIG. 8.
Fig. 8 illustrates an example configuration of a computer device 800 that may be used to implement the methods described herein. Each of the above-described apparatus 400, apparatus 500 may also be implemented in whole or at least in part by a computer device 1200 or similar device or system.
The computer device 800 may be a variety of different types of devices. Examples of computer device 800 include, but are not limited to: a desktop computer, a server computer, a notebook or netbook computer, a mobile device (e.g., a tablet, a cellular or other wireless telephone (e.g., a smartphone), a notepad computer, a mobile station), a wearable device (e.g., glasses, a watch), an entertainment device (e.g., an entertainment appliance, a set-top box communicatively coupled to a display device, a gaming console), a television or other display device, an automotive computer, and so forth.
The computer device 800 may include at least one processor 802, memory 804, communication interface(s) 806, display device 808, other input/output (I/O) devices 810, and one or more mass storage devices 812, which may be capable of communicating with each other, such as through a system bus 814 or other appropriate connection.
Processor 802 may be a single processing unit or multiple processing units, all of which may include single or multiple computing units or multiple cores. The processor 802 may be implemented as one or more microprocessors, microcomputers, microcontrollers, digital signal processors, central processing units, state machines, logic circuitry, and/or any devices that manipulate signals based on operational instructions. Among other capabilities, the processor 802 may be configured to retrieve and execute computer-readable instructions stored in the memory 804, mass storage device 812, or other computer-readable medium, such as program code for an operating system 816, program code for an application 818, program code for other programs 820, and so forth.
Memory 804 and mass storage device 812 are examples of computer-readable storage media for storing instructions that are executed by processor 802 to implement the various functions described above. By way of example, the memory 804 may generally include both volatile and non-volatile memory (e.g., RAM, ROM, etc.). In addition, mass storage device 812 may generally include a hard disk drive, solid state drive, removable media, including external and removable drives, memory cards, flash memory, floppy disks, optical disks (e.g., CD, DVD), storage arrays, network attached storage, storage area networks, and the like. Memory 804 and mass storage device 812 may both be referred to herein collectively as memory or computer-readable storage media, and may be non-transitory media capable of storing computer-readable, processor-executable program instructions as computer program code that may be executed by processor 802 as a particular machine configured to implement the operations and functions described in the examples herein.
A number of programs may be stored on the mass storage device 812. These programs include an operating system 816, one or more application programs 818, other programs 820, and program data 822, and may be loaded into memory 804 for execution. Examples of such applications or program modules may include, for instance, computer program logic (e.g., computer program code or instructions) for implementing the following components/functions: method 200 and/or method 300 (including any suitable steps of method 200 and/or method 300), and/or additional embodiments described herein.
Although illustrated in fig. 8 as being stored in memory 804 of computer device 800, modules 816, 818, 820, and 822, or portions thereof, may be implemented using any form of computer-readable media that is accessible by computer device 800. As used herein, "computer-readable media" includes at least two types of computer-readable media, namely computer-readable storage media and communication media.
Computer-readable storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer-readable instructions, data structures, program modules or other data. Computer-readable storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, Digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information for access by a computer device. In contrast, communication media may embody computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism. Computer-readable storage media, as defined herein, does not include communication media.
One or more communication interfaces 806 are used to exchange data with other devices, such as over a network, direct connection, and so forth. Such communication interfaces may be one or more of the following: any type of network interface (e.g., a Network Interface Card (NIC)), wired or wireless (such as IEEE 802.11 Wireless LAN (WLAN)) wireless interface, worldwide interoperability for microwave Access (Wi-MAX) interface, Ethernet interface, Universal Serial Bus (USB) interface, cellular network interface, BluetoothTMAn interface, a Near Field Communication (NFC) interface, etc. The communication interface 806 may facilitate communication within a variety of networks and protocol types, including wired networks (e.g., LAN, cable, etc.) and wireless networks (e.g., WLAN, cellular, satellite, etc.), the Internet, and so forth. The communication interface 806 may also provide for communication with external storage devices (not shown), such as in storage arrays, network attached storage, storage area networks, and the like.
In some examples, a display device 808, such as a monitor, may be included for displaying information and images to a user. Other I/O devices 810 may be devices that receive various inputs from a user and provide various outputs to the user, and may include touch input devices, gesture input devices, cameras, keyboards, remote controls, mice, printers, audio input/output devices, and so forth.
The techniques described herein may be supported by these various configurations of computer device 800 and are not limited to specific examples of the techniques described herein. For example, the functionality may also be implemented in whole or in part on a "cloud" using a distributed system. The cloud includes and/or represents a platform for resources. The platform abstracts underlying functionality of hardware (e.g., servers) and software resources of the cloud. The resources may include applications and/or data that may be used when performing computing processes on servers remote from the computer device 800. Resources may also include services provided over the internet and/or over a subscriber network such as a cellular or Wi-Fi network. The platform may abstract resources and functionality to connect the computer device 800 with other computer devices. Thus, implementations of the functionality described herein may be distributed throughout the cloud. For example, the functionality may be implemented in part on the computer device 800 and in part by a platform that abstracts the functionality of the cloud.
While the disclosure has been illustrated and described in detail in the drawings and foregoing description, such illustration and description are to be considered illustrative and exemplary and not restrictive; the present disclosure is not limited to the disclosed embodiments. Variations to the disclosed embodiments can be understood and effected by those skilled in the art in practicing the claimed subject matter, from a study of the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other elements or steps not listed, the indefinite article "a" or "an" does not exclude a plurality, the term "a" or "an" means two or more, and the term "based on" should be construed as "based at least in part on". The mere fact that certain measures are recited in mutually different dependent claims does not indicate that a combination of these measures cannot be used to advantage.

Claims (31)

1. A distributed data processing method, the method being performed at a server side, the method comprising:
in response to receiving, from a first client of a plurality of clients, a modification instruction for a first object and a first version number of the first object corresponding in the first client, comparing a second version number stored in a log server for the first object with the first version number; and
in response to determining that the first version number is not below the second version number,
allocating a third version number to the modification instruction, wherein the third version number is higher than the first version number;
sending the modification instruction and the third version number to other clients of the plurality of clients except the first client;
sending the third version number to the first client for updating a corresponding first version number of the first object in the first client based on the third version number; and
in response to determining that the modification instruction does not include an add or delete operation for the first object, retaining the second version number for the first object stored in the log server.
2. The method of claim 1, further comprising:
in response to the first version number not being lower than the second version number, storing the modification instruction and the third version number in the log server.
3. The method of claim 1 or 2, further comprising:
comparing the third version number with a fourth version number corresponding to the first object in a storage server; and
in response to the third version number being higher than the fourth version number, storing the modification instruction in the storage server and updating the fourth version number based on the third version number.
4. The method of claim 3, further comprising:
in response to receiving a request from the first client that includes a number corresponding to the first object, determining the first object based on the number; and
sending a modification instruction in the log server, wherein the version number corresponding to the first object is higher than the fourth version number, and/or sending the first object in the storage server corresponding to the fourth version number to the first client.
5. The method of claim 3 or 4, wherein the transmission of data between the log server, the storage server and the plurality of clients is via a streaming remote procedure call.
6. The method of any of claims 3-5, further comprising:
creating, in the storage server, at preset time intervals, a snapshot corresponding to the first object based on the modification instructions stored in the storage server and the first object corresponding to the fourth version number.
7. The method of any of claims 1-6, further comprising:
updating the second version number based on the third version number in response to determining that the modification instruction includes an add or delete operation for the first object.
8. A distributed data processing method, the method being performed at a client, the method comprising:
in response to generating a modification instruction for a first object, sending the modification instruction and a corresponding first version number of the first object in the client to a log server; and
in response to receiving a second version number for the first object from the log server, updating the first version number based on the second version number, wherein the second version number is higher than the first version number.
9. The method of claim 8, further comprising:
in response to generating the modification instruction for the first object, generating a reverse instruction of the modification instruction and storing the reverse instruction in a undo stack of the client, wherein the reverse instruction corresponds to a reverse operation of an operation corresponding to the modification instruction;
determining whether the second version number is received from the log server in response to an undo operation on the modification instruction; and
in response to receiving the second version number from the log server, executing the inverse instruction and sending the inverse instruction to the log server.
10. The method of claim 9, further comprising:
in response to the undo operation, generating a reverse instruction of the reverse instruction, and storing the generated reverse instruction of the reverse instruction in a redo stack of the client for restoring the undo operation.
11. The method of any of claims 8-10, further comprising:
sending a request for acquiring the first object to a storage server, wherein the request comprises a number corresponding to the first object;
receiving a third version number corresponding to the first object in the storage server from the storage server;
sending the third version number to the log server;
receiving the first object corresponding to the third version number from the storage server and/or receiving modification instructions for the first object having a corresponding version number higher than the third version number from the log server; and
rendering to display a current latest version of the first object based on the received first object corresponding to a third version number and/or modification instructions for the first object whose corresponding version number is higher than the third version number.
12. The method of any of claims 8-11, further comprising:
in response to generating the modification instruction, a rendering operation is performed based on the modification instruction to generate a first video stream for display.
13. The method of any of claims 8-12, further comprising:
in response to receiving an instruction from the log server for a modify operation of the first object, performing a rendering operation based on the instruction to generate a second video stream for display.
14. A distributed data processing apparatus, the apparatus comprising a log server configured to:
in response to receiving, from a first client of a plurality of clients, a modification instruction for a first object and a corresponding first version number of the first object in the first client, comparing the stored second version number for the first object with the first version number; and
in response to determining that the first version number is not below the second version number,
allocating a third version number to the modification instruction, wherein the third version number is higher than the first version number;
sending the modification instruction and the third version number to other clients of the plurality of clients except the first client;
sending the third version number to the first client for updating a corresponding first version number of the first object in the first client based on the third version number; and
in response to determining that the modification instruction does not include an add or delete operation for the first object, retaining the stored second version number for the first object.
15. The apparatus of claim 14, wherein the log server is further configured to:
in response to the first version number not being less than the second version number, storing the modification instruction and the third version number.
16. The apparatus of claim 14 or 15, further comprising a storage server, wherein the storage server has stored therein the first object corresponding to a fourth version number, and wherein the storage server is configured to:
comparing the third version number to the fourth version number; and
in response to the third version number being higher than the fourth version number, storing the modification instruction and updating the fourth version number based on the third version number.
17. The apparatus of claim 16, wherein the storage server is further configured to:
in response to receiving a request from the first client that includes a number corresponding to the first object, determining the first object based on the number;
sending the first object corresponding to the fourth version number to the first client; and is
Wherein the log server is further configured to: sending a modification instruction to the first client that the corresponding version number for the first object is higher than the fourth version number.
18. The apparatus of claim 16 or 17, wherein the transmission of data between the log server, the storage server, and the plurality of clients is via a streaming remote procedure call.
19. The apparatus of any of claims 16-18, wherein the storage server is further configured to:
creating a snapshot corresponding to the first object based on the stored modification instructions and the first object corresponding to the fourth version number at preset time intervals.
20. The apparatus of any of claims 14-19, wherein the log server is further configured to: in response to determining that the modification instruction includes an add or delete operation for the first object, updating the second version number based on the third version number.
21. A distributed data processing apparatus, the apparatus comprising a client configured to:
in response to generating a modification instruction for a first object, sending the modification instruction and a corresponding first version number of the first object in the client to a log server; and
in response to receiving a second version number for the first object from the log server, updating the first version number based on the second version number, wherein the second version number is higher than the first version number.
22. The apparatus of claim 21, wherein the client is further configured to:
in response to generating the modification instruction for the first object, generating a reverse instruction of the modification instruction and storing the reverse instruction in a undo stack of the client, wherein the reverse instruction corresponds to a reverse operation of an operation corresponding to the modification instruction;
determining whether the second version number is received from the log server in response to an undo operation on the modification instruction; and
in response to receiving the second version number from the log server, executing the inverse instruction and sending the inverse instruction to the log server.
23. The apparatus of claim 22, wherein the client is further configured to:
in response to the undo operation, generating a reverse instruction of the reverse instruction, and storing the generated reverse instruction of the reverse instruction in a redo stack of the client for restoring the undo operation.
24. The apparatus of any of claims 21-23, wherein the client is further configured to:
sending a request for acquiring the first object to a storage server, wherein the request comprises a number corresponding to the first object;
receiving a third version number corresponding to the first object in the storage server from the storage server;
sending the log server with the third version number;
receiving the first object corresponding to the third version number from the storage server and/or receiving modification instructions for the first object having a corresponding version number higher than the third version number from the log server; and
rendering to display a current latest version of the first object based on the received first object corresponding to a third version number and/or modification instructions for the first object whose corresponding version number is higher than the third version number.
25. The apparatus of any of claims 21-24, wherein the client is further configured to:
in response to generating the modification instruction, a rendering operation is performed based on the modification instruction to generate a first video stream for display.
26. The apparatus of any of claims 21-25, wherein the client is further configured to:
in response to receiving an instruction from the log server for a modify operation of the first object, performing a rendering operation based on the instruction to generate a second video stream for display.
27. A distributed data processing system comprising:
a client cluster comprising a plurality of clients; and
a log server;
wherein the distributed data processing system is configured to perform the following operations:
in response to a first client of the plurality of clients generating a modification instruction for a first object, sending, by the first client, the modification instruction and a corresponding first version number of the first object in the first client to the log server;
in response to receiving the modification instruction, comparing, by the log server, the first version number and a second version number stored in the log server for the first object;
in response to determining that the first version number is not below the second version number,
assigning, by the log server, a third version number to the modification instruction, wherein the third version number is higher than the first version number;
sending, by the log server, the modification instruction and the third version number to other clients in the cluster of clients except the first client;
sending, by the log server, the third version number to the first client for updating a corresponding first version number of the first object in the first client based on the third version number; and
in response to determining that the modification instruction does not include an add or delete operation for the first object, retaining, by the log server, the second version number for the first object stored in the log server.
28. The distributed data processing system of claim 27, further comprising:
a storage server storing the first object corresponding to a fourth version number;
wherein the distributed data processing system is further configured to perform the following operations:
sending, by the log server, the modification instruction and the third version number to the storage server;
comparing, by the storage server, the third version number and the fourth version number in response to receiving the modification instruction and the third version number; and
in response to the third version number being higher than the fourth version number, storing, by the storage server, the modification instruction and updating the fourth version number based on the third version number.
29. An electronic device, comprising:
at least one processor, wherein each of the at least one processor comprises:
caching by a processor; and
a memory communicatively coupled to the at least one processor, wherein
The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-13.
30. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-13.
31. A computer program product comprising a computer program, wherein the computer program realizes the method of any one of claims 1-13 when executed by a processor.
CN202210113565.5A 2022-01-30 2022-01-30 Distributed data processing method, apparatus, system, device and medium Pending CN114443124A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210113565.5A CN114443124A (en) 2022-01-30 2022-01-30 Distributed data processing method, apparatus, system, device and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210113565.5A CN114443124A (en) 2022-01-30 2022-01-30 Distributed data processing method, apparatus, system, device and medium

Publications (1)

Publication Number Publication Date
CN114443124A true CN114443124A (en) 2022-05-06

Family

ID=81372345

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210113565.5A Pending CN114443124A (en) 2022-01-30 2022-01-30 Distributed data processing method, apparatus, system, device and medium

Country Status (1)

Country Link
CN (1) CN114443124A (en)

Similar Documents

Publication Publication Date Title
US10614117B2 (en) Sharing container images between mulitple hosts through container orchestration
EP3408744B1 (en) Providing access to a hybrid application offline
US11221995B2 (en) Data replication from a cloud-based storage resource
CN109976667B (en) Mirror image management method, device and system
US11635990B2 (en) Scalable centralized manager including examples of data pipeline deployment to an edge system
JP6175181B2 (en) Local server for synchronized online content management system
US9722873B2 (en) Zero-downtime, reversible, client-driven service migration
US20180032410A1 (en) Mechanism for managing container runtime state
US11340970B2 (en) Distributed queueing over a Redis cluster
JP2018533125A (en) Visual content development
US20140109095A1 (en) Seamless extension of local computing power
AU2019216773B2 (en) Live-rendered and forkable graphic edit trails
US11212175B2 (en) Configuration management for cloud storage system and method
CN114448977A (en) Incremental propagation in cloud-centric collaboration and connectivity platforms
US10841363B2 (en) Streaming API subscription without loss of events
US10275468B2 (en) Replication of data in a distributed file system using an arbiter
JP7368515B2 (en) File transfer methods and devices, electronic equipment and media
CN114443124A (en) Distributed data processing method, apparatus, system, device and medium
WO2023078760A1 (en) Database synchronization employing parallel poll threads
CN114416270A (en) Page display method, device, equipment and medium
CN114443216A (en) Cloud platform mirror image management method and management system
CN112055057B (en) Method, system and equipment for dynamic expansion of Web system
US20240202053A1 (en) Performing api services using zone-based topics within a pub/sub messaging infrastructure
US11323512B2 (en) Peer to peer infrastructure management architecture
CN113110913A (en) Mirror image management system, method and computing equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination