Code development method and device, electronic equipment and readable storage medium

By creating independent twin modules for each user and merging their editing operations, the problem of user editing conflicts in low-code development is solved, efficiency and reliability are improved, and code consistency and quality are ensured.

CN120491940APending Publication Date: 2025-08-15CHINA TELECOM CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510560048.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-29
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

During low-code development, the modification and adjustment of application code by different developers may lead to abnormal code business logic, requiring additional code repair and consistency management, which reduces development efficiency and quality.

Method used

Create an independent twin module for each target user, merge the editing operations of each user through preset merge rules, and generate target modules to ensure that each user's editing operations are carried out in an independent data storage and running environment, avoid conflicts, and update the module to be orchestrated based on the merged operations.

Benefits of technology

It realizes that multiple users edit at the same time without interfering with each other, improves the efficiency of code development, enhances the reliability and stability of code development, and ensures data consistency and quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120491940A_ABST
    Figure CN120491940A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a code development method and device, electronic equipment and a readable storage medium, and the method comprises the steps: in response to a code development request of any target user, creating a twin module corresponding to a to-be-arranged module indicated by the code development request for the target user; the twin module is only provided for a target user to perform code editing; according to a preset merging rule, performing merging processing on the at least two first editing operations generated by each target user in each twin module to obtain a target editing operation for the first component object; component objects of the at least two first editing operations are the same and are the first component objects; based on the target editing operation and the second editing operation, updating the to-be-arranged module to obtain a target module; the component objects of the second editing operations are not the first component objects, and the second component objects of the second editing operations are different. The code development efficiency is improved, the reliability and stability of code development are enhanced, and the data consistency and the code development quality are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a code development method, device, electronic device, and readable storage medium. Background Art

[0002] Low-code is a software development approach that aims to speed up the application development process by minimizing the need for manual coding. Low-code platforms provide a graphical interface and pre-built components, enabling users to build applications using drag-and-drop and configuration without having to learn programming languages or write extensive code.

[0003] In related technologies, during the low-code development process, different developers may each modify and adjust the application code. When different users modify the modules at the same time, the low-code configuration content configured by other users will be overwritten, resulting in abnormal code business logic. Additional code repair and consistency management operations are required, which reduces code development efficiency and quality. Summary of the Invention

[0004] To overcome the problems existing in the related art, the present invention provides a code development method, device, electronic device and readable storage medium.

[0005] In a first aspect, the present invention provides a code development method, the method comprising:

[0006] In response to a code development request from any target user, a twin module corresponding to the module to be orchestrated indicated in the code development request is created for the target user; the twin module is only for the target user to edit the code;

[0007] Merge at least two first editing operations generated by each target user in each twin module according to a preset merging rule to obtain a target editing operation for a first component object; the component objects of the at least two first editing operations are the same and are the first component object;

[0008] Based on the target editing operation and the second editing operation, the module to be arranged is updated to obtain a target module; the component object of the second editing operation is not the first component object and the second component objects of each second editing operation are different.

[0009] Optionally, the step of creating a twin module corresponding to the module to be orchestrated indicated by the code development request for the target user includes:

[0010] Creating a module copy corresponding to the module to be arranged based on the user identifier corresponding to the target user, the request sending date corresponding to the code development request, and the module to be arranged;

[0011] An independent data storage space and an independent operating environment are set for the module copy to obtain the twin module.

[0012] Optionally, the method further includes:

[0013] When the target user performs an add component operation in the twin module, the component identifier of the newly added component object corresponding to the add component operation, the timestamp corresponding to the add component operation, and the target user identifier of the target user are recorded;

[0014] Based on the component identifier of the newly added component object and the component information corresponding to the newly added component object, generating a target key-value pair corresponding to the newly added component object;

[0015] Add the target key-value pair to the global object mapping table corresponding to the module to be arranged.

[0016] Optionally, the updating the module to be arranged based on the target editing operation and the second editing operation to obtain a target module includes:

[0017] Determining, based on a global object mapping table, second component information corresponding to each of the second editing operations and first component information corresponding to each of the target editing operations;

[0018] For any of the second editing operations, based on the second component information corresponding to the second editing operation, perform the second editing operation on the second component object corresponding to the second editing operation;

[0019] For any of the target editing operations, based on the first component information corresponding to the target editing operation, perform the target editing operation on the first component object corresponding to the target editing operation;

[0020] When the target editing operation and the second editing operation are both completed, the target module is determined.

[0021] Optionally, merging at least two first editing operations generated by each target user in each twin module according to a preset merging rule to obtain a target editing operation for the first component object includes:

[0022] If the at least two first editing operations are changes to all content of the same component attribute of the first component object, then based on the timestamps of the at least two first editing operations, the first editing operation with the latest timestamp is determined as the target compilation operation for the first component object.

[0023] Optionally, merging at least two first editing operations generated by each target user in each twin module according to a preset merging rule to obtain a target editing operation for the first component object includes:

