Code resource dependency management method and device, storage medium and computer program product

By obtaining code resource encapsulation and configuration rules in low-code development platforms, determining internal dependencies, and using tree and flat Json data structures to maintain and lock code resources, the problem of code resource dependency management in complex business scenarios is solved, and the problem of code resource dependency management is realized. Dependency management from development to running state ensures resource integrity and consistency.

CN119440606APending Publication Date: 2025-02-14CHINA MERCHANTS BANK
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411403605.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-09
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

In complex business scenarios, low-code development platforms cannot effectively manage the internal dependencies of code resources from development to running, resulting in unpredictable errors when encapsulating code resources.

Method used

By obtaining the code resource encapsulation and configuration rules entered by the user, the internal dependencies between code resources are determined, and the tree Json data structure is designed to maintain the code resources in the development state, and the flat Json data structure is designed to lock the code resources in the running state. , comprehensively manage the development maintenance results and resource loading results for dependency management.

Benefits of technology

It realizes internal dependency management of code resources from development to running state in complex business scenarios, avoids resource conflicts or missing situations, and ensures the integrity and consistency of code resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119440606A_ABST
    Figure CN119440606A_ABST
Patent Text Reader

Abstract

The invention discloses a code resource dependency management method and device, a storage medium and a computer program product, and relates to the technical field of low-code development, and the method comprises the steps: obtaining a code resource packaging configuration rule input by a user, and determining an internal dependency relationship between code resources according to the code resource packaging configuration rule; a development state tree Json data structure is designed according to the internal dependency relationship to maintain code resources in a development state, and a development state maintenance result is obtained; according to the internal dependency relationship, designing a flat Json data structure to lock code resources in a running state to obtain a resource loading result; and performing dependency management on the code resources by integrating the development state maintenance result and the resource loading result. And internal dependency management of code resources from a development state to an operation state in a complex business scene is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of low-code development technology, and in particular to code resource dependency management methods, devices, storage media, and computer program products. Background Art

[0002] In the field of low-code development, with the rapid changes in business needs and the continuous evolution of technology, the extraction, encapsulation and use of public resources such as components, logic, and templates have become an important means to build an efficient low-code development platform and improve development efficiency. At present, the low-code development platform has the ability to encapsulate public resources with low-code. Users can use existing low-code development resources and encapsulate them into various new resources. During the encapsulation process, low-code development resources generate dependencies that present a tree structure. As the complexity of the business increases, low-code development resources are nested with each other, and the dependencies become more complex. Since the low-code platform highly encapsulates and abstracts the underlying technology stack to provide a unified development environment and tool set, the high degree of encapsulation and abstraction of the underlying technology stack makes it impossible for the low-code development platform to manage the running code resources and development code resources under complex dependencies, resulting in unpredictable errors in the process of encapsulating code resources.

[0003] Therefore, how to achieve internal dependency management of code resources from development state to operation state in complex business scenarios has become an urgent problem to be solved in this application.

