Resource change method and device

By determining the change resource collection in the cloud computing deployment system and selecting the appropriate workflow, the problem of uncontrollable system explosion range during resource change is solved, and the security and efficiency of resource change is improved, and the risks are reduced.

CN118939277APending Publication Date: 2024-11-12HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202310995256.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-05-11
Filing Date
2023-08-08
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

In the field of cloud computing, the uncontrollable range of the system explosion during resource change process leads to an increase in the risk of the change process. Especially when resource changes frequently, the uncontrollable range of the system explosion is more significant.

Method used

By introducing resource change methods into the deployment system, obtaining resource templates and determining the change resource collection, using the corresponding workflow to make resource changes, selecting streamlined or complex workflows, including resource orchestration and testing, based on the scope and risk level of the change resource collection, based on the scope and risk level of the change resource collection, Units, add or reduce the acquisition approval steps and cut-off steps to control the risk and efficiency of the change process.

Benefits of technology

It effectively avoids the increased risk of the change process caused by the uncontrollable range of the system explosion, improves the security and reliability of resource changes, reduces the risks of the resource change process, and ensures the normal operation of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118939277A_ABST
    Figure CN118939277A_ABST
Patent Text Reader

Abstract

The invention provides a resource change method and device, and relates to the field of cloud computing. The method is applied to a deployment system, the deployment system comprises a resource change device and at least one deployment environment, the resource change device is used for managing resources in the at least one deployment environment, and the method comprises the steps that a resource template is acquired, and the resource template comprises a target resource state of a first resource in the at least one deployment environment. According to the resource template, a changed resource set is determined, and the changed resource set comprises changed resources existing in at least one deployment environment in the process of enabling the first resource to reach the target resource state. The workflow corresponding to the changed resource set is determined, the workflow comprises a resource arrangement unit and a test unit, the resource arrangement unit is used for arranging resources in the changed resource set, and the test step is used for testing the resources in the changed resource set. And executing the workflow. The method and the device are used for changing resources in cloud computing.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application claims the priority of the Chinese patent application filed with the China Patent Office on May 11, 2023, with application number 202310531202.8 and application name “A method and control platform for blast radius control based on resource orchestration technology”, the entire contents of which are incorporated by reference in this application. Technical Field

[0002] The present application relates to the field of cloud computing, and in particular to a resource modification method and device. Background Art

[0003] With the popularization of the development and operation (DevOps) development model in the field of cloud computing and the continuous integration, continuous delivery, continuous deployment (CI / CD) software development practice, software development increasingly emphasizes the integration and automation of development, testing, deployment, and operation.

[0004] At present, in order to achieve the integration and automation of development, testing, deployment, and operation and maintenance, a powerful deployment system has been built in the existing technology. In the deployment system, users can use resource templates to describe the target resource state of the resources to be changed. After that, the deployment system can make resource changes to the resources in the deployment environment according to the obtained resource templates and in accordance with the automated process. In other words, users only need to describe the target resource state they want to achieve in the resource template, and do not need to pay attention to the specific steps to achieve the target resource state.

[0005] However, when using the deployment system to realize the automatic deployment of software, on the one hand, it can improve the efficiency of resource changes and realize the CI / CD function. On the other hand, due to the dependency relationship between resources, when changing a resource, other resources that depend on it may also need to be changed. Therefore, unexpected resource changes may occur, leading to the problem of uncontrollable system explosion range. Especially when resources change frequently, the problem of uncontrollable system explosion range will be more significant.

[0006] Therefore, in the process of resource change, how to avoid the problem of increased risk of the change process due to uncontrollable system explosion range is a problem that needs to be solved in the embodiments of the present application. Summary of the invention

[0007] The present application provides a resource change method and device for changing resources in cloud computing.

[0008] In a first aspect, a resource change method is provided, which is applied to a deployment system, wherein the deployment system includes a resource change device and at least one deployment environment, wherein the resource change device is used to manage resources in at least one deployment environment, and wherein the method includes: the resource change device obtains a resource template, wherein the resource template includes: a target resource state of a first resource in at least one deployment environment. The resource change device determines a change resource set based on the resource template, wherein the change resource set includes: in the process of making the first resource reach the target resource state, there are changed resources in at least one deployment environment. The resource change device determines a workflow corresponding to the change resource set, wherein the workflow includes a resource orchestration unit and a test unit, wherein the resource orchestration unit is used to orchestrate resources in the change resource set, and the test step is used to test resources in the change resource set. The resource change device executes the workflow.

[0009] In the above method, it is taken into consideration that: on the one hand, the scope of resources that need to be changed in this resource change (hereinafter referred to as the "change resource set") can be used to reflect the system explosion scope of this change process; on the other hand, in the process of resource change, according to the scope of resources that need to be changed in this change process, appropriate workflows can be used to change the resources in the change resource set. For example, when the scope of resources that need to be changed in the change process is small (for example, the small scope of resources that need to be changed may include: fewer resources in the change resource set, and / or the importance of resources in the change resource set is low, etc.), a more streamlined workflow is adopted (wherein, the more streamlined workflow may include fewer resource scheduling units and test units, so as to achieve the effect of increasing the rate of resource change and avoiding excessive overhead of the change process), so as to avoid excessive overhead of the change process; when the scope of resources that need to be changed in the change process is large (that is, the system explosion range is large), a more complex workflow is adopted (wherein, the more complex workflow may include more resource scheduling units and test units, so as to achieve the effect of ensuring the security and reliability of the resource change process), so as to avoid affecting the normal operation of the system due to the large system explosion range, and achieve the effect of reducing the risk of the resource change process. In this way, the problem of increased risk of the change process due to the uncontrollable system explosion range can be avoided.

[0010] In one implementation, the resource change device determines the workflow corresponding to the changed resource set, including: the resource change device determines the risk level corresponding to the changed resource set according to the changed resource set. The resource change device determines the workflow corresponding to the risk level, wherein different risk levels correspond to different workflows.

[0011] In the above implementation, multiple risk levels are divided, where different risk levels correspond to different workflows. Therefore, when a resource change is made, the corresponding risk level can be determined according to the changed resource set corresponding to the resource change, and then the corresponding workflow can be determined.

[0012] In one implementation, the workflow also includes an action unit, and the action unit includes at least one of an approval acquisition step and a flow switching step.

[0013] Through the above implementation, corresponding approval acquisition steps and flow switching steps can be added to different workflows as needed, thereby further avoiding the problem of increased risk in the change process due to uncontrollable system explosion range. For example, more approval acquisition steps and flow switching steps are set in a more complex workflow to ensure the security of the resource change process; fewer (or no) approval acquisition steps and flow switching steps are set in a more streamlined workflow to ensure the change rate of the resource change process.

[0014] In one implementation, the changed resource set includes: a second resource in which a change occurs in the first resource, and at least one resource in the deployment environment that depends on the second resource.