[0024] If the at least two first editing operations are partial content changes to the same component attribute of the first component object, then the current first editing operation is equivalently converted based on the first editing result of the previous first editing operation in the timestamp order of the at least two first editing operations to obtain the target editing operation for the first component object.

[0025] Optionally, merging at least two first editing operations generated by each target user in each twin module according to a preset merging rule to obtain a target editing operation for the first component object includes:

[0026] If the at least two first editing operations are changes to different component attributes of the first component object respectively, the at least two first editing operations are combined to determine a target editing operation for the first component object.

[0027] In a second aspect, the present invention provides a code development device, comprising:

[0028] A first creation module is configured to, in response to a code development request from any target user, create for the target user a twin module corresponding to the module to be orchestrated indicated in the code development request; the twin module is only for the target user to perform code editing;

[0029] A first merging module is configured to merge at least two first editing operations generated by each target user in each twin module according to a preset merging rule to obtain a target editing operation for a first component object; the component objects of the at least two first editing operations are the same and are the first component object;

[0030] A first updating module is configured to update the module to be arranged based on the target editing operation and a second editing operation to obtain a target module; the component object of the second editing operation is not the first component object and the second component objects of each second editing operation are different.

[0031] Optionally, the first creation module includes:

[0032] A first creation submodule is configured to create a module copy corresponding to the module to be arranged based on a user identifier corresponding to the target user, a request sending date corresponding to the code development request, and the module to be arranged;

[0033] The first setting module is used to set an independent data storage space and an independent operating environment for the module copy to obtain the twin module.

[0034] Optionally, the device further comprises:

[0035] A first recording module is configured to record, when the target user performs an add component operation in the twin module, a component identifier of a newly added component object corresponding to the add component operation, a timestamp corresponding to the add component operation, and a target user identifier of the target user;

[0036] A first generating module, configured to generate a target key-value pair corresponding to the newly added component object based on the component identifier of the newly added component object and the component information corresponding to the newly added component object;

[0037] The first adding module is configured to add the target key-value pair to the global object mapping table corresponding to the module to be arranged.

[0038] Optionally, the first update module includes:

[0039] A first determining module, configured to determine, based on a global object mapping table, second component information corresponding to each of the second editing operations and first component information corresponding to each of the target editing operations;

[0040] a first execution module, configured to, for any second editing operation, execute the second editing operation on the second component object corresponding to the second editing operation based on the second component information corresponding to the second editing operation;

[0041] A second execution module is configured to, for any target editing operation, execute the target editing operation on the first component object corresponding to the target editing operation based on the first component information corresponding to the target editing operation;

[0042] The second determining module is configured to determine the target module when both the target editing operation and the second editing operation are completed.

[0043] Optionally, the first merging module includes:

[0044] The third determination module is used to determine the first editing operation with the latest timestamp as the target compilation operation for the first component object based on the timestamps of the at least two first editing operations if the at least two first editing operations are to change the entire content of the same component attribute of the first component object.

[0045] Optionally, the first merging module includes:

[0046] The first conversion module is used to perform equivalent conversion on the current first editing operation based on the first editing result of the previous first editing operation in accordance with the timestamp order of the at least two first editing operations if the at least two first editing operations are partial content changes on the same component attribute of the first component object, so as to obtain a target editing operation for the first component object.

[0047] Optionally, the first merging module includes:

[0048] The fourth determining module is configured to combine the at least two first editing operations to determine a target editing operation for the first component object if the at least two first editing operations are changes to different component attributes of the first component object respectively.

[0049] In a third aspect, the present invention provides an electronic device comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the code development method described in any one of the first aspects above when executing the program.

[0050] In a fourth aspect, the present invention provides a readable storage medium, which, when the instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to execute the steps in the code development method in any one of the embodiments of the first aspect above.

[0051] In an embodiment of the present invention, in response to a code development request from any target user, a twin module corresponding to the module to be orchestrated indicated by the code development request is created for the target user; the twin module is only for the target user to perform code editing; according to a preset merging rule, at least two first editing operations generated by each target user in each twin module are merged to obtain a target editing operation for the first component object; the component objects of at least two first editing operations are the same and are the first component objects; based on the target editing operation and the second editing operation, the module to be orchestrated is updated to obtain a target module; the component object of the second editing operation is not the first component object and the second component objects of each second editing operation are different. In this way, by assigning a twin module that is only for the target user to perform code editing, multiple target users can be allowed to participate in code editing at the same time without interfering with each other, thereby achieving high concurrent collaboration and improving code development efficiency to a certain extent. At the same time, by merging the first editing operation to obtain the target editing operation, and then based on the target editing operation and the second editing operation, the layout module is updated to obtain the target module. In the event of a conflict in the code logic, the merge can be performed according to the preset merging rules to maintain the rationality of at least two first editing operations, effectively reducing errors and duplication of work caused by version conflicts, thereby enhancing the reliability and stability of code development, and ensuring data consistency and code development quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0053] Figure 1 This is a flowchart of the steps of a code development method provided by an embodiment of the present invention;