[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention

[0005] The main purpose of this application is to provide a code resource dependency management method, device, storage medium and computer program product, aiming to solve the technical problem of how to achieve internal dependency management of code resources from development state to operation state in complex business scenarios.

[0006] To achieve the above objectives, the present application proposes a code resource dependency management method, the method comprising:

[0007] Obtaining a code resource encapsulation configuration rule input by a user and determining internal dependencies between code resources according to the code resource encapsulation configuration rule;

[0008] Design a development state tree-shaped Json data structure according to the internal dependency relationship to maintain the code resources in the development state, and obtain a development state maintenance result;

[0009] Design a flat Json data structure according to the internal dependency relationship to lock the code resources in the running state and obtain the resource loading result;

[0010] Dependency management of the code resources is performed based on the development state maintenance result and the resource loading result.

[0011] In one embodiment, the step of obtaining a code resource encapsulation configuration rule input by a user and determining the internal dependency relationship between code resources according to the code resource encapsulation configuration rule includes:

[0012] Get the code resource encapsulation configuration rules entered by the user;

[0013] Adjust the mutual calling relationship between code resources according to the code resource encapsulation configuration rule;

[0014] The internal dependency relationship between the code resources is determined based on the mutual calling relationship.

[0015] In one embodiment, the step of maintaining the code resources in the development state by designing the development state tree-shaped Json data structure according to the internal dependency relationship and obtaining the development state maintenance result comprises:

[0016] According to the internal dependency relationship, all sub-resource versions with the low-opening page as the root resource are recorded, and a development state tree-shaped Json data structure is designed;

[0017] Traversing the development-state tree-shaped Json data structure layer by layer, detecting dependency conflicts or circular dependency anomalies to maintain code resources in the development state;

[0018] A development state maintenance result is obtained based on the dependency conflict and the circular dependency exception.

[0019] In one embodiment, the step of designing a flat Json data structure according to the internal dependency relationship to lock the code resources in the running state and obtain the resource loading result includes:

[0020] Find the resource version configuration file held by the lower-opening page according to the internal dependency relationship;

[0021] Design a flat Json data structure based on the resource version configuration file;

[0022] Read the flat Json data structure to lock the code resource in the running state;

[0023] The resource list is loaded according to the locked running state code resource version to obtain the resource loading result.

[0024] In one embodiment, after the step of loading the resource list according to the locked running state code resource version to obtain the resource loading result, the step further includes:

[0025] Expand the configuration fields according to the flat Json data structure;

[0026] The configuration field is used to control the loading of code resources in the running state.

[0027] In one embodiment, after the step of performing dependency management on the code resource by integrating the development state maintenance result and the resource loading result, the step further includes:

[0028] The development state maintenance result is displayed in real time in a visual manner of a dependency list or a version conflict list.

[0029] In one embodiment, after the step of performing dependency management on the code resource by integrating the development state maintenance result and the resource loading result, the step further includes:

[0030] Automatically trigger the version management pop-up window to draw the dependency tree on the left and the dependency tree on the right;

[0031] The resource loading result is displayed in real time through the left dependency tree and the right dependency tree.

[0032] In addition, to achieve the above purpose, the present application also proposes a code resource dependency management device, the code resource dependency management device comprising:

[0033] An internal dependency determination module, used to obtain a code resource encapsulation configuration rule input by a user and determine the internal dependency between code resources according to the code resource encapsulation configuration rule;

[0034] A development state code resource maintenance module is used to design a development state tree-shaped Json data structure according to the internal dependency relationship to maintain the code resources in the development state and obtain a development state maintenance result;

[0035] A running state code resource locking module is used to design a flat Json data structure according to the internal dependency relationship to lock the code resources in the running state and obtain a resource loading result;

[0036] The result integration module integrates the development state maintenance result and the resource loading result to perform dependency management on the code resource.

[0037] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the code resource dependency management method described above are implemented.

[0038] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the code resource dependency management method described above are implemented.

[0039] One or more technical solutions proposed in this application have at least the following technical effects:

[0040] According to the code resource encapsulation configuration rules input by the user, the internal dependencies between code resources are determined. Based on the determined internal dependencies, a tree-shaped Json data structure is designed to represent the code resources in the development state. The tree-shaped Json data structure can clearly reflect the hierarchical relationship and dependency path of the code resources. The tree-shaped Json data structure is used to manage and maintain the code resources in the development state in real time, and the development state maintenance results are obtained. According to the internal dependencies, a flat Json data structure is designed to lock the code resources in the running state. The flat Json structure removes duplicate data and balances the contradiction between compressing the data volume and maintaining information expression. The flat Json data structure is used to lock the code resources and obtain the resource loading result. The resource loading result obtained by locking the code resources through the flat Json data structure ensures the integrity and consistency of the code resources and avoids resource conflicts or missing when the code resources are running. The development state tree-shaped Json data structure is used to manage and maintain the code resources in the development state in real time; the flat Json data structure is used to lock the code resources, and the development state maintenance results and resource loading results are combined to realize the internal dependency management of code resources from the development state to the running state in complex business scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0042] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0043] Figure 1 A flowchart of the first embodiment of the code resource dependency management method of this application is provided;

[0044] Figure 2 A schematic diagram of the code resource mutual calling relationship provided by the code resource dependency management method of this application;

[0045] Figure 3A diagram of the development tree-shaped Json data structure provided for the code resource dependency method of this application;

[0046] Figure 4 A flowchart of a second embodiment of the code resource dependency management method provided for this application;

[0047] Figure 5 A flowchart of a third embodiment of the code resource dependency management method provided for this application;

[0048] Figure 6 A schematic diagram of the module structure of the code resource dependency management device according to an embodiment of the present application;

[0049] Figure 7 Schematic diagram of the device structure of the hardware operating environment involved in the code resource dependency management method in the embodiment of the present application.

[0050] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0051] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0052] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0053] The main solution of the embodiment of the present application is: obtain the code resource encapsulation configuration rules input by the user, determine the internal dependencies between the code resources according to the code resource encapsulation configuration rules; design a development state tree Json data structure according to the internal dependencies to maintain the code resources in the development state, and obtain the development state maintenance results. Among them, the development state maintenance results include the detection results of dependency conflicts and circular dependency anomalies; design a flat Json data structure according to the internal dependencies to lock the code resources in the running state, and obtain the resource loading results. Among them, the resource loading results are the resource list of the locked version of the code resource; display the development state maintenance results and resource loading results through diversified dependency views.

[0054] In this embodiment, for ease of expression, the following is explained by identifying the low-code development platform as the execution entity.

