Data processing method and apparatus, and computing device

By acquiring the mapping relationship and real-time status information between the target environment and resources, a dynamic description file is generated, which solves the problem of IaC resource status deviation and realizes safe and efficient environment changes and resource sharing.

WO2026243032A1PCT designated stage Publication Date: 2026-11-26HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2026/097747
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2025-05-21
Filing Date
2026-05-19
Publication Date
2026-11-26

AI Technical Summary

Technical Problem

Existing technologies cannot effectively eliminate the discrepancy between the theoretical state of resources defined by Infrastructure as Code (IaC) and the actual state of resources in the live network, resulting in environmental changes not meeting expectations and posing security risks.

Method used

By obtaining the mapping relationship between the target environment and resources, real-time status information of resources is obtained, a dynamic environment description file is generated, and changes are executed by the IaC engine to ensure that changes are based on real-time status information and eliminate deviations.

Benefits of technology

Ensuring that environmental changes meet expectations improves the safety of changes, reduces the risk and cost of misoperation, and supports flexible resource sharing across multiple environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2026097747_26112026_PF_FP_ABST
    Figure CN2026097747_26112026_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present application are a data processing method and apparatus, and a computing device. The method comprises: acquiring a target environment to be changed; on the basis of the target environment and a first mapping relationship, determining at least one target resource corresponding to the target environment; acquiring respective real-time state information of the at least one target resource; on the basis of the respective real-time state information of the at least one target resource and a change operation for the target environment, generating an environment description file; and sending the environment description file to an infrastructure as code (IaC) engine, such that the IaC engine executes a corresponding change on the target environment on the basis of the respective real-time state information of the at least one target resource and the change operation in the environment description file. By means of the solution, a drift between a theoretical state defined by IaC for a resource and a real state of the resource in the live environment can be eliminated to ensure that each change to the environment behaves as expected, thereby improving the security of a change to the environment.
Need to check novelty before this filing date? Find Prior Art

Description

Data processing methods, apparatus and computing devices

[0001] This application claims priority to Chinese Patent Application No. 202510661533.2, filed on May 21, 2025, entitled "Method, Apparatus and Computing Device for Data Processing", the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of cloud computing, and more specifically, to a data processing method, apparatus, and computing device. Background Technology

[0003] Infrastructure as Code (IaC) is a methodology for defining, deploying, and managing infrastructure through code. It automates the configuration and management of infrastructure and is a crucial component of modern cloud-native and DevOps practices. Through code-based approaches, automation, and version control, IaC significantly improves the efficiency, reliability, and maintainability of infrastructure management. Its core idea is to treat infrastructure (such as servers, networks, and storage) as software, describing, deploying, and managing this infrastructure by writing code rather than manually.

[0004] Typically, deviations (drifts) occur between the theoretical state of the infrastructure defined by IaC and its actual state during operation, often caused by human intervention and multi-person collaboration. One related technical solution uses process specifications to constrain changes to physical resources, requiring all changes to go through the IaC route to ensure consistency between the configuration description file and the real-time state of resources in the live network. While this solution mitigates deviations to some extent, it cannot completely eliminate them, and exceptions will always exist in real-world scenarios. Another related technical solution provides manual or automated tools for deviation detection, periodically or on-demand scanning for differences between resource status and configuration, reminding users to update resource configurations in the IaC to avoid deviations. However, this solution requires manual merging and updating of resource configurations in the IaC after a deviation is detected, which relies heavily on human experience, is costly, and carries the risk of error.

[0005] Therefore, how to avoid the deviation between the theoretical state of resources defined by IaC and the actual state of resources in the live network, and improve the security of environmental changes, has become an urgent technical problem to be solved. Summary of the Invention

[0006] This application provides a data processing method, apparatus, and computing device that can eliminate the deviation between the theoretical state of resources defined by IaC and the actual state of resources in the live network, ensuring that every change to the environment is as expected, thereby improving the security of environmental changes.

[0007] In a first aspect, a data processing method is provided, comprising: acquiring a target environment to be modified; determining at least one target resource corresponding to the target environment based on the target environment and a first mapping relationship, wherein the first mapping relationship includes a correspondence between the target environment and the at least one target resource; acquiring real-time status information of each of the at least one target resource; generating an environment description file based on the real-time status information of each of the at least one target resource and a change operation of the target environment; and sending the environment description file to an Infrastructure as a Code (IaC) engine, so that the IaC engine can perform corresponding changes to the target environment based on the real-time status information of each of the at least one target resource in the environment description file and the change operation.

[0008] In the above technical solution, since the environment description file executed by the IaC engine is dynamically generated as an unbiased file based on the real-time status information of the resources, that is, the change benchmark in the environment description file is the real-time status information of the resources in the live network, eliminating the discrepancy between it and the theoretical status information of the resources defined by IaC, it ensures that the changes to the target environment based on this change benchmark are in line with expectations, thereby improving the security of changing the target environment.

[0009] In conjunction with the first aspect, in some implementations of the first aspect, before determining at least one target resource corresponding to the target environment based on the target environment and the first mapping relationship, the method further includes: obtaining the first mapping relationship.

[0010] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: establishing the first mapping relationship between the target environment and the at least one target resource; and storing the first mapping relationship.

[0011] The above technical solution only requires maintaining the mapping relationship between the environment and resources. This eliminates the need to manually maintain the version of the resource configuration file in IaC, reducing costs and minimizing the risk of misoperation.

[0012] In conjunction with the first aspect, in some implementations of the first aspect, a tagging mechanism is used to mark the environment corresponding to each of the at least one target resource, the environment including the target environment.

[0013] In the above technical solution, resources can be flexibly mapped to environments through business tags, decoupling the traditional "resource stack" model and supporting many-to-many dynamic mapping relationships. This enables flexible resource sharing across multiple environments and reduces the complexity of environment maintenance.

[0014] In conjunction with the first aspect, in some implementations of the first aspect, real-time status information of each of the at least one target resource is obtained from the provider of the at least one target resource.

[0015] In the above technical solution, the real-time status information of each of the at least one target resource in the existing network can be obtained directly from the provider of the at least one target resource. In this way, the deviation between the at least one target resource and the theoretical status information of the resource defined by IaC can be eliminated, thereby ensuring that the changes made to the target environment based on the real-time status information of each of the at least one target resource in the existing network are as expected.

[0016] In conjunction with the first aspect, in some implementations of the first aspect, when the at least one target resource is determined, the real-time status information of each of the at least one target resource is obtained from the provider of the at least one target resource.

[0017] In the above technical solution, when it is necessary to change the target environment, the real-time status information of each of the at least one target resource in the existing network can be obtained directly from the provider of the at least one target resource based on the information of the at least one target resource corresponding to the target environment, thereby further ensuring the real-time status information of the at least one target resource in the existing network.

[0018] In conjunction with the first aspect, in some implementations of the first aspect, real-time status information of at least one resource provided by at least one provider is obtained from at least one provider according to a time period; and real-time status information of the at least one target resource is obtained from the real-time status information of the at least one target resource based on the information of the at least one target resource.

[0019] In the above technical solution, in order to avoid frequent access to at least one provider due to frequent changes in the target environment, a polling method can be used to actively obtain the real-time status information of at least one resource provided by at least one provider at regular intervals, and store the obtained real-time status information of at least one resource provided by at least one provider locally.

[0020] In conjunction with the first aspect, in some implementations of the first aspect, before generating an environment description file based on the real-time status information of each of the at least one target resource and the change operation of the target environment, the method further includes: receiving the change operation of the target environment from the terminal device.

