Unified representation and conversion method and device for applications
By using a unified representation and transformation method, the problems of application representation fragmentation and inefficient cross-environment deployment are solved, enabling automated adaptation and efficient deployment of applications in heterogeneous environments.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- INSPUR TIANYUAN COMM INFORMATION SYST CO LTD
- Filing Date
- 2025-12-24
- Publication Date
- 2026-05-12
Smart Images

Figure CN122018925A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of application software management technology, and in particular to a unified representation and conversion method and apparatus for applications. Background Technology
[0002] With the development of information technology and digitalization, enterprise applications are becoming increasingly diversified, encompassing various forms such as standalone applications, SOA (Service-Oriented Architecture) applications, microservice applications, cloud-native applications, AI applications, and function computing applications, as well as complex distributed applications. Furthermore, the deployment and operation environments of these applications are exhibiting heterogeneous characteristics, including public clouds, private clouds, edge nodes, and terminal devices. In particular, with the rapid development of network technologies such as 5G and fiber optics, ubiquitous computing power collaboration has become an important technological trend in the context of computing power networks, leading to the rapid development of cloud-edge-device collaborative applications in scenarios such as industry, transportation, and connected vehicles. Currently, cross-environment deployment of various application types is mainly achieved through standardized descriptions and resource orchestration tools.
[0003] However, current applications are fragmented, and the current conversion methods require a lot of manual configuration modifications, which leads to inefficiency in cross-environment adaptation. Summary of the Invention
[0004] This invention provides a unified representation and conversion method and apparatus for applications, which solves the defects of current conversion methods in the prior art, such as low efficiency in cross-environment adaptation.
[0005] This invention provides a unified representation and conversion method for applications, comprising: Obtain the unified application representation of the application to be converted and the target environment characteristics of the target deployment environment; the unified application representation is used to reflect the deployment conditions supported by the application to be converted. Based on the unified application representation and the target environment feature matching preset adaptation rules, an adaptation strategy for the application to be converted is generated. Based on the adaptation strategy, the unified application representation is adjusted to obtain the target deployment configuration of the application to be converted. The application to be converted is deployed based on the target deployment environment and the target deployment configuration.
[0006] According to a unified representation and conversion method for an application provided by the present invention, the step of generating an adaptation strategy for the application to be converted based on the unified application representation and the target environment feature matching preset adaptation rules includes: Construct a field mapping relationship between the unified application representation and the target environment features, wherein the field mapping relationship includes source application fields and target environment fields corresponding to the source application fields; The comparison result is obtained by comparing the source field value of the source application field with the target field value of the target environment field. Based on the comparison results and the preset adaptation rules, the adaptation strategy is determined; the adaptation strategy includes the application fields to be adjusted, the adjustment method, and the adjustment priority.
[0007] According to the unified representation and conversion method for applications provided by the present invention, the preset adaptation rules include basic adaptation rules and application-specific adaptation rules; The basic adaptation rules include a set of rules for handling application startup. The application-specific adaptation rules include a set of rules for handling the application after it is launched.
[0008] According to a unified representation and transformation method for an application provided by the present invention, the step of constructing the field mapping relationship between the unified application representation and the target environment features includes: The application field in the unified application representation and the environment field in the target environment feature are input into the machine learning model to obtain the field mapping relationship.
[0009] According to the present invention, a unified representation and transformation method for an application is provided, wherein the unified application representation includes basic domain information, dependency domain information, and configuration domain information of the application to be transformed; The basic domain information is used to describe the basic attribute information of the application to be converted; The dependency domain information is used to describe the software and hardware environment dependencies required for the application to be converted to run. The configuration domain information is used to describe the configuration information required for the application to be converted to start and run.
[0010] According to the unified representation and conversion method of the application provided by the present invention, the application type of the application to be converted includes stand-alone application, distributed application and component modules involved in the distributed application, and the distributed application should include service-oriented architecture application, microservice application, cloud-native application, AI application and function computing application; The dependency domain information includes the dependency relationships between component modules involved in the distributed application; The application representation of each component module includes the basic domain information, dependency domain information, and configuration domain information of each component module.
[0011] According to the unified representation and transformation method for applications provided by the present invention, the target environment characteristics include target hardware characteristics and target software characteristics; The hardware features include at least CPU attributes, GPU attributes, memory attributes, network attributes, and storage attributes; The software features include at least the operating system version, the software runtime version, and the middleware version.
[0012] The present invention also provides a unified representation and conversion device for applications, comprising: The acquisition unit acquires the unified application representation of the application to be converted and the target environment characteristics of the target deployment environment; the unified application representation is used to reflect the deployment conditions supported by the application to be converted. The strategy generation unit generates an adaptation strategy for the application to be converted based on the unified application representation and the target environment features matching preset adaptation rules. The adjustment unit adjusts the unified application representation based on the adaptation strategy to obtain the target deployment configuration of the application to be converted. The conversion unit deploys the application to be converted based on the target deployment environment and the target deployment configuration.
[0013] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement a unified representation and conversion method for any of the applications described above.
[0014] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a unified representation and conversion method for any of the applications described above.
[0015] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements a unified representation and conversion method for any of the applications described above.
[0016] The unified representation and conversion method and apparatus for applications provided by this invention achieves standardized descriptions of multiple application types through a unified representation layer, eliminating information silos; and dynamically generates target deployment configurations by combining environmental characteristics through an adaptive conversion layer, realizing automated adaptation across heterogeneous environments. Thus, it effectively solves the problems of inconsistent application descriptions and the need for extensive manual configuration modifications for cross-environment deployment, which are prone to errors, in existing technologies. It significantly shortens the application adaptation cycle and improves the delivery efficiency and portability of applications in complex environments such as computing networks. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0018] Figure 1 This is one of the flowcharts illustrating the unified representation and conversion method for applications provided by this invention; Figure 2 This is a schematic diagram of the unified representation framework for applications provided by the present invention; Figure 3 This is a schematic diagram of the hierarchical architecture of the distributed application provided by the present invention; Figure 4 This is a schematic diagram of the structure of the unified representation system for multiple types of applications provided by the present invention; Figure 5 This is the second flowchart illustrating the unified representation and conversion method for applications provided by this invention; Figure 6 This is a schematic diagram of the structure of the unified representation and conversion device for applications provided by the present invention; Figure 7 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0020] It's important to note that applications with different architectures rely on completely heterogeneous description formats, creating significant information silos. For example, standalone applications primarily use ini / xml configuration files, focusing on process startup parameters and local dependencies; microservice applications rely on registry configurations and API gateway mapping rules; cloud-native applications need to define resources such as Pods, Services, and ConfigMaps using YAML; AI applications depend on specific configurations such as model paths, framework types like TensorFlow / PyTorch, and GPU parameters; and function computing applications need to describe trigger events, timeouts, and memory limits. This fragmentation leads to inconsistent application management interfaces and configuration conflicts that can easily occur during cross-application collaborative deployment.
[0021] Furthermore, cross-environment adaptation specifically includes two aspects: firstly, hardware difference adaptation, such as the need for different application packages or images for cloud x86 architecture and edge ARM architecture, while GPU nodes need to be configured with memory limits and CPU nodes need to disable GPU dependencies; secondly, software stack difference adaptation, such as the need to generate Deployment / Service configurations for cloud Kubernetes environments, convert to Docker Compose for edge lightweight environments, and write systemd service scripts for single-machine environments. Therefore, the conversion method based on manually modifying a large number of configurations suffers from the problems of time-consuming and labor-intensive cross-environment adaptation and low configuration accuracy.
[0022] To address the aforementioned problems, this invention provides a unified representation and transformation method for applications, enabling unified application representation and efficient and reliable deployment in heterogeneous environments. Figure 1 This is one of the flowcharts illustrating the unified representation and conversion method for applications provided by this invention, such as... Figure 1 As shown, the method includes: Step 110: Obtain the unified application representation of the application to be converted and the target environment characteristics of the target deployment environment.
[0023] The unified application representation is used to reflect the deployment conditions supported by the application to be converted.
[0024] Here, "applications to be converted" refers to various software entities that need to be deployed or migrated, including but not limited to standalone applications, service-oriented architecture applications, microservice applications, cloud-native applications, AI applications, or function computing applications.
[0025] Here, a unified application representation refers to standardized descriptive information decoupled from a specific deployment environment. It is used to provide a unified cross-architecture description of the attributes, dependencies, and configurations of the application to be converted. It reflects the deployment conditions supported by which the application to be converted can run normally and may include deployment conditions in at least one target deployment environment. For example, a unified application representation for application A could be "Application A depends on operating systems including Windows 7 / 10 and Linux".
[0026] Here, the target deployment environment refers to the computing environment intended to host the application to be converted, encompassing heterogeneous infrastructure such as public clouds, private clouds, edge computing nodes, and terminal devices. The target environment characteristics refer to the current hardware resource status and software runtime environment information of the target deployment environment.
[0027] It should be noted that in step 110, the unified application representation, as the input baseline data, carries a full-dimensional description of the application to be transformed, and the target environment features, as constraints, determine the boundaries of the application to be transformed.
[0028] Specifically, the process begins by reading the standardized description file corresponding to the application to be converted. This file, built on a multi-dimensional representation framework, defines in detail the application's basic attributes, required hardware and software dependencies, and deployment conditions such as startup configuration. Simultaneously, for the target deployment environment, data collection methods can include Agent programs, API service interfaces, and static configurations. Agent programs, such as those based on Prometheus Exporter, periodically report feature data by installing Agents on target environment nodes. API service interfaces refer to querying feature data by calling the target environment's management API, such as connecting to cloud vendor APIs to obtain public cloud environment features. Static configurations refer to users pre-filling basic features of edge devices or offline environments. Furthermore, the collected data covers hardware-level architecture type and resource capacity, as well as software-level operating system version and runtime environment version. Therefore, acquiring data from these two aspects provides data support for subsequent differential analysis.
[0029] It should be noted that by obtaining a standardized unified application representation, the differences in description formats between different application types are masked, the problem of application representation fragmentation is solved, and a unified application description for different types of applications is achieved.
[0030] Step 120: Based on the unified application representation and the target environment feature matching preset adaptation rules, generate the adaptation strategy for the application to be converted.
[0031] Here, preset adaptation rules refer to a predefined set of logic used to handle differences between application requirements and environmental resources, including basic adaptation rules, application-specific rules, or custom rules. Adaptation strategies refer to targeted adjustment plans generated based on rule matching, including the configuration items to be adjusted, the adjustment methods, and priorities.
[0032] It should be noted that in step 120, the preset adaptation rules act as the logic decision engine, and the adaptation strategy is the execution list after the decision. In specific implementation, the deployment requirements defined in the unified application representation can be compared and analyzed with the collected target environment characteristics. Then, the comparison results are input into the rule engine, which iterates and matches the pre-stored adaptation rules. For example, when the unified application representation declares the need for GPU resources, but the target environment characteristics show no GPU but a high-performance CPU, the corresponding rule is matched to determine whether to switch the computing mode. Another example is when the application's architecture is inconsistent with the environment's CPU architecture, an architecture compatibility rule is matched.
[0033] Furthermore, based on the results of rule matching, an adaptation strategy containing specific adjustment actions is generated. This strategy clarifies the configuration items that need to be modified, such as image tags and resource limit parameters; it can also clarify the specific operations to be modified, such as replacement, appending, and limiting; and it can also clarify the priority order of the configuration items to be modified.
[0034] It should be noted that by automatically identifying the differences between application requirements and environmental supply, and generating dynamic adaptation strategies accordingly, the process of manual analysis and configuration modification is replaced, which greatly reduces the complexity of cross-environment adaptation, avoids human configuration errors, and improves the accuracy and efficiency of adaptation.
[0035] Step 130: Adjust the unified application representation based on the adaptation strategy to obtain the target deployment configuration of the application to be converted.
[0036] Here, the target deployment configuration refers to the native deployment configuration file that has been adjusted and converted in format so that it can be directly recognized and executed by the target deployment environment.
[0037] Specifically, based on the adjustment actions indicated in the generated adaptation strategy, the relevant field values in the unified application representation are dynamically corrected. For example, general resource requirement values are adjusted to specific values that conform to the limitations of the target environment, or general startup parameters are modified to parameters that adapt to the target environment path. After completing the adjustment of values and content, the adjusted intermediate representation information is mapped and converted into the target environment's native deployment configuration file, taking into account the deployment format requirements supported by the target deployment environment, such as Kubernetes YAML format, Docker Compose format, or Systemd script format, thereby obtaining the final target deployment configuration.
[0038] It should be noted that by implementing adaptation strategies and performing format conversion, the abstract unified representation is transformed into an entity configuration that can be executed in a specific environment, realizing the conversion capability of "representation once, deployment in multiple places" and achieving compatibility of the application to be converted in different heterogeneous environments.
[0039] Step 140: Deploy the application to be converted based on the target deployment environment and the target deployment configuration.
[0040] Specifically, the generated target deployment configuration can be distributed to the target deployment environment. Then, the orchestration component or management service in the target deployment environment can parse the target deployment configuration, pull the corresponding application image or package according to the configuration content, allocate computing, storage and network resources, and start the application process, thereby completing the deployment of the application to be transformed. This achieves an automated closed loop from configuration generation to actual deployment, enabling the application to be transformed to start and run quickly and stably in the heterogeneous target deployment environment, verifying the effectiveness of adaptive transformation.
[0041] The unified representation and conversion method for applications provided in this invention is based on a two-layer architecture consisting of a unified representation layer and an adaptive conversion layer. The unified representation layer standardizes descriptions of various application types, eliminating information silos. The adaptive conversion layer dynamically generates target deployment configurations based on environmental characteristics, enabling automated adaptation across heterogeneous environments. This effectively solves the problems of inconsistent application descriptions and the need for extensive manual configuration modifications for cross-environment deployment, which are prone to errors. It significantly shortens the application adaptation cycle and improves the delivery efficiency and portability of applications in complex environments such as computing networks.
[0042] Based on any of the above embodiments, step 120 includes: Construct a field mapping relationship between the unified application representation and the target environment features, wherein the field mapping relationship includes source application fields and target environment fields corresponding to the source application fields; The comparison result is obtained by comparing the source field value of the source application field with the target field value of the target environment field. Based on the comparison results and the preset adaptation rules, the adaptation strategy is determined; the adaptation strategy includes the application fields to be adjusted, the adjustment method, and the adjustment priority.
[0043] Here, field mapping refers to the logical correspondence between the metrics defined in the unified application representation and the metrics actually possessed by the target deployment environment. The source application fields are the specific data items in the unified application representation used to describe application requirements or attributes, such as hardware resource requirements in the dependency domain or the image name in the base domain. The target environment fields are the environment attribute items extracted from the characteristics of the target environment that semantically correspond to the source application fields, such as the CPU architecture or available memory size of the target host.
[0044] Here, the comparison result refers to the difference or matching status obtained by comparing the source field value with the target field value, such as "inconsistent architecture," "resources satisfied," or "missing critical dependencies." The adaptation strategy includes the application field to be adjusted, the adjustment method, and the adjustment priority. The application field to be adjusted refers to a specific configuration item in the unified application representation that needs to be modified during the adaptation process. The adjustment method refers to the specific operation performed on this field, including replacement, restriction, and appending. The adjustment priority refers to the order in which multiple adjustment actions are performed to ensure the correctness of configuration dependencies.
[0045] Specifically, first, the structure of the unified application representation can be parsed to identify key fields in dimensions such as the base domain and dependency domain, which are then used as source application fields. Simultaneously, the collected target environment features are parsed to extract attributes describing the environment's capabilities, which are then used as target environment fields. Then, based on a predefined semantic dictionary or ontology model, the two are associated. For example, `deps-domain.resource.cpu` (the number of CPU cores required by the application) in the unified application representation can be mapped to the total number of CPU cores of the nodes in the target environment features. Another example is mapping the image architecture tag in `basic-domain.app-file` to the CPU architecture type in the target environment features, such as x86 or ARM.
[0046] Understandably, by constructing field-level mapping relationships, alignment between abstract application requirements and specific environmental capabilities is achieved, providing a logical basis for subsequent accurate comparisons and ensuring semantic consistency between heterogeneous systems.
[0047] Furthermore, the constructed field mapping relationship can be traversed to extract source field values and target field values item by item. For example, the source field value such as "requires Nvidia 4090 GPU" can be extracted, and the target field value such as "no GPU device" can be extracted.
[0048] Then, a logical comparison operation is performed to determine whether the two are consistent or whether the constraints are met. Here, the comparison logic includes numerical comparisons, such as whether the memory requirement is less than the available memory in the environment; it also includes character matching, such as whether the operating system version matches; and it includes existence checks, such as whether the dependent middleware exists. For example, when the source field value is "x86 architecture" and the target field value is "ARM architecture," the comparison result is marked as "architecture conflict"; when the source field value requires "SSL encryption" but the target environment does not have the relevant support enabled, the comparison result is marked as "environment configuration missing."
[0049] It should be noted that through automated field-level comparison, the specific obstacles and differences faced by the application in the target environment can be quickly and comprehensively identified, realizing refined diagnosis of environment awareness.
[0050] Next, the comparison results can be input into the rule engine to retrieve matching preset adaptation rules. It's important to note that these preset adaptation rules define the processing logic for specific difference scenarios. For example, if the comparison result is "architecture conflict," a basic adaptation rule is matched to generate a policy: the application field to be adjusted is pointed to the application image address, the adjustment method is set to "replace" with the ARM version image, and the adjustment priority is set to the highest. As another example, if the comparison result is "GPU missing," and the application supports CPU inference mode, an application-specific rule is matched to generate a policy: the application field to be adjusted is pointed to the startup command parameter, the adjustment method is set to "append" --use-cpu parameter, and the adjustment priority is set to the second highest. Finally, an ordered list containing multiple policies can be output, each policy clearly defining the application field to be adjusted, the adjustment method, and the adjustment priority.
[0051] It should be emphasized that by using a rule-driven approach, the differences identified through comparison are transformed into specific executable operation instructions. Furthermore, by setting adjustment methods, the flexibility and orderliness of the adaptation process are ensured. This not only solves the adaptation of hardware architecture differences but also handles differences in software runtime, thereby realizing the intelligent generation of application deployment configurations and greatly reducing the cost of manual intervention and the configuration error rate.
[0052] The method provided in this invention, through three refined steps—establishing field mapping, difference comparison, and adaptation strategy generation—enables applications to intelligently perceive the field-level environmental characteristics of the target environment and automatically generate deployment strategies that meet environmental requirements. This effectively solves the problem of application deployment difficulties in cross-architecture and cross-hardware configuration environments, and achieves efficient and accurate automated application deployment and configuration.
[0053] Based on any of the above embodiments, the preset adaptation rules include basic adaptation rules and application-specific adaptation rules; The basic adaptation rules include a set of rules for handling application startup. The application-specific adaptation rules include a set of rules for handling the application after it is launched.
[0054] Here, basic adaptation rules refer to a set of rules pre-built into the rule engine to address general differences; these rules are typically immutable and primarily handle hard constraints at the underlying hardware architecture and operating system level. Additionally, application-specific adaptation rules refer to a set of rules created for the specific operational needs of a particular type of application. These rules can be dynamically loaded on demand and are used to handle soft adaptations at the application's business logic level.
[0055] Specifically, in step 120, the basic adaptation rules, acting as the first line of defense, include a set of rules for handling application startup, such as rules related to the underlying hardware architecture and operating system at startup, to ensure the application can run in the target environment. In practice, the built-in basic adaptation rules can be invoked first to scan the comparison results. For example, if the comparison results show that the application image is compiled for x86 architecture while the target environment is ARM architecture, the architecture mutual exclusion clause in the basic adaptation rules is triggered, generating a strategy to replace the image address with the ARM version image; or if the comparison results show that the target environment has no GPU resources, the dependency disabling clause in the basic adaptation rules is triggered, generating a strategy to disable CUDA dependency library loading in the environment variables. It is understandable that the basic adaptation rules typically address the fundamental issue of whether the application can start.
[0056] It should be noted that by enforcing basic adaptation rules, the fundamental compatibility issues caused by differences in underlying infrastructure were quickly resolved, ensuring the basic availability of the application in heterogeneous environments.
[0057] Secondly, application-specific adaptation rules serve as a second line of defense, including a set of rules for handling application startup to ensure optimal performance in the target environment. Specifically, based on the application type declared in the unified application representation, such as an AI application, the corresponding set of rules required to run that application can be dynamically loaded. For example, for an AI application, if the comparison results show that the target environment lacks GPU but has sufficient CPU computing power, the AI-specific rule is applied, generating a policy that automatically appends the `--use-cpu` or `--quantize` startup parameter, switching the application to CPU inference mode. Similarly, for a web application, if the target environment is a production environment, the web-specific rule is applied, generating a policy that forces SSL encryption.
[0058] It should be noted that by loading exclusive rules for different application types, fine-grained function-level adaptation is achieved, enabling applications to not only adapt to the hardware limitations of the environment, but also automatically adjust their business operation mode according to the characteristics of the environment, thereby improving the application's operating efficiency and stability.
[0059] It should also be noted that the preset adaptation rules here can also include custom adaptation rules, which are mainly used to meet the personalized needs of enterprises, such as requiring SSL encryption to be enabled for production environment applications.
[0060] The method provided in this invention divides preset adaptation rules into basic adaptation rules and application-specific adaptation rules, enabling hierarchical rule matching and strategy generation, thus decoupling general adaptation from personalized adaptation. Specifically, basic adaptation rules ensure underlying compatibility across architectures, resolving application startup issues; application-specific adaptation rules provide flexible business logic adjustment capabilities for complex scenarios such as AI and microservices, addressing the issue of application usability. The combination of these two approaches reduces the complexity of rule maintenance while covering comprehensive adaptation needs from underlying hardware to upper-layer business logic, significantly improving the coverage and flexibility of adaptive conversion and enhancing the performance of the converted application.
[0061] It should be noted that, for some custom fields that are not directly corresponding, based on any of the above embodiments, the field mapping relationship between the unified application representation and the target environment features is constructed, including: The application field in the unified application representation and the environment field in the target environment feature are input into the machine learning model to obtain the field mapping relationship.
[0062] Here, "machine learning model" refers to an algorithmic model trained on historical deployment data that can identify semantic relationships and predict mapping logic, such as a decision tree model or a neural network model. "Application field" refers to custom configuration items that may be included in the unified application representation, particularly non-standardized key-value pairs present in the configuration or extended domains. Additionally, "environment field" refers to the various attribute items in the target environment features.
[0063] In this embodiment, machine learning models can be used to analyze historical deployment data and dynamically establish mapping logic to solve the problem of custom field mapping that cannot be covered by static mapping tables. Specifically, for standard fields that are clearly defined in the base domain and dependency domain, static mapping can be used directly. For custom content existing in the configuration domain and extended domain, such as resources.requests.cpu or custom environment variable key names, they can be used as input features to feed into a pre-trained machine learning model.
[0064] It should be noted that machine learning models can leverage patterns learned from historical deployment records—that is, which application configurations typically correspond to which environment parameters—to perform semantic analysis and association prediction on current application fields and environment fields. For example, a machine learning model can identify that the `db_file` field in a unified representation should be mapped to the database initialization script path in the target environment, or map a specific resource request in the ext-domain to a Resource Quota object in the Kubernetes environment.
[0065] The method provided in this invention overcomes the limitations of traditional hard-coded mapping rules by introducing machine learning technology to process field mapping. In other words, it allows the unified application representation to have a certain degree of openness and extensibility. Even if developers define new configuration parameters, the system can automatically deduce their correspondence in the target environment based on semantic similarity or historical experience, thus achieving dynamic adjustment of the mapping strategy.
[0066] Therefore, the method provided by this invention, when faced with constantly emerging new application configuration parameters or complex environmental attributes, does not require frequent manual updates to the static mapping table, but instead relies on model inference to achieve intelligent alignment. This not only solves the problem of adapting custom content in the extended domain, but also enables the conversion method to have the ability to continuously learn and self-evolve, thereby more efficiently supporting the automated deployment of multiple types of applications in heterogeneous environments.
[0067] Based on any of the above embodiments, the unified application representation includes the basic domain information, dependency domain information, and configuration domain information of the application to be converted. The basic domain information is used to describe the basic attribute information of the application to be converted; The dependency domain information is used to describe the software and hardware environment dependencies required for the application to be converted to run. The configuration domain information is used to describe the configuration information required for the application to be converted to start and run.
[0068] Here, basic domain information refers to a set of static attributes used to identify and define the identity and core form of the application to be transformed, which does not change with the runtime environment. Dependency domain information refers to a description of the rigid requirements the application places on the external environment at runtime, defining the boundary conditions under which the application can start normally. Configuration domain information refers to a set of variable parameters used to control the application's startup behavior and runtime state, typically involving application lifecycle management. Additionally, a unified application representation may also include extended domains, used to define other attributes for different application characteristics, such as the deployment mode of a Redis cluster, database initialization data, and model files for AI applications.
[0069] Figure 2 This is a schematic diagram of the unified representation framework for applications provided by the present invention, such as... Figure 2 As shown, a unified application representation includes the base domain, dependency domain, configuration domain, and extended domain of the application to be transformed.
[0070] The base domain contains the application ID, application name, application type, application description, version number, and developer information. Notably, the base domain also includes the definition of application files, supporting the specification of different package or container image paths for different operating system architectures such as Windows, Linux, and Mac.
[0071] The definition of dependency domains includes hardware dependencies and runtime dependencies. Hardware dependencies describe in detail the requirements for the number of CPU cores, GPU model and quantity, memory size, network ports and storage capacity; runtime dependencies describe the required runtime environment (such as Python version), middleware (such as MySQL version) or computing framework (such as PyTorch version).
[0072] The defined configuration domain includes the application's start method, stop method, restart method, environment variables, and configuration file path.
[0073] The definition of extended domains includes other attributes defined for different application characteristics, such as the deployment mode of the Redis cluster, database initialization data, and model files for AI applications.
[0074] Ultimately, the information for each domain can be stored in a structured manner using JSON or YAML format.
[0075] The method provided in this invention constructs a multi-dimensional unified application representation framework comprising a base domain, a dependency domain, and a configuration domain, thereby achieving the standardization and modularization of application attributes. The base domain addresses application identity recognition, the dependency domain quantifies environmental requirements, and the configuration domain standardizes operational procedures. Thus, by decoupling static attributes, environmental dependencies, and operational configurations, this unified application representation framework can flexibly cover various scenarios, from simple standalone applications to complex distributed applications, breaking down the barriers of inconsistent application description formats across different architectures.
[0076] Based on any of the above embodiments, the application types of the applications to be converted include standalone applications, distributed applications, and component modules involved in the distributed applications. The distributed applications should include service-oriented architecture applications, microservice applications, cloud-native applications, AI applications, and function computing applications. The dependency domain information includes the dependency relationships between component modules involved in the distributed application; The application representation of each component module includes the basic domain information, dependency domain information, and configuration domain information of each component module.
[0077] Specifically, the application types to be converted cover the current mainstream software architecture forms, including: stand-alone applications running independently on a single operating system instance; distributed applications composed of multiple cooperating components; sub-units in distributed applications, such as message queues or microservice units; microservice applications based on fine-grained service architecture; containerized cloud-native applications; AI applications that rely on specific computing frameworks; and event-driven function computing applications.
[0078] It should be noted that for AI applications, the type field is specifically identified, and the dependency field emphasizes the dependence on dedicated hardware such as GPUs / TPUs and frameworks such as TensorFlow / PyTorch. For function computing applications, the focus is on describing the triggering events and timeouts in the configuration field.
[0079] In this context, the dependency relationship between component modules refers to the dependency of upstream components on downstream components when starting or running in a distributed architecture.
[0080] Specifically, for complex distributed applications, component modules can be handled recursively or in a flattened manner. Each component module is treated as an independent application, possessing its own base domain, dependency domain, and configuration domain. The dependencies between component modules can be described using the `components` field within the dependency domain information. For example, if application A (ID 1) depends on component B (ID 2) and component C (ID 3), then `components: ["2", "3"]` would be defined in application A's dependency domain. This allows complex topologies to be decomposed into standardized node descriptions.
[0081] In one embodiment, Figure 3 This is a schematic diagram of the hierarchical architecture of the distributed application provided by the present invention, such as... Figure 3 As shown, application A (WebApp) serves as the top-level application. In its unified dependency domain (deps-domain), it explicitly defines its directly dependent lower-level components as components B and C through the components field. Furthermore, each component module in distributed application A, such as the authentication service and certificate service, is treated as an independent application with a unified representation structure completely consistent with the top-level application, including a base domain, dependency domain, and configuration domain.
[0082] Furthermore, application (component) B (authentication service), acting as an intermediate layer node, declares its dependency on application (component) D (order service) in its dependency domain; while application (component) D, in turn, declares its dependency on the underlying application (component) E (product service) and application (component) F (activation service). Meanwhile, application (component) C (certificate service), as a component in another branch, has an empty components field, indicating that it is a leaf node.
[0083] Therefore, through such Figure 3The chained reference method shown connects scattered microservice components into a complete application topology network, which can automatically parse complex distributed application architecture diagrams. In subsequent adaptive transformation and deployment processes, the deployment order can be accurately calculated based on this topology structure. For example, the underlying E, F, and C can be deployed first, followed by D, and finally B and A. This enables automated orchestration and seamless deployment of complex distributed applications in heterogeneous environments, solving the technical problems of fragmented component relationships and difficult deployment coordination in traditional description methods.
[0084] The method provided in this invention utilizes a unified representation framework to homogeneously describe various application types, including distributed components, and establishes topological relationships through component reference fields in the dependency domain, thus completely solving the problem of application representation fragmentation. That is, whether it's a traditional single-machine process, a complex microservice topology, or AI and function computation, all are incorporated into the same description system. This not only simplifies the management interface for cross-type applications but also, through explicit component dependency definitions, enables the system to automatically parse and orchestrate the correct startup order during deployment, such as deploying database components first and then business service components, improving the automation level of complex application orchestration.
[0085] Based on any of the above embodiments, the target environment features include target hardware features and target software features; The hardware features include at least CPU attributes, GPU attributes, memory attributes, network attributes, and storage attributes; The software features include at least the operating system version, the software runtime version, and the middleware version.
[0086] Here, target hardware characteristics refer to the resource attributes at the physical or virtual infrastructure level of the target deployment environment, which determine the application's hard operational boundaries. Target software characteristics refer to the system software and service stack environment deployed on top of the hardware, which determine the application's soft compatibility boundaries.
[0087] Specifically, in step 110, the specific implementation method for obtaining the target environment characteristics includes: First, environmental data can be collected comprehensively through the environment probe agent or cloud vendor API interface. Among them, the collection of target hardware characteristics includes: CPU attributes such as architecture type x86_64 / aarch64, number of cores, and clock speed; GPU attributes such as model Nvidia Tesla V100, memory size, driver version, and CUDA version; memory attributes such as total capacity and remaining available capacity; network attributes such as network card, bandwidth, and latency; and storage attributes such as disk type SSD / HDD, mount path, and remaining space.
[0088] In addition, the target software characteristics collected include: operating system version (e.g., Ubuntu 20.04 LTS, CentOS 7), software runtime version (e.g., JRE 1.8, Python 3.9, Node.js 14), middleware version (e.g., Redis 6.0, Nginx 1.18), and container runtime environment (e.g., Docker version, Containerd version). The collected target environment characteristics can then be structured and stored as a benchmark for subsequent comparisons with application dependency domains.
[0089] The method provided in this invention defines the characteristics of the target environment in a fine-grained manner, covering the entire stack of information from the underlying hardware computing and storage resources to the upper-layer software and middleware environment. This enables comprehensive feature perception and provides data support for accurate adaptive conversion. By distinguishing between hardware and software features, the adaptation strategy generation module can make intelligent decisions based on these detailed features, such as "enabling CPU inference mode instead of GPU mode" or "automatically configuring database connection strings," thereby achieving efficient adaptation to heterogeneous environments.
[0090] Based on any of the above embodiments Figure 4 This is a schematic diagram of the structure of the unified representation system for multiple types of applications provided by the present invention, such as... Figure 4 As shown, the system includes a unified representation layer and an adaptive transformation layer. The unified representation layer is used to form a unified representation description for various types of heterogeneous applications. The adaptive transformation layer is used to adapt and transform the reference deployment configuration according to the characteristics of the target environment.
[0091] In one embodiment, Figure 5 This is the second flowchart illustrating the unified representation and conversion method for applications provided by this invention, as shown below. Figure 5 As shown, the method includes: First, the unified application representation in the unified representation layer is obtained. Simultaneously, the environmental feature acquisition module in the adaptive transformation layer collects environmental features from the target environment. Then, the collected environmental features are input into the rule engine module. The rule engine module matches preset adaptation rules based on the unified application representation and the target environment features to generate an adaptation strategy for the application to be transformed. Finally, the adaptation strategy is input into the configuration generation module. The configuration generation module adjusts the unified application representation according to the adaptation strategy to obtain the target deployment configuration for the application to be transformed.
[0092] Specifically, the implementation methods for the rule engine module and configuration generation module can be as follows: First, establish a mapping relationship between unified representation fields and target format fields. Fields in the base domain and dependency domain are explicit and can be directly mapped. Custom content in the configuration domain and extended domain can be dynamically adjusted by training machine learning models, such as decision trees, using historical deployment data. For example, mapping `deps-domain.resource.cpu` in the unified representation to `resources.requests.cpu` in the YAML of a Kubernetes Pod object. Second, adjust field values according to adaptation strategies, such as limiting the value of `resources.requests.cpu` to 8 cores according to the second strategy mentioned above. Finally, perform syntax checks on the generated configuration to eliminate format errors, such as Kubernetes YAML schema validation. Finally, publish the validated deployment configuration to the corresponding target environment, where deployment components, such as K8S and systemd, will automatically deploy it.
[0093] This invention proposes a unified representation and conversion method for multiple application types. It solves the fragmentation problem of application description across different types through a unified representation model and achieves efficient deployment and configuration conversion across heterogeneous environments through an adaptive conversion mechanism. It supports various forms such as standalone applications, service-oriented architecture applications, microservice applications, cloud-native applications, AI applications, and function applications, as well as heterogeneous deployment environments such as containers, cloud, virtual machines / physical machines, edge computing, and terminals. By real-time sensing of environmental resource status and automatic adjustment of deployment strategies, it solves the problem of inefficient application adaptation in different environments, replacing manual configuration conversion and shortening the cross-environment adaptation cycle from 3-5 days to less than 5 minutes. For example, an AI model described by a unified representation can be adaptively converted to a Kubernetes configuration on a cloud GPU node, a Docker configuration on an edge gateway, and a lightweight configuration on a terminal device. Compared with existing technologies, this significantly improves application management efficiency and cross-environment deployment success rate, possessing significant industrial application value.
[0094] Based on any of the above embodiments Figure 6 This is a schematic diagram of the structure of the unified representation and conversion device for applications provided by the present invention, as shown below. Figure 6 As shown, the device includes: The acquisition unit 610 acquires the unified application representation of the application to be converted and the target environment characteristics of the target deployment environment; the unified application representation is used to reflect the deployment conditions supported by the application to be converted. The strategy generation unit 620 generates an adaptation strategy for the application to be converted based on the unified application representation and the target environment feature matching preset adaptation rules. The adjustment unit 630 adjusts the unified application representation based on the adaptation strategy to obtain the target deployment configuration of the application to be converted. The conversion unit 640 deploys the application to be converted based on the target deployment environment and the target deployment configuration.
[0095] The unified representation and conversion device for applications provided in this invention is based on a two-layer architecture consisting of a unified representation layer and an adaptive conversion layer. The unified representation layer standardizes descriptions of various application types, eliminating information silos; the adaptive conversion layer dynamically generates target deployment configurations based on environmental characteristics, enabling automated adaptation across heterogeneous environments. This effectively solves the problems of inconsistent application descriptions and the need for extensive manual configuration modifications for cross-environment deployment, which are prone to errors. It significantly shortens the application adaptation cycle and improves the delivery efficiency and portability of applications in complex environments such as computing networks.
[0096] Based on any of the above embodiments, the strategy generation unit is specifically used for: Construct a field mapping relationship between the unified application representation and the target environment features, wherein the field mapping relationship includes source application fields and target environment fields corresponding to the source application fields; The comparison result is obtained by comparing the source field value of the source application field with the target field value of the target environment field. Based on the comparison results and the preset adaptation rules, the adaptation strategy is determined; the adaptation strategy includes the application fields to be adjusted, the adjustment method, and the adjustment priority.
[0097] Based on any of the above embodiments, the preset adaptation rules include basic adaptation rules and application-specific adaptation rules; The basic adaptation rules include a set of rules for handling application startup. The application-specific adaptation rules include a set of rules for handling the application after it is launched.
[0098] Based on any of the above embodiments, the strategy generation unit is further specifically used for: The application field in the unified application representation and the environment field in the target environment feature are input into the machine learning model to obtain the field mapping relationship.
[0099] Based on any of the above embodiments, the unified application representation includes the basic domain information, dependency domain information, and configuration domain information of the application to be converted; The basic domain information is used to describe the basic attribute information of the application to be converted; The dependency domain information is used to describe the software and hardware environment dependencies required for the application to be converted to run. The configuration domain information is used to describe the configuration information required for the application to be converted to start and run.
[0100] Based on any of the above embodiments, the application type of the application to be converted includes standalone applications, distributed applications, and component modules involved in the distributed applications. The distributed applications should include service-oriented architecture applications, microservice applications, cloud-native applications, AI applications, and function computing applications. The dependency domain information includes the dependency relationships between component modules involved in the distributed application; The application representation of each component module includes the basic domain information, dependency domain information, and configuration domain information of each component module.
[0101] Based on any of the above embodiments, the target environment features include target hardware features and target software features; The hardware features include at least CPU attributes, GPU attributes, memory attributes, network attributes, and storage attributes; The software features include at least the operating system version, the software runtime version, and the middleware version.
[0102] Figure 7 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 7 As shown, the electronic device may include a processor 710, a communication interface 720, a memory 730, and a communication bus 740, wherein the processor 710, the communication interface 720, and the memory 730 communicate with each other via the communication bus 740. The processor 710 can call logical instructions in the memory 730 to execute a unified representation and conversion method for applications. This method includes: obtaining a unified application representation of the application to be converted and target environment characteristics of the target deployment environment; the unified application representation reflects the deployment conditions supported by the application to be converted; matching preset adaptation rules based on the unified application representation and the target environment characteristics to generate an adaptation strategy for the application to be converted; adjusting the unified application representation based on the adaptation strategy to obtain a target deployment configuration for the application to be converted; and deploying the application to be converted based on the target deployment environment and the target deployment configuration.
[0103] Furthermore, the logical instructions in the aforementioned memory 730 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part 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 the present invention. 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.
[0104] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the unified representation and conversion method for applications provided by the above methods. The method includes: obtaining a unified application representation of the application to be converted and target environment characteristics of the target deployment environment; the unified application representation is used to reflect the deployment conditions supported by the application to be converted; matching preset adaptation rules based on the unified application representation and the target environment characteristics to generate an adaptation strategy for the application to be converted; adjusting the unified application representation based on the adaptation strategy to obtain a target deployment configuration for the application to be converted; and deploying the application to be converted based on the target deployment environment and the target deployment configuration.
[0105] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements a unified representation and conversion method for applications provided by the methods described above. The method includes: obtaining a unified application representation of an application to be converted and target environment characteristics of a target deployment environment; the unified application representation reflecting the deployment conditions supported by the application to be converted; generating an adaptation strategy for the application to be converted by matching preset adaptation rules based on the unified application representation and the target environment characteristics; adjusting the unified application representation based on the adaptation strategy to obtain a target deployment configuration for the application to be converted; and deploying the application to be converted by applying the target deployment configuration to the target deployment environment.
[0106] The device embodiments described above are merely illustrative. 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 modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0107] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0108] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A unified representation and conversion method for applications, characterized in that, include: Obtain the unified application representation of the application to be converted and the target environment characteristics of the target deployment environment; The unified application representation is used to reflect the deployment conditions supported by the application to be converted; Based on the unified application representation and the target environment feature matching preset adaptation rules, an adaptation strategy for the application to be converted is generated. Based on the adaptation strategy, the unified application representation is adjusted to obtain the target deployment configuration of the application to be converted. The application to be converted is deployed based on the target deployment environment and the target deployment configuration.
2. The unified representation and conversion method for applications according to claim 1, characterized in that, The step of generating an adaptation strategy for the application to be converted based on the unified application representation and the target environment features matching preset adaptation rules includes: Construct a field mapping relationship between the unified application representation and the target environment features, wherein the field mapping relationship includes source application fields and target environment fields corresponding to the source application fields; The comparison result is obtained by comparing the source field value of the source application field with the target field value of the target environment field. Based on the comparison results and the preset adaptation rules, the adaptation strategy is determined; the adaptation strategy includes the application fields to be adjusted, the adjustment method, and the adjustment priority.
3. The unified representation and conversion method for applications according to claim 2, characterized in that, The preset adaptation rules include basic adaptation rules and application-specific adaptation rules; The basic adaptation rules include a set of rules for handling application startup. The application-specific adaptation rules include a set of rules for handling the application after it is launched.
4. The unified representation and conversion method for applications according to claim 2, characterized in that, The construction of the field mapping relationship between the unified application representation and the target environment features includes: The application field in the unified application representation and the environment field in the target environment feature are input into the machine learning model to obtain the field mapping relationship.
5. The unified representation and conversion method for applications according to any one of claims 1 to 4, characterized in that, The unified application representation includes the basic domain information, dependency domain information, and configuration domain information of the application to be transformed. The basic domain information is used to describe the basic attribute information of the application to be converted; The dependency domain information is used to describe the software and hardware environment dependencies required for the application to be converted to run. The configuration domain information is used to describe the configuration information required for the application to be converted to start and run.
6. The unified representation and conversion method for applications according to claim 5, characterized in that, The application types to be converted include standalone applications, distributed applications, and component modules involved in the distributed applications. The distributed applications should include service-oriented architecture applications, microservice applications, cloud-native applications, AI applications, and function computing applications. The dependency domain information includes the dependency relationships between component modules involved in the distributed application; The application representation of each component module includes the basic domain information, dependency domain information, and configuration domain information of each component module.
7. The unified representation and conversion method for applications according to any one of claims 1 to 4, characterized in that, The target environment characteristics include target hardware characteristics and target software characteristics; The hardware features include at least CPU attributes, GPU attributes, memory attributes, network attributes, and storage attributes; The software features include at least the operating system version, the software runtime version, and the middleware version.
8. A unified representation and conversion device for applications, characterized in that, include: The acquisition unit acquires the unified application representation of the application to be converted and the target environment characteristics of the target deployment environment; The unified application representation is used to reflect the deployment conditions supported by the application to be converted; The strategy generation unit generates an adaptation strategy for the application to be converted based on the unified application representation and the target environment features matching preset adaptation rules. The adjustment unit adjusts the unified application representation based on the adaptation strategy to obtain the target deployment configuration of the application to be converted. The conversion unit deploys the application to be converted based on the target deployment environment and the target deployment configuration.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the unified representation and conversion method of the application as described in any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the unified representation and conversion method of the application as described in any one of claims 1 to 7.