Service deployment method and device, electronic equipment and storage medium

By building and deploying a target dependency model, the problems of poor visibility of inter-service dependency configuration and low environment setup efficiency are solved, achieving dynamic adaptation and efficient service deployment, and improving the stability and visibility of the system.

CN121832971APending Publication Date: 2026-04-10BEIJING QIYI CENTURY SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-31
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

In existing technologies, the configuration of inter-service dependencies mainly relies on manual definition or static documents, resulting in poor visibility, inability to adapt dynamically, fragmented environment configuration, uncontrollable environment drift, time-consuming and labor-intensive repeated setup, low efficiency in anomaly recovery, lack of self-healing ability, and lack of cross-system configuration consistency verification mechanism.

Method used

By acquiring initial dependency information, constructing an initial dependency graph, configuring the dependency network using pre-stored target configuration data, forming a target dependency model, and dynamically deploying in response to deployment commands, Petri net technology and directed graph traversal algorithms are used for clear modeling and analysis, and configuration is optimized by combining intelligent parameter replacement and resource allocation algorithms.

Benefits of technology

It enables dynamic display of service dependencies and improves stability, enhances visibility, reduces configuration error rate, shortens environment setup time, lowers resource costs, and improves anomaly recovery efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121832971A_ABST
    Figure CN121832971A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a service deployment method and device, electronic equipment and a storage medium, and can solve the problems that when a dependency relationship is configured, the whole document needs to be set or modified, the complete dependency relationship among multiple services cannot be visually reflected, and the visibility is poor. Obtaining initial dependency information, wherein the initial dependency information is used for describing a dependency relationship between system service nodes; according to the initial dependency information, an initial dependency graph is constructed, the initial dependency graph comprises a dependency relationship network of at least one version, and the dependency relationship network comprises a plurality of system service nodes and at least one dependency relationship existing between the system service nodes; performing data configuration on the dependency relationship network of at least one version through pre-stored target configuration data to obtain a target dependency model, the target configuration data comprising configuration data for the plurality of system service nodes and configuration data for at least one dependency relationship; in response to the deployment instruction, the target dependency model is deployed.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the technical field of service deployment, and in particular to a service deployment method and device, electronic equipment and storage medium. BACKGROUND

[0002] In the running process of system services, resources, functions or interfaces of other services may need to be called to achieve this, which constitutes the dependency relationship between services. At present, the configuration of the dependency relationship is mainly in the form of manual definition or static documents, which leads to the need to set or modify the entire document when configuring the dependency relationship, and the complete dependency relationship between multiple services cannot be intuitively reflected, and the visibility is poor. SUMMARY

[0003] Therefore, it is necessary to provide a service deployment method and device, electronic equipment and storage medium to solve the above technical problems.

[0004] In a first aspect, embodiments of the present application provide a service deployment method, which comprises: obtaining initial dependency information, the initial dependency information being used to describe the dependency relationship between system service nodes; constructing an initial dependency graph according to the initial dependency information, the initial dependency graph including at least one version of a dependency relationship network, the dependency relationship network including a plurality of system service nodes and at least one dependency relationship existing between each system service node; performing data configuration on the at least one version of the dependency relationship network through pre-stored target configuration data to obtain a target dependency model, the target configuration data including configuration data for the system service nodes and configuration data for the at least one dependency relationship, the target dependency model being dependent on the target configuration data for running; deploying the target dependency model in response to a deployment instruction.

[0005] In a second aspect, embodiments of the present application provide a service deployment device, which comprises: an obtaining module configured to obtain initial dependency information, the initial dependency information being used to describe the dependency relationship between system service nodes; a processing module configured to construct an initial dependency graph according to the initial dependency information, the initial dependency graph including at least one version of a dependency relationship network, the dependency relationship network including a plurality of system service nodes and at least one dependency relationship existing between each system service node; The processing module is further configured to perform data configuration on the at least one version of the dependency relationship network by using pre-stored target configuration data, to obtain a target dependency model, wherein the target configuration data comprises configuration data for the system service node and configuration data for the at least one dependency relationship, and the target dependency model runs in dependence on the target configuration data. The processing module is further configured to deploy the target dependency model in response to a deployment instruction.

[0006] In a third aspect, an electronic device is provided, and the electronic device comprises: a memory storing executable program code; a processor coupled to the memory; The processor invokes the executable program code stored in the memory to execute the service deployment method in the first aspect.

[0007] In a fourth aspect, a computer readable storage medium storing a computer program is provided, and the computer program causes a computer to execute the service deployment method in the first aspect. The computer readable storage medium comprises ROM / RAM, a magnetic disk, an optical disk, and the like.

[0008] In a fifth aspect, a computer program product is provided, and when the computer program product runs on a computer, the computer program product causes the computer to execute part or all steps of any one method in the first aspect.

[0009] In a sixth aspect, an application publishing platform is provided, and the application publishing platform is configured to publish a computer program product, and when the computer program product runs on a computer, the computer program product causes the computer to execute part or all steps of any one method in the first aspect.