[0054] Figure 2 This is a flowchart of the specific steps of a code development method provided by an embodiment of the present invention;

[0055] Figure 3 This is a structural diagram of a code development device provided by an embodiment of the present invention;

[0056] Figure 4 This is a structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0057] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0058] Figure 1 This is a flowchart of a code development method provided by an embodiment of the present invention. Figure 1 As shown, the method may include:

[0059] Step 101: In response to a code development request from any target user, create a twin module corresponding to the module to be orchestrated indicated by the code development request for the target user; the twin module is only for the target user to edit the code.

[0060] In an embodiment of the present invention, a target user can send a code development request to a code development platform, and the code development request is used to apply to the code development platform for editing permissions for the module to be orchestrated indicated by the code development request. After receiving the code development request, the code development platform can verify the editing permissions corresponding to the target user based on the user ID of the target user, and create a twin module corresponding to the module to be orchestrated for the target user if the target user has editing permissions for the module to be orchestrated. Among them, the module to be orchestrated can be a page module, such as a low-code page module, and the twin module corresponding to the module to be orchestrated can be a module copy of the module to be orchestrated, and the twin module has an independent memory address, data storage and state isolation. Only users who are granted editing permissions can participate in the design and orchestration functions of the module to be orchestrated. The twin module created for the target user is only for the target user to edit the code, and each twin module is a copy of the original module to be orchestrated, but each twin module has an independent editing space and independently maintains the local state to ensure that the editing operations of different target users do not interfere with each other. Obtain the complete definition of the original module to be orchestrated, including its structure, components, properties, and dependencies. Create a module copy of the module to be orchestrated based on the deep cloning algorithm, ensuring that the copy is completely consistent with the original module in structure and function, but has independent memory address and data storage.

[0061] Optionally, step 101 may include the following steps:

[0062] Step 201: Create a module copy corresponding to the module to be arranged based on the user identifier corresponding to the target user, the request sending date corresponding to the code development request, and the module to be arranged.

[0063] In this embodiment of the present invention, the user ID of the target user and the date of the code development request are obtained. Based on the user ID, the date of the request, and the module to be orchestrated, a twin module corresponding to the module to be orchestrated is created. A deep cloning algorithm is used to generate a module replica corresponding to the module to be orchestrated, based on its structure, components, properties, and dependencies.

[0064] Step 202: Set up independent data storage space and independent operating environment for the module copy to obtain the twin module.

[0065] In an embodiment of the present invention, an independent data storage space and an independent operating environment are set for the module replica to obtain a twin module. By setting the module replica to be independent, it is ensured that it is completely decoupled from the original module to be orchestrated. Therefore, it can be set from four levels: data, logic, resources, and environment, so that the module replica has an independent data storage space and an independent operating environment to obtain a twin module. Exemplarily, the independent setting of the memory address can be achieved by allocating an independent tablespace or prefix; creating an independent instance for the module replica to perform state management and independence of the event bus; achieving file system isolation of the module replica through path redirection or a virtual file system; achieving process or thread isolation of the module replica through containerization; and achieving time isolation of the module replica through a virtual clock.

[0066] In an embodiment of the present invention, by generating a twin module corresponding to the module to be orchestrated and enabling the twin module to have independent data storage space and an independent operating environment, by creating a twin module and giving it an independent data storage and operating environment, multiple users' modifications to the module (such as UI layout adjustment) will not cause conflicts due to shared status, thereby reducing the communication cost of code merging.

[0067] Step 102: According to the preset merging rules, merge the at least two first editing operations generated by each target user in each twin module to obtain a target editing operation for the first component object; the component objects of the at least two first editing operations are the same and are the first component objects.

[0068] In an embodiment of the present invention, after creating a corresponding twin module for each target user, each target user can perform code editing in parallel in the twin module without interfering with each other, and record the code editing operation and editing operation information. The editing operation information may include information such as the operation type, operation object, timestamp, and executor (user ID of the target user). The code editing operation can be a fine-grained operation, such as a minimum editing operation, which may specifically include operations such as adding components, deleting components, and modifying component properties. The editing operation information can be used to indicate what operation the target user performed and when, providing a basis for subsequent merging and conflict resolution.

[0069] After each target user completes code editing, it is necessary to integrate the editing content of multiple users. After each target user completes editing each twin module, the code development platform can collect and obtain the code editing operations performed by each target user. If there are at least two code editing operations with the same operation object, the at least two code editing operations with the same operation object are determined as the first editing operation, and the operation object is determined as the first component object. For each first component object, according to the preset merging rules, at least two first editing operations for the first component object performed by each target user in the twin module corresponding to each target user are merged to obtain the target editing operation for the first component object. In other words, for multiple modifications of the same component object by each target user in each twin module, it is necessary to merge the operations for the component object to resolve the logical conflicts between multiple operations for the same component and obtain the merged result for the component object. This may involve merging methods such as conversion, accumulation or combination of multiple operations. Among them, at least two first editing operations can include the code editing operations performed by each target user, and the corresponding component objects are all code editing operations of the first component object. The first component object can be the same operation object corresponding to multiple code editing operations. If the operation objects corresponding to the multiple code editing operations are the same, the multiple code editing operations may be determined as the first editing operation, and the operation objects corresponding thereto may be determined as the first component object.