[0021] Secondly, a data processing apparatus is provided, comprising: an acquisition module, a determination module, a generation module, and a sending module. The acquisition module is used to acquire a target environment to be modified; the determination module is used to determine at least one target resource corresponding to the target environment based on the target environment and a first mapping relationship, wherein the first mapping relationship includes a correspondence between the target environment and the at least one target resource; the acquisition module is further used to acquire real-time status information of each of the at least one target resource; the generation module is used to generate an environment description file based on the real-time status information of each of the at least one target resource and the modification operation of the target environment; and the sending module is used to send the environment description file to an Infrastructure as a Code (IaC) engine, so that the IaC engine can perform corresponding modifications to the target environment based on the real-time status information of each of the at least one target resource in the environment description file and the modification operation.

[0022] In conjunction with the second aspect, in some implementations of the second aspect, the acquisition module is further configured to acquire the first mapping relationship before determining at least one target resource corresponding to the target environment based on the target environment and the first mapping relationship.

[0023] In conjunction with the second aspect, in some implementations of the second aspect, the apparatus further includes: a creation module and a storage module, wherein the creation module is used to establish the first mapping relationship between the target environment and the at least one target resource; and the storage module is used to store the first mapping relationship.

[0024] In conjunction with the second aspect, in some implementations of the second aspect, the creation module is specifically used to: mark the environment corresponding to each of the at least one target resource based on a tagging mechanism, the environment including the target environment.

[0025] In conjunction with the second aspect, in some implementations of the second aspect, the acquisition module is specifically used to: acquire real-time status information of each of the at least one target resource from the provider of the at least one target resource.

[0026] In conjunction with the second aspect, in some implementations of the second aspect, the acquisition module is specifically used to: upon determining the at least one target resource, acquire the real-time status information of each of the at least one target resource from the provider of the at least one target resource.

[0027] In conjunction with the second aspect, in some implementations of the second aspect, the acquisition module is specifically used to: acquire real-time status information of at least one resource provided by at least one provider according to a time period; and acquire real-time status information of the at least one target resource from the real-time status information of the at least one target resource based on the information of the at least one target resource.

[0028] In conjunction with the second aspect, in some implementations of the second aspect, the apparatus further includes: a receiving module, configured to receive a change operation of the target environment from a terminal device before generating an environment description file based on the real-time status information of each of the at least one target resource and the change operation of the target environment.

[0029] It should be understood that for the beneficial effects of the second aspect and its various implementations, please refer to the first aspect and its various implementations; they will not be repeated here.

[0030] Thirdly, a computing device is provided, including a processor and a memory, and optionally, an input / output interface. The processor controls the input / output interface to send and receive information, the memory stores a computer program, and the processor retrieves and runs the computer program from the memory, causing the computing device to execute the method of the first aspect or any possible implementation thereof.

[0031] Optionally, the processor can be a general-purpose processor, which can be implemented in hardware or software. When implemented in hardware, the processor can be a logic circuit, integrated circuit, etc.; when implemented in software, the processor can be a general-purpose processor that reads software code stored in memory. This memory can be integrated into the processor or located outside the processor and exist independently.

[0032] Fourthly, a computing device cluster is provided, including at least one computing device, each computing device including a processor and a memory; the processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device, such that the computing device cluster performs the method of the first aspect or any possible implementation thereof.

[0033] Fifthly, a chip is provided that acquires and executes instructions to implement the methods described in the first aspect and any implementation thereof.

[0034] Optionally, as one implementation, the chip includes a processor and a data interface, through which the processor reads instructions stored in the memory and executes the methods in the first aspect and any implementation thereof.

[0035] Optionally, as one implementation, the chip may further include a memory storing instructions, and the processor is used to execute the instructions stored in the memory. When the instructions are executed, the processor is used to perform the method in the first aspect and any implementation thereof.

[0036] In a sixth aspect, a computer program product containing instructions is provided, which, when executed by a computing device, cause the computing device to perform the methods described in the first aspect and any implementation thereof.

[0037] In a seventh aspect, a computer program product containing instructions is provided, which, when run by a cluster of computing devices, cause the cluster of computing devices to perform the methods described in the first aspect and any implementation thereof.

[0038] Eighthly, a computer-readable storage medium is provided, including computer program instructions that, when executed by a computing device, perform the method as described in the first aspect and any implementation thereof.

[0039] As examples, these computer-readable storage devices include, but are not limited to, one or more of the following: read-only memory (ROM), programmable ROM (PROM), erasable PROM (EPROM), flash memory, electrically EPROM (EEPROM), and hard drive.

[0040] Alternatively, as one implementation method, the aforementioned storage medium can specifically be a non-volatile storage medium.

[0041] A ninth aspect provides a computer-readable storage medium including computer program instructions that, when executed by a cluster of computing devices, perform the method as described in the first aspect and any implementation thereof.

[0042] As examples, these computer-readable storage devices include, but are not limited to, one or more of the following: read-only memory (ROM), programmable ROM (PROM), erasable PROM (EPROM), flash memory, electrically EPROM (EEPROM), and hard drive.

[0043] Alternatively, as one implementation method, the aforementioned storage medium can specifically be a non-volatile storage medium. Attached Figure Description

[0044] Figure 1 is a schematic block diagram of a cloud scenario applicable to an embodiment of this application.

[0045] Figure 2 is a schematic flowchart of a data processing method provided in an embodiment of this application.

[0046] Figure 3 is a schematic block diagram of a data processing system provided in an embodiment of this application.

[0047] Figure 4 is a schematic diagram of a mapping relationship between resources and the environment provided in an embodiment of this application.

[0048] Figure 5 is a schematic block diagram of a data processing apparatus 500 provided in an embodiment of this application.

[0049] Figure 6 is a schematic deployment diagram of a data processing apparatus 500 provided in an embodiment of this application.

[0050] Figure 7 is a schematic diagram of the architecture of a computing device 1500 provided in an embodiment of this application.

[0051] Figure 8 is a schematic diagram of the architecture of a computing device cluster provided in an embodiment of this application.

[0052] Figure 9 is a schematic diagram of the connection between computing devices 1500A and 1500B via a network provided in an embodiment of this application. Detailed Implementation

[0053] The technical solutions in this application will now be described with reference to the accompanying drawings.

[0054] This application will present various aspects, embodiments, or features relating to systems comprising multiple devices, components, modules, etc. It should be understood and appreciated that individual systems may include additional devices, components, modules, etc., and / or may not include all devices, components, modules, etc. discussed in conjunction with the accompanying drawings. Furthermore, combinations of these approaches are also possible.

[0055] Furthermore, in the embodiments of this application, the words "exemplary," "for example," etc., are used to indicate that they are examples, illustrations, or descriptions. Any embodiment or design scheme described as "exemplary" in this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of the term "exemplary" is intended to present the concept in a concrete manner.

[0056] In the embodiments of this application, "corresponding" and "corresponding" can sometimes be used interchangeably. It should be noted that when the distinction is not emphasized, their intended meanings are consistent.

[0057] The business scenarios described in the embodiments of this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided in the embodiments of this application. As those skilled in the art will know, with the evolution of network architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.

[0058] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0059] In this application, "at least one" means one or more, and "more than one" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A alone, A and B simultaneously, and B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple.

[0060] For ease of description, the relevant concepts involved in the embodiments of this application will be explained below.

[0061] 1. Infrastructure as Code (IaC)