[0055] The embodiments of the present application take into account that in the field of low-code development, with the rapid changes in business needs and the continuous evolution of technology, the extraction, encapsulation and use of public resources such as components, logic, and templates have become an important means to build an efficient low-code development platform and improve development efficiency. At present, the low-code development platform has the ability to encapsulate public resources with low-code. Users can use existing low-code development resources and encapsulate them into various new resources. During the encapsulation process, low-code development resources generate dependencies that present a tree structure. As the complexity of the business increases, low-code development resources are nested with each other, and the dependencies become more complex. Low-code platforms usually highly encapsulate and abstract the underlying technology stack to provide a unified development environment and tool set. The high degree of encapsulation and abstraction of the underlying technology stack makes it impossible for the low-code development platform to manage the running code resources and development code resources under complex dependencies, resulting in unpredictable errors in the process of encapsulating code resources.

[0056] Therefore, the present application provides a solution, which determines the internal dependencies between code resources according to the code resource encapsulation configuration rules input by the user, and designs a tree-shaped Json data structure based on the determined internal dependencies to represent the code resources in the development state. The tree-shaped Json data structure can clearly reflect the hierarchical relationship and dependency path of the code resources. The tree-shaped Json data structure is used to manage and maintain the code resources in the development state in real time, and the development state maintenance results are obtained. A flat Json data structure is designed according to the internal dependencies to lock the code resources in the running state. The flat Json structure removes duplicate data and balances the contradiction between compressing the data volume and maintaining information expression. The code resources are locked using the flat Json data structure to obtain the resource loading result. The resource loading result obtained by locking the code resources through the flat Json data structure ensures the integrity and consistency of the code resources, and avoids resource conflicts or missing situations when the code resources are running. Use the development-state tree-shaped Json data structure to manage and maintain code resources in the development state in real time; use the flat Json data structure to lock code resources, and combine the development-state maintenance results and resource loading results to achieve internal dependency management of code resources from the development state to the running state in complex business scenarios.

[0057] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, a low-code development platform, etc. The following takes the low-code development platform as an example to illustrate this embodiment and the following embodiments.

[0058] Based on this, the embodiment of the present application provides a code resource dependency management method, referring to Figure 1 , Figure 1 This is a flowchart of the first embodiment of the code resource dependency management method of this application.

[0059] In this embodiment, the code resource dependency management method includes steps S10 to S40:

[0060] Step S10, obtaining a code resource encapsulation configuration rule input by a user and determining internal dependencies between code resources according to the code resource encapsulation configuration rule;

[0061] Low-code development platforms provide multiple user input interfaces, such as graphical user interface (GUI), command line interface (CLI), etc. The graphical user interface (GUI) allows users to configure code resources by dragging and dropping, selecting menus, or filling out forms; the command line interface (CLI) allows experienced users to define resource configurations by writing commands or scripts.

[0062] Code resource encapsulation configuration rules include: resource attributes: such as the resource name, type (such as library, framework, service, module, etc.), version, path (or location), size, permissions and other basic information; functional description: briefly describe the role of the resource and its scope in the system; dependency: clearly indicate which other resources the resource depends on.

[0063] The low-code development platform first parses the code resource packaging configuration rules and converts the code resource packaging configuration rules into a data structure that can be understood and processed within the low-code development platform; further, it traverses the entire rule set according to the dependency declarations in the code resource packaging configuration rules to build a dependency relationship, in which each node represents a resource and each edge represents a dependency relationship, thereby determining the internal dependencies between code resources.

[0064] Step S20, designing a development state tree-shaped Json data structure according to the internal dependency relationship to maintain the code resources in the development state, and obtaining a development state maintenance result;

[0065] Based on the internal dependencies between code resources determined in the previous step, the low-code development platform needs to design a suitable tree-shaped Json data structure to represent these resources and the internal dependencies of code resources. Json (JavaScript Object Notation) is very suitable for representing complex data structures because of its lightweight and easy-to-read and write characteristics.

[0066] The root node of the tree-shaped Json data structure usually represents a low-level page, which is the smallest unit at runtime. The nodes under the low-level page can include different types of code resources such as UI components, custom logic, and custom components. Each node records the unique identifier of its resource (such as resource ID), version information, and pointers to its child nodes (i.e., dependencies).

[0067] After selecting the tree-shaped Json data structure as the data type to describe the calling relationship between code resources, traverse all code resources in the development state and read the basic information of the code resources from the code, database or other storage media, including resource type, ID, version, etc. According to the reference and reference relationship of the resources, build the dependency chain between the code resources. Organize the resource information and dependency relationship into a tree-shaped Json data structure. Each node contains detailed information of the resource and a link to its child nodes.

[0068] Since code resources are in the development and testing stages, the code resources in the development state are dynamically changing. The low-code development platform needs to perform real-time maintenance on the code resources in the development state through the development state tree-shaped Json data structure to ensure that the development state tree-shaped Json data structure always reflects the latest resource status, and finally generates a complete development state maintenance result.

