Code development method and related device
By automatically comparing and merging differing code, the problem of low development efficiency caused by changes in business models in low-code development platforms is solved, achieving efficient processing and merging of differing code and improving development efficiency.
Patent Information
- Application Number
- PCT/CN2025/070489
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-08-30
- Filing Date
- 2025-01-03
- Publication Date
- 2026-03-05
AI Technical Summary
In low-code development platforms, developers need to manually compare and copy code differences after modifying business models, resulting in low development efficiency. Furthermore, existing metadata synchronization solutions cannot reflect changes in the relationships between business models, increasing learning costs and workload.
This paper provides a code development method that automatically compares updated metadata with user-selected code, identifies and merges differing code, and leverages the code generation capabilities of low-code platforms to achieve automated difference code processing and merging.
It improved development efficiency, reduced the need for manual comparison and merging of differing code, and fully utilized the code generation capabilities of the low-code platform to achieve positive iterative development.
Smart Images

Figure CN2025070489_05032026_PF_FP_ABST
Abstract
Description
A code development method and related equipment
[0001] This application claims priority to Chinese Patent Application No. 202411216878.9, filed with the State Intellectual Property Office of China on August 30, 2024, entitled "A Code Development Method and Related Equipment", the entire contents of which are incorporated herein by reference. Technical Field
[0002] This application relates to the field of code development technology, and in particular to a code development method, a code development platform, a computing device cluster, a computer-readable storage medium, and a computer program product. Background Technology
[0003] Traditional software development methods require extensive coding and specialized knowledge, limiting the participation of many non-technical individuals in application development and making application development cycles exceptionally lengthy. To improve development efficiency, the industry has introduced low-code development technology. Low-code development simplifies the development process through a visual approach, reducing reliance on traditional manual coding. Even non-technical developers can participate in application building, significantly shortening development time, accelerating development cycles and product delivery, thus becoming an important tool in digital transformation.
[0004] Low-code development platforms can provide users (such as developers) with a visual interface. Users can perform business modeling through the visual interface. The low-code development platform generates basic and simple logic code based on the modeling results, such as code for adding, deleting, modifying, and querying data. However, developers still need to manually write complex business logic code.
[0005] When developing code using a low-code platform, there may be situations where, after generating the project code, further development requires modifying the business model. If the developer modifies the business model and regenerates the project code, they need to manually compare the differences between the two generated codes and manually copy the differences, reducing development efficiency. Summary of the Invention
[0006] This application provides a code development method that can automatically compare metadata differences and automatically identify differing codes based on the comparison results, eliminating the need for manual comparison. Furthermore, it can utilize code merging capabilities to merge differing codes into existing code, improving development efficiency. This application also provides a code development platform, computing device cluster, computer-readable storage medium, and computer program product corresponding to the above method.
[0007] Firstly, this application provides a code development method. This method can be applied to a code development platform. The code development platform can be the aforementioned low-code development platform. The code development platform can be a software system, which can be a standalone software system or software integrated into other software systems, such as a plugin, component, or applet. The software system can be deployed in a computing device cluster, and the computing device cluster executes the program code of the software system, thereby executing the code development method of this application. In some examples, the code development platform can also be a hardware system, such as a computing device cluster with low-code development capabilities, which executes the code development method of this application when it runs.
[0008] Specifically, the code development platform can receive user updates to the business model and obtain the updated business model. This update information is used to add, delete, or modify business objects, or modify their relationships; or to add, delete, or modify data transfer objects; or to add, delete, or modify enumeration classes. The code development platform then generates first metadata based on the updated business model. The first metadata includes a file serialized from the updated business model. Next, the code development platform compares the first metadata with the second metadata of the second code selected by the user, obtaining a metadata difference comparison result. The code development platform can then generate first code based on the first metadata. Based on the metadata difference comparison result, the code development platform compares the first code and the second code to obtain a difference code, which includes the difference code resulting from the updated business model. Finally, the code development platform processes the second code based on the difference code to obtain the processed code.
[0009] This method can automatically compare the metadata generated after updating the business model with the metadata of the code selected by the user. Based on the comparison results, it automatically identifies the code differences before and after the metadata update, eliminating the need for manual comparison. Furthermore, it can automatically merge the differing code into existing code (e.g., the user-selected baseline branch code) based on code merging capabilities, improving development efficiency. This method fully utilizes the code generation capabilities of low-code development platforms, enabling positive iterative development on low-code platforms.
[0010] In some possible implementations, the code development platform can identify the type of the target file to which the differing code belongs. When the target file is of a type that cannot be modified, the code development platform can perform operations such as adding, deleting, or replacing the target file on the second code to obtain the processed code.
[0011] This method improves code processing efficiency by identifying the type of target file to which the difference code belongs, and then adding, deleting, or replacing file-level code in the target file when the type is prohibited from modification.
[0012] In some possible implementations, the code development platform can identify the type of the target file to which the differing code belongs. When the target file type is modifiable (or extensible), the code development platform can perform operations such as adding, deleting, or replacing target methods on the second code to obtain the processed code.
[0013] This method improves the accuracy of code processing by identifying the type of the target file to which the difference code belongs, and by adding, deleting or replacing the method-level code of the target method when the type allows modification.
[0014] In some possible implementations, the target method includes either a first method to be added or a second method to be modified. Accordingly, when adding, deleting, or replacing the target method in the second code, the code development platform can add the target method's method signature and an empty method body to the second code; alternatively, the code development platform can modify the target method's method signature in the second code. This can improve the efficiency of difference code processing while ensuring its accuracy.
[0015] In some possible implementations, when the code development platform compares the first metadata with the second metadata of the second code selected by the user to obtain the metadata difference comparison result, it can obtain the directory structure of the first metadata and the directory structure of the second metadata of the second code selected by the user. Then, the code development platform can compare the directory structure of the first metadata with the target structure of the second metadata to obtain the metadata difference comparison result.
[0016] This method can achieve efficient comparison of metadata differences through simple directory structure comparison, laying the foundation for subsequent identification and processing of difference codes.
[0017] In some possible implementations, when the code development platform compares the first code and the second code based on the metadata difference comparison results to obtain the difference code between the first code and the second code, it can first determine the directory type of the first or second metadata. Then, based on the metadata difference comparison results, it compares the first code and the second code using a difference code processor corresponding to the directory type to obtain the difference code between the first code and the second code. The difference code processor includes at least one of a single-module difference code processor, a dual-module difference code processor, a Domain-Driven Design (DDD) aggregate root difference code processor, or a DDD non-aggregate root difference code processor.
[0018] This method identifies difference codes by determining the difference code processor corresponding to the directory type based on metadata, thereby improving the efficiency and accuracy of difference code identification.
[0019] In some possible implementations, the code development platform can also push the processed code to a remote branch, so that developers can directly download the processed code from the remote branch for further development, thereby improving development efficiency.
[0020] In some possible implementations, the code development platform can push the differencing code, along with the first and second codes, to a remote branch. The second code can then be processed on the remote branch to obtain the processed code. This method, by providing a full push option that pushes all code in the code repository, achieves version control, and by processing the code on the remote branch, it reduces platform-side resource consumption.
[0021] Secondly, this application provides a code development platform. The code development platform includes:
[0022] The business modeling module is used to receive update information from users on the business model and obtain the updated business model. The update information is used to add business objects, delete business objects, modify business objects, modify the association relationships of business objects; or to add, delete or modify data transmission objects; or to add, delete or modify enumeration classes.
[0023] The business modeling module is further configured to generate first metadata based on the updated business model, the first metadata including a file formed by serializing the updated business model;
[0024] The metadata difference comparison module is used to compare the first metadata with the second metadata of the second code selected by the user to obtain the metadata difference comparison result.
[0025] The code generation module is used to generate first code based on the first metadata;
[0026] The difference code processing module is used to compare the first code and the second code according to the metadata difference comparison result, and obtain the difference code between the first code and the second code, wherein the difference code includes the difference code caused by updating the business model;
[0027] The difference code processing module is further configured to process the second code according to the difference code to obtain the processed code.
[0028] In some possible implementations, the difference code processing module is specifically used for:
[0029] Identify the type of target file to which the difference code belongs;
[0030] When the target file is of type "cannot be modified", the second code is subjected to operations of adding, deleting or replacing the target file to obtain the processed code.
[0031] In some possible implementations, the difference code processing module is specifically used for:
[0032] Identify the type of target file to which the difference code belongs;
[0033] When the target file is of a type that allows modification, the second code is subjected to operations such as adding, deleting, or replacing the target method to obtain the processed code.
[0034] In some possible implementations, the target method includes a first method to be added or a second method to be modified;
[0035] The difference code processing module is specifically used for:
[0036] Add the method signature of the target method and an empty method body to the second code; or,
[0037] In the second code, modify the method signature of the target method.
[0038] In some possible implementations, the metadata difference comparison module is specifically used for:
[0039] Obtain the directory structure of the first metadata, and obtain the directory structure of the second metadata of the second code selected by the user;
[0040] Compare the directory structure of the first metadata with the target structure of the second metadata to obtain the metadata difference comparison results.
[0041] In some possible implementations, the difference code processing module is specifically used for:
[0042] Determine the directory type of the first metadata or the second metadata;
[0043] Based on the metadata difference comparison results, the difference code between the first code and the second code is obtained by comparing the first code and the second code with the difference code processor corresponding to the directory type;
[0044] The difference code processor includes at least one of a single-module difference code processor, a dual-module difference code processor, a Domain-Driven Design (DDD) aggregated root difference code processor, or a DDD non-aggregated root difference code processor.
[0045] In some possible implementations, the code development platform also includes:
[0046] The code push module is used to push the processed code to a remote branch.
[0047] In some possible implementations, the code development platform also includes:
[0048] The code push module is used to push the difference code, the first code, and the second code to a remote branch;
[0049] The difference code processing module is specifically used for:
[0050] The second code is processed in the remote branch to obtain the processed code.
[0051] Thirdly, this application provides a computing device cluster. The computing device cluster includes at least one computing device, and the at least one computing device includes at least one processor and at least one memory. The at least one processor and the at least one memory communicate with each other. The at least one processor is used to execute instructions stored in the at least one memory to cause the computing device or the computing device cluster to perform the code development method as described in the first aspect or any implementation thereof.
[0052] Fourthly, this application provides a computer-readable storage medium storing instructions that instruct a computing device or a cluster of computing devices to execute the code development method described in the first aspect or any implementation thereof.
[0053] Fifthly, this application provides a computer program product containing instructions that, when run on a computing device or a cluster of computing devices, causes the computing device or cluster of computing devices to execute the code development method described in the first aspect or any implementation thereof.
[0054] Based on the implementation methods provided in the above aspects, this application can be further combined to provide more implementation methods. Attached Figure Description
[0055] To more clearly illustrate the technical methods of this application, the accompanying drawings used will be briefly described below.
[0056] Figure 1 is a schematic diagram of the architecture of a code development platform provided in this application;
[0057] Figure 2 is a schematic diagram of the display interface of metadata difference comparison results provided in this application;
[0058] Figure 3 is a flowchart of a code development method provided in this application;
[0059] Figure 4 is a schematic diagram of a differential code processing method provided in this application;
[0060] Figure 5 is a schematic diagram of a code push process provided in this application;
[0061] Figure 6 is a flowchart illustrating a code development method provided in this application;
[0062] Figure 7 is a schematic diagram of the structure of a computing device provided in this application;
[0063] Figure 8 is a schematic diagram of the structure of a computing device cluster provided in this application;
[0064] Figure 9 is a schematic diagram of another computing device cluster provided in this application;
[0065] Figure 10 is a schematic diagram of another computing device cluster provided in this application. Detailed Implementation
[0066] The terms "first" and "second" used in the embodiments of this application are for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined with "first" and "second" may explicitly or implicitly include one or more of that feature.
[0067] First, some technical terms involved in the embodiments of this application will be introduced.
[0068] Low-code development is a visual software development methodology that allows developers to create and deploy applications with less coding effort. Code development platforms that utilize this technology are called low-code development platforms or simply low-code platforms. A low-code development platform is a software platform that facilitates application generation. It provides a visual interface for users to model applications and generates corresponding program code based on the modeling results. Low-code development platforms are mainly divided into two categories: zero-code platforms and high-code platforms. Zero-code platforms can generate end-to-end, directly executable application code, while high-code platforms still require developers to perform some manual coding before they can be applied to a production environment.
[0069] In code development, version control is achieved through branching. A branch is essentially an independent development line. Developers can use branches to isolate their work from that of other team members when working on new features or fixing bugs. Branches can form a tree-like structure, also known as trees, streams, or codelines. The original version is called the parent branch or upstream branch. Copies branched off are called child branches. After branching, it's possible to merge the branches back into the parent branch. A common use case is merging changes back into the trunk, which can be either the parent branch or a non-parent branch.
[0070] Currently, developers typically use the visual interface provided by low-code development platforms for business modeling. The low-code platform generates basic, simple logic code based on the modeling results, such as code for CRUD operations (creating, deleting, modifying, and querying data). Developers then manually write the more complex business logic code. During development, there may be situations where, after generating the project code (such as simple CRUD logic code), it's necessary to go back and modify the business model. If the developer modifies the business model and regenerates the project code, they need to manually compare the differences between the two generated codes and manually copy the differences, reducing development efficiency.
[0071] Related technologies provide a capability for bidirectional metadata synchronization. Developers can add, modify, or delete metadata during development using specific annotations. After development is complete, this metadata is reported to the low-code development platform and merged with the metadata on the low-code platform to form the final metadata. However, the annotations provided by the above solution can only add, modify, or delete the metadata itself; they cannot reflect changes in the relationships between business models, thus failing to achieve linked metadata processing. Developers still need to manually write the code corresponding to the incremental model, and development efficiency still cannot meet business needs. Moreover, the above solution requires developers to learn and understand a custom annotation language, increasing the learning cost, and they need to add annotations to the newly added code, further increasing workload and development costs.
[0072] In view of this, this application provides a code development method. This method can be applied to a code development platform. The code development platform can be the aforementioned low-code development platform. The code development platform can be a software system, which can be a standalone software system or software integrated into other software systems, such as a plugin, component, or applet. The software system can be deployed in a computing device cluster, and the computing device cluster executes the program code of the software system, thereby executing the code development method of this application. In some examples, the code development platform can also be a hardware system, such as a computing device cluster with low-code development capabilities, which executes the code development method of this application when it runs.
[0073] Specifically, the code development platform receives user updates to the business model and obtains the updated business model. This update information is used to add, delete, or modify business objects, change their relationships, or to add, delete, or modify Data Transfer Objects (DTOs) or enumeration classes. The code development platform can generate first metadata based on the updated business model, which includes a file serialized from the updated business model. Then, the platform compares the first metadata with the second metadata of the user-selected second code (e.g., baseline branch code) to obtain a metadata difference comparison result, and generates first code based on the first metadata. The platform can then compare the first and second codes based on the metadata difference comparison result to obtain difference codes between them. These difference codes include those resulting from the updated business model. Finally, the platform processes the second code based on these difference codes to obtain processed code.
[0074] This method can automatically compare the metadata generated after updating the business model with the metadata of the code selected by the user. Based on the comparison results, it automatically identifies the code differences before and after the metadata update, eliminating the need for manual comparison. Furthermore, it can automatically merge the differing code into existing code (e.g., the user-selected baseline branch code) based on code merging capabilities, improving development efficiency. This method fully utilizes the code generation capabilities of low-code development platforms, enabling positive iterative development on low-code platforms.
[0075] To make the technical solution of this application clearer and easier to understand, the system architecture of the code development platform is described below with reference to the accompanying drawings.
[0076] Referring to Figure 1, which shows a schematic diagram of the architecture of a code development platform, the code development platform 10 includes a business modeling module 102, a metadata difference comparison module 104, a code generation module 106, and a difference code processing module 108. The business modeling module 102 and the code generation module 106 can be inherent modules of the code development platform 10, while the metadata difference comparison module 104 and the difference code processing module 108 can be newly added modules to achieve metadata comparison and difference code processing. Furthermore, the code development platform 10 may also include a code push module 109. The above functional modules are described in detail below.
[0077] The business modeling module 102 receives user updates to the business model and obtains the updated business model. The update information is used to add, delete, or modify business objects, change the relationships between business objects, or add, delete, or modify data transmission objects, or add, delete, or modify enumeration classes. The business modeling module 102 also generates first metadata based on the updated business model. The first metadata includes a file serialized from the updated business model.
[0078] The metadata difference comparison module 104 is used to compare the first metadata with the second metadata of the second code selected by the user to obtain a metadata difference comparison result. The second code can be the baseline branch code selected by the user. Specifically, the metadata difference comparison module 104 can obtain the directory structure of the first metadata and the directory structure of the second metadata of the second code selected by the user, and then compare the directory structures of the first metadata and the second metadata to obtain a metadata difference comparison result. In order to achieve metadata comparison, it is usually required that the directory types of the metadata involved in the comparison are consistent. For example, the directory types of the first metadata and the second metadata can both be single-module type, dual-module type, domain-driven design (DDD) aggregate root type, or DDD non-aggregate root type.
[0079] The metadata difference comparison module 104 can also visually display the metadata difference comparison results for users to view. Referring to Figure 2, which shows a schematic diagram of a metadata difference comparison result display interface, the display interface 200 uses a tree-like directory to show the differences between the first metadata 202 generated by the updated business model and the second metadata 204 corresponding to the baseline branch code. For newly added, deleted, or modified metadata, different fonts, colors, or markers can be used to display them, allowing modelers to quickly perceive the changes in the modeling process. For example, deleted metadata can be marked with a strikethrough, and modified and newly added metadata can be marked with different colors. In this example, the Role was deleted and the UserGroup was added in the business object BO; the Address was modified in AbstractBo.
[0080] The code generation module 106 is used to generate first code based on the first metadata. Specifically, the code generation module 106 provides code generation capabilities, which can be implemented through artificial intelligence (AI), such as through machine learning (ML) or deep learning (DL). The code generation module 106 can use the code generation capabilities to generate the first code corresponding to the first metadata.
[0081] The difference code processing module 108 is used to compare the first code and the second code based on the metadata difference comparison results to obtain the difference code between the first code and the second code. The difference code includes the difference code caused by updating the business model. The difference code processing module 108 is also used to process the second code based on the difference code to obtain the processed code.
[0082] In some possible implementations, the difference code processing module 108 is used to determine the directory type of the first metadata or the second metadata. For example, the directory type of the first metadata or the second metadata can be a single-module type, a dual-module type, a DDD aggregate root type, or a DDD non-aggregate root type. The difference code processing module 108 is also used to obtain the difference code between the first code and the second code by comparing the first code and the second code with the difference code processor corresponding to the directory type, based on the metadata difference comparison result. The difference code processing module 108 can use the aforementioned difference code processor to perform file-level and method-level comparisons to obtain the difference code. The difference code can include at least one of file-level difference code or method-level difference code. For example, the difference code can include the file and / or method that needs to be modified.
[0083] When processing the user-selected second code based on the difference code, the difference code processing module 108 can also identify the type of the target file to which the difference code belongs, and adopt the processing method corresponding to that type of target file. For example, when the target file type is "prohibited from modification," the difference code processing module 108 can perform operations such as adding, deleting, or replacing the target file in the second code to obtain the processed code. As another example, when the target file type is "allowed to modify" (or "allowed to extend"), the difference code processing module 108 can perform operations such as adding, deleting, or replacing the target method in the second code to obtain the processed code.
[0084] The code push module 109 is used to push the processed code to a remote branch. The remote branch can be a code branch in a remote repository. This code branch can be a target branch specified by the user. This allows for a non-full push. In some possible implementations, the code push module 109 can also be used to push the generated code to the remote branch in its entirety. For easier processing, the code push module 109 can also push the differencing code to the remote branch. Specifically, the code push module 109 is used to push the first code, the second code, and the differencing code to the remote branch. Correspondingly, the differencing code processing module 108 can process the second code on the remote branch to obtain the processed code.
[0085] Based on the architectural diagram of a code development platform 10 shown in Figure 1, this application also provides a code development method. The code development method provided by the embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0086] Referring to Figure 3, which shows a flowchart of a code development method, the method may include the following steps:
[0087] S302, the code development platform 10 receives the user's update information on the business model and obtains the updated business model.
[0088] Update information is used to add, delete, or modify business objects, change their relationships, or add, delete, or modify data transfer objects, or add, delete, or modify enumeration classes. The code development platform 10 can enhance the visual interface, allowing users to update the business model through drag-and-drop operations. The code development platform 10 receives the user's update information and thus obtains the updated business model.
[0089] S304, the code development platform 10 generates the first metadata based on the updated business model.
[0090] The first metadata includes files serialized from the updated business model. The code development platform 10 can generate metadata through serialization based on the modeling results (e.g., an updated business model). The metadata defines the business model and the technical model, for example, by defining the business model and the technical model through classes. The technical model can be a model of technical components, such as a cache or database model. The metadata can be stored in JavaScript object notation (JSON) format, thus making classes invisible to the user. After the metadata is serialized into a JSON document, the code development platform 10 can use it to generate a directory structure (project directory) and end-to-end Model-View-Controller (MVC) code. The JSON-formatted metadata is also stored in the code repository and distributed with the completed software artifacts. Software artifact packages are typically collections of source files or compiled products, mainly in the form of binary packages and compressed packages.
[0091] S306, the code development platform 10 compares the first metadata with the second metadata of the second code selected by the user to obtain the metadata difference comparison results.
[0092] Specifically, metadata can be displayed through a directory structure, such as a tree-like directory. The code development platform 10 can obtain the directory structure of the first metadata and the directory structure of the second metadata of the second code selected by the user. The second code selected by the user can be the baseline branch code selected by the user, and the code development platform 10 can download the second metadata of the second code from the code repository. Since the directory structures of the first and second metadata are of the same type, the code development platform 10 can compare the directory structures of the first and second metadata to obtain a metadata difference comparison result.
[0093] In this application, the code development platform 10 can compare the directory structures of the first and second metadata level by level. Using the directory structure example in Figure 2, the code development platform 10 can first compare the subdirectories of the business object BO. If the subdirectories are the same, the platform can then compare the subdirectories of the next object. If the subdirectories are different, the difference type can be determined, and the difference can be marked using a marker corresponding to the difference type. In this example, the Role was deleted from BO, so a strikethrough is used to indicate it; a UserGroup was added to BO, so green font is used to indicate the addition of the UserGroup. After marking is complete, the code development platform 10 continues to compare the subdirectories of the next object, such as comparing the subdirectories of the abstract business object Abstract. In this example, the Address was modified in AbstractBo, so orange is used to indicate the modification of the Address. It should be noted that Figure 2 is converted to grayscale in this application, with green and orange both appearing as gray.
[0094] S308, the code development platform 10 generates the first code based on the first metadata.
[0095] Specifically, the code development platform 10 can generate first code based on the first metadata using its code generation capabilities. The first code generated by the code development platform 10 can correspond to the directory structure object of the first metadata; for example, the first code may include code files and resource files for the corresponding class.
[0096] S310 and code development platform 10 compare the first code and the second code based on the metadata difference comparison results to obtain the difference code between the first code and the second code.
[0097] The difference code includes the difference code resulting from updating the business model. In specific implementation, the code development platform 10 can determine the directory type of the first metadata or the second metadata. Specifically, the code development platform 10 can determine the directory type based on the directory type (or directory style) configuration in the metadata. For example, if the value of the directory type field in the metadata is "single module," then the code development platform 10 can determine that the directory type is "single module." Based on the metadata difference comparison results, the code development platform 10 can compare the first code and the second code with the difference code processor corresponding to the directory type to obtain the difference code between the first code and the second code.
[0098] In some possible implementations, the difference code processor includes at least one of a single-module difference code processor, a two-module difference code processor, a DDD aggregated root difference code processor, or a DDD non-aggregated root difference code processor. When the directory type is single-module, the code development platform 10 can input the metadata difference comparison results and the first code and the second code into the single-module difference code processor, compare the first code and the second code, and obtain the difference code between the first code and the second code. The difference code processor can perform file-level comparison and / or method-level comparison based on the files and methods indicated by the metadata difference comparison results to obtain the difference code between the first code and the second code.
[0099] S312, the code development platform 10 processes the second code based on the difference code to obtain the processed code.
[0100] Specifically, the code development platform 10 can add difference code to a user-selected second code (such as baseline branch code) to obtain processed code. The code generated by the code development platform 10 can include different types, such as those that allow modification or prohibit modification. For files that prohibit modification, the code development platform 10 can perform file-level add, delete, or replace operations. For files that allow modification, the code development platform 10 can perform method-level add, delete, or replace operations.
[0101] In some possible implementations, the code development platform 10 can identify the type of the target file to which the differing code belongs. When the target file is of a type that cannot be modified, the code development platform 10 can perform operations such as adding, deleting, or replacing the target file on the second code to obtain the processed code.
[0102] In some possible implementations, the code development platform 10 can identify the type of the target file to which the differing code belongs. When the target file type is modifiable, the code development platform 10 can perform operations such as adding, deleting, or replacing target methods on the second code to obtain the processed code. The target methods can be methods in the target file that need to be added, deleted, or replaced.
[0103] Specifically, the target method may include a first method to be added or a second method to be modified. Accordingly, the code development platform 10 can add the method signature and empty method body of the target method to the second code, for example, by adding the method signature and empty method body of the target method to the object file of the second code. Alternatively, the code development platform 10 can modify the method signature of the target method in the second code.
[0104] Referring to Figure 4, a flowchart of a difference code processing procedure is shown. The code development platform 10 generates new project code (first code) based on the edited modeling results. After downloading the baseline branch code, it selects the corresponding difference code processor according to the directory type. Based on the metadata difference comparison results and the difference code processor, it compares the project code and the baseline branch code to obtain the files and methods that need to be modified. Then, it modifies each file one by one on the baseline branch code. During file-by-file modification, the code development platform 10 can determine whether it is a file-level modification. If so, it directly replaces, copies, or deletes the file; otherwise, it parses the file to which the difference code belongs and adds, deletes, or modifies methods at the method level until the difference code processing is complete.
[0105] Furthermore, the code development platform 10 can also push the processed code to a remote branch so that users can continue development. Specifically, referring to the flowchart of a code push shown in Figure 5, when using a non-full push, the code development platform 10 generates first code, pulls second code to the local machine based on the baseline branch selected by the user, compares the first code and the second code through the difference code processing module to obtain the difference code, then adds the difference code to the baseline branch, and pushes the baseline branch code with the added difference code to the remote branch. This remote branch can be a user-specified branch.
[0106] In some possible implementations, the code development platform 10 also supports full code push. Specifically, the code development platform 10 pushes the differencing code, the first code, and the second code to the remote branch, so that the second code can be processed on the remote branch to obtain the processed code. Referring again to Figure 5, the code development platform 10 can generate the first code, create a local code repository (e.g., a local Git repository), and add all the generated code to the local code repository. The code development platform 10 can then push all the code in the local code repository to the remote branch. During the push process, the code development platform 10 can also push differencing code to facilitate adding the differencing code to the remote branch.
[0107] Based on the above description, this application provides a code development method. This method can automatically compare the metadata generated after updating the business model with the metadata of the user-selected code. It automatically identifies the code differences before and after the metadata update based on the comparison results, eliminating the need for manual comparison. Furthermore, it can automatically merge the differing code into existing code based on code merging capabilities, improving development efficiency. This method fully utilizes the code generation capabilities of low-code development platforms, enabling positive iterative development on low-code platforms.
[0108] To make the technical solution of this application clearer and easier to understand, the code development method of this application will be introduced below in combination with specific audio-visual scenarios.
[0109] Referring to Figure 6, a flowchart of a code development method is shown, which includes an initial modeling development stage and an iterative modeling development stage.
[0110] In the initial modeling and development phase, the code development platform 10 receives the business model initially configured by the user for the software development project, generates metadata based on the modeling results, generates code based on the metadata, and pushes the full generated code to the designated branch A. Users can download the code for branch A from the code hosting platform and perform local development on branch A, such as coding complex business logic. Users can then submit their code to the code hosting platform. The code hosting platform can merge or integrate the code from branch A and the locally developed code.
[0111] During the iterative modeling and development phase, the code development platform 10 receives user updates to the business model and obtains the updated business model. Then, the code development platform 10 generates primary metadata based on the updated business model. The code development platform 10 also supports users selecting a baseline branch and comparing the primary metadata with the secondary metadata of the baseline branch code to obtain metadata difference comparison results. When the business model is modified, the code development platform 10 generates new code based on the primary metadata. The code development platform 10 compares the new code with the baseline branch code to obtain the difference code and pushes the difference code to branch B. It should be noted that the code development platform 10 can add the difference code to the baseline branch code before pushing it to branch B. Developers download the code on branch B, perform local development, and then commit the code to the code hosting platform, for example, to branch B.
[0112] The key to the iterative modeling development phase lies in handling the differences in code, which will be explained in detail below with examples.
[0113] The following are the main scenarios where updates to the business model or metadata will affect code generation:
[0114] 1. Add a new business object: Directly add the Java file and resource file associated with the business object.
[0115] Specifically, when a new business object is added to the business model, the code development platform 10 will add the Java files associated with the business object, such as the interface layer files {biz}Api.java and {biz}Controller.java, the application layer file {biz}Service.java, the entity class file {biz}.java, the mapper layer file {biz}Mapper.java, and the new resource file {biz}Mapper.xml.
[0116] 2. Delete business object: Delete the Java file associated with the business object.
[0117] Similar to adding a new business object, when a business object is deleted from a business model, the code development platform 10 deletes the Java files associated with that business object, such as the interface layer files {biz}Api.java and {biz}Controller.java, the entity class file {biz}.java, the mapper layer file {biz}Mapper.java, and the resource file {biz}Mapper.xml.
[0118] 3. Modify the business object.
[0119] Modifying business objects can include adding custom interfaces. The Java files associated with these business objects are divided into two categories: those that can be modified and those that cannot.
[0120] a) For files that are prohibited from being modified, such as the interface layer files {biz}Api.java and {biz}Controller.java, the code development platform 10 can directly replace the corresponding files;
[0121] b) For files that can be modified, such as the application layer file {biz}Service.java, the code development platform 10 can parse the file and write the methods corresponding to the newly added interfaces into the file.
[0122] 4. Modify the relationships between business objects.
[0123] For example, a business model update could be adding a many-to-many relationship to two existing business objects, biz1 and biz2. Accordingly, the code development platform 10 parses the Java files associated with biz1 and biz2, such as the application layer files {biz1}Service.java and {biz2}Service.java, and adds the newly added many-to-many related methods to these files.
[0124] For example, updating a business model could involve adding a new relation object representing a many-to-many relationship. Correspondingly, the code development platform 10 could add Java files associated with this relation object, such as {relation}.java and {relation}Mapper.java.
[0125] 5. Adding, modifying, and deleting custom DTOs and enumeration classes.
[0126] a) Add: Directly copy the newly added enumeration class file to the corresponding directory of the baseline branch code;
[0127] b) Deletion: Directly delete the enumeration class from the baseline branch code;
[0128] c) Modify: Overwrite the corresponding enumeration class in the baseline branch code with the modified enumeration class file.
[0129] Different directory structures require different file operations. The following example of a single-module directory structure will detail the class handling strategies for each code layer.
[0130] Code directory:
[0131] Handling strategy:
[0132] 1. {package} / api. Files in this directory cannot be modified by users, but can be added, deleted, or replaced directly.
[0133] 2.{package} / service
[0134] Files like A.{package} / service / I{biz}Service.java are not allowed to be modified by users, but can be added, deleted, or replaced directly.
[0135] In B.{package} / service / impl / {biz}Service.java, if the file is identified as an add / delete type, it can be directly added or deleted. If it is a modify type, the file needs to be parsed using JavaParser technology, and the methods to be added, deleted, or modified need to be compared and analyzed. If it is a delete, the corresponding method will be deleted directly. If it is an add, only the method signature with an empty method body will be added. If it needs to be modified, only the method signature will be modified, without changing the content in the method body.
[0136] 3. Files in the {package} / domain directory can be extended and modified by users. The difference handling logic is similar to that in {package} / service / impl / {biz}Service.java, and will not be repeated here.
[0137] 4.{package} / repository
[0138] Files in the directory A.{package} / repository / base are not allowed to be modified by users, but can be added, deleted, or replaced directly.
[0139] Files of type B.{package} / repository / {biz}Repository.java allow users to extend and modify them. For adding and deleting files, you can directly add or delete files. There are no modification methods for this type of file.
[0140] 5.{package} / mapper
[0141] Files in the directory A.{package} / mapper / base are not allowed to be modified by users, but can be added, deleted, or replaced directly.
[0142] Files of type B.{package} / mapper / {biz}Mapper.java allow users to extend and modify them. For addition and deletion scenarios, files can be added or deleted directly. There are no modification methods for this type of file.
[0143] 6. In the {package} / model directory, all files are prohibited from being modified by users, but users can directly add, delete, or replace files.
[0144] 7. In the directory {package} / dto, all files are prohibited from being modified by users, but users can directly add, delete, or replace files.
[0145] 8. The files in the {package} / config directory can be extended and modified by users. If you need to add a configuration class, you can directly add the corresponding configuration class to this directory. If you are deleting or modifying, you can skip this step.
[0146] 9. The files in the {package} / utils directory can be extended and modified by users. If you need to add a configuration class, you can directly add the corresponding configuration class to this directory. If you are deleting or modifying, you can skip this step.
[0147] 10. The files in the {package} / exception directory are allowed to be extended and modified by users. This directory is skipped when processing diff code.
[0148] Resource Directory:
[0149] Handling strategy:
[0150] 1.resources / mapper
[0151] Files in the directory A.resources / mapper / base should not be modified by users, but can be added, deleted, or replaced directly.
[0152] The file B.resources / mapper / {biz}Mapper.xml allows users to extend it. In the case of adding or deleting files, the addition or deletion is performed directly. There is no modification method for this type of file.
[0153] 2. Files in the resources / openapi directory can be directly replaced.
[0154] 3. The metadata.json file can be directly replaced.
[0155] 4. Skip the rest of the files without making any changes.
[0156] Based on the aforementioned code development method, this application also provides a code development platform 10. The code development platform 10 will be described below from the perspective of functional modularization.
[0157] Referring to Figure 1, which shows a schematic diagram of the structure of a code development platform 10, the code development platform 10 includes:
[0158] The business modeling module 102 is used to receive update information from the user on the business model and obtain the updated business model. The update information is used to add business objects, delete business objects, modify business objects, modify the association relationships of business objects; or to add, delete or modify data transmission objects; or to add, delete or modify enumeration classes.
[0159] The business modeling module 102 is further configured to generate first metadata based on the updated business model, the first metadata including a file formed by serializing the updated business model;
[0160] Metadata difference comparison module 104 is used to compare the first metadata with the second metadata of the second code selected by the user to obtain metadata difference comparison results;
[0161] Code generation module 106 is used to generate first code based on the first metadata;
[0162] The difference code processing module 108 is used to compare the first code and the second code according to the metadata difference comparison result, and obtain the difference code between the first code and the second code, wherein the difference code includes the difference code caused by updating the business model;
[0163] The difference code processing module 108 is further configured to process the second code according to the difference code to obtain the processed code.
[0164] For example, the above-mentioned business modeling module 102, metadata difference comparison module 104, code generation module 106, and difference code processing module 108 can be implemented in hardware or in software.
[0165] When implemented through software, the business modeling module 102, metadata difference comparison module 104, code generation module 106, and difference code processing module 108 can be applications running on computer devices, such as computing engines. These applications can also be virtualized and provided to users as virtualization services. Virtualization services can include virtual machine (VM) services, bare metal server (BMS) services, or container services. VM services can be services that use virtualization technology to create virtual machine (VM) resource pools on multiple physical hosts to provide VMs for users to use on demand. BMS services are services that use virtualization technology to create BMS resource pools on multiple physical hosts to provide BMS for users to use on demand. Container services are services that use virtualization technology to create container resource pools on multiple physical hosts to provide containers for users to use on demand. A VM is a simulated virtual computer, that is, a logical computer. A BMS is a scalable, high-performance computing service with computing performance indistinguishable from traditional physical machines and features secure physical isolation. Containers are a kernel virtualization technology that provides lightweight virtualization to isolate user space, processes, and resources. It should be understood that the VM service, BMS service, and container service mentioned above are merely specific examples. In practical applications, virtualization services can also include other lightweight or heavyweight virtualization services, which are not specifically limited here.
[0166] When implemented in hardware, the business modeling module 102, metadata difference comparison module 104, code generation module 106, and difference code processing module 108 may include at least one computing device, such as a server. Alternatively, the business modeling module 102, metadata difference comparison module 104, code generation module 106, and difference code processing module 108 may also be implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0167] In some possible implementations, the difference code processing module 108 is specifically used for:
[0168] Identify the type of target file to which the difference code belongs;
[0169] When the target file is of type "cannot be modified", the second code is subjected to operations of adding, deleting or replacing the target file to obtain the processed code.
[0170] In some possible implementations, the difference code processing module 108 is specifically used for:
[0171] Identify the type of target file to which the difference code belongs;
[0172] When the target file is of a type that allows modification, the second code is subjected to operations such as adding, deleting, or replacing the target method to obtain the processed code.
[0173] In some possible implementations, the target method includes a first method to be added or a second method to be modified;
[0174] The difference code processing module 108 is specifically used for:
[0175] Add the method signature of the target method and an empty method body to the second code; or,
[0176] In the second code, modify the method signature of the target method.
[0177] In some possible implementations, the metadata difference comparison module 104 is specifically used for:
[0178] Obtain the directory structure of the first metadata, and obtain the directory structure of the second metadata of the second code selected by the user;
[0179] Compare the directory structure of the first metadata with the target structure of the second metadata to obtain the metadata difference comparison results.
[0180] In some possible implementations, the difference code processing module 108 is specifically used for:
[0181] Determine the directory type of the first metadata or the second metadata;
[0182] Based on the metadata difference comparison results, the difference code between the first code and the second code is obtained by comparing the first code and the second code with the difference code processor corresponding to the directory type;
[0183] The difference code processor includes at least one of a single-module difference code processor, a dual-module difference code processor, a Domain-Driven Design (DDD) aggregated root difference code processor, or a DDD non-aggregated root difference code processor.
[0184] In some possible implementations, the code development platform 10 also includes:
[0185] The code push module 109 is used to push the processed code to a remote branch.
[0186] In some possible implementations, the code development platform 10 also includes:
[0187] Code push module 109 is used to push the difference code, the first code, and the second code to a remote branch;
[0188] The difference code processing module 108 is specifically used for:
[0189] The second code is processed in the remote branch to obtain the processed code.
[0190] For example, the code push module 109 described above can be implemented in hardware or in software.
[0191] When implemented in software, the code delivery module 109 can be an application running on a computer device. This application can also be virtualized and provided to users as a virtualization service such as a VM service, BMS service, or container service. When implemented in hardware, the code delivery module 109 can include at least one computing device, such as a server. Alternatively, the code delivery module 109 can also be a device implemented using an Application-Specific Integrated Circuit (ASIC) or a Programmable Logic Device (PLD).
[0192] This application also provides a computing device 700. As shown in FIG7, the computing device 700 includes: a bus 702, a processor 704, a memory 706, and a communication interface 708. The processor 704, the memory 706, and the communication interface 708 communicate with each other via the bus 702. The computing device 700 may be a server or a terminal device. It should be understood that this application does not limit the number of processors and memories in the computing device 700.
[0193] Bus 702 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, only one line is used in Figure 7, but this does not imply that there is only one bus or one type of bus. Bus 702 can include pathways for transmitting information between various components of computing device 700 (e.g., memory 706, processor 704, communication interface 708).
[0194] Processor 704 may include any one or more processors such as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).
[0195] The memory 706 may include volatile memory, such as random access memory (RAM). The memory 706 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid-state drive (SSD). The memory 706 stores executable program code, which the processor 704 executes to implement the aforementioned code development method. Specifically, the memory 706 stores instructions for the code development platform 10 to execute the code development method. For example, the memory 706 may store instructions for implementing the functions of the business modeling module 102, the metadata difference comparison module 104, the code generation module 106, and the difference code processing module 108. Furthermore, the memory 706 may also store instructions for implementing the functions of the code push module 109. The communication interface 708 uses transceiver modules, such as, but not limited to, network interface cards and transceivers, to enable communication between the computing device 700 and other devices or communication networks.
[0196] This application also provides a computing device cluster. The computing device cluster includes at least one computing device. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smartphone.
[0197] As shown in Figure 8, the computing device cluster includes at least one computing device 700. The memory 706 of one or more computing devices 700 in the computing device cluster may store instructions from the same code development platform 10 for executing code development methods.
[0198] In some possible implementations, one or more computing devices 700 in the computing device cluster can also be used to execute some of the instructions of the code development platform 10 for executing code development methods. In other words, a combination of one or more computing devices 700 can jointly execute the instructions of the code development platform 10 for executing code development methods.
[0199] It should be noted that the memory 706 in different computing devices 700 in the computing device cluster can store different instructions for executing some functions of the code development platform 10.
[0200] Figure 9 illustrates one possible implementation. As shown in Figure 9, two computing devices 700A and 700B are connected via a communication interface 708. The memory in computing device 700A stores instructions for executing the functions of the business modeling module 102 and the metadata difference comparison module 104. The memory in computing device 700B stores instructions for executing the functions of the code generation module 106 and the difference code processing module 108. In other words, the memory 706 of computing devices 700A and 700B jointly stores the instructions used by the code development platform 10 to execute code development methods.
[0201] The connection method between the computing device clusters shown in Figure 9 can be considered because the code development method provided in this application requires a lot of resources for code generation and difference code comparison. Therefore, it is considered that the functions implemented by the code generation module 106 and the difference code processing module 108 are performed by independent computing devices, such as computing device 700B.
[0202] It should be understood that the functions of computing device 700A shown in Figure 9 can also be performed by multiple computing devices 700. Similarly, the functions of computing device 700B can also be performed by multiple computing devices 700.
[0203] In some possible implementations, one or more computing devices in a computing device cluster can be connected via a network. This network can be a wide area network (WAN) or a local area network (LAN), etc. Figure 10 illustrates one possible implementation. As shown in Figure 10, two computing devices 700C and 700D are connected via a network. Specifically, they are connected to the network through communication interfaces in each computing device. In this type of possible implementation, the memory 706 in computing device 700C stores instructions for executing the functions of the business modeling module 102 and the metadata difference comparison module 104. Simultaneously, the memory 706 in computing device 700D stores instructions for executing the functions of the code generation module 106 and the difference code processing module 108.
[0204] The connection method between the computing device clusters shown in Figure 10 can be considered as follows: considering that the code development method provided in this application requires a lot of resources when using code generation capabilities and difference code comparison capabilities, it is considered to delegate the functions implemented by the code generation module 106 and the difference code processing module 108 to independent computing devices, such as computing device 700D.
[0205] It should be understood that the functions of the computing device 700C shown in Figure 10 can also be performed by multiple computing devices 700. Similarly, the functions of the computing device 700D can also be performed by multiple computing devices 700.
[0206] This application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that a computing device can store, or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive). The computer-readable storage medium includes instructions that instruct the computing device to execute the code development method described above applied to the code development platform 10.
[0207] This application also provides a computer program product containing instructions. The computer program product may be a software or program product containing instructions, capable of running on a computing device or stored on any usable medium. When the computer program product is run on at least one computing device, the at least one computing device executes the above-described code development method.
[0208] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of the present invention.
Claims
1. A code development method, characterized in that, The method includes: Receive user update information on the business model, obtain the updated business model, and the update information is used to add business objects, delete business objects, modify business objects, modify the association relationships of business objects; or to add, delete or modify data transmission objects; or to add, delete or modify enumeration classes; First metadata is generated based on the updated business model, the first metadata including a file formed by serializing the updated business model; The first metadata and the second metadata of the second code selected by the user are compared to obtain the metadata difference comparison result; Generate first code based on the first metadata; Based on the metadata difference comparison results, the first code and the second code are compared to obtain the difference code between the first code and the second code, and the difference code includes the difference code caused by updating the business model; The second code is processed according to the difference code to obtain the processed code.
2. The method according to claim 1, characterized in that, The step of processing the second code according to the difference code to obtain processed code includes: Identify the type of target file to which the difference code belongs; When the target file is of type "cannot be modified", the second code is subjected to operations of adding, deleting or replacing the target file to obtain the processed code.
3. The method according to claim 1, characterized in that, The step of processing the second code according to the difference code to obtain processed code includes: Identify the type of target file to which the difference code belongs; When the target file is of a type that allows modification, the second code is subjected to operations such as adding, deleting, or replacing the target method to obtain the processed code.
4. The method according to claim 3, characterized in that, The target method includes a first method to be added or a second method to be modified; The operation of adding, deleting, or replacing the target method on the second code includes: Add the method signature of the target method and an empty method body to the second code; or, In the second code, modify the method signature of the target method.
5. The method according to any one of claims 1 to 4, characterized in that, The step of comparing the first metadata with the second metadata of the second code selected by the user to obtain a metadata difference comparison result includes: Obtain the directory structure of the first metadata, and obtain the directory structure of the second metadata of the second code selected by the user; Compare the directory structure of the first metadata with the target structure of the second metadata to obtain the metadata difference comparison results.
6. The method according to any one of claims 1 to 5, characterized in that, The step of comparing the first code and the second code based on the metadata difference comparison result to obtain the difference code between the first code and the second code includes: Determine the directory type of the first metadata or the second metadata; Based on the metadata difference comparison results, the difference code between the first code and the second code is obtained by comparing the first code and the second code with the difference code processor corresponding to the directory type; The difference code processor includes at least one of a single-module difference code processor, a dual-module difference code processor, a Domain-Driven Design (DDD) aggregated root difference code processor, or a DDD non-aggregated root difference code processor.
7. The method according to any one of claims 1 to 6, characterized in that, The method further includes: Push the processed code to the remote branch.
8. The method according to claim 1, characterized in that, The step of processing the second code according to the difference code to obtain the processed code includes: The difference code, the first code, and the second code are pushed to a remote branch so that the second code can be processed on the remote branch to obtain the processed code.
9. A code development platform, characterized in that, The code development platform includes: The business modeling module is used to receive update information from the user on the business model and obtain the updated business model. The update information is used to add business objects, delete business objects, modify business objects, modify the association relationships of business objects; or to add, delete or modify data transmission objects; or to add, delete or modify enumeration classes. The business modeling module is further configured to generate first metadata based on the updated business model, the first metadata including a file formed by serializing the updated business model; The metadata difference comparison module is used to compare the first metadata with the second metadata of the second code selected by the user to obtain the metadata difference comparison result. The code generation module is used to generate first code based on the first metadata; The difference code processing module is used to compare the first code and the second code according to the metadata difference comparison result, and obtain the difference code between the first code and the second code, wherein the difference code includes the difference code caused by updating the business model; The difference code processing module is further configured to process the second code according to the difference code to obtain the processed code.
10. The code development platform according to claim 9, characterized in that, The difference code processing module is specifically used for: Identify the type of target file to which the difference code belongs; When the target file is of type "cannot be modified", the second code is subjected to operations of adding, deleting or replacing the target file to obtain the processed code.
11. The code development platform according to claim 9, characterized in that, The difference code processing module is specifically used for: Identify the type of target file to which the difference code belongs; When the target file is of a type that allows modification, the second code is subjected to operations such as adding, deleting, or replacing the target method to obtain the processed code.
12. The code development platform according to claim 11, characterized in that, The target method includes a first method to be added or a second method to be modified; The difference code processing module is specifically used for: Add the method signature of the target method and an empty method body to the second code; or, In the second code, modify the method signature of the target method.
13. The code development platform according to any one of claims 9 to 12, characterized in that, The metadata difference comparison module is specifically used for: Obtain the directory structure of the first metadata, and obtain the directory structure of the second metadata of the second code selected by the user; Compare the directory structure of the first metadata with the target structure of the second metadata to obtain the metadata difference comparison results.
14. The code development platform according to any one of claims 9 to 13, characterized in that, The difference code processing module is specifically used for: Determine the directory type of the first metadata or the second metadata; Based on the metadata difference comparison results, the difference code between the first code and the second code is obtained by comparing the first code and the second code with the difference code processor corresponding to the directory type; The difference code processor includes at least one of a single-module difference code processor, a dual-module difference code processor, a Domain-Driven Design (DDD) aggregated root difference code processor, or a DDD non-aggregated root difference code processor.
15. The code development platform according to any one of claims 9 to 14, characterized in that, The code development platform also includes: The code push module is used to push the processed code to a remote branch.
16. The code development platform according to claim 9, characterized in that, The code development platform also includes: The code push module is used to push the difference code, the first code, and the second code to a remote branch; The difference code processing module is specifically used for: The second code is processed in the remote branch to obtain the processed code.
17. A computing device cluster, characterized in that, The computing device cluster includes at least one computing device, the at least one computing device including at least one processor and at least one memory, the at least one memory storing computer-readable instructions; the at least one processor executes the computer-readable instructions to cause the computing device cluster to perform the code development method as described in any one of claims 1 to 8.
18. A computer-readable storage medium, characterized in that, Includes computer-readable instructions; the computer-readable instructions are used to implement the code development method according to any one of claims 1 to 8.
19. A computer program product, characterized in that, Includes computer-readable instructions; the computer-readable instructions are used to implement the code development method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Low-code model processing method and system, electronic equipment and storage medium
CN113515278A
Model-code synchronization method
CN113918198A
Forward and reverse synchronous development method and system based on low-code platform and medium
CN116088856A
Method for creating micro service and related equipment
CN116627448A
Code review rebase diffing
US20190004925A1