[0070] For example, assuming that the component object corresponding to code editing operation 1 is component 1, the component object corresponding to code editing operation 2 is component 1, the component object corresponding to code editing operation 3 is component 2, the component object corresponding to code editing operation 4 is component 1, and the component object corresponding to code editing operation 5 is component 2, then code editing operations 1, 2, and 4 can be determined as a group of first editing operations, and code editing operations 3 and 5 can be determined as a group of first editing operations. According to the preset merging rule, each group of first editing operations is merged to obtain the target editing operation for the first operation object corresponding to the first editing operation, that is, code editing operations 1, 2, and 4 are merged to obtain the target editing operation for component 1; code editing operations 3 and 5 are merged to obtain the target editing operation for component 2.

[0071] Through online collaboration at the granularity of business components, low-code development capabilities are visually implemented. This refined granularity makes the development process more intelligent and precise, effectively improving the sophistication of team collaboration.

[0072] Step 103: Based on the target editing operation and the second editing operation, the module to be arranged is updated to obtain a target module; the component object of the second editing operation is not the first component object and the second component objects of each second editing operation are different.

[0073] In an embodiment of the present invention, based on the target editing operation and the second editing operation, the module to be arranged is updated to obtain a target module that collects the editing results of multiple target users. Among them, the component object of the second editing operation is not the first component object and the second component objects of each second editing operation are different. Since the first editing operation is merged in advance to obtain the target editing operation for the first component object, the first component object corresponding to each target editing operation can be edited and updated directly based on each target editing operation. The component object of the second editing operation is not the first component object and the second component objects of each second editing operation are different. The second editing operation is the other code editing operation except the first editing operation among the multiple code editing operations performed by each target user on each twin module. In other words, the second editing operation is the only code editing operation that edits the second component object among the multiple code editing operations. Based on the second editing operation, the second component object corresponding to each second editing operation is edited and updated. After the corresponding execution of the target editing operation and the second editing operation, the edited target module can be obtained.

[0074] For example, assume that multiple target users perform four code editing operations on each twin module. The component object corresponding to code editing operation a is component 1, the component object corresponding to code editing operation b is component 1, the component object corresponding to code editing operation c is component 2, and the component object corresponding to code editing operation d is component 3. Then code editing operations a and b are the first editing operation, the first component object is component 1, code editing operation c is the second editing operation, the second component object is component 2, and code editing operation d is the second editing operation, the second component object is component 3.

[0075] To summarize, in an embodiment of the present invention, in response to a code development request from any target user, a twin module corresponding to the module to be orchestrated indicated by the code development request is created for the target user; the twin module is only for the target user to perform code editing; according to a preset merging rule, at least two first editing operations generated by each target user in each twin module are merged to obtain a target editing operation for the first component object; the component objects of at least two first editing operations are the same and are the first component objects; based on the target editing operation and the second editing operation, the module to be orchestrated is updated to obtain a target module; the component object of the second editing operation is not the first component object and the second component objects of each second editing operation are different. In this way, by assigning a twin module that is only for the target user to perform code editing, multiple target users can be allowed to participate in code editing at the same time without interfering with each other, thereby achieving high concurrent collaboration and improving code development efficiency to a certain extent. At the same time, by merging the first editing operation to obtain the target editing operation, and then based on the target editing operation and the second editing operation, the layout module is updated to obtain the target module. In the event of a conflict in the code logic, the merge can be performed according to the preset merging rules to maintain the rationality of at least two first editing operations, effectively reducing errors and duplication of work caused by version conflicts, thereby enhancing the reliability and stability of code development, and ensuring data consistency and code development quality.

[0076] Optionally, the embodiment of the present invention may further include the following steps:

[0077] Step 301: When the target user performs an add component operation in the twin module, record the component identifier of the newly added component object corresponding to the add component operation, the timestamp corresponding to the add component operation, and the target user identifier of the target user.

[0078] In an embodiment of the present invention, when the target user performs an add component operation in the twin module, the editing operation information corresponding to the add component operation is recorded, including the component identifier of the newly added component object, the timestamp corresponding to the add component operation, and the user identifier of the target user.

[0079] Step 302: Based on the component identifier of the newly added component object and the component information corresponding to the newly added component object, generate a target key-value pair corresponding to the newly added component object.

[0080] Step 303: Add the target key-value pair to the global object mapping table corresponding to the module to be arranged.

[0081] In an embodiment of the present invention, in a low-code platform, each module to be orchestrated maintains a data structure, a global object mapping table, for quickly finding and managing components. The global object mapping table stores the corresponding component identifiers and component information for each component object. In the global object mapping table, the component information corresponding to a component can be searched using its unique identifier, allowing the corresponding component object to be quickly located based on the component information.