[0015] Through the above implementation, the scope involved in this resource change can be determined more accurately, so that the resource change can be performed according to a reasonable workflow.

[0016] In one implementation, the resource change device determines the changed resource set based on the resource template, including: the resource change device compares the target resource state of the first resource in the resource template with the first resource state, and determines the first resource set whose state has changed in the first resource; the first resource state is the resource state of at least one pre-recorded deployment environment. The resource change device compares the first resource state with the second resource state, and determines the second resource set whose state has changed; the second resource state is the resource state of at least one current deployment environment. The resource change device determines the second resource whose state has changed in the first resource based on the first resource set and the second resource set. The resource change device determines the changed resource set based on the second resource whose state has changed in the first resource.

[0017] Through the above implementation, it is possible to avoid the situation where, when resource drift occurs, the resource whose status has changed cannot be accurately obtained.

[0018] In one implementation, the second resource set includes: a third resource whose first resource state is different from the second resource state, and a resource that depends on the third resource.

[0019] Through the implementation method, the scope of this resource change can be determined more accurately, so that the resource change can be performed according to a reasonable workflow.

[0020] In one implementation, the method further includes: the resource change device outputting prompt information, where the prompt information is used to show the changed resource set to the user.

[0021] Through the implementation method, technical personnel can understand the resource content involved in this resource change process.

[0022] In one implementation, the resource change device determines the risk level corresponding to the changed resource set, including: the resource change device divides the resources in the changed resource set into k resource subsets according to the dependency relationship between the resources, each resource subset includes resources with a dependency relationship, and k is a positive integer. The resource change device determines the risk level corresponding to the k resource subsets respectively. The resource change device determines the risk level corresponding to the changed resource set according to the risk levels corresponding to the k resource subsets respectively.

[0023] Through the above implementation, the risk level corresponding to this resource change can be accurately determined so that the resource change can be performed according to a reasonable workflow.

[0024] In one implementation, the higher the risk level, the more complex the corresponding workflow.

[0025] In a second aspect, a resource change device is provided, which is applied to a deployment system. The deployment system includes a resource change device and at least one deployment environment. The resource change device is used to manage resources in at least one deployment environment. The resource change device includes: an acquisition unit, which is used to acquire a resource template. The resource template includes: a target resource state of a first resource in at least one deployment environment. A processing unit is used to determine a change resource set based on the resource template. The change resource set includes: in the process of making the first resource reach the target resource state, there are changed resources in at least one deployment environment. The processing unit is also used to determine a workflow corresponding to the change resource set. The workflow includes a resource orchestration unit and a test unit. The resource orchestration unit is used to orchestrate the resources in the change resource set, and the test step is used to test the resources in the change resource set. The processing unit is also used to execute the workflow.

[0026] In one implementation, the processing unit is further used to determine the workflow corresponding to the changed resource set, including: the processing unit is further used to determine the risk level corresponding to the changed resource set according to the changed resource set. The processing unit is further used to determine the workflow corresponding to the risk level, wherein different risk levels correspond to different workflows.

[0027] In one implementation, the workflow also includes an action unit, and the action unit includes at least one of an approval acquisition step and a flow switching step.

[0028] In one implementation, the changed resource set includes: a second resource in which a change occurs in the first resource, and at least one resource in the deployment environment that depends on the second resource.

[0029] In one implementation, a processing unit is used to determine a changed resource set based on a resource template, including: a processing unit is used to compare a target resource state of a first resource in a resource template with a first resource state, and determine a first resource set whose state has changed in the first resource; the first resource state is a resource state in at least one pre-recorded deployment environment. A processing unit is used to compare the first resource state with a second resource state, and determine a second resource set whose state has changed; the second resource state is a resource state in at least one current deployment environment. A processing unit is used to determine a second resource whose state has changed in the first resource based on the first resource set and the second resource set. A processing unit is used to determine a changed resource set based on the second resource.

[0030] In one implementation, the second resource set includes: a third resource whose first resource state is different from the second resource state, and a resource that depends on the third resource.

[0031] In one implementation, the processing unit is further configured to cause the resource change device to output prompt information, where the prompt information is configured to display the changed resource set to the user.

[0032] In one implementation, a processing unit is used to determine a risk level corresponding to a changed resource set, including: a processing unit is used to divide resources in the changed resource set into k resource subsets according to dependencies between resources, each resource subset includes resources with dependencies, and k is a positive integer. A processing unit is used to determine the risk levels corresponding to the k resource subsets respectively. A processing unit is used to determine the risk level corresponding to the changed resource set according to the risk levels corresponding to the k resource subsets respectively.

[0033] In a third aspect, a resource change device is provided, comprising a memory and a processor, wherein the memory is used to store computer instructions, and the processor is used to call and execute computer instructions from the memory to implement a method as in the first aspect or any implementation method in the first aspect.

[0034] In a fourth aspect, a computer-readable storage medium stores instructions, which, when executed on a processor, implement the method of the first aspect or any one of the implementations of the first aspect.

[0035] According to a fifth aspect, a computer program product comprises instructions, which, when executed on a processor, implement the method according to the first aspect or any one of the implementations of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 A schematic diagram of the structure of a deployment system provided in an embodiment of the present application;

[0037] Figure 2 One of the flowcharts of a resource change method provided in an embodiment of the present application;

[0038] Figure 3 A second flowchart of a resource change method provided in an embodiment of the present application;

[0039] Figure 4 A schematic diagram of a workflow provided in an embodiment of the present application;

[0040] Figure 5 A third flowchart of a resource change method provided in an embodiment of the present application;

[0041] Figure 6 A schematic diagram of a method for determining risk level provided in an embodiment of the present application;

[0042] Figure 7 One of the structural schematic diagrams of a resource change device provided in an embodiment of the present application;

[0043] Figure 8 This is a second structural diagram of a resource changing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0044] First, the technical terms involved in the embodiments of the present application are introduced:

[0045] 1. Development operations (DevOps)

[0046] DevOps is a culture and movement that integrates software development and operations. In the DevOps model, the development team and the operations team can be regarded as one team, rather than two "isolated" teams. Engineers from the development team and the operations team will collaborate with each other throughout the software life cycle (from development and testing to deployment and operation) and achieve a range of skills that are not limited to a single function.

[0047] 2. Continuous integration, continuous delivery, continuous deployment (CI / CD)

[0048] CI / CD is a software development practice. The core of CI / CD is to improve the efficiency of software delivery by introducing automation. Specifically, CI / CD builds a communication bridge between the development and operation teams by automating the building, testing, and deployment of software. "Continuous integration" can help developers merge code changes into a shared branch or "trunk" more frequently (sometimes even every day). After completing the automated process of building and unit testing and integration testing in "continuous integration", "continuous delivery" can automatically publish verified code to the repository. For a mature CI / CD pipeline, the final stage is "continuous deployment". As an extension of continuous delivery (automatically publishing production-ready builds to the code repository), "continuous deployment" can automatically release software to the production environment.

