Collaborative modeling method and device, electronic equipment and storage medium

By obtaining modeling user information and judging directed acyclic graph state in the collaborative modeling system, real-time synchronization of the modeling task is achieved, solving the problems of modeling tasks repetition and synchronization delay in the existing technology, and improving the coordination efficiency and user Experience.

CN119416293APending Publication Date: 2025-02-11CHINA CONSTR THIRD ENG BUREAU GRP SOUTH CHINA CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411549952.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-01
Publication Date
2025-02-11

AI Technical Summary

Technical Problem

In the existing collaborative modeling architecture based on client/server, there are problems such as repeated execution of modeling tasks and inability to synchronize models in time, resulting in poor user experience and waste of resources.

Method used

By obtaining the identification information of the modeling user and the information of the project to be collaborated, the status of the directed acyclic graph is judged, and the database model is updated in response to the editing command in the locked state, and the update information is pushed to the read-only user to realize real-time synchronization of the model.

Benefits of technology

The problem of repeated tasks and model synchronization delays in the collaborative modeling process is avoided, and the collaboration efficiency between multiple users and the user experience of the modeling process is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119416293A_ABST
    Figure CN119416293A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a collaborative modeling method and device, electronic equipment and a storage medium. The method comprises the steps that identification information of modeling users and to-be-collaborative project information between the modeling users are acquired; obtaining the state of a directed acyclic graph corresponding to the to-be-coordinated project information; if the state of the directed acyclic graph is a locked state, in response to a project model editing instruction corresponding to a to-be-coordinated project of a first user in an editing mode, updating a project model in a database; pushing update information of the project model to the second user in the read-only mode based on the communication connection; performing operation processing on the project model according to the update information; and in response to an unlocking instruction of the first user, setting the state of the directed acyclic graph as an unlocked state, and disconnecting the communication connection with the first user and the second user. By implementing the embodiment of the invention, the collaboration efficiency among multiple users is improved, and the user experience in the modeling process is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a collaborative modeling method, device, electronic device and storage medium. Background Art

[0002] Collaborative modeling means that multiple designers work together at the same time, design, edit and communicate in the same model, and can participate in product design and development in a synchronous or asynchronous mode to improve work efficiency and accuracy. In the new era, based on the needs of collaborative work, in the existing client / server-based collaborative modeling architecture, there are problems such as repeated execution of modeling tasks and model overwriting, which not only wastes modelers' modeling time, but also consumes the platform's operating resources, bringing users a poor interactive experience. Summary of the invention

[0003] The embodiments of the present application disclose a collaborative modeling method, device, electronic device and storage medium, which improve the collaboration efficiency between multiple users and enhance the user experience of the modeling process.

[0004] The present application embodiment discloses a collaborative modeling method, which is applied to an electronic device, and the method includes:

[0005] Acquire identification information of modeling users and information of projects to be coordinated between the modeling users;

[0006] Obtaining the state of the directed acyclic graph corresponding to the information of the project to be coordinated;

[0007] If the state of the directed acyclic graph is a locked state, in response to a project model editing instruction corresponding to the to-be-coordinated project by the first user in the editing mode, updating the project model in the database;

[0008] Pushing update information of the project model to a second user in a read-only mode based on the communication connection;

[0009] Performing operation processing on the project model according to the update information;

[0010] In response to the unlocking instruction of the first user, the state of the directed acyclic graph is set to an unlocked state, and the communication connection with the first user and the second user is disconnected.

[0011] As an optional implementation manner, the obtaining identification information of the modeling users and information of the projects to be coordinated between the modeling users includes:

[0012] If the state of the directed acyclic graph is an unlocked state, determining that the modeling user is the first user;

[0013] If the state of the directed acyclic graph is a locked state, it is determined that the modeling user is the second user.

[0014] As an optional implementation manner, after determining that the modeling user is the first user, the method further includes:

[0015] storing the identification information of the first user and the address of the first user in the dictionary table;

