Cloud native application deployment method and device, medium and product

By matching user demand information in the cloud project library, generating efficient container files and deploying cloud-native applications, the problems of time-consuming microservice container file generation, dependency conflicts and resource waste in existing technologies are solved, and efficient and stable cloud-native application deployment is achieved.

CN120744232APending Publication Date: 2025-10-03CHINA MOBILE INFORMATION TECHNOLOGY CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510850763.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-24
Publication Date
2025-10-03

AI Technical Summary

Technical Problem

Existing technologies have problems in the microservice container file generation process, such as serious time consumption, high risk of dependency conflicts, serious resource waste, and poor dynamic scalability. In particular, there is a lack of intelligent scheduling and automated processing in template transplantation, image building, and resource management.

Method used

By receiving user demand information, searching for projects with similarity reaching a threshold from the preset cloud project library, creating container files based on matching scores and deploying cloud-native applications, optimizing microservice features through multi-dimensional feature analysis and semantic matching, dynamically dividing processing nodes to execute matching tasks in parallel, and generating efficient container files.

Benefits of technology

It improves the efficiency and resource utilization of cloud-native application deployment, reduces the complexity of manual debugging, and improves system stability and resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120744232A_ABST
    Figure CN120744232A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a cloud native application deployment method and device, a medium and a product. The method comprises the following steps: receiving demand information sent by user equipment; retrieving a first type of items from a preset cloud item library based on the demand information; the first class of items comprise at least one to-be-deployed micro-service and at least one to-be-deployed resource-dependent item; calculating the similarity between each item in the first class of items and the demand information, and selecting the items with the similarity reaching a threshold value as a second class of items; based on the second type of items, determining a matching score of each second type of item and the demand information; and creating a container file corresponding to the demand information according to the second class item with the highest matching score in the matching scores, and deploying the container file on the corresponding cloud native application. According to the method, the item with the highest matching score with the demand information and the user demand is searched in the cloud item library, and the container file of the item is applied to the corresponding cloud native application, so that the deployment efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cloud native application technology, and specifically to a cloud native application deployment method, device, medium, and product. Background Art

[0002] With the prevalence of microservice architectures and business container (Docker) technology, splitting monolithic applications into independent microservices and encapsulating them as container images has become a mainstream development model. Existing technologies primarily rely on the following methods for generating microservice container files: First, in the internet resource search and porting approach, developers must select projects that meet their requirements from open source platforms or technical documentation and port their container files (Dockerfiles) and configuration files. This process requires significant time to determine the technology stack, project platform, and dependency versions, and is limited by network stability and resource availability. Second, in the template-based development tool approach, some platforms provide predefined microservice templates, but configuration parameters must be manually adjusted to suit specific business needs, resulting in insufficient flexibility and difficulty covering complex dependency scenarios. Finally, while using image-based build toolchains can automate the build process, manual configuration files are still required, making it impossible to dynamically optimize layering strategies and resource allocation based on microservice characteristics.

[0003] The above technologies have the following problems: Internet searches require multi-dimensional screening, which makes the preliminary research very time-consuming and full of repetitive work; the differences in technical architecture of different projects require additional adaptation, which can easily lead to dependency conflicts or environmental configuration errors, increase the failure rate of local tests, and increase the risk of transplantation; traditional image building tools do not optimize the layering rules for microservice characteristics, resulting in redundant image volume, affecting the pulling speed and storage cost during cloud server deployment, and causing waste of resources; existing solutions lack intelligent scheduling for the coordinated deployment of multiple microservices, making it difficult to achieve automatic resolution of dependencies between services and dynamic allocation of resources, and there is a problem of poor dynamic scalability. Summary of the Invention

[0004] At least one embodiment of the present application provides a cloud-native application deployment method, device, medium, and product for solving the limitations of traditional technologies in template transplantation, image construction, and resource management.

[0005] In order to solve the above technical problems, this application is implemented as follows:

[0006] In a first aspect, an embodiment of the present application provides a cloud-native application deployment method, including:

[0007] Receiving demand information sent by user equipment;

[0008] Retrieving a first category of projects from a preset cloud project library based on the demand information; the first category of projects includes at least one microservice to be deployed and at least one resource-dependent project to be deployed;

[0009] Calculate the similarity between each project in the first category and the demand information, and select projects whose similarity reaches a threshold as second category projects;

[0010] Based on the second-category items, determining a matching score between each of the second-category items and the demand information;

[0011] According to the second-category project with the highest matching score among the matching scores, a container file corresponding to the requirement information is created, and the container file is deployed on the corresponding cloud native application.

[0012] Optionally, receiving demand information sent by a user device includes:

[0013] Receive at least one demand information among text, voice, and gesture instructions input by the user to the user device; the demand information includes the functional semantic label, dependent resource type, and interface protocol specification of the microservice to be deployed; the microservice is used to represent the service that implements the target business function; the dependent resource is used to represent the external resource that the microservice depends on at runtime.

[0014] Optionally, retrieving first-category projects from a preset cloud project library based on the demand information includes:

[0015] Analyze the demand information and extract microservice feature words;

[0016] If the feature word contains a keyword feature, the microservice containing the keyword feature is used as the target microservice;

[0017] If the feature word does not include the keyword feature, the duration of the English name of the microservice corresponding to the keyword feature representing the microservice is identified based on the microservice identification model, and the degree of the feature representing the microservice is determined according to the duration;

[0018] When the characteristic degree is greater than or equal to a preset threshold, the microservice corresponding to the characteristic degree is determined to be the target microservice; when the characteristic degree is less than the preset threshold, the historical demand log is queried according to the user account of the user, the target keyword is extracted according to the historical demand log, and the semantic similarity between the demand word in the demand information and the target keyword is calculated by a preset semantic vector model, and similar words that meet the preset conditions are selected as proxy feature words, and the proxy feature words are mapped to the English name of the microservice, and the step of determining the characteristic degree characterizing the microservice according to the duration is re-executed;

[0019] The first category of projects is determined based on the target microservice.

[0020] Optionally, determining the first category of projects based on the target microservice includes:

[0021] Cluster the target microservices by business type and count the total number of microservices in each category;

[0022] Dynamically divide the processing nodes, each node processes the same category of projects, and each node performs the microservice name matching step in parallel, searching the cloud project library for a target project that has at least one common microservice with the microservice to be deployed;

[0023] Determine whether the target project has at least one dependent resource to be deployed;

[0024] If there is at least one dependent resource to be deployed, the target project is determined to be a first-category project.

[0025] Optionally, calculating the similarity between each project in the first category and the demand information, and selecting projects whose similarity reaches a threshold as second category projects, includes:

[0026] Determine all microservices to be deployed in the first type of project based on code keywords of the container file in the first type of project or by retrieving a basic configuration file of the first type of project;

[0027] Acquire a first quantity of microservices corresponding to the demand information according to all the microservices to be deployed;

[0028] Generate a two-dimensional coordinate according to the first number and the second number of all microservices to be deployed; the abscissa of the two-dimensional coordinate is the first number; and the ordinate of the two-dimensional coordinate is the second number;

[0029] Calculate the microservice similarity between the microservice in the first category and the microservice in the demand information based on the two-dimensional coordinates and the preset standard coordinates;

[0030] Determine the number of resource-dependent projects to be deployed in each of the first-category projects, and calculate dependency similarity;

[0031] Calculating a score for each of the first-category projects based on the microservice similarity and the dependency similarity and their corresponding weights, and expressing the score of the first-category project as a similarity between each project in the first category and the demand information;

[0032] According to the plurality of similarities, items whose similarities reach a threshold are selected as second-category items.

[0033] Optionally, determining a matching score between each second-category item and the demand information based on the second-category item includes:

[0034] Based on the second-category projects, determining the number of citations of the second-category projects and counting the time required for the number of citations;

[0035] Determining a first weight corresponding to the number of citations according to the number of citations and the time required for the number of citations;

[0036] Obtaining scores of the first category items in the second category items and second weights corresponding to the scores;

[0037] A matching score between each second-category project and the demand information is determined based on the number of citations, the first weight, the score of the first-category project in the second-category project, and the second weight.