[0082] During the code development process, all component objects created will generate a unique ID as the unique identifier of the component object instance. The ID corresponding to the component object is unique and non-repetitive. Object mapping is used to convert the structure into an object mapping, where the ID of the component object is used as the key and the component object itself is used as the value. In this way, the component object can be quickly found directly by ID without having to traverse the entire array each time. Then, according to the component schema, the properties of the component are traversed one by one to obtain the accurate set of modifications. The configuration data of each component usually has a pre-defined schema during code development to describe the configuration and properties of the component object. The schema defines the structure of the component object, including the component type, properties, sub-components, etc., and specifies the data type, default value, optional value, etc. of each property.

[0083] When the target user performs the add component operation in the twin module, a target key-value pair corresponding to the newly added component object will be generated based on the component identifier of the newly added component object and the component information corresponding to the newly added component object. Specifically, the component identifier of the newly added component object can be used as the key, and the component information can be used as the value. The component information can include the newly added component object itself, specifically including component location information, component type information, component attribute information, subcomponent information, metadata, etc.

[0084] Add the target key-value pair to the global object mapping table corresponding to the module to be orchestrated.

[0085] In the embodiment of the present invention, by maintaining a global object mapping table, it is possible to avoid traversing the entire component tree when editing and updating the module to be arranged, and to locate the component object that needs to be edited more quickly.

[0086] Optionally, step 102 may include the following steps:

[0087] Step 401: If the at least two first editing operations are to change all the content of the same component attribute of the first component object, then based on the timestamps of the at least two first editing operations, the first editing operation with the latest timestamp is determined as the target compilation operation for the first component object.

[0088] In an embodiment of the present invention, if at least two first editing operations are to change all the contents of the same component attribute of the first component object, then the editing operation submitted later in the at least two editing operations may overwrite the previous editing operation. Therefore, it is necessary to adopt a first conflict resolution strategy to merge the at least two first editing operations. The first conflict resolution strategy is: obtain the timestamps or version numbers of at least two first editing operations, and determine the first editing operation with the latest timestamp or the latest version number as the target editing operation for the first component object. Among them, changing all the contents of the same component attribute of the first component object refers to making an overall overwriting and replacement modification to the same component attribute.

[0089] For example, user A changes the color attribute of the first component object from "red" to "blue"; user B changes the color attribute of the first component object from "red" to "green". If the operation timestamp of user B is later than that of user A, the target editing operation is determined to be editing the color attribute of the first component object to "green".

[0090] Step 402: If the at least two first editing operations are partial content changes to the same component attribute of the first component object, then according to the timestamp order of the at least two first editing operations, the current first editing operation is equivalently converted based on the first editing result of the previous first editing operation to obtain the target editing operation for the first component object.

[0091] In an embodiment of the present invention, if at least two first editing operations are partial content changes to the same component property of a first component object, a second conflict resolution strategy may be used to merge the at least two first editing operations. The second conflict resolution strategy may be to convert concurrent operations into an equivalent and mergeable sequence of operations to ensure consistency in the merged results. Specifically, the second conflict resolution strategy may be to perform an equivalent conversion on the current first editing operation based on the first editing result of the previous first editing operation in the order of the timestamps of the at least two first editing operations until the conversion of the last first editing operation is completed. The converted first editing operations are then determined as target editing operations for the first component object in the order of the original timestamps.

[0092] For example, assume that user A and user B edit the same first component object, such as a document object, at the same time:

[0093] Initial document object: "hello"

[0094] User A's first editing operation is to insert 'a' at position 1, expressed as insert(1,'a'), and the result is "haello". User B's first editing operation is to insert 'b' at position 1, expressed as insert(1,'b'), and the result is "hbello".

[0095] To ensure a consistent final result, user B's operation can be adjusted according to the second conflict resolution strategy: the adjusted first editing operation of user B, i.e., the target editing operation, can be: insert(2,'b'), which inserts 'b' at position 2. Accordingly, when editing based on the target editing operation, user A's operation is applied first in the original timestamp order: "hello" -> "haello", and then the adjusted operation of user B: "haello" -> "habello" is applied. The final result of editing the document object based on the target editing operation can be: "habello".

[0096] Step 403: If the at least two first editing operations are changes to different component attributes of the first component object, the at least two first editing operations are combined to determine a target editing operation for the first component object.

[0097] In an embodiment of the present invention, if at least two first editing operations respectively change different component attributes of a first component object—that is, although at least two first editing operations both edit the first component object, they change different component attributes of the first component object, for example, changing the color attribute and the size attribute of the first component object—the at least two first editing operations can be combined to determine a target editing operation for the first component object. The at least two first editing operations are sequentially concatenated based on the timestamps of the at least two first editing operations to obtain the target editing operation for the first component object. For example, assuming that the first editing operation performed by user A is to change the color attribute of the first component object from "red" to "blue," and the first editing operation performed by user B is to change the size attribute of the first component object from "small" to "large," the two first editing operations can be combined to obtain a target editing operation: first, executing the operation to change the color attribute of the first component object from "red" to "blue," and then executing the operation to change the size attribute of the first component object from "small" to "large."