[0069] The development state maintenance results record the latest status of all code resources in the development state and their dependencies, providing a clear and intuitive view to view and manage resources, thereby avoiding the failure of code resource dependency management due to complex resource dependencies.

[0070] Step S30, designing a flat Json data structure according to the internal dependency relationship to lock the code resources in the running state, and obtaining a resource loading result;

[0071] Flattening refers to the process of converting a multi-layered nested data structure into a single-layer or less-layered data structure. The flat Json data structure is chosen to represent the running code resources mainly for the following reasons:

[0072] Simplify the loading process: The flat data structure reduces the nesting levels between data, so that resources can be accessed directly based on simple key-value pairs when loading, without recursive traversal or deep parsing.

[0073] Improve performance: At runtime, reducing the complexity of data structures can reduce CPU and memory consumption, thereby improving application startup speed and operating efficiency.

[0074] Easy to manage: The flat data structure makes adding, deleting, and updating resources more intuitive and simple, reducing the risk of errors.

[0075] After determining the flat Json data structure, the low-code development platform will lock the code resources that are about to enter the running state. "Locking" means changing the state of the code resources from the development state to the running state, and fixing its version and configuration information to ensure that the code resources will not have unexpected changes or conflicts during operation.

[0076] After the running code resources are successfully locked, the low-code development platform will load the resource list according to the locked code resource version, and obtain a report or log containing the status, path, version and other information of all loaded resources, that is, the resource loading result.

[0077] Step S40: performing dependency management on the code resources based on the development state maintenance result and the resource loading result.

[0078] Based on the comprehensive development state maintenance results and resource loading results, the operations of comprehensive dependency management of code resources include: further optimizing the loading order and method of resources based on the resource loading results to improve the startup speed and running performance of the application; after modifying the resources in the development state, the low-code development platform can support dynamic updates to the running state to ensure that the application always uses the latest code resources.

[0079] This embodiment provides a code resource dependency management method, which determines the internal dependency between code resources according to the code resource encapsulation configuration rules input by the user, and designs a tree-shaped Json data structure based on the determined internal dependency to represent the code resources in the development state. The tree-shaped Json data structure can clearly reflect the hierarchical relationship and dependency path of the code resources. The tree-shaped Json data structure is used to manage and maintain the code resources in the development state in real time to obtain the development state maintenance results. According to the internal dependency, a flat Json data structure is designed to lock the code resources in the running state. The flat Json structure removes duplicate data and balances the contradiction between compressing the data volume and maintaining information expression. The code resources are locked using the flat Json data structure to obtain the resource loading result. The resource loading result obtained by locking the code resources through the flat Json data structure ensures the integrity and consistency of the code resources, and avoids resource conflicts or missing situations when the code resources are running. Use the development-state tree-shaped Json data structure to manage and maintain code resources in the development state in real time; use the flat Json data structure to lock code resources, and combine the development-state maintenance results and resource loading results to achieve internal dependency management of code resources from the development state to the running state in complex business scenarios.

[0080] In a feasible implementation, step S10 may include steps S11 to S13:

[0081] Step S11, obtaining the code resource encapsulation configuration rule input by the user;

[0082] Users can define rules by directly dragging, selecting, filling out forms, etc. through the graphical configuration interface provided by the low-code platform, or write configuration files in JSON, YAML and other formats to express the package configuration rules in text form. For some advanced users or automated scripts, the low-code development platform provides command line tools to receive and parse package configuration rules.

[0083] Step S12, adjusting the mutual calling relationship between code resources according to the code resource encapsulation configuration rule;

[0084] like Figure 2 As shown, Figure 2 A schematic diagram of the mutual calling relationship of code resources provided for the code resource dependency management method of this application. The low-code page is the smallest unit at runtime; the UI component is the basic UI component provided by the low-code development platform; the custom logic is a common code snippet without an interface, which can be packaged and composed using other custom logic combinations; the custom component, that is, the public component, can be packaged and composed using UI components and other custom components and custom logic combinations. The low-code development platform adjusts the mutual calling relationship between code resources according to the code resource packaging configuration rules input by the user, and obtains the mutual calling relationship of code resources that meets user needs.

[0085] Step S13: determining the internal dependency relationship between the code resources based on the mutual calling relationship.

[0086] Consider the low-opening page as the basic operating unit, and combine it with the mutual calling relationship determined in the previous step to further clarify and refine the internal dependencies between code resources. Since the low-opening page is the operating unit, it is the direct interface for user interaction and the core of resource organization and calling. By organizing and understanding resource dependencies based on the low-opening page, you can more clearly grasp the structure and function of the entire application.