[0038] Optionally, after retrieving the first category of projects from a preset cloud project library based on the demand information, the method further includes:

[0039] Calculating the similarity between each project in the first category and the requirement information; if any of the first category projects does not meet the similarity threshold, extracting microservices and corresponding dependencies from the container file of each first category project and generating a dependency table;

[0040] Determine whether there is a third type of project in the first type of project that includes multiple microservices to be deployed; the third type of project is used to represent a project in the first type of project where the number of microservices used is exactly the same as the number of microservices corresponding to the demand information;

[0041] If the third type of project exists, a container file of the requirement information is created based on the third type of project and the target container file; the target container file is a container file corresponding to the dependency requirement between the microservice and the dependency item in the dependency table.

[0042] In a second aspect, an embodiment of the present application provides a cloud-native application deployment device, including:

[0043] A receiving module, configured to receive demand information sent by a user device;

[0044] A first processing module is configured to retrieve a first category of projects from a preset cloud project library based on the demand information; the first category of projects includes at least one microservice to be deployed and at least one resource-dependent project to be deployed;

[0045] A second processing module is configured to calculate the similarity between each project in the first category and the demand information, and select projects whose similarity reaches a threshold as second category projects;

[0046] a first determining module, configured to determine a matching score between each of the second-category items and the demand information based on the second-category items;

[0047] The third processing module is configured to create a container file corresponding to the demand information according to the second-category project with the highest matching score among the matching scores, and deploy the container file on the corresponding cloud native application.

[0048] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, on which a program is stored. When the program is executed by a processor, the steps of the method described in any one of the first aspects are implemented.

[0049] In a fourth aspect, an embodiment of the present application provides a computer program product, comprising computer instructions, which, when executed by a processor, implement the steps of the method described in any one of the first aspects.

[0050] Compared with the existing technology, the cloud-native application deployment method, device, medium and product provided in the embodiments of the present application can reduce the complexity of cloud-native application porting and deployment, improve the efficiency of local deployment of container files, and enhance resource utilization and system stability by utilizing the microservices to be deployed and dependencies to be deployed in the demand information in the project library to match the project that is closest to and most matches the user's needs, and apply the container file of the project to the deployment of the cloud-native application of the demand information. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Various other advantages and benefits will become apparent to those skilled in the art upon reading the detailed description of the preferred embodiment below. The accompanying drawings are for illustration purposes only and are not to be considered as limiting the present application. The same reference symbols are used throughout the drawings to represent the same components. In the drawings:

[0052] Figure 1 A schematic diagram of the architecture of the cloud-native application deployment system provided in an embodiment of the present application;

[0053] Figure 2 A flowchart of a cloud-native application deployment method provided in an embodiment of the present application;

[0054] Figure 3 A schematic diagram of the structure of the cloud project library provided in an embodiment of the present application;

[0055] Figure 4 A schematic diagram of the structure of a cloud-native application deployment device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0056] The terms "first", "second", etc. in this application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way are interchangeable where appropriate, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first" and "second" are generally of the same type, and do not limit the number of objects, for example, the first object can be one or more. In addition, "or" in this application represents at least one of the connected objects. For example, "A or B" covers three options, namely, Option 1: including A but not including B; Option 2: including B but not including A; Option 3: including both A and B. The character " / " generally indicates that the objects associated before and after are in an "or" relationship.

[0057] The term "indication" in this application can be either a direct indication (or explicit indication) or an indirect indication (or implicit indication). A direct indication can be understood as the sender explicitly informing the receiver of specific information, the operation to be performed, or the requested result, etc. in the instruction sent; an indirect indication can be understood as the receiver determining the corresponding information based on the instruction sent by the sender, or making a judgment and determining the operation to be performed or the requested result, etc. based on the judgment result.

[0058] As described in the background technology, it can be seen that the common method of obtaining container files in the existing technology is to spend a lot of time to search for relevant (meeting the requirements and usable) projects from the Internet or related materials. For example, determining the search direction, selecting the technology stack, project platform and other processes also requires considering network stability. Therefore, the efficiency of searching for projects from the Internet or related materials is low, which ultimately leads to low efficiency in deploying file applications. To solve the above problems, the embodiments of the present application provide a cloud-native application deployment method, which can reduce or avoid the occurrence of the above situations and improve the deployment efficiency of cloud-native applications.

[0059] Reference Figure 1As shown, an embodiment of the present application provides a cloud native application deployment system, including a user device, a cloud native application deployment device, an application deployment end and a cloud project library. The user device (i.e., the user end) is a terminal that initiates user needs, specifically sending the user's demand information to the cloud native application deployment device; the cloud native application deployment device receives the demand information sent by the user device, and based on the demand information, creates a container file corresponding to the demand information, and in the creation process, it is necessary to call the cloud project library to achieve the purpose of finding the first category item; the application deployment end is used to apply the container file corresponding to the demand information fed back by the cloud native application deployment device to the deployment of the cloud native application of the demand information. It should be emphasized that the cloud project library, as a platform for online management and sharing of project-related information, has the characteristics of cloud access, real-time collaboration, integration capabilities, custom configuration, and data analysis and report generation, specifically: Cloud access: The Internet-based project library allows users to access project information through the network from any place and any time, greatly improving flexibility and convenience; Real-time collaboration: Supports multiple team members to view and edit documents or data online at the same time, provides instant update functions, and ensures that all participants can obtain the latest project progress information.

[0060] Please refer to Figure 2 , a cloud native application deployment method provided in the embodiment of the present application is applied to Figure 1 The cloud-native application deployment device in , including:

[0061] Step 21: Receive demand information sent by user equipment.

[0062] Step 21 of this application is used to clarify the user's customized requirements for microservice functions, dependent resources, and interface protocols, providing input parameters for subsequent matching. Step 21 can receive the requirement information sent by the user device, parse the user input, such as at least one of text, voice, and gesture information, and generate a structured requirement description file containing microservice function tags such as "identity authentication service", dependent resource types, and interface protocols.

[0063] Step 22: Retrieve a first category of projects from a preset cloud project library based on the demand information; the first category of projects includes at least one microservice to be deployed and at least one resource-dependent project to be deployed.

[0064] In this application, step 22 filters out projects containing the microservices and dependent resources required by the user from the cloud project library to narrow the matching range. Step 22 can perform a preliminary search based on the microservice name and dependent resource keywords to retain projects containing at least one common microservice and dependency.

[0065] Step 23 , calculating the similarity between each project in the first category and the demand information, and selecting projects whose similarity reaches a threshold as second category projects.

[0066] This application calculates similarity and screens the second category of projects to quantify the degree of match between candidate projects and requirements, giving priority to projects with high similarity. Similarity includes microservice similarity and dependency similarity. Microservice similarity can be calculated by the intersection ratio of the number of required microservices (e.g., the user requires 3 services) and the number of candidate project microservices (e.g., the candidate project contains 4 services). Dependency similarity is the degree of matching of dependency resource types.

[0067] Step 24: determining a matching score between each of the second-category items and the demand information based on the second-category items;

[0068] Step 25: Create a container file corresponding to the requirement information based on the second-category project with the highest matching score among the matching scores, and deploy the container file on the corresponding cloud native application.

[0069] In this embodiment, the purpose of determining the matching score based on the second-category project is to determine the overall project popularity and functional compatibility, ensuring that highly reliable solutions are prioritized. The optimal matching project, determined based on the second-category project with the highest matching score, is created to correspond to the requirement information, enabling rapid deployment.

[0070] This application runs all configuration, container creation, and container image operations directly in the local server, and matches the project that is closest to and most compatible with the user's needs by utilizing the microservices to be deployed and the dependencies to be deployed in the demand information in the project library. That is, directly matching projects with the microservices to be deployed and the dependencies to be deployed solves the problem of low efficiency in traditional project searches through the Internet or related materials, thereby effectively improving the efficiency of deploying container files.

[0071] Optionally, the above step 21 includes:

[0072] Receive at least one demand information among text, voice, and gesture instructions input by the user to the user device; the demand information includes the functional semantic label, dependent resource type, and interface protocol specification of the microservice to be deployed; the microservice is used to represent the service that implements the target business function; the dependent resource is used to represent the external resource that the microservice depends on at runtime.