[0049] 3. Resource formation engine

[0050] The resource orchestration engine can also be called a target resource status based resource orchestration engine. Using the resource orchestration engine, it is possible to determine which resources need to be changed based on the target resource status described in the resource template (the target resource status in this application can be understood as the resource status expected to be achieved), and generate a corresponding resource change sequence so that changes such as deployment, change or deletion of resources can be implemented according to the resource change sequence. The core capability of the resource orchestration engine is that users do not need to pay attention to the specific steps to achieve the target resource status, but only need to describe the target resource status expected to be achieved in the resource template.

[0051] 4. Resource template

[0052] Resource templates can be understood as text files or file collections used to describe the states of multiple target resources. In practical applications, resource templates can be described using domain specific language (DSL) syntax.

[0053] 5. Resource stack

[0054] Resource stack, also called resource stack, is a logical management object that users use resource orchestration engine to manage physical and logical resources. In practical applications, resource stack can be understood as a collection of multiple resources. When using resource templates to change resources or in the process of dry run, resource stack can be used as the execution unit.

[0055] 6. Resource drift

[0056] The resource status in the deployment environment is usually maintained in the resource orchestration engine. However, when users bypass the resource orchestration engine and directly change the resources in the deployment environment, the resource status maintained in the resource orchestration engine may be inconsistent with the actual resource status. This phenomenon of the resource status maintained in the resource orchestration engine being inconsistent with the actual resource status is called resource drift.

[0057] The following is an introduction to the application scenarios of the technical solutions provided in the embodiments of the present application:

[0058] Currently, in the field of cloud computing, various vendors usually build corresponding deployment systems to improve resource change efficiency and implement CI / CD functions. Figure 1 , which is a schematic diagram of a deployment system provided in an embodiment of the present application. The deployment system 10 can be used for resource management of a public cloud, a private cloud or a hybrid cloud.

[0059] In the deployment system 10, the software / hardware resources (hereinafter referred to as "resources") of cloud computing can be divided into one or more deployment environments (deployment environment 121, deployment environment 122 and deployment environment 123 are used as examples in the figure for illustration). Each deployment environment includes a collection of software / hardware resources.

[0060] In addition, the deployment system 10 also includes a resource change device 11 for managing resources in each deployment environment. After obtaining the resource template input by the user, the resource change device 11 can determine the corresponding resource change order based on the resources described in the resource template by calling the resource orchestration engine. Then, the resource change system 11 generates corresponding change instructions and change materials (wherein the change materials may include software package resources and configuration resources that need to be upgraded) according to the resource change order determined by the resource orchestration engine, and sends the change instructions and change materials to the corresponding deployment environment so that the corresponding deployment environment executes the change instructions and change materials.

[0061] Through the introduction of the above deployment system 10, it can be seen that: by using Figure 1The deployment system 10 shown implements the automated deployment of software, thereby improving the efficiency of resource changes and realizing the functions of CI / CD. However, in the process of using the deployment system 10 to implement the automated deployment of software, due to the dependency relationship between resources, in the process of changing a resource, other resources that depend on the resource may also need to be changed. Therefore, unexpected changes in resources may occur, resulting in the problem of uncontrollable system explosion range. Especially in the case of frequent resource changes, the possibility of excessive system explosion range will be aggravated. Therefore, in the process of resource changes, how to avoid the problem of increased risk of the change process due to uncontrollable system explosion range is a problem that needs to be solved in the embodiments of the present application.

[0062] It should be noted that, in order to facilitate the description of the solution, in the embodiment of the present application, the functional module used to manage resources in each deployment environment in the deployment system 10 is referred to as a "resource change device". In actual application, other names (such as "resource change system", "change system", "resource control system" or "resource control platform", etc.) can also be used to represent the functional module used to manage resources in each deployment environment in the deployment system 10. Among them, in actual application, the function of the resource change device 11 can be implemented by a personal computer (including desktop computers, laptop computers, handheld computers and notebook computers, etc.), an ultra-mobile personal computer (UMPC), or a smart phone, server and other electronic devices; or, the function of the above-mentioned resource change device 11 can also be implemented by some hardware / software devices in the above-mentioned electronic devices. The embodiment of the present application does not impose any special restrictions on the specific form of the resource change device 11.

[0063] To facilitate understanding of the technical solutions provided by the embodiments of the present application, the following is an introduction to the technical solutions in the related art:

[0064] In the first related technology, in order to control the risk in the system change, a change operation risk control method is proposed, which includes: firstly intercepting each operation instruction to the target device, and then using a preset change plan to determine whether each operation instruction has an operation risk. After determining that there is no operation risk, the operation instruction is sent to the target device so that the target device performs the change processing according to the operation instruction.

[0065] It can be seen that, considering that the above-mentioned related technologies use operation instructions as judgment units, risk assessment is performed by judging whether each operation instruction has an operation risk. However, operation instructions are a process-oriented change management method. As the complexity of changes increases, the number of change instructions and the execution process of change instructions will grow explosively (for example, a change operation will include forward operation instructions and reverse operation instructions. For another example, when multiple operations are involved, the instructions corresponding to each operation can include multiple execution processes according to different arrangements and combinations), which will increase the complexity of risk judgment.

[0066] In the second related technology, a business-based system change risk control method is proposed, which includes: in the process of system change, first obtain all business processes included in the system; then determine the risk value of each business process; then, based on the risk value of each business process, calculate the risk size to the entire system.

[0067] It can be seen that the second related technology mentioned above evaluates the overall risk of the system change process based on the risk size of each business process. When this method is applied to the resource change process in the deployment system 10, the method may have the problem of being unable to accurately judge the risk size for resource changes with weaker business attributes. For example, when changing the network environment in the deployment environment (such as changing the firewall policy), since the business attributes of the network environment are weak, it is impossible to prepare to judge the risk size. For another example, when changing the operating system in the deployment environment, since the operating system does not have business attributes, it is also impossible to prepare to judge the risk size.

[0068] The following is a detailed description of the technical solution provided in the embodiment of the present application with reference to examples:

[0069] In response to the above technical problems, the embodiments of the present application take into account: on the one hand, the scope of resources that need to be changed in this resource change (hereinafter referred to as "change resource set") can be used to reflect the system explosion scope of this change process; on the other hand, in the process of resource change, according to the scope of resources that need to be changed in this change process, an appropriate workflow can be used to change the resources in the change resource set. For example, when the scope of resources that need to be changed in the change process is small (for example, the small scope of resources that need to be changed may include: fewer resources in the change resource set, and / or the importance of resources in the change resource set is low, etc.), a more streamlined workflow is adopted (wherein, the more streamlined workflow may include fewer resource scheduling units and test units, so as to achieve the effect of increasing the rate of resource change and avoiding excessive overhead of the change process), so as to avoid excessive overhead of the change process; when the scope of resources that need to be changed in the change process is large (that is, the system explosion range is large), a more complex workflow is adopted (wherein, the more complex workflow may include more resource scheduling units and test units, so as to achieve the effect of ensuring the security and reliability of the resource change process), so as to avoid affecting the normal operation of the system due to the large system explosion range, and achieve the effect of reducing the risk of the resource change process. In this way, the problem of increased risk of the change process due to the uncontrollable system explosion range can be avoided.