[0087] The process of determining internal dependencies includes: Dependency graph construction: Based on the mutual call relationship, a dependency graph between code resources is constructed. The dependency graph shows the direct and indirect dependencies between resources, which helps to understand and analyze the complexity and stability of the system; Dependency resolution: Parse the dependency graph to identify key resources, potential conflicts, and circular dependencies. These problems may need to be processed or optimized in subsequent steps; Dependency management: Based on the parsing results, a dependency management strategy is formulated. This may include version control, resource isolation, on-demand loading, and other measures to ensure that resources can be correctly loaded and used as expected at runtime.

[0088] In a feasible implementation, step S20 may include steps S21 to S23:

[0089] Step S21, recording all sub-resource versions with the low-opening page as the root resource according to the internal dependency relationship, and designing a development state tree-shaped Json data structure;

[0090] The development tree Json data structure is a tree structure data model expressed in Json format based on internal dependencies. The development tree Json data structure takes the low-opening page as the root node and the resources it directly depends on as child nodes. Since the child nodes may depend on other resources, a multi-layer nested development tree Json data structure is formed. In addition to the information of the resource itself, each node of the development tree Json data structure also contains the version information of other resources it depends on.

[0091] Step S22, traversing the development-state tree-shaped Json data structure layer by layer, detecting dependency conflicts or circular dependency anomalies to maintain code resources in the development state;

[0092] By recursion, such as Figure 3 As shown, Figure 3 A schematic diagram of the development-state tree-shaped Json data structure provided for the code resource dependency method of this application, traversing the development-state tree-shaped Json data structure, going deep into each layer, and checking each resource and its dependencies. Dependency conflict detection whether there are two or more child resources that require different versions of the same parent resource. For example, ModuleA requires version 3.2 of LibX, and another module requires version 3.3 of LibX, which constitutes a dependency conflict. Detecting circular dependencies ensures that no resource depends on itself directly or indirectly to form a closed loop. For example, ModuleA depends on ModuleB, and ModuleB depends on a certain version of ModuleA, which is a circular dependency.

[0093] Step S23, obtaining a development state maintenance result based on the dependency conflict and the circular dependency exception.

[0094] Generate development maintenance results and take corresponding measures based on detected dependency conflicts and circular dependency anomalies. The corresponding measures include:

[0095] Warnings or error prompts inform developers of dependency issues; recommended solutions, such as upgrading or downgrading certain resource versions to resolve conflicts; automated repairs, such as automatically adjusting versions to eliminate circular dependencies; blocking the build or deployment process until all dependency issues are resolved. By generating development maintenance results and taking corresponding measures, comprehensive maintenance and management of internal dependencies of code resources is achieved.

[0096] Based on the first embodiment of the present application, the second embodiment of the present application is proposed. In the second embodiment of the present application, the same or similar contents as those of the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following.

[0097] On this basis, please refer to Figure 4 , Figure 4 A flowchart of the second embodiment of the code resource dependency management method provided for this application.

[0098] In this embodiment, a flat Json data structure is designed according to the internal dependency relationship to lock the code resources in the running state, and step S30 of obtaining the resource loading result may include steps S31 to S34:

[0099] Step S31, searching for a resource version configuration file held by the low-opening page according to the internal dependency relationship;

[0100] There is a tree-shaped calling relationship between resources in the page, but in the actual operation process, you don't need to care about the calling relationship between resources. Each low-opening page will hold a Json configuration file that includes all resource versions used internally. According to the internal dependencies of the low-opening page (these dependencies are described and recorded through the tree-shaped Json data structure in the development state), the resource version configuration file held by the page is searched.

[0101] Step S32, designing a flat Json data structure based on the resource version configuration file;

[0102] Use a flat Json data structure to organize and express resource version configuration files, convert the resources and their version information of the resource version configuration files in the tree dependency relationship into a flat Json data structure, remove duplicate data, and only retain necessary version information and possible loading control parameters (such as loading mode, loading priority, loading order, etc.).

[0103] Step S33, reading the flat Json data structure to lock the code resources in the running state;

[0104] Read the resource version information in the flat Json data structure, and load and lock the corresponding resource version based on this information at runtime to prevent compatibility issues caused by resource version conflicts or incorrect loading, and ensure that the correct version of the resource is loaded when the code resource is running.

[0105] Step S34, loading the resource list according to the locked running state code resource version to obtain the resource loading result.

[0106] The resource list is loaded according to the locked running code resource version, that is, the required resources are loaded according to the specified loading mode, priority and order according to the information in the flat Json data structure. Specifically, the low-code development platform loads the required resources one by one according to the resource version information and loading control parameters in the flat Json data structure, and generates resource loading results. The resource loading results include a list of resources that have been successfully loaded, a list of resources that have failed to load, and any related error or warning information.