[0016] In response to a locking instruction from the first user, setting the state of the directed acyclic graph to a locked state;

[0017] Establishing a communication connection with the first user based on a full-duplex communication protocol;

[0018] The identification information of the first user, the address of the first user, and the session information with the first user are stored in an edit hash table corresponding to the directed acyclic graph.

[0019] As an optional implementation manner, after determining that the modeling user is the second user, the method further includes:

[0020] Establishing a communication connection with the second user based on a full-duplex communication protocol;

[0021] The identification information of the second user, the address of the second user, and the session information with the second user are stored in a read-only hash table corresponding to the directed acyclic graph.

[0022] As an optional implementation manner, establishing a communication connection with the first user based on a full-duplex communication protocol includes:

[0023] If it is detected that the communication connection is disconnected, determining a user corresponding to the disconnected communication connection based on the session information;

[0024] If the user corresponding to the disconnected communication connection is the first user, the state of the directed acyclic graph is set to an unlocked state.

[0025] As an optional implementation manner, the obtaining of the state of the directed acyclic graph corresponding to the information of the project to be coordinated includes:

[0026] Acquire the state of the directed acyclic graph corresponding to the information of the project to be coordinated based on the dictionary table;

[0027] The dictionary table includes: identification information of the directed acyclic graph, the state of the directed acyclic graph and the address of the first user.

[0028] As an optional implementation manner, the responding to the project model editing instruction corresponding to the to-be-coordinated project of the first user in the editing mode includes:

[0029] If any one of the editing instructions of the first user is received, the project model edited by the first user is used to replace the project model in the database;

[0030] The editing instructions include: saving model instructions, running operator instructions and stopping operator instructions.

[0031] The present application embodiment discloses a collaborative modeling device, the device comprising:

[0032] A first acquisition module is used to acquire identification information of modeling users and information of projects to be coordinated between the modeling users;

[0033] A second acquisition module is used to acquire the state of the directed acyclic graph corresponding to the information of the project to be coordinated;

[0034] A first execution module, configured to update the project model in the database in response to a project model editing instruction corresponding to the to-be-coordinated project from a first user in an editing mode if the state of the directed acyclic graph is a locked state;

[0035] A sending module, configured to push update information of the project model to a second user in a read-only mode based on a communication connection;

[0036] A processing module, used for performing operation processing on the project model according to the update information;

[0037] The second execution module is used to respond to the unlocking instruction of the first user, set the state of the directed acyclic graph to an unlocked state, and disconnect the communication connection with the first user and the second user.

[0038] An embodiment of the present application discloses an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor implements any one of the collaborative modeling methods disclosed in the embodiment of the present application.

[0039] An embodiment of the present application discloses a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, any one of the collaborative modeling methods disclosed in the embodiment of the present application is implemented.

[0040] Compared with the related art, the embodiments of the present application have the following beneficial effects:

[0041] The embodiments of the present application provide a collaborative modeling method, device, electronic device and storage medium, which obtain identification information of a modeling user and information of projects to be collaborated between modeling users, obtain the state of a directed acyclic graph corresponding to the information of the projects to be collaborated, and if the state of the directed acyclic graph is a locked state, in response to a project model editing instruction corresponding to the project to be collaborated of a first user in editing mode, update the project model in the database, push updated information of the project model to a second user in read-only mode based on a communication connection, perform operations on the project model according to the updated information, and in response to an unlocking instruction of the first user, set the state of the directed acyclic graph to an unlocked state, and disconnect the communication connection with the first user and the second user. The implementation of the embodiments of the present application realizes real-time synchronization of the model, avoids the problems of repeated execution of tasks and failure to synchronize the model in a timely manner in the collaborative modeling process, improves the collaborative efficiency between multiple users, and enhances the user experience of the modeling process. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0043] Figure 1 It is a flowchart of a collaborative modeling method disclosed in an embodiment of the present application;