[0070] Combine the following Figure 1 The deployment system 10 is shown to introduce the resource change method provided by the embodiment of the present application. The method may include the following contents of S201-204:

[0071] S201. The resource changing device 11 obtains a resource template.

[0072] The resource template includes the target resource state of the first resource in each deployment environment. The first resource may include one or more resources in the deployment environment (for example, the first resource may include: one or more virtual machines, and a collection of one or more databases).

[0073] For example, when it is necessary to change the resources in the deployment environment, the user can use the resource template to describe the desired state of the first resource. In the embodiment of the present application, for ease of description, the desired state of the resource described in the resource template is referred to as the "target resource state". Then, the user inputs the resource template into the resource change device 11 to trigger the resource change process.

[0074] For example, Figure 2As shown, the resource change device 11 includes a change system 111. The change system 111 serves as an overall entry for change operations and is used to receive resource templates input into the resource change device 11 by users.

[0075] S202: The resource changing device 11 determines the resource set to be changed according to the resource target.

[0076] The changed resource set includes the changed resources in each deployment environment (in the form of Figure 1 Take the deployment system 10 as an example, that is, there are changed resources in the deployment environment 121, the deployment environment 122 and the deployment environment 123).

[0077] For example Figure 2 As shown, the resource change device 11 includes a resource orchestration engine 112. When the change system 111 obtains a resource template, the resource template can be sent to the resource orchestration engine 112. The resource orchestration engine 112 can pre-calculate the change resource set corresponding to the current resource template through a dry run based on the target resource state described in the resource template.

[0078] In one implementation, on the one hand, the changed resource set includes resources in which changes have occurred in the first resource.

[0079] Take the resource with changes included in the first resource (hereinafter referred to as the second resource) as an example, that is to say, the other resources in the first resource except the second resource are already the target resource state described in the resource template in each deployment environment, so there is no need to change these other resources.

[0080] On the other hand, the changed resource set also includes resources in each deployment environment that are dependent on the second resource.

[0081] In a first possible design, the resources in each deployment environment that depend on the second resource may be resources that explicitly depend on the second resource.

[0082] For example, the second resource includes resource a (that is, the changed resource set includes resource a). In addition, the deployment environment includes resource b, and resource b uses a declaration to indicate that resource b depends on resource a. Then, in addition to resource a, the changed resource set may also include resource b.

[0083] In addition, the resources in each deployment environment that depend on the second resource may also be resources that implicitly depend on the second resource.

[0084] For example, the second resource includes resource a (that is, the changed resource set includes resource a). In addition, the deployment environment includes resource b. Although resource b does not declare that resource b depends on resource a, resource b references a specific attribute in resource a. Then, in addition to resource a, the changed resource set can also include resource b.

[0085] In a second possible design, the resources in each deployment environment that depend on the second resource may be resources that directly depend on the second resource.

[0086] For example, the second resource includes resource a (that is, the changed resource set includes resource a). In addition, the deployment environment includes resource b, and resource b explicitly or implicitly depends on the second resource (for details, refer to the first possible design above). Then, in addition to resource a, the changed resource set may also include resource b.

[0087] In addition, the resources in each deployment environment that depend on the second resource may also be resources that indirectly depend on the second resource.

[0088] For example, the second resource includes resource a (that is, the changed resource set includes resource a). In addition, the deployment environment includes resource b and resource c. Resource b explicitly depends on or implicitly depends on resource a, and resource c explicitly depends on or implicitly depends on resource b. Then, in addition to resource a, the changed resource set may also include resource b and resource c.

[0089] In addition, considering that in the process of determining the changed resource set, on the one hand, the resource state in the pre-recorded deployment environment (for example, the resource state in the deployment environment pre-recorded in the resource orchestration engine 112, hereinafter referred to as the "first resource state") and the target resource state of the first resource in the resource template can be compared to determine the resources whose states have changed in the first resource. On the other hand, considering that when resources drift (that is, the resource state in the pre-recorded deployment environment may be inconsistent with the resource state in the actual deployment environment), the resources whose states have changed may not be accurately obtained by comparing the first resource state with the target resource state in the resource template.

[0090] Therefore, in one implementation, the above S202 may include the following contents of S2021-S2024:

[0091] S2021. The resource changing device 11 compares the target resource state of the first resource in the resource template with the first resource state, and determines a first resource set whose state has changed in the first resource.

[0092] The first resource state is a pre-recorded resource state in each deployment environment.

[0093] like Figure 3 As shown, in the resource change device 11, after obtaining the resource template, the resource orchestration engine 112 can compare the target resource state of the first resource in the resource template with the first resource state (the first resource state can be the resource state in the deployment environment maintained by the resource orchestration engine 112) to obtain a first resource set in which the state of the first resource has changed.

[0094] S2022: The resource changing device 11 compares the first resource state with the second resource state to determine a second resource set whose state has changed.

[0095] The second resource state is the resource state in each current deployment environment.

[0096] like Figure 3 As shown, in the resource change device 11, the resource orchestration engine 112 can obtain the resource status (i.e., the second resource status) in each current deployment environment by accessing each deployment environment, etc., and compare the first resource status with the second resource status to determine the second resource set.

[0097] The second resource set may include resources whose states are different between the first resource state and the second resource state (hereinafter referred to as third resources whose states are different between the first resource state and the second resource state), and resources that depend on the third resource. Specifically, the resources that depend on the third resource may include resources that explicitly depend on or implicitly depend on the third resource. For the specific contents of explicit dependency and implicit dependency, please refer to the above description, which will not be repeated here.

[0098] S2023: The resource changing device 11 determines a changed second resource in the first resource according to the first resource set and the second resource set.

[0099] Exemplarily, the resource template includes resource a, resource b, resource c, resource d and resource e, wherein the target resource states of resource a, resource b, resource c, resource d and resource e are respectively: state a-1, state b-1, state c-1, state d-1 and state e-1. In addition, in the first resource state (i.e., the resource state maintained in the resource orchestration engine 112), the states of resource a, resource b, resource c, resource d and resource e are respectively: state a-1, state b-1, state c-1, state d-2 and state e-2. Then the first resource set may include: resource d and resource e.

[0100] In addition, in the second resource state (i.e., the resource state of the current deployment environment), the states of resource a, resource b, resource c, resource d, and resource e are: state a-3, state b-1, state c-1, state d-2, and state e-2, respectively. It can be seen that the state of resource a has changed between the first resource state and the second resource state. Therefore, the second resource set can include: resource a.