[0062] Infrastructure as a Code (IaC) is a methodology for defining, deploying, and managing infrastructure through code. It automates the configuration and management of infrastructure and is a crucial component of modern cloud-native and DevOps practices. Through code-based approach, automation, and version control, IaC significantly improves the efficiency, reliability, and maintainability of infrastructure management. Its core idea is to treat infrastructure (such as servers, networks, and storage) as software, describing, deploying, and managing this infrastructure by writing code rather than manually.

[0063] For example, IaC has the following advantages:

[0064] a) Improved efficiency: IaC reduces manual operations and human error by automating the deployment and configuration of infrastructure;

[0065] b) Consistency: IaC can ensure consistent infrastructure configuration across different environments (e.g., development, testing, production), avoiding problems caused by environmental differences;

[0066] c) Traceability: IaC stores infrastructure configurations in a code repository, records all changes through version control, and supports version rollback and collaboration;

[0067] d) Collaboration: Development and operations teams can jointly maintain the IaC code corresponding to the infrastructure, improving collaboration efficiency;

[0068] e) Cost savings: Reduce time and manpower costs for manual configuration and minimize losses caused by errors.

[0069] For example, the application scenarios of IaC may include, but are not limited to, the following:

[0070] a) Cloud resource management: Automated creation and management of resources such as virtual machines, storage, and networks;

[0071] b) Environment configuration: Quickly set up development, testing, and production environments, ensuring consistency in infrastructure configuration across all environments;

[0072] c) Disaster recovery: Quickly rebuild infrastructure through code to improve business continuity;

[0073] d) Multi-cloud management: Unified management of resources across multiple cloud platforms (such as AWS, Azure, GCP).

[0074] 2. IaC Engine

[0075] An IaC engine, also known as an IaC resource orchestration engine, is a tool or platform for automating the management and deployment of infrastructure resources. It defines infrastructure through code, enabling efficient, consistent, and repeatable management of resources.

[0076] For example, the IaC engine and core functionalities are shown below:

[0077] a) Automated deployment

[0078] The IaC engine can automatically create, configure, and manage infrastructure resources such as virtual machines, storage, and networks. It automatically executes the corresponding operations by reading user-written code or templates, without human intervention.

[0079] b) Version Control

[0080] The IaC engine supports storing infrastructure configurations in a code repository, enabling version control. This allows users to easily track and manage the infrastructure's change history, facilitating rollbacks and auditing.

[0081] c) Consistency Management

[0082] The IaC engine ensures consistent infrastructure configuration across different environments (such as development, testing, and production), avoiding "environment drift" issues. This helps improve the reliability and stability of applications.

[0083] d) Multi-cloud support

[0084] The IaC engine supports multi-cloud environments, allowing users to manage resources on different cloud platforms using the same tools and processes. This improves resource flexibility and portability.

[0085] For example, IaC engines may include, but are not limited to, Terraform, Ansible, etc.

[0086] Terraform uses the HashiCorp configuration language (HCL) to describe infrastructure, aiming to provide a concise, easy-to-read, and easy-to-write way to define resource configurations. It describes infrastructure in a domain-specific language, eliminating semantic ambiguity in infrastructure automation to support the automated deployment and management of modern applications and infrastructure. Terraform supports multi-cloud and hybrid cloud environments and is suitable for scenarios requiring resource management across cloud platforms.

[0087] Ansible is an open-source automation tool widely used in the IaC (Infrastructure as a Service) field. Through its simple configuration and powerful features, it provides an efficient solution for infrastructure management. Ansible uses a declarative YAML format for playbooks, resulting in clear logic, ease of maintenance, and suitability for team collaboration and version control. It is suitable for configuration management, automated deployment, and is ideal for teams with existing Linux environments.

[0088] 3. Drift:

[0089] Deviation refers to the difference between the theoretical state of the infrastructure defined by IaC and the actual state of the infrastructure during operation. For example, in IaC practice, after a long period of operation, the theoretical state of the infrastructure defined by IaC may become disconnected (or inconsistent) with the actual state of the infrastructure during operation, resulting in a deviation. This inconsistency can lead to operational risks, compliance issues, and system failures, and is a core challenge in automated management.

[0090] Deviations are usually caused by factors such as human operation and multi-person collaboration.

[0091] a) Human intervention: Operations personnel bypass the IaC engine and directly modify resources via the console API (such as manually adjusting security group rules), or execute scaling and failover actions automatically via scripts. This creates a disconnect between the actual state of the infrastructure during operation and the IaC-defined state, potentially causing subsequent automated tasks to fail due to this inconsistency.

[0092] b) Multi-person collaboration: Team members modify the code and the actual environment at the same time, resulting in inconsistent configuration versions (e.g., A modifies the code but does not deploy it, while B directly adjusts the environment).

[0093] c) Template and code design flaws, coupled with dynamic environmental changes. For example, incomplete resource declarations in IaC, such as missing parameters, cause actual resources to be generated according to default values. At the same time, changes in system default parameters lead to a disconnect between the actual state of the infrastructure during operation and the custom state defined by IaC.

[0094] The discrepancy between the theoretical state of the infrastructure defined by IaC and its actual state during operation can lead to unexpected changes to existing resources. For example, manually modified resources may be rolled back or deleted.

[0095] To address the discrepancy between the theoretical state of infrastructure as defined by IaC and its actual state during operation, the relevant technical solutions employ the following approach to eliminate this discrepancy:

[0096] 1) By standardizing processes, changes to entity resources are constrained, requiring all changes to follow the IaC route to ensure that the configuration description file remains consistent with the real-time status of resources in the production network. While this approach mitigates deviations to some extent, it cannot completely eliminate them, and exceptions will always exist in real-world scenarios.

[0097] 2) Provide manual or automatic tools for deviation detection, periodically or on-demand scanning of resource status and configuration differences, and remind users to update resource configurations in the IaC to avoid deviations. In this solution, after a deviation is detected, manual merging and updating of resource configurations in the IaC is required. This relies on human experience, is costly, and carries the possibility of errors.

[0098] In view of this, embodiments of this application provide a data processing method that can eliminate the deviation between the theoretical state of resources defined by IaC and the actual state of resources in the live network, ensuring that every change to the environment meets user expectations, thereby improving the security of changing the environment.

[0099] In one possible implementation, the method provided in this application embodiment can be applied to a cloud service scenario, where the method is executed by a cloud management platform within the cloud service scenario. For ease of description, the cloud service scenario will be described in detail below with reference to Figure 1.

[0100] Figure 1 is a schematic block diagram of a cloud scenario applicable to an embodiment of this application. As shown in Figure 1, the cloud scenario may include: a cloud management platform 110, the Internet 120, and a client 130.

[0101] As shown in Figure 1, the cloud management platform 110 is used to manage the infrastructure that provides multiple cloud services. The infrastructure includes multiple cloud data centers, each cloud data center includes multiple servers, and each server includes cloud service resources to provide corresponding cloud services to tenants.

[0102] The cloud management platform 110 can be located in a cloud data center and provides access interfaces (such as user interfaces or application program interfaces, APIs). Tenants can use client 130 to remotely access the access interface to register a cloud account and password on the cloud management platform 110 and log in. After successful authentication of the cloud account and password on the cloud management platform 110, the tenant can further select and purchase virtual machines of specific specifications (processor, memory, disk) on the cloud management platform 110. After successful purchase, the cloud management platform 110 provides the remote login account and password for the purchased virtual machine, and client 130 can remotely log in to the virtual machine to install and run the tenant's applications. Therefore, tenants can create, manage, log in to, and operate virtual machines in the cloud data center through the cloud management platform 110. Virtual machines can also be referred to as Elastic Compute Service (ECS) or Elastic Instances (different cloud service providers may use different names).

