Method and system for constructing dependency reference graph based on application development platform
By constructing a dependency reference graph, the problem of locating the scope of metadata engineering dependencies in low-code modeling is solved, enabling clear dependency management and quick location of functional modules, adapting to various reference forms, and improving development efficiency and accuracy.
Patent Information
- Application Number
- CN202211114883.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-14
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2042-09-14
AI Technical Summary
In the field of low-code modeling, developers often struggle to understand the scope of dependencies in the current metadata project, making it difficult to locate the metadata project for a specific function in online IDE development.
By constructing a dependency reference graph, functional module information is encapsulated into node information, and the module that is finally effective is selected in the graph according to the effectiveness strategy, including module description, source and version information. The newest or nearest strategy is used to handle module dependencies from multiple sources and versions.
It enables clear and reliable analysis of metadata engineering dependencies and references, supports quick location of specific functional modules, adapts to various reference formats, and improves development efficiency and accuracy.
Smart Images

Figure CN115480817B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer application development technology, specifically a method and system for constructing dependency and reference graphs based on an application development platform. Background Technology
[0002] In the field of low-code modeling, application development platforms provide developers with an efficient R&D platform, supporting rapid development of application systems with loosely coupled modular components. During the continuous development of the system, modular, loosely coupled development offers better reusability, maintainability, and scalability, enabling more efficient system maintenance and development, and continuously supporting business growth without becoming an obstacle to it.
[0003] In modular development, dependencies exist between functional modules, and these dependencies increase as the development process becomes more complex. When developers use online IDEs, to achieve high cohesion and low coupling among functional modules, developers implement a single business function in each project. If other functions are needed, they are implemented by referencing the corresponding function's metadata project.
[0004] Therefore, when developers use online IDEs, how to clearly understand the current application status of the metadata project, clarify the scope of dependencies of the metadata project, and then quickly locate the metadata project for a specific function is a technical problem that urgently needs to be solved. Summary of the Invention
[0005] The technical objective of this invention is to provide a method and system for constructing dependency reference graphs based on an application development platform, in order to solve the problem of how developers can clearly understand the current application status of the metadata project, clarify the scope of dependency references of the metadata project, and thus quickly locate the metadata project for a specific function when using an online IDE for development.
[0006] The technical objective of this invention is achieved as follows: a method for constructing a dependency reference graph based on an application development platform, the method being as follows:
[0007] Encapsulate functional module information into node information, and write the node information of the current functional module (current metadata project) and functional modules that have direct or indirect dependencies on the current functional module into the dependency reference node graph;
[0008] Take the currently developing functional module as the root node, and construct a dependency reference graph based on the dependency relationship between the root node and other nodes in the dependency reference node graph;
[0009] According to the activation strategy, the functional module that will be activated is selected from the same functional modules from different sources and versions in the dependency reference relationship graph.
[0010] Preferably, the node information includes module description information, module source, module version, and module dependency reference information;
[0011] The module description information includes the module name, which refers to modules with the same name from different sources and versions;
[0012] Module source refers to the source from which the current module imports its dependencies;
[0013] Module version is used to identify the specific release version of a module;
[0014] Module dependency reference information is used to record a list of other modules that a module depends on.
[0015] More optimally, the dependency reference graph is constructed as follows:
[0016] Analyze the functional module dependencies of the current node, obtain the node information of the current node, and compare it with the dependency reference node graph to see if the same node already exists:
[0017] If the corresponding node for this functional module already exists in the dependency reference node graph, then construct the reference relationship between the nodes;
[0018] If the node corresponding to the functional module does not exist in the dependency reference node graph, a node is constructed to record the node information of the module. This node is then written into the dependency reference node graph, and the reference relationship between the nodes is constructed.
[0019] Invoke the dependency relationships of the functional modules of the current node, and write the dependencies of the functional modules into the dependency reference graph in sequence.
[0020] More preferably, identical nodes refer to at least two nodes that are identical in module name, module source, and module version;
[0021] The sources of functional modules include database references, metadata project references, local metadata package references, and Maven-managed metadata package references; among them, the metadata package refers to the compressed package generated by packaging the metadata project.
[0022] As a preferred option, the new strategy is adopted, as follows:
[0023] Summarize all functional modules in the dependency reference diagram;
[0024] When there are identical functional modules from different sources and versions, the latest version of the functional module is retained, and all other versions are discarded. The latest version of the functional module is selected based on its source and version number, with the highest priority being chosen.
[0025] As a preferred approach, the nearest-to-the-source strategy is adopted, as follows:
[0026] The following is an example of traversing the nodes corresponding to each functional module in the graph using a breadth-first search algorithm:
[0027] ① If a functional module with the same name does not exist in the results list, then add the functional module to the results list;
[0028] ② If a functional module with the same name already exists in the results list, the functional module found later will be discarded, and the functional module that enters the results list first will be used, without version comparison.
[0029] The final list of results will serve as the final list of modules that will be effective.
[0030] A dependency reference graph construction system based on an application development platform, the system comprising,
[0031] The node wrapping module is used to encapsulate functional module information into node information and write the node information of the current functional module and functional modules that have direct or indirect dependencies on the current functional module into the dependency reference node graph.
[0032] The relation construction module is used to construct a dependency reference relationship graph based on the dependency relationship between the current functional module under development and other nodes in the dependency reference node graph, taking the current functional module under development as the root node.
[0033] The filtering module is used to select the functional modules that will ultimately be implemented from the same functional modules from different sources and versions in the dependency reference relationship graph, based on the activation strategy.
[0034] As a preferred option, the working process of this system is as follows:
[0035] (1) Construct the root node in the reference node diagram based on the current project structure;
[0036] (2) Obtain project reference information;
[0037] (3) Obtain information about the referenced function module;
[0038] (4) Determine whether a node corresponding to the referenced functional module already exists in the reference node graph:
[0039] ① If so, construct a directed reference relationship between the current functional module node and the referenced functional module node, and jump to step (8);
[0040] ② If not, proceed to step (5);
[0041] (5) Determine if the node for this functional module already exists in the cache:
[0042] ① If so, write the node information in the cache into the reference node graph, and construct the directed reference relationship between the current functional module node and the reference functional module node. Then jump to step (8).
[0043] ② If not, proceed to step (6);
[0044] (6) Construct directed reference relationships between the current functional module node and the referenced functional module node in the reference node graph;
[0045] (7) Record the nodes of the functional modules in the cache;
[0046] (8) Construct a dependency reference graph and obtain information about the referenced functional modules by recursive construction. Then, jump to step (3) next.
[0047] An electronic device includes: a memory and at least one processor;
[0048] The memory contains computer programs;
[0049] The at least one processor executes the computer program stored in the memory, causing the at least one processor to perform the dependency reference graph construction method based on the application development platform described above.
[0050] A computer-readable storage medium storing a computer program that can be executed by a processor to implement the application development platform-based dependency reference graph construction method described above.
[0051] The dependency reference graph construction method and system based on the application development platform of the present invention have the following advantages:
[0052] (i) This invention is used to support the establishment of a reference relationship graph for dependencies that are introduced into the metadata project in various reference forms in a low-code development platform, which facilitates the dependency management of the metadata project and clarifies the scope of the metadata project's dependency references.
[0053] (II) This invention aims to clarify the current metadata project's reference status and define the scope of dependencies when developing metadata in an IDE, enabling rapid location of the metadata project for a specific function; it has the following advantages:
[0054] ① It can adapt to dependencies from various sources, such as databases, Maven repositories, and metadata projects.
[0055] ② If the referenced metadata project references other metadata projects, the indirect references should also be added to the reference relationship diagram;
[0056] ③ When referencing the same source and version of metadata project through different reference paths, the parsing of project information is accelerated by caching;
[0057] ④ When different sources or versions of metadata projects are referenced through different dependency chains, the reference source should be selected according to the principle of proximity.
[0058] (iii) This invention can clearly and reliably analyze the dependency and reference relationships of metadata engineering, and supports developers in accurately locating the other module functions that depend on the functions when developing functions in a loosely coupled and modular manner.
[0059] (iv) The purpose of this invention is to propose a general method for developers to resolve the dependency and reference relationships of functional modules when developing online. This method is used to establish a dependency and reference relationship graph of functional modules through multiple paths, define the scope of module dependency and reference, and compare the dependency and reference versions of different reference methods. Attached Figure Description
[0060] The invention will be further described below with reference to the accompanying drawings.
[0061] Appendix Figure 1 A schematic diagram illustrating the source of the functional modules;
[0062] Appendix Figure 2 A flowchart for constructing a system based on the dependency and reference relationship graph of an application development platform. Detailed Implementation
[0063] The dependency and reference graph construction method and system based on the application development platform of the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0064] Example 1:
[0065] This embodiment discloses a method for constructing a dependency reference graph based on an application development platform. The method is as follows:
[0066] S1. Encapsulate the functional module information into node information, and write the node information of the current functional module (current metadata project) and functional modules that have direct or indirect dependencies on the current functional module into the dependency reference node graph.
[0067] S2. Take the currently developing functional module as the root node, and construct a dependency reference relationship graph based on the dependency relationship between the root node and other nodes in the dependency reference node graph;
[0068] S3. Based on the activation strategy, select the functional module that will ultimately be activated from the same functional modules from different sources and versions in the dependency reference relationship graph.
[0069] The node information in step S1 of this embodiment includes module description information, module source, module version, and module dependency reference information;
[0070] The module description information includes the module name, which refers to modules with the same name from different sources and versions;
[0071] Module source refers to the source from which the current module imports its dependencies;
[0072] Module version is used to identify the specific release version of a module;
[0073] Module dependency reference information is used to record a list of other modules that a module depends on.
[0074] As shown in the table below:
[0075]
[0076] The construction dependency reference relationship graph in step S2 of this embodiment is as follows:
[0077] S201. Analyze the functional module dependencies of the current node, obtain the node information of the current node, and compare whether the same node already exists in the dependency reference node graph:
[0078] ① If the corresponding node for this functional module already exists in the dependency reference node graph, then construct the reference relationship between the nodes;
[0079] ② If the node corresponding to the functional module does not exist in the dependency reference node graph, then a node is constructed to record the node information of the module. This node is written into the dependency reference node graph, and the reference relationship between the nodes is constructed.
[0080] S202. Call the functional module dependency relationship of the current node and write the dependency relationship of the functional module into the dependency reference relationship graph in sequence.
[0081] In this embodiment, the same node in step S201 refers to at least two nodes that are identical in module name, module source, and module version.
[0082] As attached Figure 1 As shown, the sources of the functional modules in this embodiment include database references, metadata project references, local metadata data package references, and Maven-managed metadata data package references; among them, the metadata data package refers to the compressed package generated by packaging the metadata project.
[0083] In this embodiment, the activation strategy in step S3 adopts the latest strategy, as follows:
[0084] (1) Summarize all functional modules in the dependency reference relationship diagram;
[0085] (2) When there are identical functional modules from different sources and versions, retain the latest version of the functional module and discard all other versions of the functional modules. The latest version of the functional module is selected by sorting by source and version number and selecting the version with the highest priority. The priority of metadata project source, database source, Maven repository source and local offline source is as follows: metadata project source > database source > Maven repository source > local offline source. Functional modules from the same source are confirmed to have the latest version by version comparison.
[0086] In this embodiment, the activation strategy in step S3 adopts a proximity strategy, as detailed below:
[0087] S301. Traverse the nodes corresponding to each functional module in the graph using a breadth-first search algorithm, as follows:
[0088] ① If a functional module with the same name does not exist in the results list, then add the functional module to the results list;
[0089] ② If a functional module with the same name already exists in the results list, the functional module found later will be discarded, and the functional module that enters the results list first will be used, without version comparison.
[0090] S302. The final list of results is used as the final list of modules that take effect.
[0091] Example 2:
[0092] This embodiment provides a dependency reference graph construction system based on an application development platform. The system includes:
[0093] The node wrapping module is used to encapsulate functional module information into node information and write the node information of the current functional module and functional modules that have direct or indirect dependencies on the current functional module into the dependency reference node graph.
[0094] The relation construction module is used to construct a dependency reference relationship graph based on the dependency relationship between the current functional module under development and other nodes in the dependency reference node graph, taking the current functional module under development as the root node.
[0095] The filtering module is used to select the functional modules that will ultimately be implemented from the same functional modules from different sources and versions in the dependency reference relationship graph, based on the activation strategy.
[0096] As attached Figure 2 As shown, the specific working process of this system is as follows:
[0097] (1) Construct the root node in the reference node diagram based on the current project structure;
[0098] (2) Obtain project reference information;
[0099] (3) Obtain information about the referenced function module;
[0100] (4) Determine whether a node corresponding to the referenced functional module already exists in the reference node graph:
[0101] ① If so, construct a directed reference relationship between the current functional module node and the referenced functional module node, and jump to step (8);
[0102] ② If not, proceed to step (5);
[0103] (5) Determine if the node for this functional module already exists in the cache:
[0104] ① If so, write the node information in the cache into the reference node graph, and construct the directed reference relationship between the current functional module node and the reference functional module node. Then jump to step (8).
[0105] ② If not, proceed to step (6);
[0106] (6) Construct directed reference relationships between the current functional module node and the referenced functional module node in the reference node graph;
[0107] (7) Record the nodes of the functional modules in the cache;
[0108] (8) Construct a dependency reference graph and obtain information about the referenced functional modules by recursive construction. Then, jump to step (3) next.
[0109] Example 3:
[0110] This embodiment also provides an electronic device, including: a memory and a processor;
[0111] The memory stores the instructions executed by the computer.
[0112] The processor executes computer execution instructions stored in the memory, causing the processor to execute the dependency reference graph construction method based on the application development platform in any embodiment of the present invention.
[0113] The processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), off-the-shelf programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor can be a microprocessor or any conventional processor.
[0114] Memory is used to store computer programs and / or modules. The processor implements various functions of the electronic device by running or executing the computer programs and / or modules stored in the memory, and by accessing data stored in the memory. Memory can mainly include a program storage area and a data storage area. The program storage area can store the operating system, at least one application program required for a function, etc.; the data storage area can store data created based on the use of the terminal, etc. In addition, memory can also include high-speed random access memory, and can also include non-volatile memory, such as hard disks, RAM, plug-in hard disks, smart memory cards (SMC), secure digital cards (SD cards), flash memory cards, at least one disk storage device, flash memory devices, or other volatile solid-state storage devices.
[0115] Example 4:
[0116] This embodiment also provides a computer-readable storage medium storing multiple instructions, which are loaded by a processor to cause the processor to execute the dependency reference graph construction method based on an application development platform according to any embodiment of the present invention. Specifically, a system or apparatus equipped with a storage medium may be provided, on which software program code implementing the functions of any of the above embodiments is stored, and the computer (or CPU or MPU) of the system or apparatus may read and execute the program code stored in the storage medium.
[0117] In this case, the program code read from the storage medium can itself implement the function of any of the above embodiments, and therefore the program code and the storage medium storing the program code constitute part of the present invention.
[0118] Storage media embodiments for providing program code include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RYM, DVD-RW, DVD+RW), magnetic tapes, non-volatile memory cards, and ROMs. Alternatively, program code can be downloaded from a server computer via a communication network.
[0119] Furthermore, it should be clear that not only can the program code read by the computer be executed, but also the operating system or other components operating on the computer can be instructed based on the program code to perform some or all of the actual operations, thereby realizing the function of any of the embodiments described above.
[0120] Furthermore, it is understood that the program code read from the storage medium is written to the memory set in the expansion board inserted into the computer or to the memory set in the expansion unit connected to the computer. Then, based on the instructions of the program code, the CPU or other components installed on the expansion board or expansion unit execute some and all of the actual operations, thereby realizing the function of any of the embodiments described above.
[0121] 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 or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for constructing a dependency reference graph based on an application development platform, characterized in that, The method is as follows: The functional module information is encapsulated into node information, which includes module description information, module source, module version and module dependency reference information. The node information of the current functional module and functional modules that have direct or indirect dependencies on the current functional module is written into the dependency reference node graph. Take the currently developing functional module as the root node, and construct a dependency reference graph based on the dependency relationship between the root node and other nodes in the dependency reference node graph; According to the activation strategy, the functional modules that will be activated are selected from the same functional modules from different sources and versions in the dependency reference relationship graph. The specific construction of the dependency reference graph is as follows: Analyze the functional module dependencies of the current node, obtain the node information of the current node, and compare it with the dependency reference node graph to see if the same node already exists: If the corresponding node for this functional module already exists in the dependency reference node graph, then construct the reference relationship between the nodes; If the node corresponding to the functional module does not exist in the dependency reference node graph, a node is constructed to record the node information of the module. This node is then written into the dependency reference node graph, and the reference relationship between the nodes is constructed. Invoke the functional module dependencies of the current node and write the dependencies of that functional module into the dependency reference graph in sequence; The new policy will be adopted as the effective policy, as follows: Summarize all functional modules in the dependency reference diagram; When there are identical functional modules from different sources and versions, the latest version of the functional module is retained, and all other versions are discarded. The latest version of the functional module is selected based on its source and version number, with the highest priority being chosen. The effective strategy adopts the nearest-neighbor approach, as detailed below: The following is an example of traversing the nodes corresponding to each functional module in the graph using a breadth-first search algorithm: ① If a functional module with the same name does not exist in the results list, then add the functional module to the results list; ② If a functional module with the same name already exists in the results list, the functional module found later will be discarded, and the functional module that enters the results list first will be used, without version comparison. The final list of results will serve as the final list of modules that will be effective.
2. The dependency reference graph construction method based on an application development platform according to claim 1, characterized in that, Module description information includes the module name, which refers to modules with the same name from different sources and in different versions; Module source refers to the source from which the current module imports its dependencies; Module version is used to identify the specific release version of a module; Module dependency reference information is used to record a list of other modules that a module depends on.
3. The dependency reference graph construction method based on an application development platform according to claim 1 or 2, characterized in that, Same nodes refer to at least two nodes that have the same module name, module source, and module version; The sources of functional modules include database references, metadata project references, local metadata package references, and Maven-managed metadata package references; among them, the metadata package refers to the compressed package generated by packaging the metadata project.
4. A dependency and reference graph construction system based on an application development platform, characterized in that, The system includes, The node wrapping module is used to encapsulate functional module information into node information. The node information includes module description information, module source, module version and module dependency reference information. It also writes the node information of the current functional module and functional modules that have direct or indirect dependencies on the current functional module into the dependency reference node graph. The relation construction module is used to construct a dependency reference relationship graph based on the dependency relationship between the current functional module under development and other nodes in the dependency reference node graph, taking the current functional module under development as the root node. The filtering module is used to select the final effective functional modules from the same functional modules from different sources and versions in the dependency reference relationship graph, based on the effectiveness strategy. The dependency reference graph is constructed as follows: Analyze the functional module dependencies of the current node, obtain the node information of the current node, and compare it with the dependency reference node graph to see if the same node already exists: If the corresponding node for this functional module already exists in the dependency reference node graph, then construct the reference relationship between the nodes; If the node corresponding to the functional module does not exist in the dependency reference node graph, a node is constructed to record the node information of the module. This node is then written into the dependency reference node graph, and the reference relationship between the nodes is constructed. Invoke the functional module dependencies of the current node and write the dependencies of that functional module into the dependency reference graph in sequence; The new policy will be adopted as the effective policy, as follows: Summarize all functional modules in the dependency reference diagram; When there are identical functional modules from different sources and versions, the latest version of the functional module is retained, and all other versions are discarded. The latest version of the functional module is selected based on its source and version number, with the highest priority being chosen. The effective strategy adopts the nearest-neighbor approach, as detailed below: The following is an example of traversing the nodes corresponding to each functional module in the graph using a breadth-first search algorithm: ① If a functional module with the same name does not exist in the results list, then add the functional module to the results list; ② If a functional module with the same name already exists in the results list, the functional module found later will be discarded, and the functional module that enters the results list first will be used, without version comparison. The final list of results will serve as the final list of modules that will be effective.
5. The dependency reference graph construction system based on an application development platform according to claim 4, characterized in that, The working process of this system is as follows: (1) Based on the current project, construct the root node in the reference node diagram; (2) Obtain project reference information; (3) Obtain information about the reference function module; (4) Determine whether a node corresponding to the referenced functional module already exists in the reference node graph: ① If so, construct a directed reference relationship between the current functional module node and the referenced functional module node, and jump to step (8). ② If not, proceed to step (5); (5) Determine if the node for this functional module already exists in the cache: ① If so, write the node information in the cache into the reference node graph, and construct the directed reference relationship between the current functional module node and the reference functional module node. Then jump to step (8). ② If not, proceed to step (6); (6) Construct directed reference relationships between the current functional module node and the referencing functional module node in the reference node graph; (7) Record the nodes of the functional modules in the cache; (8) Construct a dependency reference graph and obtain the information of the referenced functional modules by recursive construction. That is, the next step is to jump to step (3).
6. An electronic device, characterized in that, include: Memory and at least one processor; The memory contains computer programs; The at least one processor executes the computer program stored in the memory, causing the at least one processor to perform the dependency reference graph construction method based on the application development platform as described in any one of claims 1 to 3.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that can be executed by a processor to implement the dependency reference graph construction method based on the application development platform as described in any one of claims 1 to 3.
Citation Information
Patent Citations
Multi-module version dependency relationship establishment method and apparatus, server and storage medium
CN107678776A
Dependence relation generation method and device, terminal equipment and storage medium
CN111967017A