[0101] Then, according to the first resource set and the second resource set, it can be determined that the second resource includes: resource a, resource d and resource e.

[0102] S2024. The resource changing device 11 determines a changed resource set according to a changed second resource among the n resources.

[0103] For example, in the resource change device 11, the resource orchestration engine 112 can determine, by trial operation, the resources in the deployment environment that depend on the second resource when the second resource is changed, and further determine a set of changed resources including the second resource and the resources in the deployment environment that depend on the second resource.

[0104] Through the process of S2021-S2024 in the above implementation method, it is possible to avoid the situation where, when resource drift occurs, the resources whose status has changed cannot be accurately obtained.

[0105] In addition, in one implementation, in order to enable the technical personnel to understand the resource content involved in this resource change process, such as Figure 3 As shown, the method may also include:

[0106] S206: The resource changing device 11 outputs prompt information.

[0107] The prompt information is used to show the changed resource set to the user.

[0108] In addition, in a possible design, the prompt information may also include the second resource set obtained in S2022, so that technical personnel can understand the resource drift in the deployment system 11.

[0109] After determining the change resource set, the method may further include:

[0110] S203: The resource changing device 11 determines the workflow corresponding to the changed resource set.

[0111] The workflow is used to indicate the change process of the change resource collection.

[0112] For example Figure 2As shown, the resource change device 11 includes a workflow system 113. A plurality of workflows are pre-recorded in the workflow template of the workflow system 113. The workflow system 113 can determine the workflow corresponding to the changed resource set from the plurality of workflows in the workflow template according to the changed resource set.

[0113] Specifically, the workflow may include at least one execution unit, and each execution unit may include: a resource orchestration unit and a test unit.

[0114] Among them, the resource orchestration unit is used to orchestrate the resources in the resource set. In other words, it can be understood as an execution unit that needs to be executed by the resource orchestration engine to adjust the resource status. For example, the resource orchestration unit may include: applying for new resources (for example, applying for a virtual machine or a server), updating resources (for example, adjusting the memory occupied by resources or adjusting the computing power corresponding to resources), and deleting resources.

[0115] The test unit is used to test the resources in the change resource collection. For example, in the test unit, the resource change process can be simulated in a simulation environment.

[0116] In one implementation, the workflow may also include an action unit. The action unit may be understood as an execution unit that does not require the resource orchestration engine to execute and is used to control the progress of resource changes. The action unit may include at least one of the approval acquisition step and the flow switching step. For example, the approval acquisition step includes: manually approving whether the current step is completed, whether to proceed to the next step, etc.

[0117] For example, Figure 4 2 shows two workflows recorded in the workflow template.

[0118] Among them, Figure 4 The workflow shown in (a) includes:

[0119] S301, work approval. For example, in the execution unit corresponding to S301, the subsequent steps can only be triggered if the project leader's approval is received. Specifically, after the work is approved, S302 is executed on the one hand, and S304 can be executed in parallel on the other hand.

[0120] S302, closing resource alarms. For example, after receiving the approval operation (ie, S301), the alarms of the corresponding resources can be closed through S302 to avoid the problem of false alarms caused by resource changes in the subsequent process.

[0121] After closing the alarm of the corresponding resource in S302, execute S303.

[0122] S303, create a new resource alarm. For example, after closing the resource alarm through S302, you can add an alarm corresponding to the changed resource through S303. Among them, the process of creating a new resource alarm can be regarded as a resource change process, which is executed by the resource orchestration engine, so S303 can be implemented by the resource orchestration class unit.

[0123] S304, simulate resource changes. For example, after receiving the approval operation (i.e., S301), the resource orchestration engine can execute the resource change process in the simulation environment. After the simulation resource change process is completed, S305 is executed. Among them, executing the resource change process in the simulation environment is a resource change process, which is executed by the resource orchestration engine, so S304 can be implemented by the resource orchestration class unit.

[0124] Specifically, resource changes may include: resource creation, resource update, resource deletion, resource change, etc. The specific content of resource changes may not be limited in the embodiments of the present application. Therefore, when simulating resource changes in S304, it may also include: resource creation, resource update, resource deletion, resource change, etc.

[0125] S305, check the update result. For example, after the simulation resource change process is completed, a technician is required to manually check whether the update result of S304 meets expectations. After receiving the confirmation operation of the technician, S306 is executed.

[0126] S306, perform resource changes in the production environment. For example, after receiving the confirmation operation of the technician (i.e., S305), the resource orchestration engine can execute the resource change process in the production environment. Among them, executing the resource change process in the production environment is a resource change process, which is executed by the resource orchestration engine, so S306 can be implemented by the resource orchestration class unit.

[0127] Specifically, resource changes may include: resource creation, resource update, resource deletion, resource change, etc. The specific content of the resource change may not be limited in the embodiments of the present application.

[0128] S307, enable resource alarm. For example, after determining that the new resource alarm is created (S303) and the resource change is completed in the production environment (S306), the resource alarm is enabled through the execution unit corresponding to S307, thereby completing the resource change process.

[0129] exist Figure 4 The workflow included in (b) includes:

[0130] S401, work approval. Similar to S301, in the execution unit corresponding to S401, the approval operation of the project leader needs to be received before the subsequent steps can be triggered. Specifically, after the work is approved, S402 is executed on the one hand, and S404 can be executed in parallel on the other hand.

[0131] S402, closing resource alarms. Similar to S302, after receiving the approval operation (ie, S401), the alarms of the corresponding resources can be closed through S402 to avoid the problem of false alarms caused by resource changes in the subsequent process.

[0132] S403, creating a new resource alarm. Similar to S303, after closing the resource alarm in S402, you can create a new alarm corresponding to the changed resource in S403.

[0133] S404. Make resource changes in the production environment.

[0134] With the above Figure 4 The difference of (a) is that in Figure 4 In (b), there is no need to simulate resource changes, but to make resource changes directly in the production environment.

[0135] S405, enable resource alarm. Similar to S307, after determining that the new resource alarm is created (S403) and the resource change is completed in the production environment (S404), the resource alarm is enabled through the execution unit corresponding to S405, thereby completing the resource change process.

[0136] It can be seen that the above Figure 4 The two workflows shown are: Figure 4 Workflow ratio in (a) Figure 4 (b) is more complex, so it can be used Figure 4 (a) to carry out resource change processes with a large system explosion range, using Figure 4 The workflow in (b) is used to perform resource change processes with a smaller system explosion range.

[0137] In addition, in one implementation, the embodiment of the present application can be divided into multiple risk levels, where different risk levels correspond to different workflows. In this way, when making resource changes, the corresponding risk level can be determined based on the set of changed resources corresponding to this resource change, and then the corresponding workflow can be determined. Therefore, the above S203 can be implemented by the following S2031-S2032:

[0138] S2031. The resource changing device 11 determines the risk level (hereinafter referred to as risk level) corresponding to the changed resource set according to the changed resource set.