[0103] It should be understood that cloud service tenants can be individuals, businesses, schools, hospitals, government agencies, etc.

[0104] The cloud management platform 110 includes, but is not limited to, a user console, compute management services, network management services, storage management services, authentication services, and image management services. The user console provides an interface or API for interaction with tenants. The compute management services manage servers running virtual machines and containers, as well as bare metal servers. The network management services manage network services (such as gateways and firewalls). The storage management services manage storage services (such as data bucket services). The authentication services manage tenant account passwords. The image management services manage virtual machine images. Tenants can log in to the cloud management platform 110 via client 130 and the internet 120 to manage their rented cloud services.

[0105] The following is a detailed description of a data processing method provided by an embodiment of this application, with reference to Figure 2. It should be understood that the examples in Figure 2 are merely to help those skilled in the art understand the embodiments of this application, and are not intended to limit the embodiments to the specific values ​​or scenarios illustrated in Figure 2. Those skilled in the art can obviously make various equivalent modifications or variations based on the examples given below in Figure 2, and such modifications and variations also fall within the scope of the embodiments of this application.

[0106] Figure 2 is a schematic flowchart of a data processing method provided in an embodiment of this application. As shown in Figure 2, the method may include steps 210-240, which will be described in detail below.

[0107] Step 210: Obtain the target environment to be changed.

[0108] In this embodiment of the application, the target environment to be changed can be obtained, which can be input by the user through the user interface or API of the terminal device.

[0109] The aforementioned terminal devices include mobile phones, laptops, tablets, handheld computers, wireless terminals in smart cities, and wireless devices in smart homes, etc. This application does not specifically limit these devices.

[0110] For example, as shown in Figure 3, the aforementioned user interface can be a management UI. For instance, taking the cloud scenario shown in Figure 1, the management UI can be an interface provided by a cloud management platform.

[0111] For example, as shown in Figure 3, the user mentioned above could be an environment administrator who can input or select the target environment to be changed through the management UI interface.

[0112] This application does not specifically limit the type of the target environment, which may include, but is not limited to, development environment, testing environment, staging / pre-production environment, and production environment.

[0113] The aforementioned development environment refers to a standalone runtime environment specifically designed for developers, including a code editor, development toolchain, testing framework, and mock data, used to support rapid iteration and verification of business code. In other words, this development environment is the workspace used for writing, debugging, and initial testing code during the software development process; it is the core place where developers interact with the code.

[0114] The aforementioned testing environment refers to a dedicated runtime environment independent of the development and production environments. Its core objective is to simulate real-world scenarios for executing various tests (such as functional testing, performance testing, and security testing). By simulating production environment configurations and data, it identifies and fixes potential problems in advance. This helps the team discover and fix defects before code goes live, ensuring the software runs stably after deployment.

[0115] The aforementioned pre-release environment refers to the "last mile" testing phase in the software development process, close to the production environment, typically located after the testing environment and before the production environment. Its core objective is to simulate real production scenarios, perform end-to-end verification, and ensure high system reliability before deployment. The pre-release environment is an independent operating environment highly consistent with the production environment, used to perform final acceptance testing, performance verification, and disaster recovery drills. It minimizes deployment risks by using real production data (anonymized), identical infrastructure configurations, and all service dependencies.

[0116] The aforementioned production environment refers to a system environment that has undergone rigorous testing and verification before being officially provided to the public. In other words, this production environment is a system operating environment that directly faces end users and bears actual business loads, and the data used in this environment is real user data.

[0117] Step 220: Based on the target environment to be changed and the mapping relationship between the environment and resources, determine at least one target resource corresponding to the target environment.

[0118] In this embodiment of the application, after obtaining the target environment to be changed input by the user, the mapping relationship between the environment and resources can be obtained, and at least one target resource corresponding to the target environment can be determined according to the mapping relationship between the environment and resources.

[0119] It should be understood that at least one of the aforementioned target resources can also be referred to as resources within the scope of the target environment.

[0120] For example, as shown in Figure 3, the mapping relationship between the environment and resources can be stored in the environment metamodel library. After the environment administrator selects the target environment to be changed through the management UI interface, the environment administrator initiates a change request for the target environment by calling the change service. The change service calls the IaC reverse engineering engine to retrieve the mapping relationship between the environment and resources stored in the environment metamodel library. For example, the IaC reverse engineering engine can retrieve the stored mapping relationship between the environment and resources from the environment metamodel library by calling the environment management service, and determine at least one target resource corresponding to the target environment based on the mapping relationship between the environment and resources.

[0121] The aforementioned at least one target resource may come from one infrastructure provider or from multiple infrastructure providers; this application embodiment does not specifically limit this.

[0122] This application does not specifically limit the type of the target resource, which may include at least one of the following: network resources, storage resources, computing resources, security resources, etc.

[0123] The aforementioned target resources can be existing resources or newly added resources, and this application embodiment does not specifically limit them.

[0124] For example, the aforementioned computing resources may include, but are not limited to, virtual machines (VMs), container instances, bare metal servers, etc.

[0125] For example, the aforementioned storage resources may include, but are not limited to, cloud disks, object storage buckets, and file systems.

[0126] For example, the aforementioned network resources may include, but are not limited to: virtual private cloud (VPC), subnet, security group, load balancer, etc.

[0127] For example, the aforementioned security resources may include, but are not limited to, key pairs, certificates, access control policies, etc.

[0128] Optionally, before steps 210-220, an environmental meta-model can be obtained and stored in an environmental meta-model library. This environmental meta-model includes the definition of the environment, descriptive information about resources, and the mapping relationship between the environment and resources.

[0129] For example, if a resource is an existing resource, its description information could be its ID.

[0130] Another example is that if a resource is newly added, its description information can include multiple pieces of information related to the resource type. For instance, if the newly added resource is an Elastic Compute Service (ECS), the required description information may include, but is not limited to: the resource name, the enterprise project it belongs to, the availability zone, the CPU architecture, specifications, image, system disk size, VPC, subnet, password, etc.

[0131] For example, as shown in Figure 3, the environment administrator can log in to the management UI interface, obtain the environment metamodel by calling the environment management service, and store the environment metamodel in the environment metamodel library.

[0132] It should be understood that the aforementioned environment administrators can log in to the management UI interface at any time to define the aforementioned environment metamodel.

[0133] In the above technical solution, resources are flexibly mapped to environments through business tags, decoupling the traditional "resource stack" model and supporting many-to-many dynamic mapping relationships. This enables flexible resource sharing across multiple environments and reduces the complexity of environment maintenance.

[0134] In one possible implementation, according to this embodiment, the environment administrator can determine at least one environment based on actual business needs and classify the corresponding entity resources into the corresponding environment category, thereby obtaining the mapping relationship (also known as the correspondence relationship) between the environment and the resources. The environment administrator can manage the environment based on the significance of the business.

[0135] It should be understood that the above-mentioned relationship between environment and resources can be flexible, and the relationship between environment and resources can be many-to-many.

[0136] One possible implementation is to use a label mechanism to define entity resources as environments with business significance.