[0098] In an embodiment of the present invention, for the first editing operation on the same first component object, different conflict resolution strategies are selected according to the types of different first editing operations, and at least two first editing operations are merged, which can enable collaborative development to have both high agility (reducing code merging blockage) and high reliability (correct code logic), and automatically improve code editing efficiency while ensuring the correctness of code logic.

[0099] Optionally, step 103 may include the following steps:

[0100] Step 501: Based on a global object mapping table, determine the second component information corresponding to each of the second editing operations and the first component information corresponding to each of the target editing operations.

[0101] In an embodiment of the present invention, since the global object mapping table maintains the correspondence between the component identification of each component object and the original component information, the second component information of the second component object corresponding to each second editing operation and the first component information of the first component object corresponding to each target editing operation can be obtained based on the global object mapping table. The first component information and the second component information can be the unmodified component information corresponding to the first component object and the second component object in the module to be arranged. Exemplarily, for any second editing operation, based on the component identification of the second component object corresponding to the second editing operation, the component information corresponding to the component identification can be searched in the global object mapping table as the second component information corresponding to the second editing operation. For any target editing operation, based on the component identification of the first component object corresponding to the target editing operation, the component information corresponding to the component identification can be searched in the global object mapping table as the first component information corresponding to the target editing operation.

[0102] Step 502: For any second editing operation, based on the second component information corresponding to the second editing operation, perform the second editing operation on the second component object corresponding to the second editing operation.

[0103] In an embodiment of the present invention, for any second edit operation, the second edit operation is performed on the second component object corresponding to the second edit operation based on the second component information corresponding to the second edit operation. For example, if the second edit operation is to change the shape of the second component object from a square to a circle, then based on the second component information, an edit of the second component object is triggered, and the shape attribute of the second component object in the global object mapping table can be changed from a square to a circle.

[0104] Step 503: For any of the target editing operations, based on the first component information corresponding to the target editing operation, perform the target editing operation on the first component object corresponding to the target editing operation.

[0105] In an embodiment of the present invention, for any target editing operation, based on the first component information corresponding to the target editing operation, the target editing operation is performed on the first component object corresponding to the target editing operation. Exemplarily, the target editing operation is to change the shape of the first component object from a square to a circle, and to change the color of the first component object from blue to green. Then, based on the first component information, an edit of the first component object is triggered, and the shape attribute of the first component object in the global object mapping table can be changed from a square to a circle, and the color attribute can be changed from blue to green.

[0106] Step 504: When the target editing operation and the second editing operation are both completed, determine the target module.

[0107] In an embodiment of the present invention, after both the target edit operation and the second edit operation are executed, i.e., after both the target edit operation and the second edit operation are merged into the module to be organized, the module to be organized after the merged operations can be determined as the target module. For example, based on the modified global object mapping table, the data can be converted into JSON format and saved to a page configuration file. Based on the page configuration file, the module to be organized is updated to obtain the target module.

[0108] In an embodiment of the present invention, by obtaining the second component information and the first component information, performing the second editing operation based on the second component information, and performing the target editing operation based on the first component information, the merging and synchronization of code editing operations can be completed quickly, thereby improving the efficiency of component editing.

[0109] In one possible implementation, after all twin modules are merged and conflicts resolved, the system verifies the consistency and correctness of the final state of the target module. This includes checking that page layout, component properties, and data bindings are merged as expected and that no data inconsistencies or conflicts arise. Performance and functionality testing is performed on the target module to ensure that page loading speed, interactive responsiveness, business logic, and other aspects meet design requirements and that no new errors or issues arise. The merged target module is marked as a new version, and version control information is updated. This includes recording information such as the version number, update date, modified content, and contributors for subsequent tracking and auditing. The updated target module is deployed to the low-code platform's production environment to ensure that all users have access to the latest version of the design. Depending on the platform's architecture and configuration, the deployment process may involve steps such as code building, packaging, and publishing to the server. Furthermore, all target users and relevant personnel involved in code editing can be notified and reminded to verify and validate the target module. This ensures that all relevant personnel are satisfied with the updated target module and are ready to use it in real-world business scenarios. For a period of time after deployment, the updated target module is monitored to collect user feedback and potential issues. This helps to promptly identify and resolve potential defects or errors, ensuring the stability and reliability of the target module. Completing the merge and upgrade of modules is a key step in the collaborative editing process of the low-code platform. Through steps such as final status verification, performance testing, version control updates, deployment and release, it can be ensured that the updated target module not only includes the editing results of all participating target users, but also meets business needs and user expectations. At the same time, through monitoring and feedback collection, the performance and functionality of the target module can be continuously optimized to improve user experience and satisfaction.