[0044] Figure 2 It is a schematic diagram of a process for obtaining identification information of a modeling user and information of projects to be coordinated between modeling users disclosed in an embodiment of the present application;

[0045] Figure 3 It is a schematic diagram of a process of establishing a communication connection with a first user based on a full-duplex communication protocol disclosed in an embodiment of the present application;

[0046] Figure 4 is a structural schematic diagram of a collaborative modeling device disclosed in an embodiment of the present application;

[0047] Figure 5 It is a structural schematic diagram of an electronic device disclosed in an embodiment of the present application. DETAILED DESCRIPTION

[0048] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0049] It should be noted that the terms "including" and "having" and any variations thereof in the embodiments of the present application and the accompanying drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products or devices.

[0050] The embodiments of the present application disclose a collaborative modeling method, device, electronic device, and storage medium, which improve the collaborative efficiency among multiple users and enhance the user experience of the modeling process. Detailed descriptions are given below.

[0051] See also Figure 1 , Figure 1 is a flowchart of a collaborative modeling method disclosed in an embodiment of the present application. Figure 1 The described collaborative modeling approach is applicable to electronic devices. Figure 1 As shown, the collaborative modeling method may include the following steps:

[0052] Step S102: obtaining identification information of modeling users and information of projects to be coordinated between modeling users.

[0053] Among them, the identification information of the modeling user is used to ensure the uniqueness of the current user and can be used to distinguish between the first user and the second user. The information of the projects to be collaborated between the modeling users can specifically be: the identification information of the current project and the participating users of the current project used to ensure the uniqueness of the current project, etc., to ensure the consistency of multiple users in the collaborative modeling process.

[0054] Step S104, obtaining the state of the directed acyclic graph corresponding to the information of the project to be coordinated.

[0055] After obtaining the identification information of the modeler and the information of the projects to be collaborated between the modeling users, when the server receives a request to access the directed acyclic graph corresponding to the project to be collaborated, it will determine the state of the directed acyclic graph in order to determine the working mode of the modeler. The state of the directed acyclic graph includes a locked state and an unlocked state. The state of the directed acyclic graph can be switched after receiving the corresponding instruction.

[0056] In some embodiments, obtaining the state of the directed acyclic graph corresponding to the project information to be coordinated includes: obtaining the state of the directed acyclic graph corresponding to the project information to be coordinated based on a dictionary table, the dictionary table may be a data dictionary table created when creating the directed acyclic graph or in the process of using the directed acyclic graph, the data dictionary table containing identification information of the directed acyclic graph, the state of the directed acyclic graph and the address of the first user.

[0057] Step S106: if the state of the directed acyclic graph is a locked state, in response to a project model editing instruction corresponding to the to-be-coordinated project of the first user in the editing mode, updating the project model in the database.

[0058] The directed acyclic graph is set to a locked state and enters the editing mode. When the first user is in the editing mode, the server can verify the user information before responding to and executing the model editing instruction of the first user, and compare the user information of the user initiating the instruction with the user information of the first user recorded in the dictionary table. If they are consistent, the server responds and executes the model editing instruction. If they are inconsistent, the server enters the read-only mode and waits for the directed acyclic graph to be unlocked.

[0059] In some embodiments, in response to a project model editing instruction corresponding to a to-be-collaborated project of a first user in editing mode, the instruction includes: if any of the editing instructions of the first user is received, the project model edited by the first user is used to replace the project model in the database, wherein the model editing instruction may include a save model instruction, a run operator instruction, and a stop operator instruction.

[0060] When any one of the save model instruction, run operator instruction and stop operator instruction from the first user is received, the project model in the database may be replaced by the project model being edited by the first user.

[0061] Step S108: Pushing update information of the project model to the second user in the read-only mode based on the communication connection.

[0062] In some embodiments, after completing the WebSocket connection with the first user and the second user, the server can implement the synchronization of the model and the push function of information. For example, when the first user saves, runs, or stops the directed acyclic graph, the server will obtain these operation information and send the latest state of the model to the second user corresponding to the directed acyclic graph in the read-only hash table.