[0137] For example, as shown in Figure 4, resources in the resource list can be labeled to determine the mapping relationship between resources and environments. For instance, in Figure 4, resource R1 is labeled env = alpha, indicating that the environment corresponding to resource R1 is alpha; resource R2 is labeled env = alpha, indicating that the environment corresponding to resource R2 is alpha; resource R3 is labeled env = alpha, indicating that the environment corresponding to resource R3 is alpha; resource R4 is labeled env = beta, indicating that the environment corresponding to resource R4 is beta; and resource R5 is labeled env = alpha and env = beta, indicating that the environments corresponding to resource R1 are alpha and beta, respectively. That is, the resources corresponding to environment alpha include: resource R1, resource R2, resource R3, and resource R5. The resources corresponding to environment beta include: resource R4 and resource R5.

[0138] In the above technical solution, only the environment meta-model needs to be maintained, and the specific IaC configuration file does not need to be saved. In this way, there is no need to manually maintain the IaC configuration file version, which reduces costs and also reduces the risk of misoperation.

[0139] Step 230: Obtain the real-time status information of at least one target resource.

[0140] In this embodiment of the application, after determining at least one target resource corresponding to the target environment to be changed, the real-time status information of each of the at least one target resource can be obtained. It should be understood that the real-time status information of the resource is the actual status of the resource in the current network, and there is no deviation between it and the theoretical status of the resource defined by IaC.

[0141] Specifically, real-time status information of the at least one target resource in the current network can be obtained from the provider to which the at least one target resource belongs.

[0142] It should be understood that the embodiments of this application do not limit the status information of the resources, but are related to the type of resources.

[0143] For example, the status information of a resource may include, but is not limited to, at least one of the following: the deployment status of the resource (e.g., in deployment, or deployed successfully), the running status of the resource (e.g., running, or stopped), and the health status of the resource (e.g., whether it is healthy).

[0144] For example, as shown in Figure 3, after the environment administrator selects the target environment to be changed through the management UI, the environment administrator initiates a change request for the target environment by calling the change service. The change service calls the IaC reverse engineering engine, which retrieves the real-time status information of at least one target resource stored in the resource real-time status database.

[0145] In one possible implementation, as shown in Figure 3, the real-time information synchronizer actively obtains the real-time status information of the resources provided by the infrastructure provider through polling, and stores the real-time status information of the resources provided by the infrastructure provider in the resource real-time status database, so that the IaC reverse engineering engine can obtain the real-time status information of at least one target resource from the resource real-time status database.

[0146] In another possible implementation, as shown in Figure 3, when the IaC reverse engineering engine needs to obtain the real-time status information of at least one target resource stored in the database, the real-time information synchronizer actively obtains the real-time status information of the at least one target resource from the supplier of the at least one target resource and stores the real-time status information of the at least one target resource in the resource real-time status database, so that the IaC reverse engineering engine can obtain the real-time status information of the at least one target resource from the resource real-time status database.

[0147] Step 240: Generate a description file based on the real-time status information and changes of at least one target resource, and send the description file to the IaC engine.

[0148] In this embodiment, after obtaining the real-time status information of at least one target resource, the changes to the target environment can also be obtained, and a description file can be generated based on the real-time status information of at least one target resource and the changes. That is, the real-time status information of the entity resources obtained from the provider can be organized into an environmental model, and corresponding description files can be generated as needed.

[0149] The aforementioned description file may include real-time status information of at least one target resource in the target environment, as well as changes to the target environment.

[0150] It should be understood that the above-mentioned description file may be called an IaC file, a resource description file, or an environment description file, and this application embodiment does not specifically limit it in this way.

[0151] For example, the changes mentioned above can be changes made to the target environment by the user (e.g., an environment administrator) based on business needs. For instance, these changes may include, but are not limited to, adding, deleting, or modifying resources in the target environment.

[0152] For example, as shown in Figure 3, after the IaC reverse engineering engine generates a description file based on the real-time status information of at least one target resource, the environment administrator can log in to the management UI interface, call the change service to dynamically obtain the description file from the IaC reverse engineering engine, and modify the description file based on the changes, so that the description file includes the real-time status information of at least one target resource and the changes to the target environment.

[0153] The "creation" mentioned above refers to adding new resources to the target environment, which is applicable to scenarios such as deploying new applications and expanding cluster size.

[0154] The deletion mentioned above refers to releasing resources that are no longer needed in the target environment to avoid resource waste. This is applicable to scenarios such as cleaning up the test environment and reclaiming idle resources.

[0155] The modifications mentioned above refer to adjusting the configuration (such as CPU, memory, and storage capacity) or attributes (such as security group rules) of resources in the target environment, which is applicable to scenarios such as dealing with traffic peaks and optimizing costs.

[0156] For example, if the resource to be modified in the target environment is an ECS instance, the parameters that can be modified for that resource may include, but are not limited to: instance size (e.g., upgrading to ecs.g6e.xlarge), security group, password, and auto-renewal settings. If the resource to be modified in the target environment is a cloud disk, the parameters that can be modified for that resource may include, but are not limited to: scaling up (e.g., expanding from 40GB to 100GB), and mounting / unmounting. If the resource to be modified in the target environment is a VPC, the parameters that can be modified for that resource may include, but are not limited to: adding / deleting subnets, modifying routing tables, and updating ACL rules. If the resource to be modified in the target environment is a security group, the parameters that can be modified for that resource may include, but are not limited to: adding / deleting inbound / outbound rules (e.g., opening MySQL port 3306).

[0157] In this embodiment, the generated description file can also be sent to the IaC engine by invoking a change service. Upon receiving the description file, the IaC engine can use the real-time status information of at least one target resource in the description file as a change benchmark, and perform corresponding changes to the target environment according to the changes in the description file. Specifically, the IaC engine can invoke resource services from the infrastructure provider to perform corresponding changes to the provider-provided resources in the target environment according to the changes in the description file.

[0158] Optionally, in some embodiments, after the change is completed, the ID of the newly created resource can also be written back to the environment metamodel through the change service.

[0159] In the above technical solution, since the environment description file executed by the IaC engine is dynamically generated as an unbiased file based on the real-time status information of the resources, on the one hand, it is not necessary to save the traditional IaC resource configuration file or manually maintain the version of the IaC resource configuration file, thus reducing maintenance costs and the risk of misoperation; on the other hand, since the change benchmark in the environment description file is the real-time status information of the resources in the live network, it eliminates the discrepancy between the change benchmark and the theoretical status information of the resources defined by IaC, thus ensuring that changes to the target environment based on this change benchmark are as expected, thereby improving the security of changing the target environment.

[0160] The following examples illustrate the application scenarios of this application.

[0161] Example 1: The method provided in this application embodiment can be applied to resource orchestration in a cloud-native environment. It can realize automated resource orchestration in a cloud-native environment, ensuring that the state of the infrastructure of the cloud-native application is consistent with the state defined in the code. The unbiased change mechanism can automatically correct the inconsistency between the actual state of the resources and the theoretical state defined in the code, ensuring the stable operation of the cloud-native application.

[0162] It should be noted that in Example 2 above, since the resource status interfaces of different cloud vendors may differ, it is necessary to unify the processing of interfaces that require resource status from different cloud vendors.

[0163] Example 2: The method provided in this application embodiment can also be applied to a hybrid cloud environment to achieve unified orchestration of cross-cloud resources, supporting the simultaneous management of resources from multiple cloud vendors. Specifically, resources from different cloud vendors can be managed uniformly through an environment meta-model. This environment meta-model can flexibly define combinations of cross-cloud resources without manually maintaining multiple IaC description files. A real-time resource state library can store the real-time state of resources from multiple cloud vendors, supporting unified orchestration of cross-cloud resources. Through an unbiased change mechanism, consistency between the actual state of cross-cloud resources and the theoretical state defined in the code is ensured, avoiding business problems caused by inconsistencies in resource states.