[0073] In an embodiment of the present application, multimodal interaction is supported, such as obtaining demand information input by the user through mouse clicks (selecting a preset microservice template), keyboard input (manually filling in the service name / dependency parameters) or touch screen gestures (such as drag-and-drop service dependency graph construction) through the user device; the present application can convert unstructured input, such as handwritten notes and voice-to-text, into a standardized JSON format demand description file, which includes services (microservice list) and dependencies (dependency resource list) fields; it can also verify the legality of the input through regular expressions and predefined vocabularies, such as microservice naming specifications and dependency resource type enumeration.

[0074] For example, it can automatically populate basic configurations based on user-selected industry templates and generate structured web pages based on user-entered microservices and dependencies. This web page can be linked to a Git repository to record requirement change history and support rollbacks and diff comparisons. A lightweight Docker engine can be deployed locally to load only necessary components, avoiding full environment dependencies and reducing startup time to seconds.

[0075] Specifically, after determining the required microservices and dependencies, staff will input them into the electronic device, which will then generate a requirements document based on the input requirements information. Before launching the cloud-native application on the cloud server, all configuration, container creation, and container image operations are run on the local server to improve debugging efficiency and reduce the risk of errors after the cloud-native application is launched on the cloud server. Microservices refer to services that implement specific business functions, and dependencies refer to external resources that microservices rely on at runtime. Microservices and dependencies communicate and call each other through API interfaces. Users can trigger the requirements information of cloud-native applications through input-enabled user devices such as mice, keyboards, and touch screens.

[0076] Optionally, the above step 22 includes:

[0077] Analyze the demand information and extract microservice feature words;

[0078] If the feature word contains a keyword feature, the microservice containing the keyword feature is used as the target microservice;

[0079] If the feature word does not include the keyword feature, the duration of the English name of the microservice corresponding to the keyword feature representing the microservice is identified based on the microservice identification model, and the degree of the feature representing the microservice is determined according to the duration;

[0080] When the characteristic degree is greater than or equal to a preset threshold, the microservice corresponding to the characteristic degree is determined to be the target microservice; when the characteristic degree is less than the preset threshold, the historical demand log is queried according to the user account of the user, the target keyword is extracted according to the historical demand log, and the semantic similarity between the demand word in the demand information and the target keyword is calculated by a preset semantic vector model, and similar words that meet the preset conditions are selected as proxy feature words, and the proxy feature words are mapped to the English name of the microservice, and the step of determining the characteristic degree characterizing the microservice according to the duration is re-executed;

[0081] The first category of projects is determined based on the target microservice.

[0082] This application uses multi-dimensional feature analysis to accurately identify core keywords related to microservices in demand information, and determines the optimal target microservice based on semantic matching and historical data optimization, solving the problems of low efficiency and poor matching accuracy of traditional manual screening.

[0083] During the microservice feature word extraction process, requirement information (e.g., "Requires user authentication service, dependent on MySQL database") is input into a natural language processing (NLP) engine for word segmentation, part-of-speech tagging, and stop word filtering. An example of a segmentation result is: ["user," "authentication," "service," "dependency," "MySQL," "database"]. Based on a predefined microservice technology stack dictionary (e.g., SpringCloud, Dubbo, Kafka), the feature word is identified to see if it contains keyword features (e.g., "MySQL"). If not, the microservice identification model identifies the English microservice name corresponding to the keyword feature representing the microservice. For example, the microservice identification model calculates the correlation strength between the requirement word and the candidate microservice English name. The model inputs are the requirement word (e.g., "user permission management") and the candidate microservice name (e.g., "AuthService"). The microservice identification model outputs a matching score (e.g., 0.82), reflecting semantic similarity. A threshold is then applied. If the score ≥ a preset threshold (e.g., 0.7), the microservice is identified as the target microservice; otherwise, the historical data compensation process is initiated. This improves cross-language semantic alignment capabilities.

[0084] When the feature degree is less than the preset threshold, historical log mining is performed to query historical demand records based on user accounts (such as "payment gateway" and "message queue" that appeared frequently in the past 10 demands). Use the pre-trained semantic vector model to calculate the cosine similarity between the demand words and historical keywords. For example: the similarity between the demand word "authority control" and the historical word "RBAC model" is 0.65, and the top-3 similar words are selected as proxy words. Map the proxy words (such as "RBAC") to the standard microservice English name in the project library (such as "RBACService"). Re-execute the feature degree calculation, and the proxy feature words can be input into the microservice identification model to update the matching score. Based on the microservice name and dependency relationship, cluster the candidate projects in the project library, and select the project closest to the demand microservice cluster center as the first category project.

[0085] This application combines keyword matching, semantic vector models, and historical behavior analysis to improve the robustness of feature extraction. It automatically adjusts the matching threshold based on the complexity of the request (e.g., a low threshold for simple requests and a high threshold for complex requests), balancing recall and accuracy. It optimizes proxy feature word generation based on user historical behavior to reduce matching bias in cold start scenarios.

[0086] Optionally, determining the first category of projects based on the target microservice includes:

[0087] Cluster the target microservices by business type and count the total number of microservices in each category;

[0088] Dynamically divide the processing nodes, each node processes the same category of projects, and each node performs the microservice name matching step in parallel, searching the cloud project library for a target project that has at least one common microservice with the microservice to be deployed;

[0089] Determine whether the target project has at least one dependent resource to be deployed;

[0090] If there is at least one dependent resource to be deployed, the target project is determined to be a first-category project.

[0091] In the embodiment of the present application, the target microservices are clustered by business type. They can be classified according to business functions, divided according to microservice responsibilities (such as user services, order services, payment services), and classified according to data access modes to distinguish the database types that the services depend on (such as relational and NoSQL). For example, a hash table or dictionary structure can be used to record the number of microservices of each business type (such as 10 microservices in the user service class) to ensure centralized processing of similar services.

[0092] Dynamically partition processing nodes by business type, assigning microservices of the same business type to the same compute node (e.g., all "order service"-related tasks to node A); dynamically adjusting task load based on node computing power (e.g., high-performance nodes handling complex service matching). Each node in this application launches an independent thread pool to execute microservice name matching tasks in parallel, using a distributed message queue to coordinate task distribution and result aggregation between nodes.

[0093] The matching logic for microservice name matching is: directly compare the microservice names; fuzzy matching can also be performed. Fuzzy matching can use an edit distance algorithm to handle name variations (such as "payment service" and "payment-service"). The result filtering retains candidate projects that contain at least one common microservice (for example, if the user requirement includes "user service," the candidate project also contains "user-service"). Dependency verification in dependency resource verification includes static analysis, dynamic verification, and filtering rules. Static analysis parses the candidate project's Dockerfile and configuration files to extract a list of dependent resources. Dynamic verification tests the connectivity of dependent resources through API calls. In the filtering rules, if the candidate project's dependent resources are empty or do not match the requirement (for example, if the user requires "PostgreSQL" but the candidate project uses "MongoDB"), it will be excluded. Finally, projects that meet the following conditions simultaneously are marked as first-category projects: contain at least one microservice that matches the user requirement; contain at least one dependent resource that matches the requirement.

[0094] This application efficiently screens out candidate projects that include target microservices and dependent resources through business type clustering, parallel processing, and dependent resource verification, solving the problems of low efficiency and poor matching accuracy of traditional manual screening.

[0095] Optionally, the present application may generate a list of first-category projects, sorted by matching degree (matching degree = microservice similarity × weight + dependency similarity × weight).

[0096] It's important to note that the cloud project library includes multiple projects, each with corresponding microservices, dependencies, container files, and reference counts. Each project also has a local configuration deployment file, which includes a Dockerfile (container file), each project's microservices, and dependencies. The cloud project library is a cloud database located on a cloud server. All operations and users accessing the cloud project library are logged, and the number of references to a project is recorded whenever it is referenced.

[0097] First, this application matches the project that best matches the requirement information from the cloud project library based on the matching of microservices and dependencies corresponding to the requirement information, rather than screening the microservices and dependencies that match the requirement from the cloud project library.