[0107] In this embodiment, based on the established internal dependencies, the resource version configuration file held by the corresponding low-opening page is accurately found, and the resource version configuration file is converted into a flat Json data structure, removing redundant data and repeated levels, thereby reducing the size of the configuration file and improving data processing efficiency. By reading the resource version information in the flat Json data structure, the version locking of the code resources in the running state is achieved. Based on the locked resource version, the resource list is loaded quickly and accurately to ensure that the low-code development platform can respond quickly during runtime. Through the organic combination and interaction of the above steps, the internal dependency management of code resources from the development state to the running state in complex business scenarios is effectively realized, which improves the efficiency of resource management and the stability of the low-code development platform.

[0108] Based on the first embodiment and / or the second embodiment of the present application, the third embodiment of the present application is proposed. In the third embodiment of the present application, the same or similar contents as those of the first embodiment and / or the second embodiment can be referred to the above introduction, and will not be repeated in the following.

[0109] On this basis, please refer to Figure 5 , Figure 5 A flowchart of the third embodiment of the code resource dependency management method provided for this application.

[0110] In this embodiment, the resource list is loaded according to the locked running state code resource version, and steps S35 to S36 are included after step S34 to obtain the resource loading result:

[0111] Step S35, expanding the configuration field according to the flat Json data structure;

[0112] The main purpose of this step is to further expand the previously designed flat Json data structure to include more configuration fields. These configuration fields can be used to perform more refined loading control on running code resources. The expanded configuration fields include:

[0113] Field definition: Define new configuration fields based on business requirements and system architecture. These fields may include resource loading mode (such as asynchronous loading, synchronous loading), loading priority, conditional loading (determining whether to load based on specific conditions), loading order, etc.

[0114] Add fields: Add the defined configuration fields to the flat Json data structure. Due to the design characteristics of the flat structure, these new fields can be added directly as attributes of the Json object without considering the hierarchical relationship.

[0115] Field validation: After adding configuration fields, perform necessary validation to ensure that the newly added fields comply with the Json format specification and can be correctly parsed and used in subsequent steps.

[0116] Document update: Update relevant development documents or configuration instructions, and provide detailed descriptions of newly added configuration fields and their functions and usage, so that developers and maintainers can understand and use them.

[0117] Step S36: Control the loading of the running code resources through the configuration field.

[0118] The extended configuration field is used to control the loading of running code resources. During the resource loading process, the configuration field in the flat Json data structure is first parsed to obtain the resource loading mode, priority, conditions and other information.

[0119] Furthermore, the loading process of the code resources is controlled according to the configuration field information obtained through the analysis. For example, if the loading mode of a resource is set to asynchronous loading, the low-code development platform will load the resource asynchronously; if the loading priority is set, the low-code development platform will load the resource according to the priority order; if conditional loading is set, the low-code development platform will load the resource only when specific conditions are met.

[0120] In this embodiment, according to the flat Json data structure, the configuration field is extended, and the extended configuration field is used to control the loading of the running code resources. Through the extended configuration field and the loading control strategy, a more refined and dynamic management of the running code resources is achieved.

[0121] Based on the above embodiments of the present application, a fourth embodiment of the present application is proposed. In the fourth embodiment of the present application, the same or similar contents as those of the above embodiments can be referred to the above introduction, and will not be described in detail later.

[0122] In this embodiment, after step S40 of performing dependency management on the code resource based on the development state maintenance result and the resource loading result, steps S1 to S3 are also included:

[0123] Step S1, displaying the development state maintenance result in real time in a visual manner of a dependency list or a version conflict list;

[0124] The development state maintenance results include dependency conflicts and circular dependency exceptions. The low-code development platform organizes the resource maintenance results in the development state (including resource dependencies, version information, and possible version conflicts, etc.) into a dependency list or version conflict list, and displays it to developers in real time in a visual way.

[0125] Visualization methods include the following: Dependency graph: Displays the dependency relationship between resources in a graphical way, so that developers can intuitively see the other resources that each resource depends on and which resources it depends on. Version comparison table: Lists the current version, expected version, and conflicting version of the resource to help developers quickly locate version conflict issues. Real-time status panel: Displays the real-time status of the resource, such as whether it has been loaded, loading progress, loading results, etc., as well as related error messages or warning prompts.

[0126] Step S2, automatically triggering a version management pop-up window to draw a left dependency tree and a right dependency tree;

[0127] After displaying the development status maintenance results in real time, the version management pop-up window is automatically triggered. The low-code development platform first generates the tree structure on the left (displaying the resource hierarchy), the list on the left (may display resource name, ID, etc.) and various Map data structures (used to store mapping relationships of resource versions, reference paths, and other information) based on the current project status and resource information.

[0128] Select one or more resources in the tree structure on the left, and click to trigger the process of calculating the tree on the right. During this process, the low-code development platform will use the resldMapToCurrVAndLatestV method to obtain the current version number and the latest version number of the selected resource. Based on the resource ID and resldMapPaths (a mapping containing resource reference paths) selected by the user, the low-code development platform calculates all paths of the resource on copyPomTree (a tree structure representing project resource dependencies).