[0164] It should be noted that in Example 2 above, due to the differences in resource description file formats and interfaces between different cloud vendors, it is necessary to adapt to the IaC formats of multiple cloud vendors (such as Terraform, AWS CloudFormation, etc.).

[0165] Example 3: The method provided in this application embodiment can also be applied to environment management in a microservice architecture to ensure consistency in the state of different microservice instances (such as development instances, test instances, and production instances). Specifically, the resources occupied by microservice instances can be flexibly mapped to different environments through a Label mechanism. Multiple environments (such as alpha, beta, and production) can be defined through an environment metamodel, supporting flexible mapping of resources occupied by microservice instances, thereby supporting resource sharing and dynamic adjustment between environments. Through an unbiased change mechanism, the consistency between the actual state of resources occupied by microservice instances and the theoretical state defined in the code is ensured, avoiding service anomalies and other problems caused by inconsistent resource states, thereby ensuring the stability of microservices.

[0166] It should be noted that in Example 3 above, due to the high dynamism of the microservice architecture, resource states may change frequently, requiring real-time monitoring and synchronization. Furthermore, resource sharing across multiple environments may lead to resource conflicts; therefore, enhanced resource state management is necessary.

[0167] The following is an example of an environment metamodel provided in the embodiments of this application. It should be understood that this environment metamodel definition incorporates multiple cloud providers and also supports descriptions of both new and existing resources.

[0168] For example, an example of an environmental meta-model is shown below:

[0169] It should be understood that the above environment metamodel description file defines two Providers, corresponding to two cloud resource providers (e.g., cloud A and cloud B). This environment metamodel description file defines two environments: env1 and env2. env1 contains resources from cloud A, where "A cloud_vpc" and "Acloud_cce_cluster" are existing resources; only their IDs are stored in the environment metamodel. There is also one newly created (added) resource (Acloud_vpc_subnet), expressed using standard IaC definitions. For example, the environment metamodel stores information such as the name, classless inter-domain routing (CIDR), gateway IP, and availability zone (AZ) of this new resource. env2 contains one existing resource, "B cloud_vpc," whose ID is only stored in the environment metamodel.

[0170] The methods provided by the embodiments of this application have been described in detail above with reference to Figures 1 to 4. The embodiments of the apparatus of this application will be described in detail below with reference to Figures 5 to 9. It should be understood that the descriptions of the method embodiments correspond to the descriptions of the apparatus embodiments; therefore, any parts not described in detail can be referred to the preceding method embodiments.

[0171] Figure 5 is a schematic block diagram of a data processing apparatus 500 provided in an embodiment of this application. The apparatus 500 can be implemented by software, hardware, or a combination of both. The apparatus 500 provided in this embodiment can implement the method flow shown in Figure 2 of this embodiment. The apparatus 500 includes: an acquisition module 510, a determination module 520, a generation module 530, and a sending module 540. The acquisition module 510 is used to acquire the target environment to be changed; the determination module 520 is used to determine at least one target resource corresponding to the target environment based on the target environment and a first mapping relationship, wherein the first mapping relationship includes the correspondence between the target environment and the at least one target resource; the acquisition module 510 is also used to acquire the real-time status information of each of the at least one target resource; the generation module 530 is used to generate an environment description file based on the real-time status information of each of the at least one target resource and the change operation of the target environment; the sending module 540 is used to send the environment description file to the Infrastructure as a Code (IaC) engine, so that the IaC engine can perform corresponding changes to the target environment based on the real-time status information of each of the at least one target resource in the environment description file and the change operation.

[0172] Optionally, the acquisition module 510 is further configured to acquire the first mapping relationship before determining at least one target resource corresponding to the target environment based on the target environment and the first mapping relationship.

[0173] Optionally, the device 500 further includes: a creation module and a storage module, wherein the creation module is used to establish the first mapping relationship between the target environment and the at least one target resource; and the storage module is used to store the first mapping relationship.

[0174] Optionally, the creation module is specifically used to: mark the environment corresponding to each of the at least one target resource based on a tagging mechanism, the environment including the target environment.

[0175] Optionally, the acquisition module 510 is specifically used to: acquire real-time status information of each of the at least one target resource from the provider of the at least one target resource.

[0176] Optionally, the acquisition module 510 is specifically used to: when the at least one target resource is determined, acquire the real-time status information of each of the at least one target resource from the provider of the at least one target resource.

[0177] Optionally, the acquisition module 510 is specifically used to: acquire real-time status information of at least one resource provided by at least one provider according to a time period; and acquire real-time status information of the at least one target resource from the real-time status information of the at least one target resource based on the information of the at least one target resource.

[0178] Optionally, the device 500 further includes a receiving module, configured to receive a change operation of the target environment from a terminal device before generating an environment description file based on the real-time status information of each of the at least one target resource and the change operation of the target environment.

[0179] The device 500 here can be embodied in the form of a functional module. The term "module" here can be implemented in software and / or hardware, without specific limitations.

[0180] For example, a "module" can be a software program, a hardware circuit, or a combination of both that implements the above functions. For instance, the implementation of module 510 will be described below using module 510 as an example. Similarly, the implementation of other modules, such as module 520, module 530, module 540, module 540, module 550, module 550, module 560, module 570, module 580, module 590, module 500, module 510, and module 520, can refer to the implementation of module 510.

[0181] As an example of a software functional unit, the acquisition module 510 may include code running on a computing instance. The computing instance may include at least one of a physical host (computing device), a virtual machine, or a container. Further, the aforementioned computing instance may be one or more. For example, the acquisition module 510 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code may be distributed in the same region or in different regions. Further, the multiple hosts / virtual machines / containers used to run the code may be distributed in the same availability zone (AZ) or in different AZs, each AZ including one or more geographically proximate data centers. Typically, a region may include multiple AZs.

[0182] Similarly, multiple hosts / virtual machines / containers used to run this code can be distributed within the same Virtual Private Cloud (VPC) or across multiple VPCs. Typically, a VPC is set up within a region. Communication between two VPCs within the same region, as well as between VPCs in different regions, requires a communication gateway to be set up within each VPC to enable interconnection between VPCs.

[0183] As an example of a hardware functional unit, the acquisition module 510 may include at least one computing device, such as a server. Alternatively, the acquisition module 510 may also be a device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be implemented using a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), generic array logic (GAL), or any combination thereof.

[0184] The multiple computing devices included in the acquisition module 510 can be distributed in the same region or in different regions. Similarly, the multiple computing devices included in the acquisition module 510 can be distributed in the same Availability Zone (AZ) or in different AZs. Likewise, the multiple computing devices included in the acquisition module 510 can be distributed in the same Virtual Private Cloud (VPC) or in multiple VPCs. These multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.

[0185] Therefore, the modules of the various examples described in the embodiments of this application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0186] It should be noted that the device provided in the above embodiments is only illustrated by the division of the functional modules described above when executing the above methods. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. For example, the acquisition module 510 can be used to execute any step in the above methods, the determination module 520 can be used to execute any step in the above methods, the generation module 530 can be used to execute any step in the above methods, the sending module 540 can be used to execute any step in the above methods, the creation module can be used to execute any step in the above methods, the storage module can be used to execute any step in the above methods, and the receiving module can be used to execute any step in the above methods. The steps implemented by the acquisition module 510, determination module 520, generation module 530, sending module 540, creation module, storage module, and receiving module can be specified as needed. By implementing different steps in the above methods through the acquisition module 510, determination module 520, generation module 530, sending module 540, creation module, storage module, and receiving module, all the functions of the above device can be realized.

