Project dependence management system and method
By injecting dependency information during image generation and using multi-language SDK packages, the problems of complex configuration injection and the inability to dynamically switch external dependencies in traditional systems are solved, thereby improving the stability and flexibility of the distributed project management system.
Patent Information
- Application Number
- CN202511715702.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-21
- Publication Date
- 2026-03-27
AI Technical Summary
Traditional distributed project management systems have complex configuration injection operations during distributed deployment, and external dependencies cannot be dynamically switched at runtime, resulting in insufficient disaster recovery, multi-site active-active deployment of resources, and dynamic switching functions.
This invention provides a project dependency management system that stores dependency information through a configuration management component, injects dependency information during image generation through a configuration injection component, and accesses external dependencies at runtime using a dependency resource access toolkit component. It supports multi-language SDK packages and enables static configuration and dynamic switching.
It enables the elimination of dependency injection at each deployment location during distributed deployment, supporting seamless disaster recovery, migration, and scaling operations for business projects, thereby improving the stability and flexibility of the system.
Smart Images

Figure CN121742855A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of software applications, and more particularly to a project dependency management system and method. Background Technology
[0002] Traditional distributed project dependency management systems include Disconf, Spring Cloud Config, etcd, Consul, and Deephacks Config. Disconf and Spring Cloud Config inject configuration at runtime; etcd, Consul, and Deephacks Config inject configuration at deployment time. They simply place configuration in fixed locations, requiring users to perform secondary development to use these configurations, which increases the complexity of integration and usage. Furthermore, traditional distributed project management systems often restrict the language used in the project; for example, Disconf and Spring Cloud Config require Java as the only language, which brings many troubles and limitations in complex real-world application environments.
[0003] In the process of developing this invention, the applicant discovered at least the following problems in the prior art:
[0004] Traditional distributed project management systems suffer from complex configuration injection operations and the inability to dynamically switch external dependencies during runtime during distributed deployment. Summary of the Invention
[0005] This invention provides a project dependency management system and method to at least solve the problems of complex configuration injection operations and the inability to dynamically switch external dependencies at runtime during the distributed deployment of traditional distributed project management systems.
[0006] To achieve the above objectives, in a first aspect, embodiments of the present invention provide a project dependency management system, comprising:
[0007] A configuration management component is used to store the dependency information and external dependency details of business projects; the dependency information of the business project includes at least one unique identifier of an external dependency in the business project and the corresponding external dependency type; the external dependency details of the business project include the unique identifier of each external dependency in the business project and the corresponding external dependency access information;
[0008] A configuration injection component is configured to, in response to a command to generate an image of the business project, obtain the dependency information of the business project from the configuration management component and inject the dependency information into the image of the business project;
[0009] The dependency resource access toolkit component is used during the image execution of the business project to respond to an access request from the business project with a target external dependency unique identifier as a parameter, and to access the external dependency specified by the external dependency access information corresponding to the target external dependency unique identifier based on the target external dependency unique identifier, the dependency information of the business project, and the external dependency details; the target external dependency unique identifier can be any external dependency unique identifier in the business project.
[0010] Secondly, embodiments of the present invention provide a project dependency management method, including:
[0011] The system stores the dependency information and external dependency details of business projects; the dependency information of a business project includes at least one unique identifier of an external dependency in the business project and the corresponding external dependency type; the external dependency details of a business project include the unique identifier of each external dependency in the business project and the corresponding external dependency access information.
[0012] In response to a command to generate an image of the business project, the dependency information of the business project is obtained, and the dependency information is injected into the image of the business project;
[0013] During the mirror execution of the business project, in response to the access request of the business project with a target external dependency unique identifier as a parameter, the external dependency specified by the external dependency access information corresponding to the target external dependency unique identifier is accessed according to the target external dependency unique identifier, the dependency information of the business project, and the external dependency details; the target external dependency unique identifier can be any external dependency unique identifier in the business project.
[0014] The above technical solution has the following beneficial effects: By injecting dependency information (static configuration) into the business project when generating the business project image, it is not necessary to inject dependency information separately at each deployment location during distributed deployment. This dependency information records the unique identifiers of external dependencies used within the business project and their corresponding external dependency types. The external dependency details of each business project are stored in a storage location outside the business project, such as a configuration management component, for unified management. This storage location can be shared by all business projects. Each business project can obtain external dependency access information by querying the external dependency details through the unique identifier of the external dependency, thus accessing the external dependency pointed to by the external dependency access information based on the unique identifier. Furthermore, backend administrators can easily establish a correspondence between the unique identifier of an external dependency and a new external dependency by modifying the external dependency access information corresponding to a specific external dependency identifier in the external dependency details of a relevant business project. Based on this feature, seamless disaster recovery, migration, and scaling operations for business projects can be further implemented at runtime. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 This is an architecture diagram of a project dependency management system according to one embodiment of the present invention;
[0017] Figure 2 This is a flowchart of a project dependency management method according to one embodiment of the present invention;
[0018] Figure 3 This is a deployment diagram of a project dependency management system according to one embodiment of the present invention;
[0019] Figure 4 This is another flowchart of a project dependency management method according to one embodiment of the present invention;
[0020] Figure 5 This is an interaction sequence diagram of a project dependency management method according to one embodiment of the present invention. Detailed Implementation
[0021] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0022] Abbreviations and terms:
[0023] Distributed configuration management system: This refers to a mechanism used to manage and maintain configuration data across multiple nodes in a distributed system. Such systems typically support centralized version control, node configuration synchronization and unified distribution, and are suitable for large-scale service architectures with autonomous components, cross-regional deployment, and elastic scaling requirements.
[0024] Zero-interference operation: This means that during configuration changes or resource switching, the system does not experience significant performance degradation, function jitter, or interruption of running services or components, ensuring that user access and business processes are not affected by configuration operations, thereby achieving the goal of "uninterrupted online operation".
[0025] Build-time binding means that the configurations that a service or application depends on are fixed in the deployment artifacts during the build or image packaging stage, without the need for dynamic retrieval at runtime, thus avoiding runtime environment uncertainties and potential configuration drift.
[0026] Pre-run resolution: This refers to the structured parsing and initialization of the configuration injected into the build artifacts into objects or components that can be directly invoked at runtime, before the application or container officially starts. This step is not triggered repeatedly during runtime, ensuring that the resolution logic is isolated from the runtime process.
[0027] Dynamic switching refers to the ability of the system to switch or replace underlying resource configurations (such as database addresses, message queue instances, cache nodes, etc.) in real time without stopping services, and to switch the new configuration as the target of business calls, ensuring that the switching process is imperceptible to the business flow and a smooth transition.
[0028] Disaster recovery operation: refers to the system's ability to trigger predefined backup resource paths or backup configurations when abnormal system operation or resource failure is detected, and automatically take over the faulty node through the above dynamic switching mechanism, so as to achieve the system's self-healing capability of continuous business availability.
[0029] The inventors discovered that while etcd, Consul, and Deephacks Config inject configurations during deployment, they simply place the configurations in fixed locations, requiring users to perform secondary development to utilize them, thus increasing complexity in integration and usage. Traditional distributed project management systems often restrict the languages used in projects; for example, Disconf and Spring Cloud Config require Java only, which brings many problems and limitations in complex real-world application environments. In actual online use, disaster recovery, multi-site active-active deployment of resources, and dynamic failover are crucial, especially in the event of unexpected situations such as online resource unavailability. These are features that existing distributed project dependency management systems generally lack. Traditional technologies cannot prevent runtime failures from impacting the production environment.
[0030] Firstly, such as Figure 1 As shown, an embodiment of the present invention provides a project dependency management system, including:
[0031] Configuration management component 100 is used to store dependency information and external dependency details of business projects; the dependency information of the business project includes at least one unique identifier of an external dependency in the business project and the corresponding external dependency type; the external dependency details of the business project include a unique identifier of each external dependency in the business project and the corresponding external dependency access information.
[0032] Configuration injection component 101 is used to obtain the dependency information of the business project from the configuration management component in response to the command to generate the image of the business project, and inject the dependency information into the image of the business project;
[0033] The dependency resource access toolkit component 102 is used, during the image execution of the business project, in response to an access request from the business project using a target external dependency unique identifier as a parameter, to access the external dependency specified by the external dependency access information corresponding to the target external dependency unique identifier, based on the target external dependency unique identifier, the dependency information of the business project, and the external dependency details; the target external dependency unique identifier can be any external dependency unique identifier in the business project.
[0034] In some embodiments, the configuration management component 100 can manage and store dependency information and external dependency details for multiple business projects. This storage can be achieved through configuration files in a file system or forms in a database system. Business projects can be independent or interdependent. The dependency information for each business project includes a unique identifier for the external dependency and the corresponding external dependency type. A business project typically consists of business code and other dependency packages, such as custom SDK dependency packages or standard dependency packages and libraries provided by third-party tools. The external dependency to be accessed is explicitly indicated in the business project's code using a unique identifier. Each unique identifier corresponds to external dependency access information, which points to the actual external dependency. The unique identifier is hard-coded into the business project's code and remains unchanged once the business project is developed, serving as the unique name of the external dependency used in the project. The mapping between the unique identifier and the corresponding external dependency access information (i.e., external dependency details) is stored outside the business project and is dynamically configured. This allows backend administrators to change the external dependency access information corresponding to the unique identifier in the backend, thereby associating the unique identifier with the new external dependency. Dependency information is injected into the business project image via static configuration. This information stores the unique identifier of each external dependency and its corresponding external dependency type. For example, external dependency types may include databases and / or third-party services. The business project can create corresponding object instances for operating external dependencies based on their unique identifiers and external dependency types. These object instances can access the corresponding external dependencies through the external dependency access information corresponding to the unique identifier. External dependency access information includes the IP address of the external dependency and may also include port and / or authentication information. External dependencies include, but are not limited to, various external resources such as databases (MySQL, SQLite) and / or external service interfaces. For example, the following is one organization method for dependency information:
[0035] resources:
[0036] redis:
[0037] -name:punch-challenge-redis
[0038] -name:card-read-times-redis
[0039] mysql:
[0040] -name:content-mysql
[0041] Here, "resources" indicates that the project depends on external resources. "redis" and "mysql" are the external dependency types. "name:punch-challenge-redis", "name:card-read-times-redis", and "name:content-mysql" represent three unique identifiers for external dependencies. The dependency information above indicates that the business project depends on some external resources, specifically the Redis corresponding to the unique identifiers "punch-challenge-redis" and "card-read-times-redis", and the MySQL corresponding to the unique identifier "content-mysql".
[0042] For example, here is another form of information organization:
[0043] services:
[0044] weibo-user-graph:
[0045] -name:user-client
[0046] Here, `services` indicates the external service interface that is relied upon; `weibo-user-graph` indicates the type of external dependency; and `user-client` is the unique identifier of the external dependency used in the business project. This `services` definition indicates that the business project depends on the Weibo user center's `user-client` RPC service.
[0047] The embodiments of this invention have the following technical effects: By injecting dependency information (static configuration) into the business project when generating the business project image, it is not necessary to inject dependency information separately at each deployment location during distributed deployment. This dependency information records the unique identifiers of external dependencies used within the business project and their corresponding external dependency types. The external dependency details of each business project are stored in a storage location outside the business project, such as a configuration management component, for unified management. This storage location can be shared by all business projects. Each business project can obtain external dependency access information by querying the external dependency details through the unique identifier of the external dependency, thereby accessing the external dependency pointed to by the external dependency access information based on the unique identifier. Furthermore, backend administrators can easily establish a correspondence between the unique identifier of an external dependency and a new external dependency by modifying the external dependency access information corresponding to a specific unique identifier in the external dependency details of a relevant business project. Based on this feature, seamless disaster recovery, migration, and scaling operations for business projects can be achieved at runtime.
[0048] Furthermore, the dependency resource access toolkit component is specifically used to obtain the dependency information from the image of the business project when the business project starts; for each unique identifier of an external dependency in the dependency information, create a corresponding object instance according to the external dependency type corresponding to the unique identifier; and establish an access link with the external dependency specified by the external dependency access information corresponding to the unique identifier, which serves as the access link corresponding to the target external dependency unique identifier. The object instance accesses the external dependency through the access link.
[0049] In some embodiments, when a business project starts, an object instance of the corresponding external dependency type is generated for each unique external dependency identifier, and an access link to the external dependency is established based on the external dependency access information corresponding to the unique external dependency identifier. The object instance can access the external dependency through this access link. The external dependency type information is injected into the image of the business project, while the external dependency access information corresponding to the unique external dependency identifier is stored outside the business project. This allows backend administrators to modify the content of the external dependency access information corresponding to the unique external dependency identifier as needed, thereby modifying the external dependencies actually accessed by the business project through the unique external dependency identifier. This enables seamless disaster recovery, migration, and scaling operations for the business project at runtime. Object instances are generated for all external dependency types corresponding to unique external dependency identifiers at startup, and these object instances can be used directly during runtime, avoiding the impact of temporary generation before use on response speed.
[0050] Furthermore, the dependency resource access toolkit component is specifically used during the operation of the business project to respond to an access request from the business project with a unique identifier of the target external dependency as a parameter, and to call the object instance corresponding to the unique identifier of the target external dependency, and access the external dependency pointed to by the access link through the access link corresponding to the unique identifier of the target external dependency.
[0051] In some embodiments, at runtime, a business project can invoke an object instance through a unique identifier of an external dependency, and the object instance can manipulate the external dependency through the corresponding access link. The access link corresponding to the unique identifier of the external dependency is used as an input parameter for the object instance corresponding to the unique identifier of the external dependency, thereby decoupling the business project from the external dependency actually accessed. For example, if, for some reason, the external dependency A1 accessed by a unique identifier of external dependency A needs to be replaced with external dependency A2, it is not necessary to regenerate the object instance A corresponding to the unique identifier of external dependency A. It is only necessary to re-establish the access link to access external dependency A2, continue to use the object instance A corresponding to the unique identifier of external dependency A, and access external dependency A2 through the access link of external dependency A2.
[0052] Furthermore, the dependent resource access toolkit component is an SDK dependency package that is the same as the programming language of the business project, which is pulled from multiple SDK dependency packages of various pre-developed programming languages during the development of the business project, and deployed in the business project.
[0053] In some embodiments, the dependency resource access toolkit component is pre-added to the execution archive of the business project; the execution archive is used to generate an image of the business project. Different business projects may use different programming languages, such as Go, Java, PHP, etc. SDK dependency packages containing the same functionality are pre-developed using multiple programming languages. These SDK dependency packages in different programming languages all contain the functionality of the dependency resource access toolkit component. When packaging a business project, based on the programming language of the business project, the SDK dependency package in the same programming language is automatically pulled and packaged into the business project as the dependency resource access toolkit component, thereby achieving automatic selection of the SDK dependency package.
[0054] Furthermore, the configuration management component is also used to modify the external dependency access information corresponding to the unique external dependency identifier of the business project to the access information of the backup external dependency of the failed external dependency when the external dependency specified by the external dependency access information corresponding to the unique external dependency identifier of the external dependency fails.
[0055] In some embodiments, external dependency details (including external dependency access information corresponding to a unique external dependency identifier) are stored outside the business project and managed by a configuration management component. This allows the configuration management component to manage and modify the external dependency access information corresponding to a unique external dependency identifier at runtime. When the external dependency pointed to by the current external dependency access information of a unique external dependency identifier fails, the external dependency access information corresponding to that unique external dependency identifier in the external dependency details can be modified at runtime to point to a backup external dependency of the failed external dependency. This allows the business project to access the backup external dependency using the unique external dependency identifier instead of the failed external dependency. The business project only sees the unique external dependency identifier and is unaware of which specific external dependency it is accessing, thus achieving runtime disaster recovery that is imperceptible to the business project.
[0056] Furthermore, the configuration management component is also configured to, in response to a data migration command for the business project, obtain a first external dependency unique identifier for data migration out and a second external dependency access information for data migration in from the data migration command, migrate the data on the external dependency specified by the first external dependency access information corresponding to the first external dependency unique identifier for data migration out to the external dependency specified by the second external dependency access information for data migration in, and replace the first external dependency access information corresponding to the first external dependency unique identifier for data migration out in the configuration management component with the second external dependency access information.
[0057] In some embodiments, when it is necessary to migrate the data in the current external dependency corresponding to a certain external dependency unique identifier to a new external dependency, it is only necessary to copy the data to the new external dependency and then modify the access information of the external dependency corresponding to the external dependency unique identifier to the access information of the new external dependency. This achieves seamless external dependency data migration at runtime. For business projects, only the external dependency unique identifier is visible, and they are unaware that the external dependency corresponding to the external dependency unique identifier has changed.
[0058] Furthermore, the configuration management component is also used to respond to the expansion command for the business project, obtain the unique identifier of the third external dependency that needs to be expanded and the expansion external dependency access information from the expansion command, and append the expansion external dependency access information to the third external dependency access information corresponding to the unique identifier of the third external dependency that needs to be expanded, to obtain the expanded fourth external dependency access information.
[0059] In some embodiments, when the resources of the external dependency corresponding to a certain external dependency unique identifier are insufficient, the access information of the external dependency corresponding to that external dependency unique identifier can be modified in the background to add access information for additional resources. This allows access to more external dependencies when operating on that external dependency unique identifier, achieving seamless resource scaling for runtime business projects.
[0060] Furthermore, the dependency resource access toolkit component is also used to re-distribute the data on the external dependency specified by the third external dependency access information according to a preset distribution rule and store it on the external dependency specified by the expanded fourth external dependency access information; when the business project accesses the operation data of the third external dependency unique identifier, the object instance corresponding to the third external dependency unique identifier locates the data on the external dependency specified by the expanded fourth external dependency access information according to the same preset distribution rule.
[0061] In some embodiments, the data on the external dependencies corresponding to the original external dependency access information is re-distributed and stored on the external dependencies corresponding to the expanded external dependency access information according to a preset distribution rule. When a business project accesses the unique identifier of the external dependency operation data, the instance object corresponding to the unique identifier of the external dependency locates the data on the external dependencies corresponding to the expanded external dependency access information according to the same preset distribution rule. When expanding resources, the original data can be distributed and stored on the expanded external dependencies according to the preset distribution rule, and the data is located according to the same distribution rule when accessing the data.
[0062] Furthermore, the dependency resource access toolkit component is also used to re-establish the access link with the external dependency specified by the changed external dependency access information when it is discovered that the external dependency access information corresponding to a certain external dependency unique identifier has changed.
[0063] In some embodiments, the configuration management component can periodically retrieve details of external dependencies and detect changes in the access information of an external dependency corresponding to a unique identifier. Furthermore, if an access failure occurs each time an external dependency is accessed (e.g., the link is unavailable or the external dependency cannot be found), the configuration management component can be actively queried to determine if any changes have occurred, thus ensuring timely updates to external dependency changes.
[0064] Furthermore, the system also includes:
[0065] The dependency management component provides a backend interface to receive the external dependency type and access information corresponding to the unique identifier of each external dependency in the business project, generate the dependency information and external dependency details of the business project, and store the dependency information and external dependency details of the business project in the configuration management component.
[0066] In some embodiments, a backend interface is provided to allow backend administrators to specify the external dependencies for each business project in the background.
[0067] Secondly, such as Figure 2 As shown, this embodiment of the invention provides a project dependency management method, including:
[0068] Step S20: Store the dependency information and external dependency details of the business project; the dependency information of the business project includes at least one unique identifier of an external dependency in the business project and the corresponding external dependency type; the external dependency details of the business project include the unique identifier of each external dependency in the business project and the corresponding external dependency access information.
[0069] Step S21: In response to the command to generate the image of the business project, obtain the dependency information of the business project and inject the dependency information into the image of the business project;
[0070] Step S22: During the mirror execution of the business project, in response to the access request of the business project with a target external dependency unique identifier as a parameter, the external dependency specified by the external dependency access information corresponding to the target external dependency unique identifier is accessed according to the target external dependency unique identifier, the dependency information of the business project, and the external dependency details; the target external dependency unique identifier can be any external dependency unique identifier in the business project.
[0071] Further, during the mirror execution of the business project, in response to an access request from the business project using a unique identifier of a target external dependency as a parameter, accessing the external dependency specified by the external dependency access information corresponding to the unique identifier of the target external dependency, based on the unique identifier of the target external dependency, the dependency information of the business project, and the external dependency details, includes:
[0072] When the business project starts, the dependency information is obtained from the image of the business project. For each unique identifier of external dependency in the dependency information, a corresponding object instance is created according to the external dependency type corresponding to the unique identifier of external dependency. According to the external dependency access information corresponding to the unique identifier of external dependency, an access link is established with the external dependency specified by the external dependency access information, which serves as the access link corresponding to the target unique identifier of external dependency.
[0073] Further, during the mirror execution of the business project, in response to an access request from the business project using a unique identifier of a target external dependency as a parameter, accessing the external dependency specified by the external dependency access information corresponding to the unique identifier of the target external dependency, based on the unique identifier of the target external dependency, the dependency information of the business project, and the external dependency details, includes:
[0074] During the operation of the business project, in response to the access request of the business project with a unique identifier of the target external dependency as a parameter, the object instance corresponding to the unique identifier of the target external dependency is invoked according to the unique identifier of the target external dependency, and the external dependency pointed to by the access link is accessed through the access link corresponding to the unique identifier of the target external dependency.
[0075] Furthermore, the method also includes: during the development of the business project, pulling an SDK dependency package with the same programming language as the business project from multiple pre-developed SDK dependency packages of various programming languages, and deploying it in the business project;
[0076] The SDK dependency package is used during the image execution of the business project to respond to the access request of the business project with a target external dependency unique identifier as a parameter, and to access the external dependency specified by the external dependency access information corresponding to the target external dependency unique identifier according to the target external dependency unique identifier, the dependency information of the business project and the external dependency details.
[0077] Furthermore, the method also includes:
[0078] If the external dependency specified by the external dependency access information corresponding to a certain external dependency unique identifier of the business project fails, the external dependency access information corresponding to the external dependency unique identifier will be modified to the access information of the backup external dependency of the failed external dependency.
[0079] Furthermore, the method also includes:
[0080] In response to a data migration command for the business project, the system obtains a first external dependency unique identifier for data migration out and a second external dependency access information for data migration into the system from the data migration command. The system then migrates the data on the external dependency specified by the first external dependency access information corresponding to the first external dependency unique identifier for data migration out to the external dependency specified by the second external dependency access information for data migration into the system. Finally, the system replaces the first external dependency access information corresponding to the first external dependency unique identifier for data migration out in the configuration management component with the second external dependency access information.
[0081] Furthermore, the method also includes:
[0082] In response to the expansion command for the business project, the unique identifier of the third external dependency to be expanded and the expansion external dependency access information are obtained from the expansion command. The expansion external dependency access information is appended to the third external dependency access information corresponding to the unique identifier of the third external dependency to be expanded, so as to obtain the expanded fourth external dependency access information.
[0083] Furthermore, the method also includes:
[0084] The data on the external dependency specified by the third external dependency access information is re-distributed and stored on the external dependency specified by the expanded fourth external dependency access information according to the preset distribution rules; when the business project accesses the operation data of the unique identifier of the third external dependency, the object instance corresponding to the unique identifier of the third external dependency locates the data on the external dependency specified by the expanded fourth external dependency access information according to the same preset distribution rules.
[0085] Furthermore, the method also includes:
[0086] When a change is detected in the access information of an external dependency corresponding to a unique external dependency identifier, a new access link is established with the external dependency specified by the changed external dependency access information.
[0087] Furthermore, the method also includes:
[0088] A backend interface is provided, through which the external dependency type and external dependency access information corresponding to the unique identifier of each external dependency in the business project are received, and the dependency information and external dependency details of the business project are generated.
[0089] As the method embodiments are basically similar to the system embodiments, the description is relatively simple, and relevant parts can be found in the description of the system embodiments.
[0090] The technical solutions of the present invention will be described in detail below with reference to specific application examples. For technical details not described in the implementation process, please refer to the relevant descriptions above.
[0091] This invention provides a project dependency management method and system, which is also a distributed project dependency management system based on build-time binding and runtime resolution.
[0092] 1. System Introduction
[0093] like Figure 3As shown, this embodiment of the invention is a distributed project dependency management system. The system is used to manage the dependencies between various projects across the company and the resources each project requires. Specifically, this management system consists of four components: admin (dependency management) component, config (configuration management) component, loader (configuration injection) component, and sdk (dependency resource access toolkit) component.
[0094] The admin (dependency management) component: designed and built a user backend where users can view and manage their project's dependencies, including dependencies on other project services, MySQL, Redis, Kafka, and other resources. It also includes functions such as permission management and supports one-click scaling up and down, dynamic resource migration, and resource switching.
[0095] The config (configuration management) component maintains the external dependency information of all projects across the company, generated by the admin component.
[0096] The loader (configuration injection) component communicates with the config component during project packaging to build a structured configuration of the external dependencies of the currently packaged project, and places it in the project's packaged image for later use.
[0097] The SDK is responsible for generating corresponding SDK dependency packages for different programming languages and frameworks. The dependency packages include versions for multiple languages such as Java, PHP, Python, and Go. When the project starts, the components of the SDK dependency packages that the project depends on will parse the structured configuration generated by the loader project and placed in the image before startup, and generate the objects that the corresponding language project depends on. For example, for a Java Spring project, it generates resource beans for the project to use at runtime.
[0098] 2. Project Architecture and Interaction Sequence Diagram
[0099] This project adopts a four-layer architecture: admin, config, loader, and sdk. Figure 3 This demonstrates a deployment architecture for the system's components in a real-world production environment. Figure 5 The interaction sequence diagram of the four components is shown.
[0100] like Figure 4 and Figure 5 As shown, in the actual workflow, users first configure the business project and all external projects and resource dependencies on the user-friendly visual interface provided by the admin subsystem.
[0101] The admin subsystem interacts with the config subsystem to store and update structured configuration data in the database.
[0102] When a business project triggers a Docker build operation, the loader subsystem will automatically analyze the current project and communicate with the config subsystem to obtain all the dependencies of the current project and store the configuration in the image as a file, since the build process has already depended on the loader subsystem.
[0103] When a business project is deployed and started, the client in the SDK package that the business project depends on will analyze the local configuration file and the remote resource configuration in the config system to create a connection with the corresponding resource, so that the business project can perform actual operations on the resource.
[0104] Thus, this configuration system enables the management of dependencies for all projects across the company. Through a visual user interface provided by the admin panel, the dependencies and usage of company resources and projects are clearly visible and maintainable. Furthermore, the multi-language client encapsulation within the SDK hides many details of resource deployment and usage from user projects, enhancing system stability.
[0105] 3. Support for disaster recovery, expansion, and migration operations.
[0106] Compared to other existing project resource management systems, this system is designed to inject project resource dependencies during project construction and startup. Traditional technologies inject configurations during project runtime, while this system does not inject configurations during project runtime and will not affect the project during runtime. This avoids the impact on projects that depend on this system due to incorrect configuration updates or system failures.
[0107] Once a business project is integrated into the system, it no longer interacts directly with resources. Instead, it operates on various resources through the client provided in the SDK. When the system administrator performs expansion or migration operations in the admin system, the SDK will automatically query the resource information after expansion or migration when performing actual data operations, thus automatically switching to use the new resources without the business being aware of it.
[0108] In particular, when a project's dependent resources encounter problems, since all resources are already configured within this resource management system, which monitors the availability of each resource and the success and failure rates of SDK client operations on each resource, this system can obtain the resource's operational status through monitoring alerts as soon as a resource problem occurs. This allows for appropriate emergency handling, such as activating backup resources. When switching to backup resources is necessary, similar to the aforementioned scaling and migration operations, the SDK client implementation can automatically switch from the original resource to the newly activated backup resource based on the configuration system, avoiding any impact on business operations and significantly reducing business losses.
[0109] Meanwhile, with the SDK isolating and hiding the details of resource usage, the project does not need to worry about the distributed deployment of resources. It only needs to use the client provided by the SDK to operate on a single resource. In the actual implementation code of the client, after the user submits a read or write operation, the SDK will automatically read and write the shard where the resource to be operated is located according to the resource deployment status configured in the Config system. This enables the operation of resources in a multi-site active-active and distributed deployment without the business being aware of it, thus ensuring the security of the company's projects.
[0110] This system is implemented using a four-layer architecture (admin–config–loader–SDK):
[0111] Dependencies are acquired during the build process: the loader binds dependencies during the image build phase;
[0112] Pre-startup injection: Cross-language SDKs handle this during container startup;
[0113] Dynamic migration security: admin controls disaster recovery and resource switching without interrupting operation;
[0114] Multi-language integration: Unified structured configuration adapts to languages such as Java, PHP, Python, and Go.
[0115] This is an innovation that the existing systems do not possess, and it is also a unique highlight of this patent application.
[0116] This invention proposes a "distributed project dependency management system based on build-time binding and runtime resolution," which achieves the following technical effects through four-layer collaboration (admin→config→loader→SDK):
[0117] Dependency configuration injection during build: By using a loader to extract structured dependency information from the config and bind it to the image during the image packaging stage, the runtime environment configuration is fixed before deployment, eliminating the instability risk caused by dynamic changes in the traditional runtime dependency system.
[0118] Unified multi-language parsing before startup: Before the service starts, the SDK module performs structured parsing of the configuration in the image in multi-language environments such as Java, PHP, Python, and Go, generating Beans / objects for runtime calls, thus achieving cross-language dependency consistency;
[0119] Zero-down dynamic failover: One-click scaling up / down and disaster recovery failover operations driven by the admin, with the loader and SDK to complete dependency switching and state synchronization, without service restart or runtime interruption;
[0120] Enhanced robustness through system isolation: Compared to systems like Spring Cloud Config, which may experience non-atomic refreshes (such as momentary mixed states due to simultaneous bean configuration updates triggered by buses or actuators) during runtime, and etcd / Consul, which suffers performance and consistency pressures under large-scale key-value changes, this system ensures that dependencies are fixed once during the build process and exist in a read-only state at runtime, significantly reducing the risk of system instability. This invention addresses the problem of traditional distributed project management systems requiring separate configuration injection for each distributed node during distributed deployment, leading to complex operations and the inability to seamlessly switch external dependencies at runtime. This makes it difficult to achieve disaster recovery, multi-site active-active deployment of resources, and dynamic switching without impacting the production environment when external dependencies fail.
[0121] In summary, the technical solutions to be protected by this invention include, but are not limited to:
[0122] It relies on the loader to capture and bind dependency configurations during the image build process;
[0123] The multi-language SDK employs a structured parsing injection mechanism before startup.
[0124] An automated disaster recovery / scaling-down switching mechanism under admin control;
[0125] The system enables visualized management, access control, and zero-downtime operation of dependencies for distributed projects.
[0126] It should be understood that the specific order or hierarchy of steps in the disclosed process is an example of an exemplary method. Based on design preferences, it should be understood that the specific order or hierarchy of steps in the process may be rearranged without departing from the scope of this disclosure. The appended method claims provide elements of various steps in an exemplary order and are not intended to limit the scope to the specific order or hierarchy described.
[0127] In the above detailed description, various features are combined together in a single embodiment to simplify this disclosure. This approach to disclosure should not be construed as reflecting an intention that embodiments of the claimed subject matter require more features than are explicitly stated in each claim. Rather, as reflected in the appended claims, the invention is presented with fewer features than all of the features of the single disclosed embodiment. Therefore, the appended claims are hereby explicitly incorporated into the detailed description, wherein each claim stands alone as a preferred embodiment of the invention.
[0128] The disclosed embodiments have been described above to enable any person skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be applied to other embodiments without departing from the spirit and scope of this disclosure. Therefore, this disclosure is not limited to the embodiments given herein, but is consistent with the broadest scope of the principles and novel features disclosed in this application.
[0129] The foregoing description includes examples of one or more embodiments. It is certainly impossible to describe all possible combinations of components or methods in order to describe the above embodiments, but those skilled in the art will recognize that further combinations and arrangements of the various embodiments are possible. Therefore, the embodiments described herein are intended to cover all such changes, modifications, and variations falling within the scope of the appended claims. Furthermore, the term "comprising" as used in the specification or claims is used in a manner similar to the term "including." Additionally, the use of any term "or" in the specification of the claims is intended to mean "non-exclusive or."
[0130] Those skilled in the art will also understand that the various illustrative logical blocks, units, and steps listed in the embodiments of the present invention can be implemented by electronic hardware, computer software, or a combination of both. To clearly demonstrate the interchangeability of hardware and software, the functions of the various illustrative components, units, and steps described above have been generally described. Whether such functionality is implemented through hardware or software depends on the specific application and the overall system design requirements. Those skilled in the art can implement the described functions using various methods for each specific application, but such implementation should not be construed as exceeding the scope of protection of the embodiments of the present invention.
[0131] The various illustrative logic blocks or units described in the embodiments of this invention can be implemented or operate the described functions using a general-purpose processor, digital signal processor, application-specific integrated circuit (ASIC), field-programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof. The general-purpose processor can be a microprocessor; alternatively, it can be any conventional processor, controller, microcontroller, or state machine. The processor can also be implemented using a combination of computing devices, such as a digital signal processor and a microprocessor, multiple microprocessors, one or more microprocessors combined with a digital signal processor core, or any other similar configuration.
[0132] The steps of the methods or algorithms described in the embodiments of this invention can be directly embedded in hardware, a software module executed by a processor, or a combination of both. The software module can be stored in RAM, flash memory, ROM, EPROM, EEPROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium in the art. Exemplarily, the storage medium can be connected to the processor so that the processor can read information from and write information to the storage medium. Optionally, the storage medium can also be integrated into the processor. The processor and storage medium can be housed in an ASIC, which can be housed in a user terminal. Optionally, the processor and storage medium can also be housed in different components of the user terminal.
[0133] In one or more exemplary designs, the functions described in the embodiments of the present invention can be implemented in hardware, software, firmware, or any combination of these three. If implemented in software, these functions can be stored on a computer-readable medium or transmitted on a computer-readable medium in the form of one or more instructions or code. Computer-readable media include computer storage media and communication media that facilitate the transfer of computer programs from one place to another. Storage media can be any available media that can be accessed by a general-purpose or special-purpose computer. For example, such computer-readable media can include, but is not limited to, RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store program code in the form of instructions or data structures and other forms that can be read by a general-purpose or special-purpose computer, or a general-purpose or special-purpose processor. Furthermore, any connection can be suitably defined as a computer-readable medium, for example, if the software is transmitted from a website, server or other remote resource via a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL) or wirelessly, such as infrared, wireless and microwave, it is also included in the defined computer-readable medium. The disks and discs mentioned include compressed disks, laser discs, optical discs, DVDs, floppy disks, and Blu-ray discs. Disks typically copy data magnetically, while disks typically copy data optically using lasers. Combinations of the above can also be contained in computer-readable media.
[0134] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A project dependency management system, characterized by, The system comprises: a configuration management component configured to store dependency information and external dependency details of a business project; the dependency information of the business project comprises at least one external dependency unique identifier and a corresponding external dependency type in the business project; the external dependency details of the business project comprise each external dependency unique identifier and corresponding external dependency access information in the business project; a configuration injection component configured to, in response to a command for generating an image of the business project, obtain the dependency information of the business project from the configuration management component, and inject the dependency information into the image of the business project; a dependency resource access toolkit component configured to, during execution of the image of the business project, in response to an access request of the business project with a target external dependency unique identifier as a parameter, access an external dependency specified by external dependency access information corresponding to the target external dependency unique identifier according to the target external dependency unique identifier, the dependency information and the external dependency details of the business project; the target external dependency unique identifier is any external dependency unique identifier in the business project.
2. The item dependency management system of claim 1, wherein, The dependency resource access toolkit component is specifically configured to, when the business project is started, obtain the dependency information from the image of the business project, create a corresponding object instance according to an external dependency type corresponding to each external dependency unique identifier in the dependency information, and establish an access link with an external dependency specified by external dependency access information according to the external dependency access information, as an access link corresponding to the target external dependency unique identifier.
3. The item dependency management system of claim 2, wherein, The dependency resource access toolkit component is specifically configured to, during running of the business project, in response to an access request of the business project with a target external dependency unique identifier as a parameter, call an object instance corresponding to the target external dependency unique identifier according to the target external dependency unique identifier, and access an external dependency pointed by the access link through an access link corresponding to the target external dependency unique identifier.
4. The item dependency management system of claim 1, wherein, The dependency resource access toolkit component is pulled from a plurality of SDK dependency packages of various programming languages developed in advance during development of the business project, and is deployed in the business project.
5. The project dependency management system of claim 1, wherein: the configuration management component is further configured to, in a case where an external dependency specified by external dependency access information corresponding to a certain external dependency unique identifier of the business project fails, modify the external dependency access information corresponding to the external dependency unique identifier to access information of a backup external dependency of the failed external dependency.
6. The project dependency management system of claim 1, wherein: The configuration management component is further configured to, in response to a data migration command for the business item, obtain data migration-out first external dependency unique identifier and data migration-in second external dependency access information from the data migration command, migrate data on an external dependency specified by first external dependency access information corresponding to the data migration-out first external dependency unique identifier to an external dependency specified by the data migration-in second external dependency access information, and replace the first external dependency access information corresponding to the data migration-out first external dependency unique identifier in the configuration management component with the second external dependency access information.
7. The item dependency management system of claim 1, wherein, The configuration management component is further configured to, in response to a capacity expansion command for the business item, obtain third external dependency unique identifier that needs to be expanded and capacity expansion external dependency access information from the capacity expansion command, append the capacity expansion external dependency access information to third external dependency access information corresponding to the third external dependency unique identifier that needs to be expanded to obtain fourth external dependency access information after expansion.
8. The item dependency management system of claim 7, wherein, The dependency resource access toolkit component is further configured to store data on an external dependency specified by the third external dependency access information in a distributed manner on an external dependency specified by the fourth external dependency access information after expansion according to a preset distribution rule; When the business item accesses operation data of the third external dependency unique identifier, an object instance corresponding to the third external dependency unique identifier locates data on an external dependency specified by the fourth external dependency access information after expansion according to the same preset distribution rule.
9. The item dependency management system of claim 5, 6, or 7, wherein, The dependency resource access toolkit component is further configured to re-establish an access link with an external dependency specified by changed external dependency access information when it is found that the external dependency access information corresponding to a certain external dependency unique identifier has changed.
10. A project dependency management method characterized by, Comprise: Storing dependency information and external dependency details of a business item; the dependency information of the business item comprises at least one external dependency unique identifier in the business item and a corresponding external dependency type; The external dependency details of the business item comprise each external dependency unique identifier in the business item and corresponding external dependency access information; In response to a command of generating a mirror image of the business item, obtaining dependency information of the business item, and injecting the dependency information into the mirror image of the business item; In a process of executing the mirror image of the business item, in response to an access request of the business item with a target external dependency unique identifier as a parameter, accessing an external dependency specified by external dependency access information corresponding to the target external dependency unique identifier according to the target external dependency unique identifier, the dependency information and the external dependency details of the business item; the target external dependency unique identifier is any one of the external dependency unique identifiers in the business item.