[0098] Next, in a specific implementation method, the specific implementation method of this application for determining the first type of project from the cloud project library is introduced: for users, they will input demand information according to their own needs on the user side. In order to facilitate the rapid transmission of the demand information to the cloud-native application deployment device, the demand information will be compressed. For the cloud-native application deployment device, after receiving the compressed demand information, it will immediately decompress and parse it, and then determine whether it can extract the parsed data related to the microservice from the parsing result.

[0099] If so, identify the keywords in the parsed data. Take the payment microservice as an example. If keywords such as "payment microservice required" appear, there is no need to use the keyword quantity parameter, and the characteristic degree value of the microservice is directly determined to be 1. If other keywords indirectly represent the microservice, the microservice identification model is introduced at this time, and the length of the English name of the microservice corresponding to the keyword representing the microservice is identified based on the microservice identification model to calculate the characteristic degree value representing the microservice. If the keyword cannot be identified, the characteristic degree value is 0. See Table 1 below for details:

[0100] Table 1:

[0101]

[0102] Among them, the preset threshold can be set to 0.6. Since the name attributes carried by the microservices will be identified when storing microservices in the cloud project library, for example, the English name, specifically: the English name of the payment microservice is Payment Service, the English name of the search microservice is Search Service, and the English name of the analysis microservice is Analytics Service. Taking the payment project as an example, all the payment microservices are stored in the payment project. At this time, the microservices will also be identified according to their actual use. For example, the English name of the company payment microservice is Payment Service-gs, and the English name of the bank payment microservice is Payment Service-yh. If there are multiple bank payment microservices, the English names can be expressed as Payment Service-yh-1 and Payment Service-yh-2. This can represent the uniqueness of the English name of the microservice.

[0103] In this case, the English name of the microservice is used as a keyword to search the cloud project library for projects that share at least one microservice with the microservice to be deployed. The project is then determined to have at least one microservice dependency. If so, the project is considered a Category 1 project, meaning it includes at least one microservice to be deployed and at least one dependency to be deployed. Category 1 projects share microservices with the requirement information, meaning they share similarities with the requirement information and may serve as the basis for deploying the cloud-native application corresponding to the requirement information. The cloud project library uniquely categorizes the English names of microservices, which can be used to match the required microservices.

[0104] In addition, when the characteristic degree value is less than the preset threshold, it indicates that the parsed data cannot directly represent the microservice. At this time, the account number of the user logging into the user terminal is obtained, and the account number is used as identification information to query the historical demand information exclusive to the user, and the keywords of the historical demand information parsing are obtained. The keywords of the historical demand information parsing and the keywords of the current parsed data are input into the keyword matching model. For the keyword matching model, the keyword with the highest matching degree will be output, and then the target historical demand information will be determined based on the keyword, and the English name of the microservice corresponding to the target historical demand information will be used as the English name of the microservice corresponding to the current demand information. For example:

[0105] The user account used to log in to the client is "133XXXX3333". At this time, the historical demand information queried using the account number is "needing to use a microservice for transferring money to others or receiving money oneself", "needing to use a microservice for storing multi-dimensional information", and "needing to use a search engine for searching microservices". At this time, keywords such as "repayment", "collection", "storage information", and "search" will all be input into the keyword matching model. In the keyword matching model, the above-mentioned received keywords will be matched with the keywords of this demand information. For example, if the current demand information is "selling goods to others and collecting money", the keyword information is "selling goods" and "collection". At this time, the historical demand information with the highest matching degree is "needing to use a microservice for transferring money to others or collecting money oneself". The corresponding microservice is the payment microservice, whose English name is Payment Service.

[0106] Among them, the specific method of searching for projects in the cloud project library that have at least one common microservice with the microservice to be deployed is: since the cloud project library has the characteristics of cloud access, it can be accessed and processed simultaneously based on multiple nodes. In order to effectively improve the search efficiency, this application will classify the projects in the cloud project library after identifying the English name of the microservice, and count the number of each type of project, and then match multiple microservices in each type of project at the same time based on the multiple processing nodes generated by the processor.

[0107] For details, please refer to Figure 3 The cloud project library shown is illustrated using three processing nodes as an example, namely processing node a, node b, and node c. To avoid the long-tail effect during searches, the number of microservices in each category of projects is counted, and each category of projects is divided equally according to the number of processing nodes. Then, all processing nodes process the same category of projects simultaneously. For example, payment projects are processed first, then search projects, and finally analysis projects, until all projects are processed. If, according to the prior art, payment projects are completed by node a, search projects are completed by node b, and analysis projects are completed by node c, then since the number of microservices contained in A, B, and analysis projects is different, a long-tail effect will inevitably occur. The solution of this application can solve the above problem.

[0108] For example, if the number of payment microservices is 1500, the starting pointer for processing by node a is [0], the starting pointer for processing by node b is

[500] , and the starting pointer for processing by node c is

[1000] . The size of each node is 500, that is, the size of node a is from [0]-

[499] , the size of node b is from

[590] -

[999] , and the size of node c is from

[1000] -

[1499] .

[0109] Optionally, the above step 23 includes:

[0110] Determine all microservices to be deployed in the first type of project based on code keywords of the container file in the first type of project or by retrieving a basic configuration file of the first type of project;

[0111] Acquire a first quantity of microservices corresponding to the demand information according to all the microservices to be deployed;

[0112] Generate a two-dimensional coordinate according to the first number and the second number of all microservices to be deployed; the abscissa of the two-dimensional coordinate is the first number; and the ordinate of the two-dimensional coordinate is the second number;

[0113] Calculate the microservice similarity between the microservice in the first category and the microservice in the demand information based on the two-dimensional coordinates and the preset standard coordinates;

[0114] Determine the number of resource-dependent projects to be deployed in each of the first-category projects, and calculate dependency similarity;

[0115] Calculating a score for each of the first-category projects based on the microservice similarity and the dependency similarity and their corresponding weights, and expressing the score of the first-category project as a similarity between each project in the first category and the demand information;

[0116] According to the plurality of similarities, items whose similarities reach a threshold are selected as second-category items.

[0117] It should be noted that the electronic device calculates the similarity between the microservices and dependencies of each first-category project and the microservices and dependencies to be deployed in the requirement information. The similarity can intuitively characterize the degree of closeness between each first-category project and the requirement information. The higher the degree of closeness, the more capable the project's container file is as a container file for deploying the cloud-native application corresponding to the requirement information, that is, the project's container file is more portable.

[0118] It should also be noted that the similarity threshold is used as the dividing point with a high degree of closeness. When the similarity reaches the similarity threshold, it means that it is relatively close to the demand information. The microservices and dependencies hit more and more similar demand information and can be transplanted into the deployment operation of the cloud native application corresponding to the demand information.

[0119] In an embodiment of the present application, the number of microservices to be deployed that are hit by each first-category project is determined, and the similarity of the microservices is calculated. Since in the container file of the project, the microservices and dependencies are represented by English names, and the English names are usually followed by special fields in the code of the container file, there are two ways to extract the number of microservices and dependencies of the first-category project. The first is to identify the key fields of the code, specifically: the code of each container file in the first-category project, and after identifying the keywords in the code, query the microservices and dependencies in the container file according to the keywords (which can be understood as identification information), and then obtain all the microservices and dependencies in the entire first-category project. The second is to retrieve the configuration file, specifically: obtain the basic configuration file included in the first-category project, and then obtain the microservices and dependencies corresponding to the basic configuration file by retrieving the file, that is, there is a mapping relationship between the basic configuration file and the microservices and dependencies. Then determine all the microservices and dependencies in the first-category project.