[0187] Furthermore, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process can be found in the method embodiments above, which will not be repeated here.

[0188] Figure 6 is a schematic deployment diagram of the data processing apparatus 500 provided in an embodiment of this application. As shown in Figure 6, the apparatus 500 can be abstracted into a cloud service by a cloud service provider on a cloud management platform and provided to users. After the user purchases the cloud service on the cloud management platform, the cloud environment uses the cloud service to provide IaC cloud services to the user.

[0189] For example, a tenant logs into the cloud management platform via a pre-registered account and password on the public cloud access page. After successfully logging in, the tenant selects and purchases IaC cloud services on the cloud management platform. If the tenant purchases IaC cloud services, they can then utilize the computing capabilities provided by those services.

[0190] For example, a cloud management platform is primarily used to manage the infrastructure running IaC cloud services. This infrastructure may include multiple data centers located in different regions, each containing multiple servers. Data centers can provide basic resources for IaC cloud services, such as computing resources and storage resources. Therefore, when tenants purchase and use IaC cloud services, they primarily pay for the resources they use.

[0191] As shown in Figure 6, taking a tenant's purchase of IaC cloud services as an example, the user can upload at least one of the following information to the cloud environment through the application program interface (API) or the web interface provided by the cloud management platform: the selected target environment; and the environment description file obtained by the IaC's cloud service invocation device.

[0192] The aforementioned terminal devices can be mobile phones, laptops, tablets, handheld computers, wireless terminals in smart cities, wireless devices in smart homes, etc.

[0193] In some embodiments, users can also define the above-mentioned environment metamodel at any time and flexibly through the configuration interface or API on the public cloud access page provided by the cloud management platform.

[0194] In this embodiment of the application, when the device 500 is a software device, the device can be deployed on a computing device in any environment, or on a computing device cluster consisting of multiple computing devices in any environment.

[0195] The method provided in this application can be executed by a computing device, which can also be referred to as a computer system. It includes a hardware layer, an operating system layer running on top of the hardware layer, and an application layer running on the operating system layer. The hardware layer includes hardware such as processing units, memory, and memory control units; the functions and structure of this hardware will be described in detail later. The operating system can be any one or more computer operating systems that implement business processing through processes, such as Linux, Unix, Android, iOS, or Windows. The application layer includes applications such as browsers, address books, word processing software, and instant messaging software. Optionally, the computer system can be a handheld device such as a smartphone, or a terminal device such as a personal computer; this application does not particularly limit this, as long as the method provided in this application can be used. The executing entity of the method provided in this application can be a computing device, or a functional module within the computing device capable of calling and executing programs.

[0196] The following describes in detail, with reference to Figure 7, a computing device provided in an embodiment of this application.

[0197] Figure 7 is a schematic diagram of the architecture of a computing device 1500 provided in an embodiment of this application. The computing device 1500 can be a server, a computer, or other device with computing capabilities. The computing device 1500 shown in Figure 7 includes at least one processor 1510 and a memory 1520.

[0198] It should be understood that this application does not limit the number of processors and memories in the computing device 1500.

[0199] The processor 1510 executes instructions in the memory 1520, causing the computing device 1500 to implement the method provided in this application. Alternatively, the processor 1510 executes instructions in the memory 1520, causing the computing device 1500 to implement the various functional modules provided in this application, thereby implementing the method provided in this application.

[0200] Optionally, the computing device 1500 also includes a communication interface 1530. The communication interface 1530 uses a transceiver module, such as, but not limited to, a network interface card or a transceiver, to enable communication between the computing device 1500 and other devices or communication networks.

[0201] Optionally, the computing device 1500 also includes a system bus 1540, wherein the processor 1510, memory 1520, and communication interface 1530 are respectively connected to the system bus 1540. The processor 1510 can access the memory 1520 through the system bus 1540; for example, the processor 1510 can perform data read / write or code execution in the memory 1520 through the system bus 1540. The system bus 1540 is a peripheral component interconnect express (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The system bus 1540 is divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is used in Figure 7, but this does not mean that there is only one bus or one type of bus.

[0202] In one possible implementation, the processor 1510 primarily functions to interpret the instructions (or code) of a computer program and process data within the computer software. The instructions of the computer program and the data within the computer software can be stored in memory 1520 or cache 1516.

[0203] Optionally, processor 1510 may be an integrated circuit chip with signal processing capabilities. By way of example and not limitation, processor 1510 may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. Among these, a general-purpose processor is a microprocessor, etc. For example, processor 1510 may be a central processing unit (CPU).

[0204] Optionally, each processor 1510 includes at least one processing unit 1512 and a memory control unit 1514.

[0205] Optionally, the processing unit 1512, also known as the core, is the most important component of the processor. The processing unit 1512 is manufactured from single-crystal silicon using a specific production process. All calculations, command reception, command storage, and data processing are performed by the core. Each processing unit independently executes program instructions, utilizing parallel computing capabilities to accelerate program execution. Various processing units have fixed logical structures; for example, a processing unit includes logical units such as a Level 1 cache, a Level 2 cache, an execution unit, an instruction-level unit, and a bus interface.

[0206] In one implementation example, the memory control unit 1514 controls the data interaction between the memory 1520 and the processing unit 1512. Specifically, the memory control unit 1514 receives memory access requests from the processing unit 1512 and controls access to memory based on the memory access requests. By way of example and not limitation, the memory control unit is a device such as a memory management unit (MMU).

[0207] In one implementation example, each memory control unit 1514 addresses the memory 1520 via the system bus. An arbitrator (not shown in Figure 7) is configured on the system bus to handle and coordinate contention for access by the multiple processing units 1512.

[0208] In one implementation example, the processing unit 1512 and the memory control unit 1514 are connected via internal chip connection lines, such as address lines, thereby enabling communication between the processing unit 1512 and the memory control unit 1514.

[0209] Optionally, each processor 1510 also includes a cache 1516, which is a buffer for data exchange (called a cache). When the processing unit 1512 needs to read data, it first looks for the required data in the cache. If the data is found, it is executed directly; otherwise, it looks for the data in memory. Since the cache operates much faster than memory, its purpose is to help the processing unit 1512 run faster.

[0210] The memory 1520 provides runtime space for processes in the computing device 1500. For example, the memory 1520 stores the computer program (specifically, the program code) used to generate the process. After the computer program is run by the processor to generate a process, the processor allocates corresponding storage space for the process in the memory 1520. Furthermore, the aforementioned storage space further includes text segments, initialized data segments, bit initialized data segments, stack segments, heap segments, etc. The memory 1520 stores data generated during the process's execution, such as intermediate data or process data, in the aforementioned process-specific storage space.

[0211] Optionally, the memory, also known as RAM, is used to temporarily store the data processed by the processor 1510, as well as data exchanged with external storage devices such as hard disks. As long as the computer is running, the processor 1510 will load the data that needs to be processed into RAM for processing, and after the processing is completed, the processing unit 1512 will send the result out.

[0212] By way of example and not limitation, memory 1520 is volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. Non-volatile memory is read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory is random access memory (RAM) used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM). It should be noted that the memory 1520 of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0213] The structure of the computing device 1500 listed above is merely illustrative and is not limited thereto. The computing device 1500 in this application includes various hardware components in existing computer systems. For example, the computing device 1500 also includes other memories besides memory 1520, such as disk storage. Those skilled in the art should understand that the computing device 1500 may also include other devices necessary for normal operation. Furthermore, depending on specific needs, those skilled in the art should understand that the computing device 1500 may also include hardware devices for implementing other additional functions. In addition, those skilled in the art should understand that the computing device 1500 may only include the devices necessary for implementing the embodiments of this application, and not necessarily all the devices shown in FIG. 7.