[0010] Compared with the prior art, the embodiments of the present application have the following beneficial effects: The embodiment of the present application provides a service deployment method and device, electronic equipment and storage medium, initial dependency information is acquired, and the initial dependency information is used for describing dependency relationships between system service nodes; an initial dependency graph is constructed according to the initial dependency information, the initial dependency graph includes dependency relationship networks of at least one version, the dependency relationship networks include a plurality of system service nodes and at least one dependency relationship existing between the system service nodes; data configuration is performed on the dependency relationship networks of at least one version through pre-stored target configuration data, a target dependency model is obtained, the target configuration data includes configuration data for the system service nodes and configuration data for the at least one dependency relationship, and the target dependency model runs in dependence on the target configuration data; and the target dependency model is deployed in response to a deployment instruction. In the scheme, a dynamic multi-version dependency model can be constructed based on the dependency relationship networks formed by the dependency relationships between the system service nodes and configuration information, and the dependency model can be deployed, so that the upstream and downstream dependency relationships between the system service nodes can be clearly shown, the dependency relationships can be directly shown or updated through the dependency model without static document configuration, and the stability and visibility of the dependency model are improved. BRIEF DESCRIPTION OF DRAWINGS

[0011] The accompanying drawings, which are incorporated herein and form part of the specification, illustrate embodiments consistent with the present application and, together with the description, further serve to explain the principles of the application.

[0012] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiments will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort on the basis of these drawings.

[0013] Figure 1 is a flowchart of a service deployment method provided by an embodiment of the present application Figure 1 ; Figure 2 is a flowchart of a service deployment method provided by an embodiment of the present application Figure 2 ; Figure 3 is a flowchart of a service deployment method provided by an embodiment of the present application Figure 3 ; Figure 4 is a structural schematic diagram of a service deployment device provided by an embodiment of the present application; Figure 5 is a structural schematic diagram of an electronic equipment provided by an embodiment of the present application. DETAILED DESCRIPTION

[0014] In order to describe the technical solutions of the embodiments of the present application more clearly, clearly and completely, the technical solutions in the embodiments of the present application will be described in the following with reference to the drawings in the embodiments of the present application. It should be explained that, in the case of no conflict, the embodiments of the present application and the features in the embodiments can be combined with each other. Obviously, the described embodiments are some embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all the other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.

[0015] The terms "first" and "second" and the like in the specification and claims of the present application are used to distinguish different objects, and are not used to describe a specific order of the objects.

[0016] The terms "include" and "have" and any variations thereof in the embodiments of the present application are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to the process, method, product or device.

[0017] It should be explained that, in the embodiments of the present application, the words "exemplary" or "for example" are used to represent an example, illustration or description. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as more preferred or more advantageous than other embodiments or design schemes. In fact, the words "exemplary" or "for example" are used to present the relevant concept in a specific way.

[0018] At present, in the related art, the display and management of the dependency relationship can have the following technical defects: dependency relationship management between systems is coarse-grained: dependency configuration is maintained in the form of a document, and it is difficult to realize dynamic adaptation; environment configuration is fragmented: heterogeneous configuration formats (such as XML / JSON / YAML) are used by each system, and there is a lack of unified management; environment drift is uncontrollable: when multiple systems are debugged together, cascading changes of configuration items cause unstable environment and dependency relationship is realized through configuration items, and the association relationship changes; environment reuse cost is high: there is a lack of versioned snapshot management, and repeated construction is time-consuming and labor-intensive; abnormal recovery efficiency is low: the dependency fault lacks self-healing capability, and manual intervention is required for repair.

[0019] Although the existing technology (such as infrastructure as code IaC) realizes partial dependency configuration automation, it has the following limitations: dependency on manual definition of static templates, unable to adapt to dynamic dependency changes; lack of cross-system configuration consistency checking mechanism; and the problem of cascading influence of multiple system configuration items is not solved.

[0020] To solve all or part of the above technical problems, an embodiment of the present application provides a service deployment method and device, electronic equipment and storage medium, as shown in Figure 1 Figure 1 A flowchart of a service deployment method provided by an embodiment of the present application can include the following steps: 101, obtaining initial dependency information.

[0021] In an embodiment of the present application, the initial dependency information can be used to describe the dependency relationship between system service nodes, the subject of the dependency relationship can be a system, a service, an application, a program, a port, etc. The initial dependency information can include at least one set of dependency relationships.

[0022] In some embodiments, in at least one set of dependency relationships, the dependency subject can be repeated, that is, the same dependency subject can simultaneously depend on multiple other subjects, and similarly, the same dependency subject can also be simultaneously depended on by multiple other subjects, which is not limited.

[0023] In some embodiments, the way to obtain the initial dependency information can include many kinds, in addition to manual input by staff, it can also include: OpenAPI / Swagger-based interface-level dependency relationship extraction; and dependency relationship generated by fusion deployment topology discovery technology (such as Consul).

[0024] Among them, the core goal of OpenAPI / Swagger-based interface-level dependency extraction is to parse the API call relationship between services from the code level, and to clearly indicate which interfaces of service B are called by service A. OpenAPI Specification (OAS) is a standardized specification for describing RESTful APIs, and Swagger is one of the implementation tools. By defining OpenAPI annotations in the code or maintaining Swagger YAML / JSON files, the interface list (URL, HTTP method) of the service, the input / output parameters (request body, response body) of the interface, the version of the interface, and the label (such as v1 / users belongs to the user service) can be clearly recorded. That is, by scanning the OpenAPI annotations in the code or the Swagger file, the interface definitions of all services can be extracted, and the dependency relationship between the corresponding services can be generated.