[0129] Furthermore, the low-code development platform starts to traverse the copyPomTree, and for each piece of data, it checks whether it is related to the resource selected by the user. During the traversal process, the low-code development platform selects a suitable version number for each related record and records the referenced paths of these resources. This information will be stored in data structures such as pomTree and pomList.

[0130] Furthermore, if a conflict is found during the version selection process (for example, different resources reference different versions of the same resource), the low-code development platform will pop up a conflict resolution pop-up window. In this pop-up window, the user can decide whether to update the version number by comparing the two version numbers, or resolve the conflict manually. After the version number is modified, the low-code development platform needs to supplement the new resource reference information in copyPomTree and copyPomList caused by the version number modification. Based on the latest resource version information and reference relationship, the system will redraw the tree structure on the left and right to reflect the latest project status.

[0131] Step S3, displaying the resource loading result in real time through the left dependency tree and the right dependency tree.

[0132] In this embodiment, by displaying the development state maintenance results in real time in a visual way of a dependency list or a version conflict list, the dependencies between resources, version differences, and potential version conflict problems can be quickly identified. This intuitive display method is more efficient than traditional text or log output, and helps to quickly locate problems. Trigger the version management pop-up window and draw the left and right dependency trees, providing a powerful tool to manage and analyze version differences. The left dependency tree shows the resource dependencies in the current development state, while the right dependency tree can show the dependencies under another version or branch. The resource loading results are displayed in real time through the left and right dependency trees, and the loading status of the resources is monitored in real time, including loading progress, loading results, and possible errors or warnings. Visual methods such as dependency lists, version conflict lists, left and right dependency trees, etc. display the dependency management results of code resources in real time, and assist in the operation and maintenance management of code resources from development state to operation state.

[0133] This application also provides a code resource dependency management device, please refer to Figure 6 , the code resource dependency management device comprises:

[0134] An internal dependency determination module 10, configured to obtain a code resource encapsulation configuration rule input by a user and determine the internal dependency between code resources according to the code resource encapsulation configuration rule;

[0135] The low-code development platform first parses the code resource packaging configuration rules and converts the code resource packaging configuration rules into a data structure that can be understood and processed within the low-code development platform; further, it traverses the entire rule set according to the dependency declarations in the code resource packaging configuration rules to build a dependency relationship, in which each node represents a resource and each edge represents a dependency relationship, thereby determining the internal dependencies between code resources.

[0136] The development state code resource maintenance module 20 is used to design a development state tree-shaped Json data structure according to the internal dependency relationship to maintain the code resources in the development state and obtain a development state maintenance result;

[0137] After selecting the tree-shaped Json data structure as the data type to describe the calling relationship between code resources, traverse all code resources in the development state and read the basic information of the code resources from the code, database or other storage media, including resource type, ID, version, etc. According to the reference and reference relationship of the resources, build the dependency chain between the code resources. Organize the resource information and dependency relationship into a tree-shaped Json data structure. Each node contains detailed information of the resource and a link to its child nodes.

[0138] The running state code resource locking module 30 is used to design a flat Json data structure according to the internal dependency relationship to lock the code resources in the running state and obtain a resource loading result;

[0139] After the running code resources are successfully locked, the low-code development platform will load the resource list according to the locked code resource version, and obtain a report or log containing the status, path, version and other information of all loaded resources, that is, the resource loading result.

[0140] The result integration module 40 integrates the development state maintenance result and the resource loading result to perform dependency management on the code resources.

[0141] The code resource dependency management device provided by the present application adopts the code resource dependency management method in the above embodiment, which can solve the technical problem of code resource dependency management. Compared with the prior art, the beneficial effects of the code resource dependency management device provided by the present application are the same as the beneficial effects of the code resource dependency management method provided by the above embodiment, and other technical features in the code resource dependency management device are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0142] The present application provides a code resource dependency management device, which includes: at least one processor; and a memory that is communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the code resource dependency management method in the above-mentioned embodiment 1.

[0143] Reference below Figure 7, which shows a schematic diagram of the structure of a code resource dependency management device suitable for implementing the embodiment of the present application. The code resource dependency management device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7 The code resource dependency management device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0144] like Figure 7 As shown, the code resource dependency management device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the code resource dependency management device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the code resource dependency management device to communicate with other devices wirelessly or by wire to exchange data. Although the code resource dependency management device with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or provided alternatively.

[0145] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0146] The code resource dependency management device provided by the present application adopts the code resource dependency management method in the above embodiment to solve the technical problem of code resource dependency management. Compared with the prior art, the beneficial effects of the code resource dependency management device provided by the present application are the same as the beneficial effects of the code resource dependency management method provided by the above embodiment, and the other technical features in the code resource dependency management device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0147] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0148] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0149] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, wherein the computer-readable program instructions are used to execute the code resource dependency management method in the above-mentioned embodiment.