[0139] like Figure 5 As shown, the workflow system 113 may include a risk control subsystem 1131 and a workflow subsystem 1132. The risk control subsystem 1131 may determine the corresponding risk level according to the acquired change resource set and the preset risk control strategy.

[0140] Next, the process of determining the corresponding risk level according to the acquired change resource set and the preset risk control strategy by the risk control subsystem 1131 is introduced. Figure 6 As shown, S2031 can be realized by the following S1-S3:

[0141] S1. The risk control subsystem 1131 divides the resources in the change resource set into k resource subsets according to the dependencies between the resources.

[0142] Each resource subset includes resources with dependencies.

[0143] For example, the changed resource set includes resource a, resource b, resource c, resource d, and resource e. Among them, resource a and resource b have a dependency relationship, and resource c, resource d, and resource e have a dependency relationship. Then the resources in the changed resource set are divided into two resource subsets, including: resource a and resource b; resource c, resource d, and resource e.

[0144] S2. The risk control subsystem 1131 determines the risk levels corresponding to the k resource subsets.

[0145] For example, the risk level corresponding to each resource subset may be determined according to the resource type included in each resource subset and the change content corresponding to the resource (eg, the change content may be addition, update or deletion, etc.).

[0146] In the actual application process, the risk level division method can be determined as needed. For example, for changes involving changes to gateways, application programming interfaces, or database resources, the corresponding risk level is higher; for another example, for changes involving changes to virtual machine internal resources, the corresponding risk level is lower. There is no limitation on the method of determining the risk level division in the embodiments of the present application.

[0147] S3. The risk control subsystem 1131 determines the risk level corresponding to the changed resource set according to the risk levels corresponding to the k resource subsets.

[0148] For example, the risk control subsystem 1131 may select the highest risk level among the risk levels corresponding to the k resource subsets as the risk level corresponding to the changed resource set. For another example, the risk control subsystem 1131 may perform a weighted sum of the risk levels corresponding to the k resource subsets, and use the sum as the risk level corresponding to the changed resource set.

[0149] S2032: The resource changing device 11 determines the workflow corresponding to the risk level.

[0150] Among them, different risk levels correspond to different workflows.

[0151] In one implementation, the higher the risk level, the more complex the corresponding workflow.

[0152] Specific as Figure 5 As shown, in the workflow system 113, after the risk control subsystem 1131 determines the risk level according to the content of S2031, the risk level can be sent to the workflow subsystem 1132. The workflow subsystem 1132 determines the workflow corresponding to the risk level from the workflow template according to the acquired risk level. For example, when the risk level acquired by the workflow subsystem 1132 is high, the workflow corresponding to the risk level is determined as follows: Figure 4 When the risk level obtained by the workflow subsystem 1132 is low, the workflow corresponding to the risk level is determined as follows: Figure 4 as shown in (b).

[0153] S204: The resource changing device 11 executes the workflow determined in S203.

[0154] For example Figure 2 , Figure 3 and Figure 5 In the process shown, after the change system 111 in the resource change device 11 obtains the workflow from the workflow system 113, on the one hand, it executes the execution unit of the resource orchestration class in the workflow by calling the resource orchestration engine 112, and on the other hand, the change system 11 can directly interact with the deployment environment to execute the execution unit of the action class in the workflow.

[0155] It is understandable that, in order to realize the functions in the above-mentioned embodiments, the resource change device 11 includes hardware structures and / or software modules corresponding to the execution of each function, such as the change system 111, the resource orchestration engine 112 and the workflow system 113. It should be easy for those skilled in the art to realize that, in combination with the units and method steps of each example described in the embodiments disclosed in this application, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application scenario and design constraints of the technical solution.

[0156] In addition, in the above embodiments of the present application, for the convenience of describing the scheme, the above Figure 2 , Figure 3 and Figure 5 The change system 111, resource orchestration engine 112 and workflow system 113 used to implement the corresponding functions are respectively used as a functional module in the resource change device 11 to describe the workflow of the resource change device 11. It can be understood that in the actual application process, the above-mentioned change system 111, resource orchestration engine 112 or workflow system 113 can also be a functional module independent of the resource change device 11. At this time, the resource change device 11 can call the change system 111, resource orchestration engine 112 or workflow system 113 through the corresponding interface, so that the resource change device 11 executes the content of the resource change method provided in the embodiment of the present application. The embodiment of the present application may not limit the logical relationship between the resource change device 11 and each functional module.

[0157] In addition, in the above embodiment of the present application, in order to facilitate the understanding of the solution, the resource change device 11 is divided into three systems (i.e., the change system 111, the resource orchestration engine 112, and the workflow system 113), and the method provided by the embodiment of the present application is introduced through the working process of the three systems. In the actual application process, more or fewer functional modules in the resource change device can be used to implement the functions of the above three systems.

[0158] like Figure 7 As shown, it is a schematic diagram of the structure of another resource change device provided by the present application. The resource change device 50 can be used to implement the above Figure 2 or Figure 3 The functions of each step executed by the described resource change device can therefore also achieve the beneficial effects of the above method embodiments.

[0159] like Figure 7 As shown, the resource changing device 50 includes: an acquisition unit 501 and a processing unit 502.

[0160] Specifically, the acquisition unit 501 is used to acquire a resource template.

[0161] The resource template includes: a target resource state of a first resource in at least one deployment environment.

[0162] For example, the acquisition unit 501 can be used to execute Figure 2 , Figure 3 or Figure 5 S201 in.

[0163] The processing unit 502 is used to determine a change resource set according to the resource template.

[0164] The changed resource set includes: in the process of making the first resource reach the target resource state, there are changed resources in at least one deployment environment.

[0165] For example, the processing unit 502 may be used to execute Figure 2 , Figure 3 or Figure 5 S202 in.

[0166] The processing unit 502 is further used to determine the workflow corresponding to the changed resource set, wherein the workflow includes a resource arrangement unit and a test unit, wherein the resource arrangement unit is used to arrange the resources in the changed resource set, and the test step is used to test the resources in the changed resource set.

[0167] This workflow is used to indicate the change process for a collection of change resources.

[0168] For example, the processing unit 502 may be used to execute Figure 2 , Figure 3 or Figure 5 S203 in.

[0169] The processing unit 502 is also used to execute the workflow.

[0170] For example, the processing unit 502 may be used to execute Figure 2 , Figure 3 or Figure 5 S204 in.

[0171] In one implementation, the processing unit 502 is further configured to determine a workflow corresponding to the changed resource set, including:

[0172] The processing unit 502 is further configured to determine a risk level corresponding to the changed resource set according to the changed resource set.

[0173] The processing unit 502 is further configured to determine a workflow corresponding to a risk level, wherein different risk levels correspond to different workflows.

[0174] For example, the processing unit 502 may be used to execute Figure 5 S2031-S2032 in.

[0175] In one implementation, the workflow also includes an action unit, and the action unit includes at least one of an approval acquisition step and a flow switching step.