[0025] ​Among them, the core goal of the fusion deployment topology discovery technology is: capture the actual deployment topology of the service from the runtime environment, supplement the dependency details (such as instance address, load balancing strategy, etc.). When the service starts, it will register its address, port, and health status with the registration center (such as Consul, Eureka). Other services query the instance list of the dependent service (such as all available IP:Port of serviceB) through the registration center. The registration center can also store metadata, and can attach labels (such as version, environment) or custom attributes (such as interface path). The registration information of the service can be obtained through the Consul API, and then combined with the labels to associate with the interfaces defined in the OpenAPI to obtain the dependency relationship; in addition, the actual call path between services (such as through the service mesh Sidecar or proxy logs) can be used to generate instance-level dependency relationships.

[0026] In summary, it can be seen that the above-mentioned interface-level dependency relationship extraction based on OpenAPI / Swagger and the fusion deployment topology discovery technology generate dependency relationships. The data sources of the two acquisition methods are different. The interface-level dependency relationship extraction based on OpenAPI / Swagger is more inclined to domain name calling, and extracts interface information from the management platform to obtain dependency relationships by combining interface context and path. The fusion deployment topology discovery technology is inclined to microservice calling, and determines the upper and lower dependency relationships between the provider and the consumer in the microservice.

[0027] In some embodiments, the way of obtaining the initial dependency information can also include other ways, which are not limited in the embodiments of the application.

[0028] 102. Construct an initial dependency graph according to the initial dependency information.

[0029] In the embodiments of the application, after obtaining the initial dependency information, an initial dependency graph can be constructed according to the initial dependency information. The initial dependency graph can be understood as a complete dependency relationship network that represents all dependency relationships after summarizing all dependency relationships described in the initial dependency information.

[0030] In some embodiments, the dependency relationship between system service nodes is not fixed and can change at any time when the business changes or the application scenario changes. After the change, a latest version of the dependency relationship is formed, and at the same time, the initial dependency graph also changes. If the dependency relationship is updated, the dependency relationship can be dynamically updated to form a new version of the dependency relationship while saving the original dependency relationship. Therefore, the initial dependency graph can include at least one version of the dependency relationship network, which can be used to show the association relationship between the dependency relationships between all system service nodes in the same version.

[0031] For example, suppose the initial dependency information includes the following dependencies: service A depends on service B, service C depends on service D, service D depends on service A, service E depends on service C, and service B depends on service F. This forms a complete dependency network: E→C→D→A→B→F. In other words, the initial dependency graph can include this dependency network. If the dependencies change, and the updated service B depends on service A, service D depends on service B, and service A depends on service F, then a new dependency network can be formed: E→C→D→B→A→F. Thus, the initial dependency graph can dynamically update the dependency network while preserving the original network, resulting in the latest version of the dependency network. In other words, the initial dependency graph includes two versions of the dependency network.

[0032] 103. Configure the dependency network of at least one version using the pre-stored target configuration data to obtain the target dependency model.

[0033] In this embodiment of the application, since the dependency relationship network of at least one version included in the initial dependency graph only shows the dependency relationship between system service nodes, in order to deploy and execute each dependency relationship in the initial dependency graph, it is also necessary to configure the dependency relationship and the subject of the dependency relationship to enable the execution of the dependency relationship. When configuring the data, the pre-stored target configuration data can be used to configure the dependency relationship network of at least one version included in the initial dependency graph. It can also be understood as configuring the data of multiple system service nodes and at least one dependency relationship between each system service node to obtain the target dependency model.

[0034] It's important to note that at least one version of the dependency network can be understood as connecting various dependencies to form a complete dependency architecture. This network shows who depends on whom. However, it's currently just a framework and needs to be populated with target configuration data. In other words, when running the target dependency model, each system service node requires configuration data support, and the dependencies between these system service nodes also require configuration data support. Therefore, this target configuration data can include configuration data for system service nodes and configuration data for at least one dependency. The target dependency model can only run with the support of this target configuration data; that is, the target dependency model depends on the target configuration data to operate.

[0035] In some embodiments, the target dependency model may include: DependencyGraph = { service: { upstream: [upstream service list]; downstream: [downstream service list]; config_dependencies: [configuration item list]; version_constraints: [semantic version range]; } } Wherein, the upstream service list can represent the upstream subject in the dependency relationship, the downstream service list can represent the downstream subject in the dependency relationship, the configuration item list can include the configuration item of the system service node and the dependency item of the dependency relationship, and the semantic version range is the version information of the current dependency relationship.

[0036] 104. In response to the deployment instruction, the target dependency model is deployed.

[0037] In the embodiments of the present application, after obtaining the target dependency model, it can be considered that the target dependency model is a model including dependency relationships that can be directly executed, so after receiving the deployment instruction, the target dependency model can be directly deployed.

[0038] In some embodiments, the deployment instruction can be an instruction manually issued by a staff, an instruction automatically triggered by a cloud platform, or a pre-set instruction, which is not limited in the embodiments of the present application.

[0039] In some embodiments, when deploying the target dependency model, the process of deployment can be implemented based on Petri net technology, by virtue of the advantages of combination of graphical and mathematical, through the steps of clear input and output, drawing structure model, refining key links, determining token attribute, setting color function (advanced net), simulating running and correcting, clear modeling and dynamic analysis of the dependency relationship can be realized.

[0040] In some embodiments, when deploying the target dependency model, directed graph traversal algorithm can be used for configuration item cascading influence analysis, which can be understood as, when deploying, for any subject, all the dependency relationships related to the subject in the target dependency model need to be traversed, so that when deploying, all the dependency relationship nets for the subject can be formed, and the cascading influence between the subjects can be determined.