[0120] According to all the microservices to be deployed, a first number of microservices corresponding to the demand information is obtained. According to the first number and the second number of all the microservices to be deployed, a two-dimensional coordinate is generated, where the horizontal coordinate of the two-dimensional coordinate is the first number; the vertical coordinate of the two-dimensional coordinate is the second number. According to the two-dimensional coordinate and the preset standard coordinate, the microservice similarity between the microservices in the first category of projects and the projects of the demand information is calculated, that is, the microservices corresponding to the demand information are obtained, and the multi-node processing method is used to simultaneously match the microservices with the microservices to be deployed in the first category of projects, and the successfully matched microservices are obtained. Services, and count the number of successfully matched microservices and the number of microservices to be deployed in the first category of projects. In order to effectively improve the efficiency of calculating the similarity, the number of successfully matched microservices is used as the horizontal coordinate and the number of microservices to be deployed in the first category of projects is used as the vertical coordinate, that is, coordinate A. At this time, the standard coordinate B is set, and then the cosine formula is used to calculate the similarity between the two. The specific formula can be: cosθ=(A*B) / |A|||B|, where A*B represents the product of vector A and vector B, and |A| and |B| represent the modulus of vector A and vector B.

[0121] For example, the microservices corresponding to the demand information are a, b, c, d, e, and f, and the microservices to be deployed in the first category of projects are a, b, c, d, e, f, g, and h. At this time, the first number of successfully matched microservices is 6, and the total number of microservices to be deployed in the first category of projects, that is, the second number is 8. Then the coordinate A is (6,8). At this time, the standard coordinate is determined according to the number of microservices to be deployed in the first category of projects. The standard coordinate B is (8,8). At this time, the similarity calculated according to the cosine formula is 0.99.

[0122] It should be noted that the greater the calculated similarity, the closer the first category project is to the project requirements of the demand information.

[0123] Determine the number of projects with dependent resources to be deployed in each of the first-category projects and calculate the dependency similarity. Similar to the above steps, the specific steps of determining the number of dependencies to be deployed hit by each first-category project and calculating the dependency similarity include: obtaining dependencies corresponding to the requirement information, using the above-mentioned multi-node processing method to simultaneously match the dependencies with the dependencies to be deployed in the first-category projects, obtaining successfully matched dependencies, and counting the number of successfully matched dependencies and the number of dependencies to be deployed in the first-category projects. In order to effectively improve the efficiency of calculating the similarity, the number of successfully matched microservices is used as the horizontal coordinate and the number of dependencies to be deployed in the first-category projects is used as the vertical coordinate, that is, coordinate C. At this time, the standard coordinate D is set, and then the cosine formula is used to calculate the similarity between the two.

[0124] For example, suppose the dependencies corresponding to the requirement information are A, B, and C, and the microservices to be deployed in the first-category project are A, B, C, D, E, and F. The number of successfully matched dependencies is 3, and the number of dependencies to be deployed in the first-category project is 6. Therefore, coordinate C is (3, 6). The standard coordinate is determined based on the number of dependencies to be deployed in the first-category project, and the standard coordinate D is (6, 6). The similarity calculated using the cosine formula is 0.949. The greater the calculated similarity, the closer the first-category project is to the requirements information and the higher the degree of portability.

[0125] The score of each first-category project is calculated based on the similarity of microservices and dependencies, as well as their corresponding weights, to represent similarity. The microservice similarity and dependency similarity ratio describe the degree of similarity between the first-category project and the requirement information from the perspective of microservices and dependencies, respectively. Both affect whether the first-category project can be used as the foundation for the creation of cloud-native application deployment corresponding to the requirement information. The influence of microservices and dependencies varies. Therefore, different first weights are set for the proportion of microservices and the proportion of dependencies. In this case, consensus nodes can be used, and a hierarchical analysis algorithm is configured on each consensus node. That is, the consensus node analyzes the influence of microservices and dependencies. Specifically, three consensus nodes are used as an example: consensus node 1, consensus node 2, and consensus node 3:

[0126] First, the consensus node uses sequential consensus. In order, consensus node 1 analyzes the impact of the microservice based on the hierarchical analysis algorithm. If the impact is high, it will give three stars, and the score of each star is 0.3. At this time, the weight given by consensus node 1 is 0.9. To ensure the fairness of the consensus result, consensus node 2 will overwrite the analysis result of consensus node 1 when it reaches consensus. For consensus node 2, it is a new analysis object. If the impact is low, it will give one star. At this time, the weight given by consensus node 2 is 0.3. Similarly, when consensus node 2 reaches consensus, it will overwrite the analysis result of consensus node 1. The analysis results of consensus nodes 1 and 2 overlap. If consensus node 3's analysis result is medium, it is given two stars. In this case, the weight given by consensus node 2 is 0.6. The weights given by the three consensus nodes are then averaged, resulting in a microservice first weight of 0.6. At this point, the dependency weight is directly subtracted from the first weight of the microservice from the unit "1," which is 0.4. Taking S1 and S2 as an example, the electronic device calculates the first-category score for the first-category project as (0.99 × 0.6) + (0.949 × 0.4) = 0.9736. A higher score indicates that the first-category project is closer to the demand information.

[0127] The second category of projects is equivalent to the first category of projects, and their scores are all greater than the preset score threshold. That is to say, projects with scores greater than the preset score threshold selected from the first category of projects are the second category of projects. For the category, if the scores of multiple projects are greater than the preset score threshold, then multiple projects will be regarded as second category projects.

[0128] Optionally, determining a matching score between each second-category item and the demand information based on the second-category item includes:

[0129] Based on the second-category projects, determining the number of citations of the second-category projects and counting the time required for the number of citations;

[0130] Determining a first weight corresponding to the number of citations according to the number of citations and the time required for the number of citations;

[0131] Obtaining scores of the first category items in the second category items and second weights corresponding to the scores;

[0132] A matching score between each second-category project and the demand information is determined based on the number of citations, the first weight, the score of the first-category project in the second-category project, and the second weight.

[0133] This application aims to accurately match the projects that are closest to and most closely match the user's needs. If the accuracy is high, the time spent is short, the overall efficiency is high, and the efficiency of obtaining the container file is further improved, which naturally effectively improves the efficiency of deploying the container file. After multiple matches of the projects that are closest to and most closely match the user's needs, a single match is generally used. Whether it is a search to avoid the long-tail effect, a secondary match to introduce the number of citations, or the setting of dynamic weights, the only function is to improve the accuracy of matching the projects that are closest to and most closely match the user's needs, thereby efficiently determining the container file that meets the needs and improving the efficiency of deploying the container file.

[0134] In this application, the matching score between each second-category project and the demand information is determined based on the similarity of the second-category projects and the number of citations of the second-category projects. The number of citations is used as an evaluation criterion for the popularity of the project, and is more in line with the dependencies corresponding to the microservices of the demand information and the user's needs (this is a new parameter that will only be used in this field and will not be used in other fields at all). The number of citations represents the number of times the project is cited. If the number of citations is higher, it means that the user uses the project more frequently, is more interested in the project or the microservice or dependency of the project, and is more matched with the user's demand information. This is why the parameter of the number of citations is introduced to determine the matching score between each second-category project and the demand information. For example, if the user's demand information is "need to use a microservice to remit money to others or receive money by yourself", then the payment microservice will definitely be used frequently, and payment projects will be cited multiple times accordingly, which matches the user's needs.

[0135] Therefore, after determining the second-category projects that meet the similarity threshold, we then make a comprehensive judgment based on the number of citations for each second-category project to determine the matching score for each second-category project. The higher the matching score of the second-category project, the more it fits the demand information and the more suitable it is for transplantation to the project that deploys the cloud-native application corresponding to the demand information.

[0136] The second-category score of each second-category project is calculated based on the first-category score, citation count, and corresponding second weight. The first-category score of the second-category project represents the score of the project in the second-category project in the first-category project. After the first-category score and citation count of the second-category project are calculated, the matching score of each second-category project with the demand information is calculated based on the weight. The weight can be dynamic and needs to take into account the statistical time and time decay. For example, if the number of citations in the past year is counted, the second weight is 0.7; if the number of citations in the past year is counted, the second weight is 0.5; and if the number of citations after three years is counted, the second weight is 0.3. After determining the number of citations and their second weights, the time of counting the number of citations is taken into account. For example, if the number of citations is counted within a specified time (which can be set to 1 second), the weight is the above-set weight. For every 0.1 second exceeding the specified time, the weight increases by 0.01. Similarly, if the number of citations exceeds 2 seconds or more, the weight increases by 0.2. In other words, the maximum weight of the number of citations can be set to 0.9, thus achieving dynamic weight setting. The purpose of doing this is that if the statistical time is longer, the more times the item is referenced, that is, the more interested the user is in the item and the closer it matches the user's demand information, the accuracy of determining the matching score between each second-category item and the demand information can be effectively improved, thereby improving the efficiency of the container file.