[0063] The communication connection may include a first communication connection between a first user and a server, and a second communication connection between a second user and a server. Through the first communication connection, the server may obtain user information of the first user, such as identification information of the first user, address of the first user, etc. After receiving an instruction from the first user, the server may push the user information of the first user and the updated model to the second user through the second communication connection, so that the second user may know the latest status of the model.

[0064] Among them, the WebSocket protocol is implemented based on the TCP protocol. It is a protocol for full-duplex communication on a single TCP connection. The client and the server only need to complete a handshake to create a persistent connection between the two, making data exchange simpler and allowing the server to actively push data to the client.

[0065] Step S110: performing operations on the project model according to the update information.

[0066] After the second user receives the updated information of the project model, he operates the project model through the command corresponding to the project to be collaborated, combines the project model according to the updated information and the latest status of the project model to obtain a combined object, further updates the project model, and uses the combined project model to replace the project model in the database.

[0067] Step S112, in response to the unlocking instruction of the first user, the state of the directed acyclic graph is set to an unlocked state, and the communication connection with the first user and the second user is disconnected.

[0068] In response to the unlocking instruction of the first user, the state of the directed acyclic graph is set to an unlocked state, and the modeling process of the first user is terminated. When the directed acyclic graph is in a locked state, the changes made to the model by the first user in the editing mode are pushed to the second user in the read-only mode in real time through the communication connection, thereby achieving real-time synchronization of the model, avoiding the problems of repeated execution of tasks and failure to synchronize the model in a timely manner in the collaborative modeling process, and improving the user experience of the modeling process.

[0069] In some embodiments, when a WebSocket connection is detected to be disconnected, the server can also determine the user corresponding to the disconnected WebSocket connection based on the session information, and if the user corresponding to the disconnected WebSocket connection is the first user, set the state of the directed acyclic graph to an unlocked state.

[0070] In some embodiments, after executing the unlock instruction, the server can cause the first user and the second user to exit the edit mode and the read-only mode respectively, disconnect the communication connection with the first user and the second user, and set the directed acyclic graph to an unlocked state, thereby ending the modeling process of the first user. After the directed acyclic graph is unlocked, the second user can initiate a request to access the directed acyclic graph again to start the modeling process. In particular, when the number of second users in read-only mode is one, the user can directly enter the edit mode.

[0071] Figure 2 is a flow chart of obtaining identification information of a modeling user and information of a project to be coordinated between modeling users disclosed in an embodiment of the present application. Figure 2The method comprises the following steps:

[0072] Step S202: If the state of the directed acyclic graph is unlocked, determine that the modeling user is the first user.

[0073] In some embodiments, the identification information of the first user and the address of the first user are stored in a dictionary table, and in response to a locking instruction of the first user, the state of the directed acyclic graph is set to a locked state. When the modeling user is the first user, the identification information of the first user and the address of the first user can be stored in the dictionary table, and the locking instruction can be waited for. The locking instruction can be actively initiated by the first user, or it can be automatically executed by the server after a preset time after the first user appears. For example, when the first user accesses the directed acyclic graph in an unlocked state, he directly starts editing the model without sending a locking instruction. After detecting the access of the first user, the server can directly lock the directed acyclic graph after 30 seconds.

[0074] In some embodiments, a communication connection with the first user is established based on a full-duplex communication protocol. After the first user enters the editing mode, the server can also establish a communication connection with the first user based on the full-duplex communication protocol. Through the communication connection, the server can actively obtain the model being edited by the first user. Among them, the full-duplex communication protocol can be a WebSocket protocol. Based on this protocol, after the server and the first user or the server and the second user establish the first HTTP connection, subsequent data exchanges do not need to resend HTTP requests. Compared with the HTTP protocol, this protocol does not require a polling mechanism to be set up in the server, and does not require repeated establishment of HTTP connections, saving bandwidth resources. Among them, the HTTP protocol is a stateless, connectionless, unidirectional application layer protocol that adopts a request / response model. Communication requests can only be initiated by the client, and the server responds to the request.