[0041] The embodiment of the present application provides a service deployment method, initial dependency information is acquired, the initial dependency information is used for describing the dependency relationship between system service nodes; according to the initial dependency information, an initial dependency graph is constructed, the initial dependency graph includes at least one version of a dependency relationship network, the dependency relationship network includes a plurality of system service nodes and at least one dependency relationship existing between each system service node; at least one version of the dependency relationship network is configured with pre-stored target configuration data to obtain a target dependency model, the target configuration data includes configuration data for the system service node and configuration data for at least one dependency relationship, and the target dependency model runs in dependence on the target configuration data; in response to a deployment instruction, the target dependency model is deployed. In the scheme, a dynamic multi-version dependency model can be constructed based on the dependency relationship network formed by the dependency relationship between each system service node and the configuration information, and the dependency model can be deployed, so that the upstream and downstream dependency relationship between each system service node can be clearly displayed, the static document configuration is not needed, the dependency relationship can be directly displayed or updated through the dependency model, and the stability and visibility of the dependency model are improved.

[0042] As Figure 2 shown, Figure 2 A flowchart of a service deployment method provided by the embodiment of the present application, the method can further include the following steps: 201, initial dependency information is acquired.

[0043] In the embodiment of the present application, for the description of step 201, please refer to the detailed description of step 101 in the above embodiment, and the embodiment of the present application will not be repeated.

[0044] 202, the dependency relationship between each system service node in the initial dependency information is traversed, and whether there is a conflict relationship in each dependency relationship is judged.

[0045] In the embodiment of the present application, for two subjects of a dependency relationship, the dependency relationship is directional, in order to avoid conflict, in the case that subject A depends on subject B, subject B will not depend on subject A; in addition, if there is a circular dependency, there will also be a conflict, for example: subject A depends on subject B, subject B depends on subject C, and subject C depends on subject A, so that a closed loop dependency relationship is formed, thereby causing a conflict relationship, therefore, before constructing the initial dependency model, the dependency relationship between each system service node can be traversed, and whether there is a conflict relationship in each dependency relationship is judged, the conflict relationship can indicate that the dependency relationship between a plurality of system service nodes exists in a closed loop, and the closed loop here can be a closed loop of the dependency relationship between two system service nodes, or a closed loop of the dependency relationship between a plurality of system service nodes.

[0046] In some embodiments, whether there is a conflict relationship can be determined by a SAT solver, and the conflict relationship can generally manifest as version incompatibility, circular dependency, or missing dependency, etc., and the essence is whether there is a solution that satisfies a set of logical constraints. A dependency graph can be constructed, with nodes being software packages and edges being dependency relationships; whether there is a loop (circular dependency) or version conflict in the graph can be quickly determined by topological sorting or a SAT solver; if the SAT solver returns UNSAT, the core constraint set that leads to the conflict can be extracted using the conflict clause learning (CDCL) mechanism provided by the SAT solver; the propagation path of the conflict can be traced by combining the dependency graph and the conflict clause. The dependency relationship conflict resolution based on the SAT solver quickly locates the root of the conflict by encoding the logical constraints into Boolean formulas and using an efficient search algorithm, and is particularly suitable for large-scale and dynamically changing dependency networks. In actual application, a suitable solver needs to be selected according to the project size and dependency complexity, and the pre-processing and visualization techniques need to be combined to improve the resolution efficiency.

[0047] 203. When it is detected that there is no conflict relationship between the dependency relationships, an initial dependency graph is constructed according to the initial dependency information.

[0048] In the embodiments of the present application, after it is determined whether there is a conflict relationship, if it is detected that there is no conflict relationship between the dependency relationships, it means that these dependency relationships can form a complete dependency relationship network, and all dependency relationships can be normally deployed and executed, and then an initial dependency graph can be constructed according to the initial dependency information.

[0049] 204. A plurality of hierarchical templates pre-stored are obtained.

[0050] In the embodiments of the present application, the plurality of hierarchical templates are provided with configuration items of different levels, and each level of configuration items can include configuration items for system service nodes, which can be used for data configuration of the system service nodes; and each level of configuration items can also include configuration items for at least one dependency relationship, which are used for data configuration of the at least one dependency relationship.

[0051] In some embodiments, the hierarchical templates can include a system level template, a component level template, and an interface level template.

[0052] The system level template can define basic resources such as CPU, memory, storage, etc.; the component level template can include standardized middleware configuration (such as a Redis cluster configuration template); and the interface level template can generate an API test stub based on the OpenAPI specification.

[0053] 205. Each configuration item in the plurality of hierarchical templates is filled with data to obtain target configuration data.

[0054] In the embodiments of the present application, for each configuration item in the hierarchical template, the intelligent parameter replacement algorithm can be used to fill in data for all configuration items, obtain target configuration data, and store the target configuration data.

[0055] In some embodiments, the intelligent parameter replacement algorithm can be used to perform context-aware variable replacement. The context awareness can include network status, user behavior, environmental variables, etc. Real-time data (such as IP address, port number, and service status) can be collected using sensors, logs, or APIs, and context relationships can be inferred based on an ontology or a rule engine (such as Drools) to generate a replacement strategy. Finally, the inference result can be automatically injected into the configuration template to complete variable replacement.

[0056] In some embodiments, the intelligent parameter replacement algorithm can be used to perform configuration item automatic derivation. By analyzing the dependency relationships between configuration parameters (such as hierarchical structure and conditional constraints), a graph algorithm or a constraint satisfaction problem (CSP) solver can be used to automatically derive necessary parameters.

