CN117113942B - Model synchronization method and device, electronic equipment and storage medium - Google Patents

Model synchronization method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN117113942B
CN117113942B CN202311378758.4A CN202311378758A CN117113942B CN 117113942 B CN117113942 B CN 117113942B CN 202311378758 A CN202311378758 A CN 202311378758A CN 117113942 B CN117113942 B CN 117113942B
Authority
CN
China
Prior art keywords
model
data
client
synchronization
clients
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.)
Active
Application number
CN202311378758.4A
Other languages
Chinese (zh)
Other versions
CN117113942A (en
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.)
Hangzhou Baizijian Technology Co ltd
Original Assignee
Hangzhou Baizijian 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 Hangzhou Baizijian Technology Co ltd filed Critical Hangzhou Baizijian Technology Co ltd
Priority to CN202311378758.4A priority Critical patent/CN117113942B/en
Publication of CN117113942A publication Critical patent/CN117113942A/en
Application granted granted Critical
Publication of CN117113942B publication Critical patent/CN117113942B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Abstract

The invention discloses a model synchronization method, a model synchronization device, electronic equipment and a storage medium. The method is performed by a server, the method comprising: if the editing request of at least two clients to the target model is determined to be received, determining a temporary host in each client; sending a synchronization instruction to other clients except the temporary host to instruct the other clients to perform data synchronization of the target model through the temporary host; and receiving the model data sent by the temporary host, and carrying out data synchronization of the target model according to the model data. By using the technical scheme of the invention, the load of the server can be reduced while the collaborative editing and synchronization of the model are realized.

Description