[0110] For example, Figure 2 A flowchart of the specific steps of code editing is shown as follows: Figure 2As shown, for the module to be arranged, that is, the low-code module M, different participants (1, 2...N) need to edit the code of the low-code module M. Therefore, for any participant, the operation authority of the participant is verified. When the participant has the operation authority, the master module corresponding to the pre-edited low-code module M is generated as a twin module based on the user identification, date and other information with unique marking of the participant. The participant will edit the module in the twin module (twin interface) and record each code editing operation in the editing history. The code editing operation and editing operation information edited by each participant will be submitted to the server. The server will perform module merging according to the preset merging rules, complete the module merging and version upgrading, obtain the target module, upgrade the module version number, and push the target module to the client. The present invention provides powerful version management and real-time collaboration support for the development team through the organic collaboration of the twin editing module (creating twin modules), the collaborative merging module (performing code merging and synchronization) and the version upgrading module. This design not only ensures the stability of the development process, but also effectively reduces development delays and errors caused by version conflicts.

[0111] Figure 3 This is a schematic diagram of the structure of a code development device provided by an embodiment of the present invention. Figure 3 As shown, the device may specifically include:

[0112] The first creation module 601 is configured to respond to a code development request from any target user and create a twin module corresponding to the module to be orchestrated indicated in the code development request for the target user; the twin module is only for the target user to edit the code;

[0113] A first merging module 602 is configured to merge at least two first editing operations generated by each target user in each twin module according to a preset merging rule to obtain a target editing operation for a first component object; the component objects of the at least two first editing operations are the same and are the first component object;

[0114] The first updating module 603 is configured to update the module to be arranged based on the target editing operation and a second editing operation to obtain a target module; the component object of the second editing operation is not the first component object and the second component objects of each second editing operation are different.

[0115] Optionally, the first creation module 601 includes:

[0116] A first creation submodule is configured to create a module copy corresponding to the module to be arranged based on a user identifier corresponding to the target user, a request sending date corresponding to the code development request, and the module to be arranged;

[0117] The first setting module is used to set an independent data storage space and an independent operating environment for the module copy to obtain the twin module.

[0118] Optionally, the device further comprises:

[0119] A first recording module is configured to record, when the target user performs an add component operation in the twin module, a component identifier of a newly added component object corresponding to the add component operation, a timestamp corresponding to the add component operation, and a target user identifier of the target user;

[0120] A first generating module, configured to generate a target key-value pair corresponding to the newly added component object based on the component identifier of the newly added component object and the component information corresponding to the newly added component object;

[0121] The first adding module is configured to add the target key-value pair to the global object mapping table corresponding to the module to be arranged.

[0122] Optionally, the first updating module 603 includes:

[0123] A first determining module, configured to determine, based on a global object mapping table, second component information corresponding to each of the second editing operations and first component information corresponding to each of the target editing operations;

[0124] a first execution module, configured to, for any second editing operation, execute the second editing operation on the second component object corresponding to the second editing operation based on the second component information corresponding to the second editing operation;

[0125] A second execution module is configured to, for any target editing operation, execute the target editing operation on the first component object corresponding to the target editing operation based on the first component information corresponding to the target editing operation;

[0126] The second determining module is configured to determine the target module when both the target editing operation and the second editing operation are completed.

[0127] Optionally, the first merging module 602 includes:

[0128] The third determination module is used to determine the first editing operation with the latest timestamp as the target compilation operation for the first component object based on the timestamps of the at least two first editing operations if the at least two first editing operations are to change the entire content of the same component attribute of the first component object.

[0129] Optionally, the first merging module 602 includes:

[0130] The first conversion module is used to perform equivalent conversion on the current first editing operation based on the first editing result of the previous first editing operation in accordance with the timestamp order of the at least two first editing operations if the at least two first editing operations are partial content changes on the same component attribute of the first component object, so as to obtain a target editing operation for the first component object.

[0131] Optionally, the first merging module 602 includes:

[0132] The fourth determining module is configured to combine the at least two first editing operations to determine a target editing operation for the first component object if the at least two first editing operations are changes to different component attributes of the first component object respectively.

[0133] The present invention also provides an electronic device, see Figure 4 , including: a processor 701, a memory 702, and a computer program 7021 stored in the memory and executable on the processor, wherein the processor implements the code development method of the aforementioned embodiment when executing the program.

[0134] The present invention also provides a readable storage medium, which, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to execute the code development method of the aforementioned embodiment.

[0135] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0136] The algorithm and display provided herein are not inherently related to any particular computer, virtual system or other device. Various general-purpose systems can also be used together with the teachings based on this. According to the above description, it is obvious that the structure required for constructing this type of system. In addition, the present invention is not directed to any specific programming language. It should be understood that various programming languages can be utilized to realize the content of the present invention described herein, and the above description of specific languages is for the purpose of disclosing the best mode of the present invention.