[0137] For example, if the number of citations within the past year is counted, the initial second weight is 0.7. If counting the citations takes 1.5 seconds, the added weight is 0.5 / 0.1*0.01=0.05, resulting in an increased weight of 0.75. The weight of the first-category score corresponding to the second-category project is calculated by subtracting 0.75 from "Unit 1" to obtain 0.25. The matching score between each second-category project and the requirement information is then calculated based on the similarity and citation count of the second-category project. The specific calculation method is: the first-category score corresponding to the second-category project is S1, the number of citations is S2, the score weight is Q1, and the weight corresponding to the number of citations is Q2. The matching score between each second-category project and the requirement information is (S1×Q1)+(S2×Q2). If the first-category project has a first-category score of 0.9736 and has been cited three times, the matching score between each second-category project and the requirement information is 0.9736*0.25+3*0.75=2.4934.

[0138] Furthermore, after calculating the matching score between each second-category project and the demand information, the second-category project with the highest matching score is screened, and the second-category project with the highest matching score is used as the project that best matches the user demand. Then, a container file corresponding to the demand information is created based on the container file of the second-category project with the highest matching score, and the container file is deployed.

[0139] Optionally, after retrieving the first category of projects from a preset cloud project library based on the demand information, the method further includes:

[0140] Calculating the similarity between each project in the first category and the requirement information; if any of the first category projects does not meet the similarity threshold, extracting microservices and corresponding dependencies from the container file of each first category project and generating a dependency table;

[0141] Determine whether there is a third type of project in the first type of project that includes multiple microservices to be deployed; the third type of project is used to represent a project in the first type of project where the number of microservices used is exactly the same as the number of microservices corresponding to the demand information;

[0142] If the third type of project exists, a container file of the requirement information is created based on the third type of project and the target container file; the target container file is a container file corresponding to the dependency requirement between the microservice and the dependency item in the dependency table.

[0143] It should be noted that the present application may also utilize dependency requirements as requirement information. Dependency requirements are requirements for the dependencies to be deployed corresponding to each microservice to be deployed. If no first-category project meets the similarity threshold, the similarity between each project in the first-category project and the requirement information is calculated. If none of the first-category projects meet the similarity threshold, the following steps are performed: Step a: Extract the code from the container file of each first-category project; Step b: Determine the microservices and dependencies in each container file based on the code; Step c: If a target container file exists where both the microservices and dependencies meet the dependency requirements, create a container file corresponding to the requirement information based on the target container file. The electronic device can, after opening each container file (i.e., a Dockerfile) of the first-category project in the background of relevant software, such as "Docker Desktop software," automatically obtain the code in each container file by responding to a copy instruction. The copy instruction can be understood as an instruction to obtain the code in the container. After extracting the code, the microservices in each container file and the dependencies corresponding to each microservice can be determined in accordance with the method described in Step 21.

[0144] A dependency requirement may be a dependency requirement triggered by a user inputting in a specific format that can be recognized by an electronic device through input devices such as a mouse and keyboard. For example, the "user registration" microservice corresponds to the "database" dependency. If the microservice in a container file is "user registration" and the dependency is "database", then the container file is the target container file. The calling relationship between the microservice and the dependency in the container file is consistent with the calling relationship in the dependency requirement. Then, the container file corresponding to the microservice to be deployed in the requirement information can be created directly based on the target container file. For example, the electronic device directly transplants the code of the target container file to the container file under the deployment project corresponding to the requirement information through copy and paste instructions.

[0145] In addition, if there is no first-category project that reaches the similarity threshold, it means that all first-category projects are not close enough to the requirement information, and only each first-category project has the same microservices and / or dependencies as the requirement information. Therefore, the microservices and dependencies in each container file can be extracted.

[0146] This application extracts microservices and corresponding dependencies from the container file of each first-category project, generates a dependency table, and stores it in the electronic device. The dependency table records all microservices and corresponding dependencies of all first-category projects. After the electronic device determines the dependency table, it can traverse the dependency table for each dependency requirement to determine whether there is an item in the dependency requirement in the dependency table. If there is a microservice that hits the dependency requirement in the dependency table, the target container file is determined based on the corresponding relationship of the row where the microservice that hits the dependency requirement is located. The dependency requirement is also a table.

[0147] This application determines whether there are third-category projects including multiple microservices to be deployed in the first-category projects. The electronic device determines whether the microservices used by each first-category project include all the microservices to be deployed in the demand information. The third-category project refers to a project in which the number of microservices used in the first-category project is exactly the same as the number of microservices corresponding to the demand information. For example, if the first-category project has a, b, c, d, e, and f microservices to be deployed, and the microservices corresponding to the demand information are a, b, c, d, e, and f, then the proportion is 1, which means that the third-category project exists in the first-category project.

[0148] If a third-category project exists, a container file for the requirements information is created based on the third-category project and the target container file. The electronic device opens all container files for the third-category project in relevant software, such as "Docker Desktop," thereby reducing the need for the user to manually create container files corresponding to the requirements information. Furthermore, since the target container file has been determined, the container file for the third-category project can be modified based on the target container file, enabling faster creation of the container file for the requirements information.

[0149] The steps to create a container file of requirement information based on the third type of project and the target container file are as follows:

[0150] S1. The electronic device opens all container files of the third category project on relevant software such as "docker Desktop software" to display all container files of the third category project. Specifically, each container file can be displayed in a separate window.

[0151] S2. The electronic device extracts the microservices and dependencies in each container file, determines the microservices and dependencies in each container file, and then generates a dependency table for the third type of project based on the dependency table template. Each row in the dependency table is traversed in the dependency requirements. If the dependency requirements do not exist after the traversal, it means that the dependency requirements are not met, thereby determining the microservices and dependencies that do not meet the dependency requirements, and then determining the container files corresponding to the microservices and dependencies that do not meet the dependency requirements as the container files to be modified.

[0152] S3: The target container file refers to a container file that meets the dependency requirements. This template container file can be stored in a collection. After determining the container file to be modified, the microservice of the container file to be modified is obtained. Based on the microservice, a container file with the same microservice is matched from the container file collection, which is the target container file. Because the target container file meets the dependency requirements, the electronic device matches the target container file with the same microservice as the container file to be modified, i.e., the selected container file. The electronic device then opens the target container file with the same microservice in the background of the "Docker Desktop software". The target container file's code can be extracted using a copy instruction and pasted and replaced in the corresponding code area of ​​the container file to be modified, thereby modifying the container file to be modified so that the modified container file to be modified meets the dependency requirements.

[0153] The microservice to be deployed and its dependencies each have corresponding configuration information. After the electronic device matches the target container file with the microservice in the container file to be modified, the corresponding configuration information for the microservice and dependency is extracted from the modified container file code. The configuration information may also include the port number and version number of the microservice to be deployed, as well as the port number and version number of the dependency to be deployed. If the target configuration information exists in the modified container file code, the target configuration information is annotated and a hyperlink is generated at the location of the target configuration information.

[0154] The target configuration information is inconsistent with the configuration information of the microservice to be deployed or the configuration information of the dependency to be deployed. The hyperlink points to the configuration information of the microservice to be deployed or the dependency to be deployed corresponding to the target configuration information.

[0155] In the solution of the present application, if the target configuration information exists in the code of the modified container file, it means that the modified container file contains configuration information that is inconsistent with the configuration information of the microservice to be deployed, and / or configuration information that is inconsistent with the configuration information of the dependency to be deployed. The electronic device can mark the above configuration information in the code interface, such as highlighting, bolding, etc., so that the user can find it in a timely and convenient manner. Then, a hyperlink is generated for the location where the target configuration information is located or the code itself, and the hyperlink points to the configuration information of the microservice to be deployed or the dependency to be deployed corresponding to the target configuration information. This allows the user to modify the target configuration information by directly triggering the hyperlink through an input device such as a mouse.