[0057] For example, the network address of a database server can be automatically replaced by the following code: host: ${DEPENDENCY.DB.host}; The maximum connection value of the database can be dynamically calculated based on resources. The CPU core number can be used for calculation: pool_size: ${CALC(MAX(5,CPU_CORES*2))}。

[0058] 206. Data configuration is performed on at least one version of the dependency relationship network based on the pre-stored target configuration data to obtain a target dependency model.

[0059] In the embodiments of the present application, for the description of step 206, please refer to the detailed description of step 103 in the above embodiments, and the embodiments of the present application will not be repeated here.

[0060] 207. In response to a deployment instruction, a simulation running test is performed on the target dependency model in a test environment, and simulation running indicators are collected.

[0061] In the embodiments of the present application, before the target dependency model is actually deployed, the target dependency model needs to be tested, that is, whether the target dependency model is safe and healthy, and whether a fault can occur during execution. Therefore, a simulation running test can be performed on the target dependency model in a test environment, and simulation running indicators can be collected during the simulation running test. The simulation running indicators can be used to represent the simulation running state of the target dependency model.

[0062] In some embodiments, the simulation running indicators can specifically include indicators from the perspectives of service survival performance, configuration consistency, dependency availability, etc., and the simulation running indicators can be collected at certain periods during the simulation running test.

[0063] 208. Determine a simulation running result according to the simulation running indicators and a preset running indicator range.

[0064] In the embodiments of the present application, after the simulation running indicators are collected, the simulation running indicators can be compared with the preset running indicator range. The preset running indicator range can be understood as a value range of the simulation running indicators when the target dependency model is normally running. Therefore, the simulation running result can be determined according to whether the simulation running indicators are located in the preset running indicator range.

[0065] 209. If the simulation running result indicates that the target dependency model is normally running, deploy the target dependency model.

[0066] In the embodiments of the present application, if the simulation running result indicates that the target dependency model is normally running, the target dependency model can be deployed and executed in an actual scenario.

[0067] In some embodiments, since the simulation running result can be determined according to whether the simulation running indicators are located in the preset running indicator range, the simulation running result indicating that the target dependency model is normally running can be determined by the simulation running indicators being located in the preset running indicator range. That is, after the simulation running indicators are collected, if it is detected that the simulation running indicators are located in the preset running indicator range, it is considered that the target dependency model can be normally running, and the target dependency model can be deployed.

[0068] 210. If the simulation running result indicates that the target dependency model has a fault during running, determine a fault type according to the simulation running indicators not located in the preset running indicator range.

[0069] In the embodiments of the present application, if it is detected that the simulation running result indicates that the target dependency model has a fault during running, the target dependency model cannot be directly deployed in an actual scenario, and the target dependency model needs to be diagnosed to determine the fault and repaired in time. Since the target dependency model can have many types of faults, different faults have different indicators and repair strategies. Therefore, the fault type can be determined according to the simulation running indicators not located in the preset running indicator range.

[0070] It should be noted that in the simulation running process of the target dependency model, the collected simulation running indexes can include multiple indexes, each index representing a running monitoring dimension, and if a simulation running index is not located in the preset running index range, it indicates that the running monitoring dimension represented by the simulation running index can have a fault, and therefore the corresponding fault type can be determined according to the simulation running index not located in the preset running index range.

[0071] 211. repairing the target dependency model according to the repair strategy corresponding to the fault type.

[0072] In the embodiment of the present application, after the fault type of the target dependency model is determined, the target dependency model can be repaired according to the repair strategy corresponding to the fault type.

[0073] It should be noted that if the fault type is a service survival performance type fault, the simulation running index can have an abnormal condition of more than 3 consecutive failures of HTTP 200, and the corresponding repair strategy at this time can be container restart, collection of fault logs and storage; if the fault type is a configuration consistency type fault, the simulation running index can have an abnormal condition of inconsistent Hash values, and the corresponding repair strategy at this time can be re-injection of configuration from a template warehouse; if the fault type is a dependency availability type fault, the simulation running index can have an abnormal condition of more than 5 seconds of downstream service response timeout, and the corresponding repair strategy at this time can be automatic switching of a backup instance.

[0074] In some embodiments, after the fault type is determined, the fault information of the target dependency model can also be recorded and stored.

[0075] In some embodiments, in the process of simulating running test on the target dependency model and deploying or repairing the target dependency model according to different simulation running results, intelligent snapshot management can be performed synchronously.

[0076] It should be noted that the intelligent snapshot management can specifically include CRDT-based distributed configuration state synchronization and support for fine-grained rollback capability to a single configuration item level, which can also be understood as recording the process of simulating running test on the target dependency model in real time, and recording the simulation running results, as well as recording the fault repair strategy, repair result, etc. of the target dependency model. That is, the intelligent snapshot management can store the record of each detection and repair action of the dependency model in history.

[0077] The embodiment of the present application provides a service deployment method, the detection of the conflict relationship of each dependency relationship in advance can effectively ensure the accuracy of the dependency model deployment; in addition, the dependency basic service test environment platform, the integrated template configuration and the parameter replacement can unify the configuration standard of the heterogeneous system; in addition, the simulation running test of the target dependency model can also effectively avoid the deployment failure.

[0078] As Figure 3 shown, Figure 3 A flow chart of a service deployment method provided by the embodiment of the present application, the method can also include the following steps: 301, obtaining initial dependency information.

[0079] 302, constructing an initial dependency graph according to the initial dependency information.

[0080] 303, performing data configuration on at least one version of the dependency relationship network through the pre-stored target configuration data, to obtain a target dependency model.