[0150] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.

[0151] The computer-readable storage medium may be included in the code resource dependency management device; or may exist independently without being assembled into the code resource dependency management device.

[0152] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the code resource dependency management device, the code resource dependency management device: obtains the code resource encapsulation configuration rules input by the user and determines the internal dependency relationship between the code resources according to the code resource encapsulation configuration rules; designs a development state tree-shaped Json data structure according to the internal dependency relationship to maintain the code resources in the development state and obtain a development state maintenance result; designs a flat Json data structure according to the internal dependency relationship to lock the code resources in the running state and obtain a resource loading result; and performs dependency management on the code resources by combining the development state maintenance result and the resource loading result.

[0153] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0154] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0155] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0156] The readable storage medium provided in the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned code resource dependency management method, and can solve the technical problems of code resource dependency management. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the present application are the same as the beneficial effects of the code resource dependency management method provided in the above-mentioned embodiment, and will not be elaborated here.

[0157] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned code resource dependency management method when executed by a processor.

[0158] The computer program product provided by this application can solve the technical problem of code resource dependency management. Compared with the prior art, the beneficial effects of the computer program product provided by this application are the same as the beneficial effects of the code resource dependency management method provided by the above embodiment, which will not be repeated here.

[0159] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A code resource dependency management method, characterized in that: The method comprises: Obtaining a code resource encapsulation configuration rule input by a user and determining internal dependencies between code resources according to the code resource encapsulation configuration rule; Design a development state tree-shaped Json data structure according to the internal dependency relationship to maintain the code resources in the development state, and obtain a development state maintenance result; Design a flat Json data structure according to the internal dependency relationship to lock the code resources in the running state and obtain the resource loading result; Dependency management of the code resources is performed based on the development state maintenance result and the resource loading result.

2. The method according to claim 1, characterized in that The step of obtaining the code resource encapsulation configuration rule input by the user and determining the internal dependency relationship between code resources according to the code resource encapsulation configuration rule comprises: Get the code resource encapsulation configuration rules entered by the user; Adjust the mutual calling relationship between code resources according to the code resource encapsulation configuration rule; The internal dependency relationship between the code resources is determined based on the mutual calling relationship.

3. The method according to claim 1, characterized in that The step of maintaining the code resources in the development state by designing the development state tree-shaped Json data structure according to the internal dependency relationship to obtain the development state maintenance result comprises: According to the internal dependency relationship, all sub-resource versions with the low-opening page as the root resource are recorded, and a development state tree-shaped Json data structure is designed; Traversing the development-state tree-shaped Json data structure layer by layer, detecting dependency conflicts or circular dependency anomalies to maintain code resources in the development state; A development state maintenance result is obtained based on the dependency conflict and the circular dependency exception.

4. The method according to claim 1, characterized in that The step of designing a flat Json data structure according to the internal dependency relationship to lock the code resources in the running state and obtain the resource loading result includes: Find the resource version configuration file held by the lower-opening page according to the internal dependency relationship; Design a flat Json data structure based on the resource version configuration file; Read the flat Json data structure to lock the code resource in the running state; The resource list is loaded according to the locked running state code resource version to obtain the resource loading result.

5. The method according to claim 4, characterized in that After the step of loading the resource list according to the locked running state code resource version to obtain the resource loading result, the following step further comprises: Expand the configuration fields according to the flat Json data structure; The configuration field is used to control the loading of code resources in the running state.

6. The method according to claim 1, characterized in that After the step of performing dependency management on the code resource by integrating the development state maintenance result and the resource loading result, the following step further comprises: The development state maintenance result is displayed in real time in a visual manner of a dependency list or a version conflict list.

7. The method according to claim 1, characterized in that After the step of performing dependency management on the code resource by integrating the development state maintenance result and the resource loading result, the following step further comprises: Automatically trigger the version management pop-up window to draw the dependency tree on the left and the dependency tree on the right; The resource loading result is displayed in real time through the left dependency tree and the right dependency tree.

8. A code resource dependency management device, characterized in that: The device comprises: An internal dependency determination module, used to obtain a code resource encapsulation configuration rule input by a user and determine the internal dependency between code resources according to the code resource encapsulation configuration rule; A development state code resource maintenance module is used to design a development state tree-shaped Json data structure according to the internal dependency relationship to maintain the code resources in the development state and obtain a development state maintenance result; A running state code resource locking module is used to design a flat Json data structure according to the internal dependency relationship to lock the code resources in the running state and obtain a resource loading result; The result integration module integrates the development state maintenance result and the resource loading result to perform dependency management on the code resource.

9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the code resource dependency management method according to any one of claims 1 to 7 are implemented.

10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the code resource dependency management method according to any one of claims 1 to 7 are implemented.