[0176] In one implementation, the changed resource set includes: a second resource in which a change occurs in the first resource, and at least one resource in the deployment environment that depends on the second resource.

[0177] In one implementation, the processing unit 502 is configured to determine, according to the resource template, a set of changed resources, including:

[0178] The processing unit 502 is configured to compare the target resource state of the first resource in the resource template with the first resource state to determine a first resource set whose state has changed in the first resource, wherein the first resource state is a resource state in at least one pre-recorded deployment environment.

[0179] The processing unit 502 is used to compare the first resource state with the second resource state to determine a second resource set whose state has changed; the second resource state is a resource state in at least one current deployment environment.

[0180] The processing unit 502 is configured to determine a second resource that has been changed in the first resource according to the first resource set and the second resource set. The processing unit is configured to determine a changed resource set according to the second resource that has been changed in the first resource set.

[0181] For example, the processing unit 502 may be used to execute Figure 3 S2021-S2024 in.

[0182] In one implementation, the second resource set includes: a third resource whose first resource state is different from the second resource state, and a resource that depends on the third resource.

[0183] In one implementation, the processing unit 502 is further configured to output prompt information, where the prompt information is used to show the changed resource set to the user.

[0184] For example, the processing unit 502 may be used to execute Figure 3 S205 in.

[0185] In one implementation, the processing unit 502 is further configured to determine a first risk level corresponding to the changed resource set, including:

[0186] The processing unit 502 is further configured to divide the resources in the changed resource set into k resource subsets according to the dependency relationship between the resources, each resource subset includes resources with a dependency relationship, and k is a positive integer.

[0187] The processing unit 502 is further configured to determine risk levels corresponding to the k resource subsets.

[0188] The processing unit 502 is further configured to determine a first risk level according to the risk levels corresponding to the k resource subsets.

[0189] For example, the processing unit 502 may be used to execute Figure 6 S1-S3 in .

[0190] For a more detailed description of the acquisition unit 501 and the processing unit 502, please refer to Figure 2-Figure 3 The relevant description in the method embodiment shown is not repeated here.

[0191] Figure 8 This is a schematic diagram of another resource change device provided in this embodiment. The resource change device 60 can be a chip or a system on a chip. In addition, the resource change device 60 can include all or part of the hardware in a desktop computer, a tablet computer, a desktop, a laptop, a handheld computer, a notebook computer, a super mobile personal computer, a netbook, and a cellular phone, a personal digital assistant, an augmented reality\virtual reality device, etc. that can perform anomaly detection.

[0192] The resource changing device 60 may include: a processor 601 , a communication line 602 , a memory 603 , and part or all of at least one communication interface 604 .

[0193] The processor 601 is used to execute the Figure 2 and Figure 3 All or part of the steps performed by the resource change device 11 in the provided method.

[0194] Specifically, the processor 601 may include a general-purpose central processing unit (CPU), and the processor 601 may also include a microprocessor, a field programmable gate array (Field Programmable Gate Array, FPGA), a digital signal processor (digital signal processing, DSP) or an application-specific integrated circuit (application-specific integrated circuit, ASIC), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0195] In a specific implementation, as an embodiment, the processor 601 may include one or more CPUs, such as Figure 8 CPU0 and CPU1 in.

[0196] In a specific implementation, as an embodiment, the device 60 may include multiple processors, such as Figure 8 601 and processor 608 in the embodiment of the present invention. Each of these processors can be a single-CPU processor or a multi-CPU processor. The processor here can refer to one or more devices, circuits, and / or processing cores for processing, for example, computer data (computer program instructions).

[0197] In addition, the memory 603 may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memories. Among them, the nonvolatile memory may be a read-only memory (ROM), a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct rambus RAM (DR RAM). Memory 603 can be independent and connected to processor 601 via communication line 602. Memory 603 can also be integrated with processor 601.

[0198] The memory 603 stores computer instructions. The processor 601 can execute all or part of the steps in the method provided in this embodiment by executing the computer instructions stored in the memory 603. Figure 8 As shown, the computer instructions stored in the memory 603 may include software modules for implementing the functions of the acquisition unit 501 and the processing unit 502. The processor 601 may execute the computer instructions stored in the memory 603 to perform the method provided in this embodiment.

[0199] Optionally, the computer-executable instructions in this embodiment may also be referred to as application program codes, which is not specifically limited in this embodiment.

[0200] In addition, the communication interface 604 uses any transceiver or other device for communicating with other devices or communication networks, such as Ethernet, radio access network (RAN), wireless local area networks (WLAN), etc.

[0201] In addition, the communication line 602 is used to connect the components in the resource change device 60. Specifically, the communication line 602 may include a data bus, a power bus, a control bus, a status signal bus, etc. However, for the sake of clarity, various buses are marked as communication lines 602 in the figure.

[0202] In a specific implementation, as an embodiment, the data processing device 60 may further include an output device 607 and an input device 606. The output device 607 may communicate with the processor 601 and may display information in a variety of ways. For example, the output device 607 may be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector. The input device 606 may communicate with the processor 601 and may receive user input in a variety of ways. For example, the input device 606 may be a mouse, a keyboard, a touch screen device, or a sensor device.

[0203] In addition, the resource change device 60 may further include a storage medium 605. The storage medium 605 is used to store computer instructions and various data for implementing the technical solution of this embodiment. When the resource change device 60 executes the above method of this embodiment, the computer instructions and various data stored in the storage medium 605 are loaded into the memory 603, so that the processor 601 can execute the computer instructions stored in the memory 603 to execute the method provided by this embodiment.

[0204] The method steps in this embodiment can be implemented by hardware or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, and the software modules can be stored in RAM, flash memory, ROM, PROM, EPROM, EEPROM, registers, hard disks, mobile hard disks, CD-ROMs or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC. In addition, the ASIC can be located in a resource change device. Of course, the processor and the storage medium can also be present in the resource change device as discrete components.

[0205] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instruction is loaded and executed on a computer, the process or function described in this embodiment is executed in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a communication device, a user device or other programmable device. The computer program or instruction can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer program or instruction can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired or wireless means. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that integrates one or more available media. The available medium can be a magnetic medium, such as a floppy disk, a hard disk, or a tape; it can also be an optical medium, such as a digital video disc (DVD); it can also be a semiconductor medium, such as an SSD.

[0206] In this embodiment, unless otherwise specified or there is a logical conflict, the terms and / or descriptions between different implementations are consistent and can be referenced to each other, and the technical features in different embodiments can be combined to form a new embodiment based on their internal logical relationships.

[0207] In this embodiment, "at least one" means one or more, "more than one" means two or more, and other quantifiers are similar. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, for elements (element) in the singular form "a", "an" and "the", unless the context clearly stipulates otherwise, it does not mean "one or only one", but means "one or more than one". For example, "a device" means one or more such devices. Furthermore, at least one (at least one of)... "means one or any combination of subsequent associated objects, for example, "at least one of A, B and C" includes A, B, C, AB, AC, BC, or ABC. In the text description of this embodiment, the character " / " generally indicates that the previous and next associated objects are in an "or" relationship; in the formula of this embodiment, the character " / " indicates that the previous and next associated objects are in a "division" relationship.