[0081] In the embodiment of the present application, for the description of steps 301-303, please refer to the detailed description of steps 101-103 in the above embodiment, and the embodiment of the present application will not be repeated.

[0082] 304, in response to the deployment instruction, determining the system availability level corresponding to each system service node in the target dependency model.

[0083] In the embodiment of the present application, when deploying the target dependency model, the system needs to allocate resources for the target dependency model, at this time, a dynamic resource allocation algorithm can be used to realize, specifically, the system availability level corresponding to each system service node in the target dependency model can be determined, which can be used to indicate the importance of each system service node in the target dependency model.

[0084] It should be noted that the importance can be reflected in the number of other system service nodes that have a dependency relationship with the system service node, if a certain system service node is simultaneously depended on by multiple other system service nodes in the target dependency model, then it can be considered that the importance of the system service node is higher, and the system availability level corresponding to the system service node is also higher.

[0085] It should be noted that the system availability level can be a system SLA level, which can actually indicate the importance of the system, and the system availability level can be related to the number of service failures and the position in the business. If the number of service failures is low or the position in the business is important, the system availability level can be considered as high availability. Conversely, if the number of service failures is high or the position in the business is not important, the system availability level can be considered as low availability.

[0086] 305. According to the system availability level, the resource allocation weight is calculated.

[0087] In the embodiments of the present application, different system availability levels have different resource allocation weights, and the calculation methods of the resource allocation weights are also different.

[0088] In some embodiments, when the system availability level is high availability, the resource allocation weight can be obtained by multiplying the dependency degree and the historical failure rate. The dependency degree can be calculated by the topology of the dependency relationship, and the historical failure rate can be the proportion of the number of historical deployment failures. When the system availability level is low availability, the resource allocation weight can be obtained by multiplying the service priority and the load coefficient. The service priority can be obtained according to the business definition, and the load coefficient can be a default constant.

[0089] 306. According to the resource allocation amount corresponding to the resource allocation weight, the resource allocation is performed on each system service node to deploy the target dependency model.

[0090] In the embodiments of the present application, according to the calculated resource allocation weight, more system resources can be obtained when the resource allocation weight is higher, and fewer system resources can be obtained when the resource allocation weight is lower. In the case that the total amount of resources is fixed, the corresponding resource allocation amount can be determined according to the resource allocation weight, and then the resource allocation can be performed on each system service node according to the resource allocation amount corresponding to the resource allocation weight to deploy the target dependency model.

[0091] 307. In the process of deploying the target dependency model in response to the deployment instruction, when it is detected that the running index of the target service node in the target dependency model does not meet the preset index condition, the version rollback processing is performed on the upstream node of the target service node according to the dependency relationship corresponding to the target service node, so as to deploy according to the dependency relationship included in the historical version of the upstream node of the target service node.

[0092] In the embodiments of the present application, in the process of deploying the target dependency model in response to the deployment instruction, an abnormal rollback strategy can be executed, and version rollback is performed in reverse order of the dependency relationship, that is, if it is detected that the running index of the target service node in the target dependency model does not meet the preset index condition, it means that the target service node may have an abnormal situation, and then the related deployment of the target service node is suspended, and the upstream node of the target service node is processed by version rollback according to the dependency relationship corresponding to the target service node, that is, if the target service node may have an abnormal situation, it means that the dependency relationship corresponding to the target service node may be unreasonable, and if only the target service node is processed, the dependency relationship between the target service node and the upstream node on which the target service node depends may still be abnormal, so it is necessary to change the dependency relationship from the upstream node of the target service node, that is, the upstream node of the target service node can be processed by version rollback, the dependency relationship included in the dependency relationship network of the current version and the historical version of the upstream node is determined, and deployment is performed.

[0093] In some embodiments, in the process of deploying the target dependency model, an LRU-based environment instance multiplexing strategy can also be executed. Since one dependency subject can depend on more than one subject, similarly, it can be depended on by more than one subject, each dependency subject can be called multiple times, and if the dependency subject is called each time and the configuration information is called, it will be repeatedly called and resources will be wasted. Therefore, through the environment instance multiplexing strategy, the related data of the called dependency subject can be stored, and subsequent direct retrieval from the storage space can be performed without repeated calling.

[0094] The storage space can be updated according to the data storage time. When the storage space reaches a certain threshold, the related data of the first stored dependency subject can be deleted when new related data of the dependency subject is stored, so as to ensure the normal storage of the related data of the dependency subject.

[0095] According to the service deployment method provided by all the above embodiments, in the actual scene test process, the multi-system integration environment construction efficiency is improved by 10 times, from 8 hours to 48 minutes; in addition, through the template verification mechanism, the configuration error rate can be reduced by 95%; and the environment abnormal recovery time is reduced from hours to seconds, and the average is 13.2 seconds; at the same time, through the intelligent multiplexing algorithm, the resource cost is reduced by 40%.

[0096] As shown in Figure 4 The service deployment apparatus provided by the embodiments of the present application can comprise: The acquisition module 401 is configured to acquire initial dependency information, and the initial dependency information is used to describe the dependency relationship between system service nodes. The processing module 402 is configured to construct an initial dependency graph according to the initial dependency information, the initial dependency graph including at least one version of a dependency relationship network, the dependency relationship network including a plurality of system service nodes and at least one dependency relationship existing between the system service nodes. The processing module 402 is further configured to perform data configuration on the at least one version of the dependency relationship network by using pre-stored target configuration data to obtain a target dependency model, the target configuration data including configuration data for the system service nodes and configuration data for the at least one dependency relationship, and the target dependency model being configured to run in dependence on the target configuration data. The processing module 402 is further configured to deploy the target dependency model in response to a deployment instruction.