Model synchronization method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method and apparatus for model synchronization, an electronic device, and a storage medium.
Background
The industrial process simulation can simulate and simulate the industrial production process by a computer simulation technology, the industrial production process is complex and changeable, and the industrial process simulation is adopted for testing, so that the testing cost can be greatly reduced, and the production efficiency is improved.
In the early modeling process of the industrial process simulation, a plurality of technicians are sometimes required to perform collaborative modeling, if the technicians sequentially perform model editing, the models are transmitted to clients of other technicians after the editing is completed, the efficiency of the mode of editing and synchronizing the models is low, and the problem of error in transmission version is easy to occur. However, if multiple clients simultaneously implement model editing and synchronization through the server, multiple models related to the industrial production process may be stored on the server at the same time due to the complex industrial production process, and multiple clients simultaneously access the server to perform model editing and synchronization, so that the load of the server is increased, and requirements on the performance of the server are set.
Disclosure of Invention
The invention provides a model synchronization method, a device, electronic equipment and a storage medium, which are used for realizing model collaborative editing and synchronization and reducing server load.
In a first aspect, an embodiment of the present invention provides a model synchronization method, which is executed by a server, and includes:
if the editing request of at least two clients to the target model is determined to be received, determining a temporary host in each client;
sending a synchronization instruction to other clients except the temporary host to instruct the other clients to perform data synchronization of the target model through the temporary host;
and receiving the model data sent by the temporary host, and carrying out data synchronization of the target model according to the model data.
In a second aspect, an embodiment of the present invention provides another model synchronization method, which is performed by a client, and includes:
receiving model synchronization requests sent by other clients, and establishing model synchronization connection with the other clients;
if the modified data of the target model sent by the target client is determined to be received, the modified data are sent to other clients except the target client, so that the other clients perform model synchronization according to the modified data;
and carrying out model synchronization according to the modified data, and sending the synchronized model data to a server so as to enable the server to carry out data synchronization of the target model according to the model data.
In a third aspect, an embodiment of the present invention further provides a model synchronization device, where the device is deployed in a server, and the device includes:
the temporary host determining module is used for determining a temporary host in each client if the editing request of at least two clients to the target model is determined to be received;
the synchronous instruction sending module is used for sending synchronous instructions to other clients except the temporary host so as to instruct the other clients to perform data synchronization of the target model through the temporary host;
and the model data synchronization module is used for receiving the model data sent by the temporary host and performing data synchronization of the target model according to the model data.
In a fourth aspect, an embodiment of the present invention further provides another model synchronization apparatus, where the apparatus is deployed in a client, and the apparatus includes:
the synchronous connection establishing module is used for receiving model synchronous requests sent by other clients and establishing model synchronous connection with the other clients;
the system comprises a modification data synchronization module, a modification data synchronization module and a modification data synchronization module, wherein the modification data synchronization module is used for sending modification data of a target model sent by a target client to other clients except the target client if the modification data is determined to be received, so that the other clients perform model synchronization according to the modification data;
and the model data transmitting module is used for carrying out model synchronization according to the modified data and transmitting the synchronized model data to a server so as to enable the server to carry out data synchronization of a target model according to the model data.
In a fifth aspect, an embodiment of the present invention further provides an electronic device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the processor implements the model synchronization method according to any one of the embodiments of the present invention when the processor executes the program.
In a sixth aspect, embodiments of the present invention also provide a storage medium storing computer-executable instructions that, when executed by a computer processor, are used to perform a model synchronization method according to any one of the embodiments of the present invention.
According to the technical scheme, when the target model is edited by the plurality of clients, the server determines one temporary host in the plurality of clients and sends the synchronization instruction to other clients except the temporary host, the other clients are instructed to synchronize model data through the temporary host, after model data sent by the temporary host are received, the target model of the server is synchronized according to the model data, the problems that in the prior art, the model data are transmitted and edited among the plurality of clients, transmission errors are easy to occur due to low efficiency, and the plurality of clients edit and synchronize the model through the server, so that the problem that the server load is high is solved, and the load of the server is reduced while the model is cooperatively edited.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method for model synchronization according to a first embodiment of the present invention;
FIG. 2 is a flowchart of another model synchronization method according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a model synchronization device according to a third embodiment of the present invention;
FIG. 4 is a schematic structural diagram of another model synchronization device according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
Fig. 1 is a flowchart of a model synchronization method provided in an embodiment of the present invention, where the embodiment is applicable to a situation where multiple clients cooperate to perform model editing, the method may be performed by a model synchronization device, the model synchronization device may be implemented in a form of hardware and/or software, and the model synchronization device may be configured in a server.
As shown in fig. 1, the method includes:
s110, if it is determined that at least two clients receive the editing request of the target model, determining a temporary host in each client.
The target model is a model which is edited by a plurality of clients together, and when a certain model has a plurality of clients which edit simultaneously, the model is used as the target model. The edit request may be sent by the client to the server when the user interface of the client detects an edit mode opening instruction, and the edit mode opening instruction may be generated after the user interface detects a clicking operation or a selecting operation in the edit mode opening control area.
In this embodiment, when only one client performs the object model editing, since only the synchronization of the model data between the client and the server is required, the client may not be set as a temporary host at this time, and after receiving the request of the client for editing the object model, the server locks the editing state of the model to avoid that other clients simultaneously edit the object model, and after completing the object model editing, the client synchronizes the model data to the server, and the server updates the local model data. When only one client performs the target model editing, the client can be set as a temporary host, the temporary host locks the model editing state, and after the target model editing is completed, the temporary host synchronizes the model data to the server, and the server updates the local model data. The embodiment does not limit the specific manner when only one client performs model editing.
Further, S110 may further include:
a1, if the fact that the first client receives an editing request of a model to be edited is determined, model data of the model to be edited are sent to the first client, and the model to be edited is used as a target model.
The model to be edited is a model which is deployed in a server and is not in an editing state, and the first client is a client which makes an editing request for the model which is not in the editing state.
In this embodiment, after detecting that a certain client makes an editing request to a model that is not in an editing state, the server issues model data of the model to the client, uses the model as a target model, detects an editing request of the target model, and if detecting an editing request of other clients to the target model, it is required to determine a temporary host, and synchronously edit the model by the temporary host.
A2, if the fact that the editing request of the second client to the target model is received is confirmed, the first client is used as a temporary host.
In this embodiment, the determination of the temporary host is performed based on the time sequence of sending the editing request, and the temporary host may be determined in each client according to the performance of each client, etc., which is not limited in this embodiment.
For example, the client a sends an edit request for the model S to the server, the server sends model data of the model S to the client a, and when the server receives the edit request for the model S from the client B, it determines that the model S is already in an edit state, and uses the client a as a temporary host.
Further, the server may maintain a model edit status list, when receiving an edit request sent by a client to a model that is not in an edit status, modify the model to an edit status, and store the model and an identifier of the client in the model edit status list. When the server receives new editing requests of other clients, matching the model corresponding to the editing requests with each model in the model editing state list, if the matching is successful, indicating that the model is in an editing state, determining the corresponding client, determining a temporary host in each client, and performing model synchronous editing through the temporary host. If the matching is unsuccessful, the model is not in an editing state, the model is modified into the editing state, and the model and the identifier of the client are stored in a model editing state list.
And S120, sending a synchronization instruction to other clients except the temporary host to instruct the other clients to perform data synchronization of the target model through the temporary host.
In this embodiment, after the temporary host is determined, collaborative editing and synchronization of the model is achieved by the temporary host. Specifically, a synchronization instruction is sent to other clients except the temporary host, after the other clients receive the synchronization instruction, the other clients subscribe to the temporary host for a synchronization event, if the temporary host edits the target model, the temporary host modifies the model into a locked state, and the other clients cannot edit the target model at the same time. By the arrangement, the conflict caused by simultaneous editing of the models by a plurality of clients can be avoided, and the consistency of model data of the clients is ensured. After the temporary host editing is completed, the modified model data are synchronized to each other client, and the model locking state is released. When other clients edit the target model, a model editing request is sent to the temporary host, the temporary host modifies the model into a locking state, after the other clients edit, the modified model data is sent to the temporary host, and the temporary host synchronizes the model data to other clients subscribing to the synchronization event.
Further, after sending the synchronization instruction to the other clients except the temporary host, the method further includes: and if the request for exiting editing of the temporary host is received, re-determining the temporary host in other clients except the temporary host, and repeatedly executing the operation of sending the synchronous instruction to the other clients except the temporary host until the number of the clients editing the target model is determined to be one.
After determining the temporary host, if the server receives the request for exiting editing of the temporary host, the server indicates that the temporary host exits from the model editing of the target model, at this time, the temporary host can send the number of clients subscribing to the model synchronization event and the identification of each client to the server, the server determines the temporary host again in the remaining servers, sends synchronization instructions to the remaining clients except the determined temporary host, and the remaining clients receiving the synchronization instructions subscribe to the synchronization event of the determined temporary host again, and repeatedly executes the above process until only one client editing the target model remains.
In a specific example, the client a sends an edit request for the model S to the server, the server sends model data of the model S to the client a, when the server receives the edit request for the model S by the client B, the client a is used as a temporary host, a synchronization instruction is sent to the client B, the client B subscribes to a synchronization event of the client a, when the server receives the edit request for the model S by the client C, a synchronization instruction is sent to the client C, and the client C subscribes to a synchronization event of the client a. Client A, B, C implements model collaborative editing through client a. When the server receives the exit edit request of the client a, the temporary host is redetermined in the client B, C, for example, the client B may be set as a new temporary host, and a synchronization instruction is sent to the client C, and the client C registers a synchronization event with the client B. Client B, C implements model collaborative editing through client B. When the server receives the request of exiting editing of the client B, the client for editing the target model only needs to use the client C, so that the server can not set a new temporary host any more, after the client C finishes editing the model, model data are sent to the server, and the server realizes model synchronization according to the model data sent by the client C. The server may set the client C as a new temporary host, but no other client cooperates with the client C to edit the model at this time, so, similarly, after the client C edits the model, the model data is sent to the server, and the server realizes model synchronization according to the model data sent by the client C.
S130, receiving model data sent by the temporary host, and carrying out data synchronization of a target model according to the model data.
In an alternative embodiment, the temporary host may synchronize the updated model data to the server after each model data update, so that real-time synchronous update of the model data may be ensured. In another specific embodiment, the temporary host may synchronize the latest model data to the server only when exiting the model editing of the target model, so that the configuration can avoid confusion when different temporary hosts perform the model collaborative editing. In yet another specific embodiment, the latest model data can be synchronized to the server only by the last temporary host editing the target model, so that the load of the server can be reduced.
Further, S130 may further include:
b1, if the number of the clients for editing the target model is determined to be one, determining the clients for editing the target model as temporary hosts.
And B2, receiving model data sent by the temporary host, and carrying out data synchronization of a target model according to the model data.
And the model data is that the temporary host sends the server after sending the exit editing request.
In this embodiment, the last client for editing the target model is used as a temporary host, and the last temporary host performs model data synchronization with the server.
According to the technical scheme, when the server edits the same model at the same time in the plurality of clients, the temporary host is determined in the plurality of clients, and the temporary host performs model synchronous editing, so that the load of the server can be reduced compared with the mode synchronous editing among the plurality of clients through the server when the plurality of models are deployed in the server.
According to the technical scheme, when the target model is edited by the plurality of clients, the server determines one temporary host in the plurality of clients and sends the synchronization instruction to other clients except the temporary host, the other clients are instructed to synchronize model data through the temporary host, after model data sent by the temporary host are received, the target model of the server is synchronized according to the model data, the problems that in the prior art, the model data are transmitted and edited among the plurality of clients, transmission errors are easy to occur due to low efficiency, and the plurality of clients edit and synchronize the model through the server, so that the problem that the server load is high is solved, and the load of the server is reduced while the model is cooperatively edited.
Example two
Fig. 2 is a flowchart of another model synchronization method provided in the second embodiment of the present invention, where the method may be applied to a situation where a plurality of clients cooperate to perform model editing, and the method may be performed by a model synchronization device, where the model synchronization device may be implemented in a form of hardware and/or software, and the model synchronization device may be configured in a client, where the client is a client designated as a temporary host by a server.
As shown in fig. 2, the method includes:
s210, receiving model synchronization requests sent by other clients, and establishing model synchronization connection with the other clients.
The execution body of the embodiment is a client designated as a temporary host by the server, and among the clients simultaneously requesting the editing of the target model, the server determines one client as the temporary host, and the other clients register synchronization events of the subscription hosts.
Specifically, the other clients send model synchronization requests to the temporary host, and the temporary host establishes model synchronization connection with the other clients after receiving the model synchronization requests.
Further, after S210, the method further includes: and if the fact that the editing request of the target model sent by the target client is received is determined, sending a model locking instruction to other clients except the target client.
In this embodiment, if the temporary host edits the target model, a model locking instruction is sent to each client subscribing to the synchronization event with the temporary host, and after each client receives the model locking instruction, the editing operation cannot be performed on the target model, so as to avoid confusion caused by simultaneous editing of the model by multiple clients. In this embodiment, after the temporary host edits the target model, the target model is unlocked, and model data is sent to each client to complete the model editing synchronization.
If the target client subscribing the synchronization event with the temporary host sends an editing request to the temporary host, the temporary host sends a model locking instruction to other clients subscribing the synchronization event with the temporary host except for the target client after receiving the editing request, and after receiving the model locking instruction, all other clients can not execute editing operation on the target model.
And S220, if the fact that the modification data of the target model sent by the target client is received is determined, the modification data are sent to other clients except the target client, and the other clients perform model synchronization according to the modification data.
In this embodiment, if the target client subscribing to the synchronization event with the temporary host performs the model editing, the target client sends the model data to the temporary host after completing the model editing. The model data may be full-scale data of the target model, or may be modified data of the current full-scale data of the target model compared with the historical full-scale data, and this embodiment is described taking the model data as the modified data.
After receiving the modification data of the target model sent by the target client, the temporary host synchronizes the modification data to other clients except the target client in each client subscribing the synchronization event with the temporary host, and after receiving the modification data, the other clients update the local model data according to the modification data so as to realize model synchronization.
S230, carrying out model synchronization according to the modified data, and sending the synchronized model data to a server so that the server can carry out data synchronization of a target model according to the model data.
The temporary host synchronizes the modified data to other clients and updates the local model data according to the modified data. And synchronizing the updated model data to the server so that the server performs model synchronization of the target model according to the updated model data.
According to the technical scheme, the other clients send the synchronization request to the client which is designated as the temporary host by the server, synchronous connection is established, when the client designated as the temporary host receives the target model modification data of the other clients, the modification data are synchronized to the other clients, the local model data are updated, and the updated model data are sent to the server, so that model data synchronization is realized. The method solves the problems that in the prior art, model data are transmitted and edited among a plurality of clients, transmission errors are easy to occur due to low efficiency, the plurality of clients edit and synchronize the model through a server, the load of the server is high, and the load of the server is reduced while the model collaborative editing is realized.
Specific application scenario
In one specific applicable scenario, modeling of industrial process simulation software is performed by a multi-person collaborative modeling system. The multi-person collaborative modeling system includes a server and a plurality of clients. Specifically, in the application scene, the multi-person collaborative modeling is performed through the following steps:
s1, the server detects an editing request of a model to be edited, which is sent by a target client, takes the model to be edited as a target model, and sends model data of the target model to the target client.
S2, if the server detects the editing request of the target model sent by other clients, the target client is used as a temporary host, and other clients are notified to subscribe to a synchronous event of the temporary host.
And S3, if other clients send editing requests to the temporary host, the temporary host sets the target model to be in a locking state, and the other clients send edited model data to the temporary host.
S4, synchronizing the model data to other clients except the client for performing model editing by the temporary host, and simultaneously, performing model data synchronization by the temporary host according to the model data.
S5, after receiving the model data, other clients except the client for performing model editing perform model data synchronization according to the model data.
And S6, if the target client serving as the temporary host exits from the model editing, the temporary host is redetermined in other clients subscribing to the synchronous event of the temporary host, and the clients of other clients except the temporary host subscribe to the synchronous event of the new temporary host.
And S7, synchronizing the edited model data to a server when the last client for performing model editing exits from the model editing, and performing model synchronization according to the received model data by the server.
Example III
Fig. 3 is a schematic structural diagram of a model synchronization device according to a third embodiment of the present invention. As shown in fig. 3, the apparatus includes:
a temporary host determining module 310, configured to determine a temporary host in each client if it is determined that an editing request of at least two clients for the target model is received;
a synchronization instruction sending module 320, configured to send a synchronization instruction to other clients except for the temporary host, so as to instruct the other clients to perform data synchronization of the target model through the temporary host;
and the model data synchronization module 330 is configured to receive the model data sent by the temporary host, and perform data synchronization of the target model according to the model data.
According to the technical scheme, when the target model is edited by the plurality of clients, the server determines one temporary host in the plurality of clients and sends the synchronization instruction to other clients except the temporary host, the other clients are instructed to synchronize model data through the temporary host, after model data sent by the temporary host are received, the target model of the server is synchronized according to the model data, the problems that in the prior art, the model data are transmitted and edited among the plurality of clients, transmission errors are easy to occur due to low efficiency, and the plurality of clients edit and synchronize the model through the server, so that the problem that the server load is high is solved, and the load of the server is reduced while the model is cooperatively edited.
Based on the above embodiment, the temporary host determining module 310 includes:
the model data issuing unit is used for sending the model data of the model to be edited to the first client and taking the model to be edited as a target model if the first client determines that the editing request of the model to be edited is received;
the first temporary host determining unit is used for taking the first client as a temporary host if determining that the editing request of the second client for the target model is received.
On the basis of the above embodiment, the apparatus further includes:
and the temporary host resetting module is used for re-determining the temporary host in other clients except the temporary host if the request for exiting editing of the temporary host is determined to be received, and repeatedly executing the operation of sending the synchronous instruction to the other clients except the temporary host until the number of the clients editing the target model is determined to be one.
Based on the above embodiment, the model data synchronization module 330 includes:
the second temporary host determining unit is used for determining that the client for editing the target model is a temporary host if the number of the clients for editing the target model is determined to be one;
the model data synchronization unit is used for receiving the model data sent by the temporary host and performing data synchronization of a target model according to the model data;
and the model data is that the temporary host sends the server after sending the exit editing request.
The model synchronization device provided by the embodiment of the invention can execute the model synchronization method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example IV
Fig. 4 is a schematic structural diagram of another model synchronization device according to a fourth embodiment of the present invention, as shown in fig. 4, where the device includes:
the synchronous connection establishing module 410 is configured to receive a model synchronous request sent by another client, and establish a model synchronous connection with the other client;
the modification data synchronization module 420 is configured to, if it is determined that modification data of a target model sent by a target client is received, send the modification data to other clients except the target client, so that the other clients perform model synchronization according to the modification data;
the model data sending module 430 is configured to perform model synchronization according to the modification data, and send the synchronized model data to a server, so that the server performs data synchronization of the target model according to the model data.
According to the technical scheme, the other clients send the synchronization request to the client which is designated as the temporary host by the server, synchronous connection is established, when the client designated as the temporary host receives the target model modification data of the other clients, the modification data are synchronized to the other clients, the local model data are updated, and the updated model data are sent to the server, so that model data synchronization is realized. The method solves the problems that in the prior art, model data are transmitted and edited among a plurality of clients, transmission errors are easy to occur due to low efficiency, the plurality of clients edit and synchronize the model through a server, the load of the server is high, and the load of the server is reduced while the model collaborative editing is realized.
On the basis of the above embodiment, the apparatus further includes:
and the model locking module is used for sending a model locking instruction to other clients except the target client if the model locking module determines that the editing request of the target model sent by the target client is received.
The model synchronization device provided by the embodiment of the invention can execute the model synchronization method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example five
Fig. 5 shows a schematic diagram of the structure of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 5, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (central processor), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as the model synchronization method.
In some embodiments, the model synchronization method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the model synchronization method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the model synchronization method in any other suitable way (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (9)

1. A method of model synchronization, the method performed by a server, the method comprising:
if it is determined that at least two clients have received an editing request for the target model, determining a temporary host in each client, including:
if the fact that the first client receives an editing request of a model to be edited is determined, model data of the model to be edited are sent to the first client, and the model to be edited is used as a target model;
if the fact that the editing request of the second client to the target model is received is determined, the first client is used as a temporary host;
sending a synchronization instruction to other clients except the temporary host to instruct the other clients to perform data synchronization of the target model through the temporary host;
and receiving the model data sent by the temporary host, and carrying out data synchronization of the target model according to the model data.
2. The method of claim 1, further comprising, after sending the synchronization instruction to the other clients than the temporary host:
and if the request for exiting editing of the temporary host is received, re-determining the temporary host in other clients except the temporary host, and repeatedly executing the operation of sending the synchronous instruction to the other clients except the temporary host until the number of the clients editing the target model is determined to be one.
3. The method of claim 2, wherein receiving the model data sent by the temporary host and performing data synchronization of the target model according to the model data comprises:
if the number of the clients for editing the target model is determined to be one, determining the clients for editing the target model as temporary hosts;
receiving model data sent by the temporary host, and synchronizing data of a target model according to the model data;
and the model data is that the temporary host sends the server after sending the exit editing request.
4. A model synchronization method, wherein the method is performed by a client, the client being a client designated as a temporary host by a server, the method comprising:
receiving model synchronization requests sent by other clients, and establishing model synchronization connection with the other clients;
if the modified data of the target model sent by the target client is determined to be received, the modified data are sent to other clients except the target client, so that the other clients perform model synchronization according to the modified data;
and carrying out model synchronization according to the modified data, and sending the synchronized model data to a server so as to enable the server to carry out data synchronization of the target model according to the model data.
5. The method of claim 4, further comprising, after establishing the model sync connection with the other clients:
and if the fact that the editing request of the target model sent by the target client is received is determined, sending a model locking instruction to other clients except the target client.
6. A model synchronization device, wherein the device is deployed in a server, the device comprising:
the temporary host determining module is used for determining a temporary host in each client if the editing request of at least two clients to the target model is determined to be received;
a temporary host determination module, comprising:
the model data issuing unit is used for sending the model data of the model to be edited to the first client and taking the model to be edited as a target model if the first client determines that the editing request of the model to be edited is received;
the first temporary host determining unit is used for taking the first client as a temporary host if determining that the editing request of the second client for the target model is received;
the synchronous instruction sending module is used for sending synchronous instructions to other clients except the temporary host so as to instruct the other clients to perform data synchronization of the target model through the temporary host;
and the model data synchronization module is used for receiving the model data sent by the temporary host and performing data synchronization of the target model according to the model data.
7. A model synchronization device, wherein the device is deployed in a client, the client being a client designated as a temporary host by a server, the device comprising:
the synchronous connection establishing module is used for receiving model synchronous requests sent by other clients and establishing model synchronous connection with the other clients;
the system comprises a modification data synchronization module, a modification data synchronization module and a modification data synchronization module, wherein the modification data synchronization module is used for sending modification data of a target model sent by a target client to other clients except the target client if the modification data is determined to be received, so that the other clients perform model synchronization according to the modification data;
and the model data transmitting module is used for carrying out model synchronization according to the modified data and transmitting the synchronized model data to a server so as to enable the server to carry out data synchronization of a target model according to the model data.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the model synchronization method of any of claims 1-5 when the program is executed by the processor.
9. A storage medium storing computer executable instructions which, when executed by a computer processor, are adapted to perform the model synchronisation method according to any of claims 1-5.
CN202311378758.4A 2023-10-24 2023-10-24 Model synchronization method and device, electronic equipment and storage medium Active CN117113942B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311378758.4A CN117113942B (en) 2023-10-24 2023-10-24 Model synchronization method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311378758.4A CN117113942B (en) 2023-10-24 2023-10-24 Model synchronization method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN117113942A CN117113942A (en) 2023-11-24
CN117113942B true CN117113942B (en) 2024-02-20

Family

ID=88806074

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311378758.4A Active CN117113942B (en) 2023-10-24 2023-10-24 Model synchronization method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117113942B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107071005A (en) * 2017-03-24 2017-08-18 厦门中控生物识别信息技术有限公司 A kind of method of data synchronization and system
CN110334398A (en) * 2019-05-30 2019-10-15 广东民航机场建设有限公司 Information processing method, device, equipment and storage medium based on BIM model
CN110611638A (en) * 2018-06-14 2019-12-24 中国科学院沈阳计算技术研究所有限公司 Multi-terminal model real-time synchronization method
CN110995844A (en) * 2019-12-06 2020-04-10 北京澜景科技有限公司 Multi-person collaborative design method, device, equipment and computer readable storage medium
CN111553132A (en) * 2020-04-21 2020-08-18 广州视源电子科技股份有限公司 Data cooperative processing method, device and system
CN111985191A (en) * 2020-08-05 2020-11-24 北京同创永益科技发展有限公司 Multi-person collaborative online document editing method and device
CN112822232A (en) * 2020-12-28 2021-05-18 浙江中控技术股份有限公司 Batch recording system cooperative configuration realization method, device, equipment and storage medium
CN114723239A (en) * 2022-03-18 2022-07-08 中国建设银行股份有限公司 Multi-party collaborative modeling method, device, equipment, medium and program product
CN115920409A (en) * 2022-11-11 2023-04-07 网易(杭州)网络有限公司 Data processing method and device and electronic equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113420002A (en) * 2021-06-24 2021-09-21 阿波罗智联(北京)科技有限公司 Data synchronization method and device, electronic equipment and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107071005A (en) * 2017-03-24 2017-08-18 厦门中控生物识别信息技术有限公司 A kind of method of data synchronization and system
CN110611638A (en) * 2018-06-14 2019-12-24 中国科学院沈阳计算技术研究所有限公司 Multi-terminal model real-time synchronization method
CN110334398A (en) * 2019-05-30 2019-10-15 广东民航机场建设有限公司 Information processing method, device, equipment and storage medium based on BIM model
CN110995844A (en) * 2019-12-06 2020-04-10 北京澜景科技有限公司 Multi-person collaborative design method, device, equipment and computer readable storage medium
CN111553132A (en) * 2020-04-21 2020-08-18 广州视源电子科技股份有限公司 Data cooperative processing method, device and system
CN111985191A (en) * 2020-08-05 2020-11-24 北京同创永益科技发展有限公司 Multi-person collaborative online document editing method and device
CN112822232A (en) * 2020-12-28 2021-05-18 浙江中控技术股份有限公司 Batch recording system cooperative configuration realization method, device, equipment and storage medium
CN114723239A (en) * 2022-03-18 2022-07-08 中国建设银行股份有限公司 Multi-party collaborative modeling method, device, equipment, medium and program product
CN115920409A (en) * 2022-11-11 2023-04-07 网易(杭州)网络有限公司 Data processing method and device and electronic equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
The Journal of China Universities of Posts and Telecommunications.Research on concurrency control algorithm for real-time collaborative editing systems.The Journal of China Universities of Posts and Telecommunications.2014,第21卷全文. *
高丽萍 ; 张鑫 ; .移动平台下实时协同关联图文档模型一致性维护算法研究.小型微型计算机系统.2018,(第08期),全文. *

Also Published As

Publication number Publication date
CN117113942A (en) 2023-11-24

Similar Documents

Publication Publication Date Title
CN110309161B (en) Data synchronization method and device and server
EP3817338B1 (en) Method and apparatus for acquiring rpc member information, electronic device and storage medium
CN113193947B (en) Method, apparatus, medium, and program product for implementing distributed global ordering
CN117113942B (en) Model synchronization method and device, electronic equipment and storage medium
CN113691403B (en) Topology node configuration method, related device and computer program product
CN113703946B (en) Application recovery method and device, electronic equipment and computer readable storage medium
CN115525666A (en) Real-time data updating method and device, electronic equipment and storage medium
CN113420275B (en) Data connection processing method, related device and computer program product
CN114070889B (en) Configuration method, traffic forwarding device, storage medium, and program product
CN115599438A (en) Method, device, equipment and medium for constructing application program publishing package
CN112799879B (en) Fault processing method, device, equipment and storage medium of node
CN114579311A (en) Method, apparatus, device and storage medium for executing distributed computing task
CN110661857B (en) Data synchronization method and device
CN114915516A (en) Communication method and device
CN114328739A (en) Data synchronization method, data reading method, data synchronization device, data reading device, electronic equipment, storage medium and product
CN112860719B (en) Data processing method and device and electronic equipment
CN103973723A (en) Centralized scientific data synchronization method and system
CN116708705A (en) Communication method and device for video conference, electronic equipment and storage medium
CN115034895A (en) Block chain node management method and device and electronic equipment
CN115174447B (en) Network communication method, device, system, equipment and storage medium
CN116614357A (en) Configuration information issuing method and device, electronic equipment and storage medium
CN117271667A (en) Data reading method and device, electronic equipment and storage medium
CN116881229A (en) Database exercise environment construction method, device, equipment and storage medium
CN117675841A (en) Configuration information synchronization method, system, electronic equipment and storage medium
CN116049311A (en) Data synchronization method and device, electronic equipment and storage medium

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
GR01 Patent grant
GR01 Patent grant