[0214] This application also provides a computing device cluster. The computing device cluster includes at least one computing device. The computing device may be a server. In some embodiments, the computing device may also be a desktop computer, laptop computer, or smartphone, or other terminal device.

[0215] As shown in Figure 8, the computing device cluster includes at least one computing device 1500. The memory 1520 of one or more computing devices 1500 in the computing device cluster may store the same instructions for performing the above-described method.

[0216] In some possible implementations, the memory 1520 of one or more computing devices 1500 in the computing device cluster may also each store a portion of the instructions for executing the above-described methods. In other words, a combination of one or more computing devices 1500 can jointly execute the instructions of the above-described methods.

[0217] It should be noted that the memory 1520 in different computing devices 1500 within the computing device cluster can store different instructions, each used to execute a portion of the functions of the aforementioned device. That is, the instructions stored in the memory 1520 of different computing devices 1500 can implement the functions of one or more modules within the aforementioned device.

[0218] In some possible implementations, one or more computing devices in a computing device cluster can be connected via a network. This network can be a wide area network (WAN) or a local area network (LAN), etc. Figure 9 illustrates one possible implementation. As shown in Figure 9, two computing devices, 1500A and 1500B, are connected via a network. Specifically, they are connected to the network through communication interfaces in each computing device.

[0219] It should be understood that the functions of computing device 1500A shown in Figure 9 can also be performed by multiple computing devices 1500. Similarly, the functions of computing device 1500B can also be performed by multiple computing devices 1500.

[0220] In this embodiment, a computer program product containing instructions is also provided. The computer program product may be a software or program product containing instructions capable of running on a computing device or stored on any usable medium. When run on a computing device, it causes the computing device to perform the methods provided above, or causes the computing device to perform the functions of the apparatus provided above.

[0221] In this embodiment, a computer-readable storage medium is also provided. This computer-readable storage medium can be any available medium that a computing device can store, or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive). The computer-readable storage medium includes instructions that, when executed on a computing device, cause the computing device to perform the method described above.

[0222] It should be understood that in the various embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0223] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0224] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0225] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0226] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0227] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0228] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0229] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A data processing method, characterized in that, The method includes: Obtain the target environment to be changed; Based on the target environment and the first mapping relationship, at least one target resource corresponding to the target environment is determined, wherein the first mapping relationship includes the correspondence between the target environment and the at least one target resource; Obtain the real-time status information of each of the at least one target resource; An environment description file is generated based on the real-time status information of each of the at least one target resource and the change operations of the target environment; The environment description file is sent to the Infrastructure as Code (IaC) engine so that the IaC engine can perform corresponding changes to the target environment based on the real-time status information of each of the at least one target resource in the environment description file and the change operation.

2. The method according to claim 1, characterized in that, Before determining at least one target resource corresponding to the target environment based on the target environment and the first mapping relationship, the method further includes: Obtain the first mapping relationship.

3. The method according to claim 1 or 2, characterized in that, The method further includes: Establish the first mapping relationship between the target environment and the at least one target resource; Store the first mapping relationship.

4. The method according to claim 3, characterized in that, Establishing the first mapping relationship between the target environment and the at least one target resource includes: Based on a tagging mechanism, the environment corresponding to each of the at least one target resource is marked, and the environment includes the target environment.

5. The method according to any one of claims 1 to 4, characterized in that, The step of obtaining the real-time status information of each of the at least one target resource includes: Obtain the real-time status information of each of the at least one target resource from the provider of the at least one target resource.

6. The method according to claim 5, characterized in that, The step of obtaining the real-time status information of each of the at least one target resource from the provider of the at least one target resource includes: In the case of identifying the at least one target resource, obtain the real-time status information of each of the at least one target resource from the provider of the at least one target resource.

7. The method according to claim 5, characterized in that, The step of obtaining the real-time status information of each of the at least one target resource from the provider of the at least one target resource includes: According to the time period, obtain real-time status information of at least one resource provided by at least one provider from at least one provider; Based on the information of the at least one target resource, obtain the real-time status information of the at least one target resource from the real-time status information of the at least one target resource.

8. The method according to any one of claims 1 to 7, characterized in that, Before generating an environment description file based on the real-time status information of each of the at least one target resource and the change operations of the target environment, the method further includes: Receive the change operation of the target environment from the terminal device.

9. A data processing apparatus, characterized in that, The device includes: The acquisition module is used to acquire the target environment to be changed; The determining module is configured to determine at least one target resource corresponding to the target environment based on the target environment and the first mapping relationship, wherein the first mapping relationship includes the correspondence between the target environment and the at least one target resource; The acquisition module is also used to acquire the real-time status information of each of the at least one target resource; The generation module is used to generate an environment description file based on the real-time status information of each of the at least one target resource and the change operations of the target environment. The sending module is used to send the environment description file to the Infrastructure as a Code (IaC) engine, so that the IaC engine can perform corresponding changes to the target environment based on the real-time status information of each of the at least one target resource in the environment description file and the change operation.

10. The apparatus according to claim 9, characterized in that, The acquisition module is further configured to acquire the first mapping relationship before determining at least one target resource corresponding to the target environment based on the target environment and the first mapping relationship.

11. The apparatus according to claim 9 or 10, characterized in that, The device further includes: A module is created to establish the first mapping relationship between the target environment and the at least one target resource; A storage module is used to store the first mapping relationship.

12. The apparatus according to claim 11, characterized in that, The creation module is specifically used for: Based on a tagging mechanism, the environment corresponding to each of the at least one target resource is marked, and the environment includes the target environment.

13. The apparatus according to any one of claims 9 to 10, characterized in that, The acquisition module is specifically used for: Obtain the real-time status information of each of the at least one target resource from the provider of the at least one target resource.

14. The apparatus according to claim 13, characterized in that, The acquisition module is specifically used for: In the case of identifying the at least one target resource, obtain the real-time status information of each of the at least one target resource from the provider of the at least one target resource.

15. The apparatus according to claim 13, characterized in that, The acquisition module is specifically used for: According to the time period, obtain real-time status information of at least one resource provided by at least one provider from at least one provider; Based on the information of the at least one target resource, obtain the real-time status information of the at least one target resource from the real-time status information of the at least one target resource.

16. The apparatus according to any one of claims 9 to 15, characterized in that, The device further includes: The receiving module is configured to receive the change operation of the target environment from the terminal device before generating an environment description file based on the real-time status information of each of the at least one target resource and the change operation of the target environment.

17. A computing device cluster, characterized in that, It includes at least one computing device, each computing device including a processor and memory; The processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device to cause the cluster of computing devices to perform the method as described in any one of claims 1 to 8.

18. A computer program product containing instructions, characterized in that, When the instruction is executed by the computing device cluster, the computing device cluster causes the computing device cluster to perform the method as described in any one of claims 1 to 8.

19. A computer-readable storage medium, characterized in that, It includes computer program instructions, which, when executed by a cluster of computing devices, perform the method as described in any one of claims 1 to 8.