[0075] Among them, the HTTP protocol is a stateless, connectionless, unidirectional application layer protocol that adopts a request / response model. Communication requests can only be initiated by the client, and the server responds to the request. In the related art, since only the HTTP protocol is used, it is impossible to realize that the server actively initiates messages to the client. It is difficult for read-only users to synchronize with editing users. Editing users adjust and transform the model, and read-only users cannot perceive it. They can only read the model state when entering the directed acyclic graph, or exit modeling and re-enter the directed acyclic graph to re-acquire the latest model state. If the client adopts a timed refresh directed acyclic graph mechanism, long polling is achieved through frequent asynchronous JavaScript and XML (AJAX) requests. When the number of operators is small and the connection is not complicated, the read-only user can synchronize with the editing user; however, when the number of operators is large and the connection is complex, the use of a timed refresh mechanism is a considerable burden on both the client and the server. The timed refresh mechanism is not only inefficient, but also a waste of resources.

[0076] In some embodiments, the identification information of the first user, the address of the first user, and the session information with the first user are stored in an edit hash table corresponding to the directed acyclic graph, and a hash table is created to store the user information of the modeled user. For example, an edit hash table can be created to store the user information of the first user, the primary key of the hash table is the identification information of the directed acyclic graph, and the specific value is a list for storing the identification information of the directed acyclic graph, the identification information of the first user, the address of the first user, and the session information of the first user. After establishing a WebSocket connection with the first user, the identification information of the first user, the address of the first user, and the session information with the first user are stored in the edit hash table.

[0077] Step S204: If the state of the directed acyclic graph is a locked state, determine that the modeling user is the second user.

[0078] In some embodiments, a communication connection with the second user is established based on a full-duplex communication protocol. When the second user is in read-only mode, the server can establish a communication connection with the second user based on the full-duplex communication protocol. When receiving a model editing instruction from the first user, the server can actively send the updated model in the database and the user information of the first user to the second user through the communication connection to achieve real-time synchronization of the model. When the second user is in read-only mode, the relevant information of the directed acyclic graph can be viewed, but the server will not respond to the locking instructions, model editing instructions, and unlocking instructions of the second user.

[0079] In some embodiments, the identification information of the second user, the address of the second user, and the session information with the second user are stored in a read-only hash table corresponding to the directed acyclic graph, and a hash table is created to store the user information of the modeled user. For example, a read-only hash table can be created to store the user information of the second user, the primary key of the hash table is the identification information of the directed acyclic graph, and the specific value is a list for storing the identification information of the directed acyclic graph, the identification information of the second user, the address of the second user, and the session information of the second user. After establishing a WebSocket connection with the first user, the identification information of the second user, the address of the second user, and the session information with the second user are stored in the read-only hash table.

[0080] After establishing a WebSocket connection with the first user, the server can also verify the information in the hash table. For example, it can determine whether the identification information of the directed acyclic graph exists in the edit hash table; if not, the identification information of the directed acyclic graph is added to the edit hash table; if it exists, the identification information of the directed acyclic graph is added to the read-only hash table. In this way, when the model information in the database changes, the server can push relevant information to the modeling user in read-only mode.

[0081] Classifying modeling users based on the state of the directed acyclic graph can effectively avoid the situation where multiple people perform modeling operations at the same time, reduce resource waste, and avoid the model being overwritten. After the first user locks the directed acyclic graph and enters the edit mode, the second user enters the directed acyclic graph in read-only mode. When the first user saves the model, runs the operator, and stops the operator, the directed acyclic graph of the second user will be updated to the latest state in real time to achieve model synchronization between the edit mode and the read-only mode; when the first user exits the edit mode, the directed acyclic graph is set to an unlocked state and the second user of the current directed acyclic graph is notified; when the first user loses connection with the currently locked directed acyclic graph due to page jumps, closing the browser or network abnormalities, the directed acyclic graph will automatically unlock normally, and the data will be automatically saved to the database, and the second user of the current directed acyclic graph will be notified.