Claims

1. A resource change method, applied to a deployment system, wherein the deployment system comprises a resource change device and at least one deployment environment, wherein the resource change device is used to manage resources in the at least one deployment environment, It is characterized in that The method comprises: The resource changing device acquires a resource template, wherein the resource template includes: a target resource state of a first resource in the at least one deployment environment; The resource changing device determines a set of changed resources according to the resource template, wherein the set of changed resources includes: resources that have changed in the at least one deployment environment during the process of making the first resource reach the target resource state; The resource change device determines a workflow corresponding to the changed resource set, wherein the workflow includes a resource orchestration unit and a test unit, wherein the resource orchestration unit is used to orchestrate resources in the changed resource set, and the test step is used to test the resources in the changed resource set; The resource changing device executes the workflow.

2. The method according to claim 1, It is characterized in that The resource changing device determines the workflow corresponding to the changed resource set, including: The resource changing device determines the risk level corresponding to the changed resource set according to the changed resource set; The resource changing device determines the workflow corresponding to the risk level, wherein different risk levels correspond to different workflows.

3. The method according to claim 1 or 2, It is characterized in that The workflow also includes an action unit, and the action unit includes at least one of an approval acquisition step and a flow switching step.

4. The method according to any one of claims 1 to 3, It is characterized in that The changed resource set includes: a second resource in which a change occurs in the first resource, and a resource in the at least one deployment environment that depends on the second resource.

5. The method according to any one of claims 1 to 4, It is characterized in that The resource changing device determines to change the resource set according to the resource template, including: The resource changing device compares the target resource state of the first resource in the resource template with the first resource state to determine a first resource set whose state has changed in the first resource; the first resource state is a resource state in the at least one deployment environment recorded in advance; The resource changing device compares the first resource state with the second resource state to determine a second resource set whose state has changed; the second resource state is a resource state in the at least one deployment environment currently; The resource changing device determines, according to the first resource set and the second resource set, the second resource that has been changed in the first resource; The resource changing device determines the changed resource set according to the second resource.

6. The method according to claim 5, It is characterized in that The second resource set includes: a third resource whose state is different from that of the first resource and the second resource, and a resource that depends on the third resource.

7. The method according to any one of claims 1 to 6, It is characterized in that The method further comprises: The resource change device outputs prompt information, and the prompt information is used to show the changed resource set to the user.

8. The method according to claim 2, It is characterized in that The resource changing device determines the risk level corresponding to the changed resource set, including: The resource changing device divides the resources in the change resource set into k resource subsets according to the dependency relationship between the resources, each of the resource subsets includes resources with a dependency relationship, and k is a positive integer; The resource changing device determines the risk levels corresponding to the k resource subsets respectively; The resource changing device determines the risk level corresponding to the changed resource set according to the risk levels respectively corresponding to the k resource subsets.

9. A resource change device, applied to a deployment system, wherein the deployment system comprises a resource change device and at least one deployment environment, wherein the resource change device is used to manage resources in the at least one deployment environment. It is characterized in that The method comprises: An acquisition unit, configured to acquire a resource template, wherein the resource template includes: a target resource state of a first resource in the at least one deployment environment; A processing unit, configured to determine a set of changed resources according to the resource template, wherein the set of changed resources includes: resources in the at least one deployment environment that have been changed in the process of making the first resource reach the target resource state; The processing unit is further used to determine a workflow corresponding to the changed resource set, wherein the workflow includes a resource orchestration unit and a testing unit, wherein the resource orchestration unit is used to orchestrate resources in the changed resource set, and the testing step is used to test the resources in the changed resource set; The processing unit is further configured to execute the workflow.

10. The resource changing device according to claim 9, It is characterized in that The processing unit is further used to determine a workflow corresponding to the changed resource set, including: The processing unit is further configured to determine a risk level corresponding to the changed resource set according to the changed resource set; The processing unit is further used to determine the workflow corresponding to the risk level, wherein different risk levels correspond to different workflows.

11. The resource changing device according to claim 9 or 10, It is characterized in that The workflow also includes an action unit, and the action unit includes at least one of an approval acquisition step and a flow switching step.

12. The resource changing device according to any one of claims 9 to 11, It is characterized in that The changed resource set includes: a second resource in which a change occurs in the first resource, and a resource in the at least one deployment environment that depends on the second resource.

13. The resource changing device according to any one of claims 9 to 12, It is characterized in that The processing unit is used to determine a change resource set according to the resource template, including: The processing unit is configured to compare the target resource state of the first resource in the resource template with the first resource state, and determine a first resource set whose state has changed in the first resource; the first resource state is a resource state in the at least one deployment environment that is pre-recorded; The processing unit is configured to compare the first resource state with a second resource state to determine a second resource set whose state has changed; the second resource state is a resource state in the at least one deployment environment currently; The processing unit is configured to determine, according to the first resource set and the second resource set, the second resource in which a change occurs in the first resource; The processing unit is configured to determine the changed resource set according to the second resource.

14. The resource changing device according to claim 13, It is characterized in that The second resource set includes: a third resource whose state is different from that of the first resource and the second resource, and a resource that depends on the third resource.

15. The resource changing device according to any one of claims 9 to 14, It is characterized in that The processing unit is further used for the resource change device to output prompt information, and the prompt information is used to show the changed resource set to the user.

16. The resource changing device according to claim 10, It is characterized in that The processing unit is used to determine the risk level corresponding to the changed resource set, including: The processing unit is used to divide the resources in the changed resource set into k resource subsets according to the dependency relationship between the resources, each of the resource subsets includes resources with a dependency relationship, and k is a positive integer; The processing unit is used to determine the risk levels corresponding to the k resource subsets respectively; The processing unit is used to determine the risk level corresponding to the changed resource set according to the risk levels respectively corresponding to the k resource subsets.

17. A resource changing device, It is characterized in that The system comprises a memory and a processor, wherein the memory is used to store computer instructions, and the processor is used to call and execute the computer instructions from the memory to implement the method according to any one of claims 1 to 8.

18. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores instructions, and when the instructions are executed on a processor, the method according to any one of claims 1 to 8 is implemented.

19. A computer program product, It is characterized in that The computer program product comprises instructions which, when executed on a processor, implement the method according to any one of claims 1 to 8.

Citation Information

Cited By

  • Cloud environment change management method and device based on large model, equipment and medium

    CN119561838A

  • Big model-based cloud environment change management method, device and equipment and medium

    CN119561838B

  • Execution plan generating method and apparatus, and computing device cluster

    WO2026113386A1

  • Micro-service change method and apparatus

    WO2026200140A1