[0097] In some embodiments, the processing module 402 is specifically configured to perform simulation running test on the target dependency model in a test environment in response to the deployment instruction, and collect simulation running indexes, the simulation running indexes being used to represent a simulation running state of the target dependency model. The processing module 402 is specifically configured to determine a simulation running result according to the simulation running indexes and a preset running index range, the simulation running result being determined according to whether the simulation running indexes are located within the preset running index range. The processing module 402 is specifically configured to deploy the target dependency model if the simulation running result indicates that the target dependency model runs normally.

[0098] In some embodiments, the processing module 402 is further configured to determine a fault type according to the simulation running indexes that are not located within the preset running index range if the simulation running result indicates that the target dependency model has a fault during running. The processing module 402 is further configured to repair the target dependency model according to a repair strategy corresponding to the fault type.

[0099] In some embodiments, the processing module 402 is specifically configured to traverse the dependency relationships between the system service nodes in the initial dependency information, and determine whether there is a conflict relationship in each dependency relationship, the conflict relationship being used to indicate that there is a closed loop in the dependency relationships between the system service nodes. The processing module 402 is specifically configured to construct the initial dependency graph according to the initial dependency information if it is detected that there is no conflict relationship between the dependency relationships.

[0100] In some embodiments, the acquisition module 401 is further configured to acquire a plurality of hierarchical templates, the plurality of hierarchical templates being provided with configuration items of different levels, each level of the configuration items including configuration items for the system service nodes and configuration items for the at least one dependency relationship. The processing module 402 is also used to populate the data of each configuration item in the multiple-level templates to obtain the target configuration data.

[0101] In some embodiments, the processing module 402 is specifically used to respond to a deployment instruction to determine the system availability level corresponding to each system service node in the target dependency model, wherein the system availability level is used to indicate the importance of each system service node in the target dependency model; The processing module 402 is specifically used to calculate the resource allocation weight based on the system availability level; The processing module 402 is specifically used to allocate resources to each system service node according to the resource allocation amount corresponding to the resource allocation weight, so as to deploy the target dependency model.

[0102] In some embodiments, the processing module 402 is specifically used to, in the process of deploying the target dependency model in response to the deployment instruction, when it is detected that the running indicators of the target service node in the target dependency model do not meet the preset indicator conditions, perform version rollback processing on the upstream node of the target service node according to the dependency relationship corresponding to the target service node, so as to deploy according to the dependency relationship included in the historical version of the upstream node of the target service node, wherein the target service node is any one of the multiple system service nodes included in the target dependency model.

[0103] In this embodiment, each module can implement the service deployment method provided in the above method embodiments and achieve the same technical effect. To avoid repetition, it will not be described again here.

[0104] like Figure 5 As shown in the embodiments of this application, an electronic device is also provided, which may include: Memory 501 storing executable program code; Processor 502 coupled to memory 501; Specifically, the processor 502 calls the executable program code stored in the memory 501 to execute the service deployment method executed by the electronic device in the above method embodiments.

[0105] This application provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the service deployment method described in the above method embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here.

[0106] The embodiment of the present application further provides a computer program product, which stores a computer program. The computer program is executed by a processor to implement each process of the service deployment method in the method embodiment, and achieves the same technical effects. To avoid repetition, details are not described herein.

[0107] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system or a computer program product. Therefore, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. In addition, the present application can take the form of a computer program product implemented on one or more computer-usable storage media including computer-usable program code.

[0108] In several embodiments provided by the present application, it should be understood that the disclosed apparatus and method can also be implemented by other manners. The apparatus embodiments described above are merely illustrative, for example, the flowcharts and block diagrams in the drawings show the possible implementation architectures, functions and operations of the apparatus, method and computer program product according to the embodiments of the present application. In this regard, each block in the flowcharts or block diagrams can represent a module, a program segment or a part of code, which includes one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur in different orders from those described in the drawings. For example, two consecutive blocks can actually be executed substantially in parallel, and sometimes they can be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and the combination of blocks in the block diagrams and / or flowcharts, can be implemented by a dedicated hardware-based system for executing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.

[0109] In the present application, the processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), ready programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor.

[0110] In this application, memory can include non-persistent memory and / or volatile memory, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM), EPROM, EEPROM, or flash memory. Memory is an example of computer readable storage media.

[0111] In this application, those of ordinary skill in the art can understand that all or part of the steps in the above-mentioned embodiments can be completed by a program instructing relevant hardware, and the program can be stored in a computer readable storage medium, including a volatile and non-volatile, removable and non-removable storage medium. Storage media can be implemented by any method or technology, and information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), other types of random access memory (RAM), read-only memory (ROM), one-time programmable read-only memory (OTPROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette, disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to computing devices. According to the definition herein, computer readable media does not include transitory computer readable media, such as modulated data signals and carrier waves.

[0112] It is to be noted that, in the present document, relational terms such as "first" and "second", and the like, are used solely to distinguish one entity or action from another entity or action, without necessarily requiring or implying any actual relationship or order between such entities or actions. Moreover, the terms "comprises", "comprising", "includes", "including", or the like, are intended to encompass non-exclusive inclusions, such that a process, method, article, or apparatus that comprises a list of elements is not necessarily limited to those elements, but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. In the absence of a contrary indication, an element listed in a "list of elements" should not be assumed to be the only element of that element.

[0113] It is to be understood that the terminology "one embodiment" or "an embodiment" used throughout this document means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the application. Therefore, the appearances of "in one embodiment" or "in an embodiment" throughout the specification are not necessarily referring to the same embodiment. Furthermore, the particular features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. It is also to be understood that the embodiments described herein are optional embodiments, and the acts and modules involved are not necessarily required by the application. The above-mentioned embodiments are not necessarily independent of each other, and are combined only to highlight different technical features in different embodiments. Those skilled in the art should know that the above-mentioned embodiments can be combined in any suitable manner.

[0114] In various embodiments of the present application, it should be understood that the size of the sequence number of the above-mentioned processes does not mean the inevitable sequence of execution, and the execution sequence of the processes should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0115] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e. they can be located in one place, or can be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiments of the present application.