[0082] See also Figure 3 , Figure 3 This is a flow chart of establishing a communication connection with a first user based on a dual full-duplex communication protocol disclosed in an embodiment of the present application. In one embodiment, the step of establishing a communication connection with a first user based on a dual full-duplex communication protocol also includes the following steps:

[0083] Step S302: If it is detected that the communication connection is disconnected, the user corresponding to the disconnected communication connection is determined based on the session information.

[0084] When detecting that a WebSocket connection is disconnected, the server may also determine the user corresponding to the disconnected WebSocket connection based on the session information.

[0085] Step S304: If the user corresponding to the disconnected communication connection is the first user, the state of the directed acyclic graph is set to an unlocked state.

[0086] In some embodiments, when the user corresponding to the disconnected WebSocket connection is the first user, the state of the directed acyclic graph is set to an unlocked state. For example, it can be determined whether the session information of the server is consistent with the session information of the directed acyclic graph in the edit hash table; if it is consistent, it can be considered that the first user has lost connection, shut down, etc., resulting in abnormal disconnection of the WebSocket connection. At this time, the information that the first user exits the edit mode can be pushed to the second user of the directed acyclic graph in the read-only hash table, and the model data can be synchronized, and all WebSocket connections of the directed acyclic graph are closed, and the directed acyclic graph is set to an unlocked state; on the other hand, if it is detected that the user corresponding to the disconnected WebSocket connection is the second user, the WebSocket connection with the second user is closed.

[0087] In some embodiments, a heartbeat mechanism is established by adopting the WebSocket protocol to avoid the problem that after a user locks the directed acyclic graph, the directed acyclic graph is locked and cannot be edited subsequently due to abnormal exit of modeling due to network abnormalities, browser non-response, etc. At the same time, it can also help users in read-only mode to update the synchronization model status in real time. Through the check-in and check-out mechanism and the heartbeat mechanism, users can model immersively without paying attention to the influence of other factors. At the same time, it avoids the waste of resources caused by repeated modeling, and provides users with a better modeling environment and interactive experience.

[0088] On the basis of the check-in and check-out mechanism, a heartbeat mechanism is added, and a full-duplex communication protocol is used to realize the interaction between the server and the client, thus obtaining a collaborative modeling method based on collaborative modeling of directed acyclic graphs. After the user locks the directed acyclic graph and enters the editing mode, other users enter the directed acyclic graph in read-only mode. When the editing user saves the model, runs the operator, and stops the operator, the directed acyclic graph of the read-only user will be updated to the latest state in real time, achieving model synchronization between the editing mode and the read-only mode; when the user exits the editing mode, the directed acyclic graph is set to an unlocked state, and the current read-only user of the directed acyclic graph is notified; when the user loses connection with the currently locked directed acyclic graph due to page jumps, closing the browser, or network abnormalities, the directed acyclic graph will automatically unlock normally, and the data will be automatically saved to the database, and the current read-only user of the directed acyclic graph will be notified.

[0089] See also Figure 4 , Figure 4Schematic diagram of a collaborative modeling device disclosed in an embodiment of the present application. The device can be applied to electronic devices. Figure 4 As shown, the collaborative modeling apparatus 400 may include: a first acquisition module 401 , a second acquisition module 402 , a first execution module 403 , a sending module 404 , a processing module 405 and a second execution module 406 .

[0090] The first acquisition module 401 is used to acquire identification information of modeling users and information of projects to be coordinated between modeling users;

[0091] The second acquisition module 402 is used to acquire the state of the directed acyclic graph corresponding to the information of the project to be coordinated;