[0156] Specifically, in step 25, a container file corresponding to the requirement information is created based on the container file of the second-category project with the highest matching score. After the electronic device determines the second-category project with the highest matching score, it retrieves the container file of the second-category project and expands it in relevant software, such as "Docker Desktop," to deploy and create the container file corresponding to the requirement information. By finding the project that best matches the requirement information in the project library and porting the container file of the best-matching project, the container file required to create the cloud-native application corresponding to the requirement information is deployed, thereby improving deployment efficiency.

[0157] In summary, this application proposes an efficient cloud native application deployment method based on the analysis of the existing technology. When determining the first category of projects from the Internet project library, the Internet project library has the characteristics of cloud access and can be accessed and processed simultaneously based on multiple nodes. In order to effectively improve the search efficiency, after identifying the English name of the microservice, this technical solution will classify the projects in the Internet project library and count the number of each type of project. Then, the English name is used as the keyword, and the multiple processing nodes generated by the processor are used to simultaneously match multiple microservices in each type of project, thereby avoiding the long tail effect during the search, thereby effectively improving the efficiency of determining the first category of projects.

[0158] In order to effectively improve the efficiency of calculating similarity, this application uses the number of successfully matched microservices as the horizontal coordinate and the number of microservices to be deployed in the first category of projects as the vertical coordinate, that is, coordinate A. At this time, the standard coordinate B is set, and then the cosine formula is used to calculate the similarity between the two. Similarly, the number of successfully matched dependencies is used as the horizontal coordinate and the number of dependencies to be deployed in the first category of projects is used as the vertical coordinate, that is, coordinate C. At this time, the standard coordinate D is set (the standard coordinate D and the standard coordinate C can be different. The setting rules of the two can be determined according to the number of dependencies to be deployed and the number of microservices to be deployed in the first category of projects. For example, if the number is 100, the coordinate is (100, 100), and then the cosine formula is used to calculate the similarity between the two. That is, a new method is used to calculate microservice similarity and dependency similarity. Compared with the existing method of directly measuring the similarity between the two by quantity, it can effectively improve the accuracy and reliability of calculating similarity. It should be protected.

[0159] This application designs a strategy for setting the reference and weight of parameters in specific fields. The number of citations is used as an evaluation criterion for the popularity of a project, which is more in line with the requirements information and the dependencies corresponding to the microservices required by the user. A new parameter is introduced to the number of citations of the project. The set weight can be a dynamic weight, which needs to consider time decay and the time of statistical citation counts. The matching score of each second-category project and the requirements information calculated in the end can better analyze the deployment requirements of cloud-native applications that meet user needs, and the dependencies corresponding to the microservices that meet user needs, thereby improving the efficiency of transplantation and deployment.

[0160] Compared with the prior art, this application has at least the following effects:

[0161] The cloud-native application deployment method of the present application relates to the field of artificial intelligence technology, obtains user input demand information, and adopts a simultaneous matching strategy to avoid the long-tail effect, searches for a first-category project including at least one microservice and at least one dependency from a project library based on the demand information, and then calculates the similarity between each project in the first-category project and the demand information based on a similarity calculation strategy of the coordinate dimension, and selects projects with a similarity greater than a preset similarity threshold from the first-category project, that is, obtains a second-category project, and then determines the matching score between each second-category project and the demand information based on the similarity of the second-category project and the number of citations of the second-category project based on a weight setting strategy, and takes the second-category project with the highest matching score as the most matching project, thereby effectively improving the efficiency of obtaining projects, and then creates a container file corresponding to the demand information based on the container file of the most matching project, and applies the container file to the deployment of the cloud-native application of the demand information, thereby effectively improving the efficiency of deploying the container file.

[0162] This application uses the microservices to be deployed and the dependencies to be deployed in the demand information in the project library, matches the similarities multiple times to find the project that is closest to the demand information and the user's needs, and applies the container file of the project to the deployment of the cloud-native application of the demand information, thereby improving the efficiency of local deployment of container files and having broad application prospects.

[0163] The above describes various methods of the embodiments of the present application. The following further provides apparatuses for implementing the above methods.

[0164] Reference Figure 4 As shown, an embodiment of the present application provides a cloud native application deployment device, including:

[0165] Receiving module 41, used to receive demand information sent by user equipment;

[0166] A first processing module 42 is configured to retrieve a first category of projects from a preset cloud project library based on the demand information; the first category of projects includes at least one microservice to be deployed and at least one resource-dependent project to be deployed;

[0167] The second processing module 43 is configured to calculate the similarity between each project in the first category and the demand information, and select projects whose similarity reaches a threshold as second category projects;

[0168] A first determining module 44 is configured to determine a matching score between each of the second-category items and the demand information based on the second-category items;

[0169] The third processing module 45 is configured to create a container file corresponding to the requirement information according to the second-category project with the highest matching score among the matching scores, and deploy the container file on the corresponding cloud native application.

[0170] Optionally, the receiving module 41 includes:

[0171] The first receiving unit is used to receive at least one demand information among text, voice, and gesture instructions input by the user to the user device; the demand information includes the functional semantic label, dependent resource type and interface protocol specification of the microservice to be deployed; the microservice is used to represent the service that realizes the target business function; the dependent resource is used to represent the external resource that the microservice depends on at runtime.

[0172] Optionally, the first processing module 42 includes:

[0173] An extraction unit, configured to parse the demand information and extract microservice feature words;

[0174] A first processing unit is configured to, if the feature word includes a keyword feature, use a microservice including the keyword feature as a target microservice;

[0175] a second processing unit configured to, if the feature word does not include a keyword feature, identify, based on a microservice identification model, a duration of the English name of the microservice corresponding to the keyword feature representing the microservice, and determine a degree of the feature representing the microservice according to the duration;

[0176] A third processing unit is configured to, when the characteristic degree is greater than or equal to a preset threshold, determine that the microservice corresponding to the characteristic degree is the target microservice; when the characteristic degree is less than the preset threshold, query the historical demand log according to the user account of the user, extract the target keyword according to the historical demand log, calculate the semantic similarity between the demand word in the demand information and the target keyword through a preset semantic vector model, select similar words that meet the preset conditions as proxy feature words, map the proxy feature words to the English name of the microservice, and re-execute the step of determining the characteristic degree characterizing the microservice according to the duration;

[0177] The first determining unit is configured to determine the first type of project according to the target microservice.

[0178] Optionally, the first determining unit is specifically configured to:

[0179] Cluster the target microservices by business type and count the total number of microservices in each category;

[0180] Dynamically divide the processing nodes, each node processes the same category of projects, and each node performs the microservice name matching step in parallel, searching the cloud project library for a target project that has at least one common microservice with the microservice to be deployed;

[0181] Determine whether the target project has at least one dependent resource to be deployed;

[0182] If there is at least one dependent resource to be deployed, the target project is determined to be a first-category project.

[0183] Optionally, the second processing module 43 includes:

[0184] A second determining unit is configured to determine all microservices to be deployed in the first type of project based on code keywords of the container file in the first type of project or by retrieving a basic configuration file of the first type of project;

[0185] A first acquiring unit is configured to acquire a first quantity of microservices corresponding to the demand information based on all the microservices to be deployed;

[0186] a generating unit, configured to generate a two-dimensional coordinate according to the first number and the second number of all microservices to be deployed, wherein the abscissa of the two-dimensional coordinate is the first number, and the ordinate of the two-dimensional coordinate is the second number;

[0187] A calculation unit, configured to calculate the microservice similarity between the microservices in the first category of projects and the microservices in the demand information according to the two-dimensional coordinates and the preset standard coordinates;

[0188] a fourth processing unit, configured to determine the number of resource-dependent projects to be deployed in each of the first-category projects, and calculate dependency similarity;

[0189] a fifth processing unit, configured to calculate a score for each of the first-category projects based on the microservice similarity and the dependency similarity and their corresponding weights, and express the score of the first-category project as a similarity between each project in the first category and the demand information;

[0190] The sixth processing unit is configured to select, based on the plurality of similarities, projects whose similarities reach a threshold as second-category projects.

[0191] Optionally, the first determining module 44 includes:

[0192] a seventh processing unit, configured to determine, based on the second-category projects, the number of citations of the second-category projects, and to count the time required for the number of citations;

[0193] a third determining unit, configured to determine a first weight corresponding to the number of citations according to the number of citations and the time required for the citations;

[0194] a second obtaining unit, configured to obtain scores of the first category items in the second category items and second weights corresponding to the scores;

[0195] An eighth processing unit is configured to determine a matching score between each second-category project and the demand information based on the number of citations, the first weight, the score of the first-category project in the second-category project, and the second weight.

[0196] Optionally, the cloud-native application deployment device further includes:

[0197] a fourth processing module, configured to calculate a similarity between each project in the first category and the requirement information; if any of the first category projects does not meet the similarity threshold, extracting microservices and corresponding dependencies from the container file of each first category project and generating a dependency table;

[0198] A judgment module is configured to judge whether there is a third-category project in the first-category project that includes multiple microservices to be deployed; the third-category project is used to indicate a project in the first-category project where the number of microservices used is completely consistent with the number of microservices corresponding to the requirement information;

[0199] a fifth processing module configured to create a container file for the requirement information based on the third-category project and a target container file if the third-category project exists; the target container file being a container file corresponding to the dependency requirement between the microservice and the dependency item in the dependency table.

[0200] It should be noted that the device in this embodiment is a device corresponding to the method applied to the cloud native application deployment device described above, and the implementation methods in the above embodiments are all applicable to the embodiments of this device and can achieve the same technical effects. The above-mentioned device provided in the embodiment of this application can implement all the method steps implemented in the above-mentioned method embodiment and can achieve the same technical effects. The parts and beneficial effects that are the same as those in the method embodiment in this embodiment will not be specifically described here.

[0201] The present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, each process of the above-mentioned cloud native application deployment method embodiment is implemented, and the same technical effect is achieved. To avoid repetition, the details are not described here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0202] An embodiment of the present application also provides a computer program product, including computer instructions. When the computer instructions are executed by a processor, the various processes of the above-mentioned cloud-native application deployment method embodiment are implemented, and the same technical effects can be achieved. To avoid repetition, they will not be repeated here.