[0137] In the description provided herein, numerous specific details are described. However, it is understood that embodiments of the present invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques are not shown in detail so as not to obscure the understanding of this description.

[0138] Similarly, it should be understood that in order to streamline the present invention and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as reflected in the claims below, inventive aspects lie in less than all the features of the individual embodiments disclosed above. Accordingly, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of the present invention.

[0139] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition may be divided into a plurality of submodules or subunits or subcomponents. All features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed herein may be combined in any combination, except that at least some of such features and / or processes or units are mutually exclusive. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.

[0140] The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It will be appreciated by those skilled in the art that a microprocessor or digital signal processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components of the sorting device according to the present invention. The present invention may also be implemented as an apparatus or device program for performing a portion or all of the methods described herein. Such a program for implementing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.

[0141] It should be noted that the above embodiments illustrate rather than limit the invention, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between brackets should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising several different elements and by means of appropriately programmed computers. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third etc. does not indicate any order. These words may be interpreted as names.

[0142] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0143] It should be noted that all actions of acquiring signals, information or data in this application are carried out in compliance with the relevant data protection laws and policies of the country where they are located and with the authorization given by the owner of the corresponding device.

[0144] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

[0145] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.

Claims

1. A code development method, characterized in that: The method comprises: In response to a code development request from any target user, a twin module corresponding to the module to be orchestrated indicated in the code development request is created for the target user; the twin module is only for the target user to edit the code; Merge at least two first editing operations generated by each target user in each twin module according to a preset merging rule to obtain a target editing operation for a first component object; the component objects of the at least two first editing operations are the same and are the first component object; Based on the target editing operation and the second editing operation, the module to be arranged is updated to obtain a target module; the component object of the second editing operation is not the first component object and the second component objects of each second editing operation are different.

2. The method according to claim 1, characterized in that The step of creating a twin module corresponding to the module to be orchestrated indicated by the code development request for the target user includes: Creating a module copy corresponding to the module to be arranged based on the user identifier corresponding to the target user, the request sending date corresponding to the code development request, and the module to be arranged; An independent data storage space and an independent operating environment are set for the module copy to obtain the twin module.

3. The method according to claim 1, characterized in that The method further comprises: When the target user performs an add component operation in the twin module, the component identifier of the newly added component object corresponding to the add component operation, the timestamp corresponding to the add component operation, and the target user identifier of the target user are recorded; Based on the component identifier of the newly added component object and the component information corresponding to the newly added component object, generating a target key-value pair corresponding to the newly added component object; Add the target key-value pair to the global object mapping table corresponding to the module to be arranged.

4. The method according to claim 1, wherein The updating of the module to be arranged based on the target editing operation and the second editing operation to obtain a target module includes: Determining, based on a global object mapping table, second component information corresponding to each of the second editing operations and first component information corresponding to each of the target editing operations; For any of the second editing operations, based on the second component information corresponding to the second editing operation, perform the second editing operation on the second component object corresponding to the second editing operation; For any of the target editing operations, based on the first component information corresponding to the target editing operation, perform the target editing operation on the first component object corresponding to the target editing operation; When the target editing operation and the second editing operation are both completed, the target module is determined.

5. The method according to claim 1, wherein The step of merging at least two first editing operations generated by each target user in each twin module according to a preset merging rule to obtain a target editing operation for the first component object includes: If the at least two first editing operations are changes to all content of the same component attribute of the first component object, then based on the timestamps of the at least two first editing operations, the first editing operation with the latest timestamp is determined as the target compilation operation for the first component object.

6. The method according to claim 1, characterized in that The step of merging at least two first editing operations generated by each target user in each twin module according to a preset merging rule to obtain a target editing operation for the first component object includes: If the at least two first editing operations are partial content changes to the same component attribute of the first component object, then the current first editing operation is equivalently converted based on the first editing result of the previous first editing operation in the timestamp order of the at least two first editing operations to obtain the target editing operation for the first component object.

7. The method according to claim 1, characterized in that The step of merging at least two first editing operations generated by each target user in each twin module according to a preset merging rule to obtain a target editing operation for the first component object includes: If the at least two first editing operations are changes to different component attributes of the first component object respectively, the at least two first editing operations are combined to determine a target editing operation for the first component object.

8. A code development device, characterized in that: The device comprises: A first creation module is configured to, in response to a code development request from any target user, create for the target user a twin module corresponding to the module to be orchestrated indicated in the code development request; the twin module is only for the target user to perform code editing; A first merging module is configured to merge at least two first editing operations generated by each target user in each twin module according to a preset merging rule to obtain a target editing operation for a first component object; the component objects of the at least two first editing operations are the same and are the first component object; A first updating module is configured to update the module to be arranged based on the target editing operation and a second editing operation to obtain a target module; the component object of the second editing operation is not the first component object and the second component objects of each second editing operation are different.

9. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the code development method according to any one of claims 1 to 7 when executing the program.

10. A readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the code development method according to any one of claims 1 to 7.