[0092] A first execution module 403 is configured to update the project model in the database in response to a project model editing instruction corresponding to the to-be-coordinated project of the first user in the editing mode if the state of the directed acyclic graph is a locked state;

[0093] A sending module 404, configured to push update information of the project model to a second user in a read-only mode based on the communication connection;

[0094] Processing module 405, used to operate and process the project model according to the update information;

[0095] The second execution module 406 is configured to respond to the unlocking instruction of the first user, set the state of the directed acyclic graph to an unlocked state, and disconnect the communication connection with the first user and the second user.

[0096] In one embodiment, the first acquisition module 401 further includes a first determination unit and a second determination unit:

[0097] A first determining unit, configured to determine that the modeling user is a first user if the state of the directed acyclic graph is an unlocked state;

[0098] The second determining unit is used to determine that the modeling user is a second user if the state of the directed acyclic graph is a locked state.

[0099] In one embodiment, the first determining unit further includes:

[0100] A first storage unit, used to store the identification information of the first user and the address of the first user in a dictionary table;

[0101] A first execution unit, configured to set the state of the directed acyclic graph to a locked state in response to a locking instruction of a first user;

[0102] A first connection unit, configured to establish a communication connection with a first user based on a full-duplex communication protocol;

[0103] The second storage unit is used to store the identification information of the first user, the address of the first user and the session information with the first user into an edit hash table corresponding to the directed acyclic graph.

[0104] In one embodiment, the second determining unit further includes:

[0105] A second connection unit, configured to establish a communication connection with a second user based on a full-duplex communication protocol;

[0106] The third storage unit is used to store the identification information of the second user, the address of the second user and the session information with the second user into a read-only hash table corresponding to the directed acyclic graph.

[0107] In one embodiment, the first connection unit further includes a determination subunit and an execution subunit:

[0108] a determination subunit, configured to determine, if a disconnection of the communication connection is detected, a user corresponding to the disconnected communication connection based on the session information;

[0109] The execution subunit is used to set the state of the directed acyclic graph to an unlocked state if the user corresponding to the disconnected communication connection is the first user.

[0110] In one embodiment, the second acquisition module 402 is further used to acquire the state of the directed acyclic graph corresponding to the to-be-coordinated project information based on a dictionary table; wherein the dictionary table includes: identification information of the directed acyclic graph, the state of the directed acyclic graph and the address of the first user.

[0111] In one embodiment, the first execution module 403 is also used to replace the project model in the database with the project model edited by the first user if any editing instruction from the first user is received; wherein the editing instructions include: save model instructions, run operator instructions and stop operator instructions.

[0112] In an embodiment of the present application, when the directed acyclic graph is in a locked state, the changes made to the model by the first user in the editing mode are pushed in real time to the second user in the read-only mode through a communication connection, thereby achieving real-time synchronization of the model, avoiding the problems of repeated execution of tasks and failure to synchronize the model in a timely manner in the collaborative modeling process, improving the collaborative efficiency between multiple users, and enhancing the user experience of the modeling process.

[0113] See also Figure 5 , Figure 5 It is a structural schematic diagram of an electronic device disclosed in an embodiment of the present application.

[0114] like Figure 5 As shown, the electronic device 500 may include:

[0115] A memory 501 storing executable program codes;

[0116] a processor 502 coupled to the memory 501;

[0117] The processor 502 calls the executable program code stored in the memory 501 to execute any collaborative modeling method disclosed in the embodiments of the present application.

[0118] An embodiment of the present application discloses a computer-readable storage medium storing a computer program, wherein when the computer program is executed by the processor, the processor implements any one of the collaborative modeling methods disclosed in the embodiment of the present application.

[0119] The embodiments of the present application disclose a computer program product, including a computer program, and the computer program can be executed by a processor to implement the methods described in the above embodiments.

[0120] It should be understood that the "one embodiment" or "an embodiment" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. Those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required for the present application.