[0116] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.

[0117] The integrated units described above, if implemented in the form of software function units and sold or used as independent products, can be stored in a computer accessible memory. Based on such understanding, the technical solutions of the present application essentially or the part of the prior art that contributes to the present application or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a memory and includes a plurality of parts or all steps of the above-mentioned method for enabling a computer device (which can be a personal computer, a server or a network device, etc., and specifically can be a processor in the computer device) to execute the embodiments of the present application.

[0118] The above is only a specific implementation of the present application, enabling those skilled in the art to understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to these embodiments herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A service deployment method, characterized in that, The method includes: Obtain initial dependency information, which describes the dependency relationships between system service nodes; Based on the initial dependency information, an initial dependency graph is constructed, which includes at least one version of the dependency network, and the dependency network includes multiple system service nodes and at least one dependency relationship between the system service nodes. The target dependency model is obtained by configuring the dependency network of at least one version using pre-stored target configuration data. The target configuration data includes configuration data for the multiple system service nodes and configuration data for the at least one dependency. The target dependency model depends on the target configuration data to run. In response to the deployment command, the target dependency model is deployed.

2. The method according to claim 1, characterized in that, The step of deploying the target dependency model in response to a deployment command includes: In response to the deployment command, the target dependency model is simulated and tested in a test environment, and simulation metrics are collected. These simulation metrics are used to characterize the simulation running status of the target dependency model. The simulation results are determined based on the simulated operation indicators and the preset operation indicator range, wherein the simulation results are determined based on whether the simulated operation indicators are within the preset operation indicator range; If the simulation results indicate that the target dependency model is running normally, then the target dependency model is deployed.

3. The method according to claim 2, characterized in that, After determining the simulation results based on the simulation indicators and the preset range of indicators, the method further includes: If the simulation results indicate that the target dependency model has a fault during operation, then the fault type is determined based on the simulation indicators that are not within the range of the preset operation indicators; The target dependency model is repaired according to the repair strategy corresponding to the fault type.

4. The method according to claim 1, characterized in that, The step of constructing an initial dependency graph based on the initial dependency information includes: Iterate through the dependencies between each system service node in the initial dependency information, and determine whether there are conflict relationships in each dependency relationship. The conflict relationship is used to indicate that there is a closed loop in the dependency relationship between multiple system service nodes. When no conflict is detected among the dependencies, the initial dependency graph is constructed based on the initial dependency information.

5. The method according to claim 1, characterized in that, Before configuring the dependency network of at least one version using pre-stored target configuration data to obtain the target dependency model, the method further includes: Obtain multiple pre-stored hierarchical templates, each of which contains configuration items at different levels. Each level of configuration item includes configuration items for the system service node and configuration items for the at least one dependency relationship. The target configuration data is obtained by populating each configuration item in the multiple hierarchical templates with data.

6. The method according to claim 1, characterized in that, The step of deploying the target dependency model in response to a deployment command includes: In response to the deployment instruction, the system availability level corresponding to each system service node in the target dependency model is determined, and the system availability level is used to indicate the importance of each system service node in the target dependency model; Based on the system availability level, the resource allocation weight is calculated; Resources are allocated to each system service node according to the resource allocation amount corresponding to the resource allocation weight, in order to deploy the target dependency model.

7. The method according to claim 1, characterized in that, The step of deploying the target dependency model in response to a deployment command includes: In response to the deployment instruction, during the deployment of the target dependency model, if it is detected that the operating metrics of the target service node in the target dependency model do not meet the preset metric conditions, the upstream node of the target service node is rolled back according to the dependency relationship corresponding to the target service node, so as to deploy according to the dependency relationship included in the historical version of the upstream node of the target service node. The target service node is any one of the multiple system service nodes included in the target dependency model.

8. A service deployment apparatus, characterized in that, The device includes: The acquisition module is used to acquire initial dependency information, which describes the dependency relationships between system service nodes. The processing module is used to construct an initial dependency graph based on the initial dependency information. The initial dependency graph includes a dependency network of at least one version, and the dependency network includes multiple system service nodes and at least one dependency relationship between the system service nodes. The processing module is further configured to configure the dependency network of at least one version using pre-stored target configuration data to obtain a target dependency model. The target configuration data includes configuration data for the plurality of system service nodes and configuration data for the at least one dependency relationship. The target dependency model depends on the target configuration data to run. The processing module is also configured to deploy the target dependency model in response to a deployment command.

9. An electronic device, characterized in that, include: Memory containing executable program code; and the processor coupled to the memory; The processor invokes the executable program code stored in the memory to execute the service deployment method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, include: The computer-readable storage medium stores computer instructions that, when executed by a processor, implement the service deployment method as described in any one of claims 1 to 7.