[0203] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.

[0204] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), including a number of instructions for enabling a terminal (which can be a mobile phone, computer, server, air conditioner, or network equipment, etc.) to execute the methods described in each embodiment of the present application.

[0205] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of this application, ordinary technicians in this field can also make many forms without departing from the purpose of this application and the scope of protection of the claims, all of which are within the protection of this application.

Claims

1. A cloud native application deployment method, characterized in that: include: Receiving demand information sent by user equipment; Retrieving a first category of projects from a preset cloud project library based on the demand information; the first category of projects includes at least one microservice to be deployed and at least one resource-dependent project to be deployed; Calculate the similarity between each project in the first category and the demand information, and select projects whose similarity reaches a threshold as second category projects; Based on the second-category items, determining a matching score between each of the second-category items and the demand information; According to the second-category project with the highest matching score among the matching scores, a container file corresponding to the requirement information is created, and the container file is deployed on the corresponding cloud native application.

2. The method according to claim 1, characterized in that Receive demand information sent by user equipment, including: Receive at least one demand information among text, voice, and gesture instructions input by the user to the user device; the demand information includes the functional semantic label, dependent resource type, and interface protocol specification of the microservice to be deployed; the microservice is used to represent the service that implements the target business function; the dependent resource is used to represent the external resource that the microservice depends on at runtime.

3. The method according to claim 1, characterized in that Retrieving a first category of projects from a preset cloud project library based on the demand information includes: Analyze the demand information and extract microservice feature words; If the feature word contains a keyword feature, the microservice containing the keyword feature is used as the target microservice; If the feature word does not include the keyword feature, the duration of the English name of the microservice corresponding to the keyword feature representing the microservice is identified based on the microservice identification model, and the degree of the feature representing the microservice is determined according to the duration; When the characteristic degree is greater than or equal to a preset threshold, the microservice corresponding to the characteristic degree is determined to be the target microservice; when the characteristic degree is less than the preset threshold, the historical demand log is queried according to the user account of the user, the target keyword is extracted according to the historical demand log, and the semantic similarity between the demand word in the demand information and the target keyword is calculated by a preset semantic vector model, and similar words that meet the preset conditions are selected as proxy feature words, and the proxy feature words are mapped to the English name of the microservice, and the step of determining the characteristic degree characterizing the microservice according to the duration is re-executed; The first category of projects is determined based on the target microservice.

4. The method according to claim 3, characterized in that According to the target microservice, the first category of projects is determined, including: Cluster the target microservices by business type and count the total number of microservices in each category; Dynamically divide the processing nodes, each node processes the same category of projects, and each node performs the microservice name matching step in parallel, searching the cloud project library for a target project that has at least one common microservice with the microservice to be deployed; Determine whether the target project has at least one dependent resource to be deployed; If there is at least one dependent resource to be deployed, the target project is determined to be a first-category project.

5. The method according to claim 1, wherein Calculating the similarity between each project in the first category and the demand information, and selecting projects whose similarity reaches a threshold as second category projects, including: Determine all microservices to be deployed in the first type of project based on code keywords of the container file in the first type of project or by retrieving a basic configuration file of the first type of project; Acquire a first quantity of microservices corresponding to the demand information according to all the microservices to be deployed; Generate a two-dimensional coordinate according to the first number and the second number of all microservices to be deployed; the abscissa of the two-dimensional coordinate is the first number; and the ordinate of the two-dimensional coordinate is the second number; Calculate the microservice similarity between the microservice in the first category and the microservice in the demand information based on the two-dimensional coordinates and the preset standard coordinates; Determine the number of resource-dependent projects to be deployed in each of the first-category projects, and calculate dependency similarity; Calculating a score for each of the first-category projects based on the microservice similarity and the dependency similarity and their corresponding weights, and expressing the score of the first-category project as a similarity between each project in the first category and the demand information; According to the plurality of similarities, items whose similarities reach a threshold are selected as second-category items.

6. The method according to claim 5, characterized in that Determining a matching score between each of the second-category items and the demand information based on the second-category items includes: Based on the second-category projects, determining the number of citations of the second-category projects and counting the time required for the number of citations; Determining a first weight corresponding to the number of citations according to the number of citations and the time required for the number of citations; Obtaining scores of the first category items in the second category items and second weights corresponding to the scores; A matching score between each second-category project and the demand information is determined based on the number of citations, the first weight, the score of the first-category project in the second-category project, and the second weight.

7. The method according to claim 1, characterized in that After retrieving the first category of projects from a preset cloud project library based on the demand information, the method further includes: Calculating the similarity between each project in the first category and the requirement information; if any of the first category projects does not meet the similarity threshold, extracting microservices and corresponding dependencies from the container file of each first category project and generating a dependency table; Determine whether there is a third type of project in the first type of project that includes multiple microservices to be deployed; the third type of project is used to represent a project in the first type of project where the number of microservices used is exactly the same as the number of microservices corresponding to the demand information; If the third type of project exists, a container file of the requirement information is created based on the third type of project and the target container file; the target container file is a container file corresponding to the dependency requirement between the microservice and the dependency item in the dependency table.

8. A cloud native application deployment device, characterized in that: include: A receiving module, configured to receive demand information sent by a user device; A first processing module is configured to retrieve a first category of projects from a preset cloud project library based on the demand information; the first category of projects includes at least one microservice to be deployed and at least one resource-dependent project to be deployed; A second processing module is configured to calculate the similarity between each project in the first category and the demand information, and select projects whose similarity reaches a threshold as second category projects; a first determining module, configured to determine a matching score between each of the second-category items and the demand information based on the second-category items; The third processing module is configured to create a container file corresponding to the demand information according to the second-category project with the highest matching score among the matching scores, and deploy the container file on the corresponding cloud native application.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 7.

10. A computer program product, characterized in that The method comprises computer instructions, which, when executed by a processor, implement the steps of the method according to any one of claims 1 to 7.