[0121] In the various embodiments of the present application, it should be understood that the size of the serial numbers of the above-mentioned processes does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0122] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0123] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0124] If the above integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-accessible memory. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a memory and includes several requests for a computer device to execute some or all of the steps of the above methods of various embodiments of the present application.

[0125] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium.

[0126] The above is a detailed introduction to a collaborative modeling method, device, electronic device and storage medium disclosed in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of ​​the present application. At the same time, for those of ordinary skill in the art, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A collaborative modeling method, characterized in that: The method comprises: Acquire identification information of modeling users and information of projects to be coordinated between the modeling users; Obtaining the state of the directed acyclic graph corresponding to the information of the project to be coordinated; If the state of the directed acyclic graph is a locked state, in response to a project model editing instruction corresponding to the to-be-coordinated project by the first user in the editing mode, updating the project model in the database; Pushing update information of the project model to a second user in a read-only mode based on the communication connection; Performing operation processing on the project model according to the update information; In response to the unlocking instruction of the first user, the state of the directed acyclic graph is set to an unlocked state, and the communication connection with the first user and the second user is disconnected.

2. The method according to claim 1, characterized in that The obtaining identification information of the modeling users and information of the projects to be coordinated between the modeling users includes: If the state of the directed acyclic graph is an unlocked state, determining that the modeling user is the first user; If the state of the directed acyclic graph is a locked state, it is determined that the modeling user is the second user.

3. The method according to claim 2, characterized in that After determining that the modeling user is the first user, the method further includes: storing the identification information of the first user and the address of the first user in the dictionary table; In response to a locking instruction from the first user, setting the state of the directed acyclic graph to a locked state; Establishing a communication connection with the first user based on a full-duplex communication protocol; The identification information of the first user, the address of the first user, and the session information with the first user are stored in an edit hash table corresponding to the directed acyclic graph.

4. The method according to claim 2, characterized in that: After determining that the modeling user is the second user, the method further includes: Establishing a communication connection with the second user based on a full-duplex communication protocol; The identification information of the second user, the address of the second user, and the session information with the second user are stored in a read-only hash table corresponding to the directed acyclic graph.

5. The method according to claim 3, characterized in that: The establishing of a communication connection with the first user based on the full-duplex communication protocol includes: If it is detected that the communication connection is disconnected, determining a user corresponding to the disconnected communication connection based on the session information; If the user corresponding to the disconnected communication connection is the first user, the state of the directed acyclic graph is set to an unlocked state.

6. The method according to claim 1, characterized in that The obtaining of the state of the directed acyclic graph corresponding to the information of the project to be coordinated includes: Acquire the state of the directed acyclic graph corresponding to the information of the project to be coordinated based on the dictionary table; The dictionary table includes: identification information of the directed acyclic graph, the state of the directed acyclic graph and the address of the first user.

7. The method according to claim 1, characterized in that The responding to the project model editing instruction corresponding to the to-be-coordinated project of the first user in the editing mode includes: If any one of the editing instructions of the first user is received, the project model edited by the first user is used to replace the project model in the database; The editing instructions include: saving model instructions, running operator instructions and stopping operator instructions.

8. A collaborative modeling device, characterized in that: include: A first acquisition module is used to acquire identification information of modeling users and information of projects to be coordinated between the modeling users; A second acquisition module is used to acquire the state of the directed acyclic graph corresponding to the information of the project to be coordinated; A first execution module, configured to update the project model in the database in response to a project model editing instruction corresponding to the to-be-coordinated project from a first user in an editing mode if the state of the directed acyclic graph is a locked state; A sending module, configured to push update information of the project model to a second user in a read-only mode based on a communication connection; A processing module, used for performing operation processing on the project model according to the update information; The second execution module is used to respond to the unlocking instruction of the first user, set the state of the directed acyclic graph to an unlocked state, and disconnect the communication connection with the first user and the second user.

9. An electronic device, characterized in that: The method comprises a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor implements the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.