Method and device for deploying service, and computer storable medium

Through the image recognition model, the standard deployment solution is generated from the service deployment diagram and the deployment code corresponding to the target platform is generated, which solves the difficulty of deployers to obtain parameter values ​​and improves the efficiency of automated deployment and platform security.

CN114003239BActive Publication Date: 2024-12-20CHINA TELECOM CORP LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111273024.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-29
Publication Date
2024-12-20
Estimated Expiration
2041-10-29

AI Technical Summary

Technical Problem

During the automated deployment of services, deployment personnel need to obtain and understand the parameter values ​​of the target platform, resulting in high workload, low efficiency and poor platform security.

Method used

By receiving user deployment requests, the image recognition model is used to generate standard deployment solutions based on computer language from the service deployment diagram, and corresponding deployment codes are generated based on the target platform identification to realize automatic deployment of services, reduce manual intervention, improve automation level and platform security sex.

Benefits of technology

It realizes automatic adaptation of the deployment process, reduces the workload of deployment personnel, improves the degree of automation and efficiency of deployment services, and enhances the security of the target platform.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114003239B_ABST
    Figure CN114003239B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a method and device for deploying services, and a computer storable medium, and relates to the field of computer technology. The method for deploying services includes: receiving a deployment request from a user, the deployment request includes a service deployment diagram for deploying the service and an identifier of a target platform, the service deployment diagram graphically describes information about operations for deploying the service; based on the service deployment diagram, using an image recognition model, generating a standard deployment scheme based on a computer language, the standard deployment scheme includes information about operations for deploying the service; based on the standard deployment scheme, generating a deployment code corresponding to the identifier of the target platform, the deployment code is used to deploy the service on the target platform; executing the deployment code to deploy the service on the target platform.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a method and device for deploying services, and a computer storable medium. Background Art

[0002] Automated deployment services are usually used in scenarios such as application cloud migration, automated integration in DevOps (Development and Operations) processes, and environment construction in software development and evaluation processes.

[0003] In the related art, the deployer stores the deployment script of the service in advance on the target platform. Based on the deployment request initiated by the deployer, the target platform obtains and executes the deployment script to deploy the corresponding service on the target platform. The deployment script is developed by the deployer using the parameter values ​​required to deploy the service. Summary of the invention

[0004] In the related art, the deployer needs to obtain and understand the parameter values ​​required for deploying the service, which results in a large workload for the deployer and a low efficiency of deploying the service. In addition, the parameter value is usually related to the target platform, and the deployer directly obtains the parameter value, which makes the platform security of the target platform poor.

[0005] In response to the above technical problems, the present disclosure proposes a solution that can not only automatically adapt the deployment process to the target platform and reduce the workload of deployment personnel, thereby improving the automation and efficiency of deployment services, but also improve the security of the platform.

[0006] According to a first aspect of the present disclosure, a method for deploying services is provided, which is executed by a device for deploying services, and includes: receiving a deployment request from a user, the deployment request including a service deployment diagram for deploying the service and an identifier of a target platform, the service deployment diagram using a graphical method to describe information about operations for deploying the service; generating a standard deployment scheme based on a computer language using an image recognition model according to the service deployment diagram, the standard deployment scheme including information about operations for deploying the service; generating a deployment code corresponding to the identifier of the target platform according to the standard deployment scheme, the deployment code being used to deploy the service on the target platform; and executing the deployment code to deploy the service on the target platform.

[0007] In some embodiments, generating a standard deployment plan based on a computer language includes: generating a standard deployment plan based on a computer language and its confidence level based on the service deployment diagram using an image recognition model; generating a deployment code corresponding to the identifier of the target platform based on the standard deployment plan includes: sending the standard deployment plan to the user when the confidence level is less than or equal to a confidence threshold; receiving the standard deployment plan adjusted by the user; and generating a deployment code corresponding to the identifier of the target platform based on the adjusted standard deployment plan.

[0008] In some embodiments, generating a deployment code corresponding to the identifier of the target platform includes: when the service deployment diagram does not include a parameter name for deploying the service, obtaining a default parameter name for deploying the service and its parameter value corresponding to the operation from the target platform; when the service deployment diagram also includes a parameter name for deploying the service, obtaining a corresponding parameter value from the target platform according to the parameter name; and generating the deployment code according to the obtained parameter value and information about the operation.

[0009] In some embodiments, the parameter name is one or more, the operation is one or more, the information of each operation includes the operation identifier of the operation, the deployment code includes a deployment code snippet corresponding to each operation, and generating the deployment code according to the obtained parameter value and the operation information includes: for each operation, obtaining a template of the deployment code snippet corresponding to the operation identifier and the identifier of the target platform, the template of the deployment code snippet including at least one of the one or more parameter names; generating the deployment code snippet corresponding to each operation according to the obtained parameter value and the obtained deployment code snippet template; and encapsulating the deployment code snippet of one or more operations to obtain the deployment code.

[0010] In some embodiments, generating a deployment code snippet corresponding to each operation based on the obtained parameter values ​​and the obtained deployment code snippet template includes: for each operation, obtaining the parameter name in the template of the corresponding deployment code snippet; filtering parameter values ​​corresponding to the parameter names in the template of the deployment code snippet from the obtained parameter values; and replacing the corresponding parameter names in the template of the deployment code snippet with the filtered parameter values ​​to obtain the deployment code snippet corresponding to each operation.

[0011] In some embodiments, when there are multiple operations, the operation information also includes the execution order of the multiple operations, encapsulating the deployment code fragments of the one or more operations, and obtaining the deployment code includes: encapsulating the deployment code fragments of the multiple operations according to the execution order to obtain the deployment code.

[0012] In some embodiments, the template for deploying the code snippet is installed in the device in the form of a plug-in.

[0013] In some embodiments, the target platform pre-stores a correspondence between parameter names and parameter values, and obtaining corresponding parameter value information from the target platform includes: obtaining the parameter value corresponding to the parameter name according to the correspondence.

[0014] In some embodiments, the deployment code is an executable code or a script code. When the deployment code is an executable code, the executable code is directly executed; when the deployment code is a script code, a deployment tool corresponding to the identifier of the target platform is called to execute the script code.

[0015] In some embodiments, the method for deploying a service further includes: storing the corresponding relationship between the identifier of the service deployment diagram, the deployment status, and the deployment result.

[0016] In some embodiments, the method of deploying a service further includes: regularly training the image recognition model.

[0017] According to a second aspect of the present disclosure, a device for deploying services is provided, comprising: a receiving module, configured to receive a deployment request from a user, the deployment request comprising a service deployment diagram for deploying the service and an identifier of a target platform, the service deployment diagram using a graphical method to describe information about operations for deploying the service; a first generating module, configured to generate a standard deployment scheme based on a computer language using an image recognition model according to the service deployment diagram, the standard deployment scheme comprising information about operations for deploying the service; a second generating module, configured to generate a deployment code corresponding to the identifier of the target platform according to the standard deployment scheme, the deployment code being used to deploy the service on the target platform; and an executing module, configured to execute the deployment code to deploy the service in the target platform.

[0018] According to a third aspect of the present disclosure, a device for deploying services is provided, comprising: a memory; and a processor coupled to the memory, wherein the processor is configured to execute the method for deploying services described in any of the above embodiments based on instructions stored in the memory.

[0019] According to a fourth aspect of the present disclosure, a computer storable medium is provided, on which computer program instructions are stored, and when the instructions are executed by a processor, the method for deploying services described in any of the above embodiments is implemented.

[0020] In the above embodiment, not only can the deployment process be automatically adapted to the target platform, reducing the workload of deployment personnel, thereby improving the automation level and deployment efficiency of the deployment service, but also the security of the platform can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The accompanying drawings, which constitute a part of the specification, illustrate embodiments of the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0022] The present disclosure may be more clearly understood from the following detailed description with reference to the accompanying drawings, in which:

[0023] Figure 1 is a flowchart illustrating a method of deploying a service according to some embodiments of the present disclosure;

[0024] Figure 2 is a flowchart illustrating generation of deployment code corresponding to an identification of a target platform according to some embodiments of the present disclosure;

[0025] Figure 3 is a block diagram illustrating an apparatus for deploying services according to some embodiments of the present disclosure;

[0026] Figure 4 is a block diagram showing an apparatus for deploying services according to other embodiments of the present disclosure;

[0027] Figure 5 is a block diagram illustrating a computer system for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION

[0028] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of components and steps, numerical expressions and numerical values ​​set forth in these embodiments do not limit the scope of the present disclosure unless otherwise specifically stated.

[0029] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.

[0030] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present disclosure, its application, or uses.

[0031] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered as part of the specification.

[0032] In all examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not as limiting. Therefore, other examples of the exemplary embodiments may have different values.

[0033] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.

[0034] Figure 1 is a flowchart illustrating a method of deploying a service according to some embodiments of the present disclosure.

[0035] like Figure 1 As shown, the method for deploying services includes steps S1 to S4. The method for deploying services is executed by a device for deploying services.

[0036] In step S1, a deployment request is received from a user. The deployment request includes a service deployment diagram for deploying a service and an identifier of a target platform. The service deployment diagram graphically describes information about operations for deploying a service. In some embodiments, the service deployment diagram may include parameter names for deploying a service, or may not include parameter names for deploying a service. The target platform may pre-store default parameter names and parameter values ​​for deploying a service corresponding to the operation. In this way, the fault tolerance of service deployment may be improved.

[0037] In some embodiments, a scanned copy or photo of a service deployment diagram drawn on paper is submitted to the device for deploying services through an interface. In some embodiments, a service deployment diagram drawn on a whiteboard can also be photographed and uploaded to the device for deploying services. In some embodiments, a service deployment diagram can also be drawn on a tablet device (such as an iPad, an Android tablet, a professional drawing board, etc.), and submitted to the device for deploying services through an APP (which can be a specially developed application), an interface, or a web page.

[0038] In some embodiments, the deployment request may be received through an HTTP (HyperText Transfer Protocol) service interface or a RESTful interface. A RESTful interface is an interface that complies with the REST (Representational State Transfer) principle. For example, the above services include but are not limited to applications and systems. For example, a deployment request from a user may also be received through a web page interface.

[0039] In some embodiments, the parameter name includes a parameter name corresponding to an IP (Internet Protocol) address (e.g., a parameter name hostip representing the host IP address of the target platform), a parameter name corresponding to an account name used to log in to the target platform (e.g., a parameter name nodeA_admin representing the account of node A on the target platform), and a parameter name corresponding to a file transfer address (e.g., a parameter name path representing the file transfer address). In some embodiments, the parameter name may also include a node name, a module name, etc.

[0040] In some embodiments, the operation includes an operation of transferring a file and an operation of executing a specified command. The specified command includes a command related to a precondition or a pre-dependency. Taking the parameter name including a node name and a module name as an example, the operation may also include building a connection relationship, an inclusion relationship, etc. between nodes or modules.

[0041] In step S2, a standard deployment solution based on computer language is generated based on the service deployment diagram using an image recognition model. The standard deployment solution describes information for deploying the service operation based on computer language. In the case where the service deployment diagram includes parameter names, the standard deployment solution also includes parameter names.

[0042] In some embodiments, the standard deployment solution can be expressed in a lightweight data exchange format. The lightweight data exchange format includes the JSON (JavaScript Object Notation) format. The lightweight data exchange format expresses the standard deployment solution, which can provide a structured and easy-to-understand standard deployment solution for the deployment personnel, so that the deployment personnel do not need to learn more development knowledge in depth when reviewing the standard deployment solution, further reducing the workload of the deployment personnel.

[0043] In some embodiments, the image recognition model is mainly composed of an image and text recognition processor, with the core being a recognition model. For example, the image recognition model can be based on a deep learning algorithm, a convolutional neural network model, a Bayesian model, a decision tree model, etc., alone or in combination. The image recognition model can be obtained through training, and the training data includes corpus and data in this field, data edited by experts, historical data of the system, etc. In some embodiments, the image recognition model can also be trained regularly. In the process of deploying the service, the model is updated regularly through continuous data supplementation to continuously improve accuracy and performance.

[0044] In some embodiments, the structure of a standard deployment solution in JSON format is as follows:

[0045] {

[0046] parameter:

[0047] {parameter 1: parameter name 1, parameter 2: parameter name 2}

[0048] operate:

[0049] {Operation 1: Operation name 1, Operation 2: Operation name 2}

[0050] }.

[0051] As shown in the structure of the standard deployment solution shown above, the "Parameter" item defines some parameter name keys "Parameter 1", "Parameter 2". The corresponding parameter names "Parameter Name 1", "Parameter Name 2" are filled after the colon of the key to form a complete key-value pair.

[0052] For example, part of a standard deployment solution in JSON format for a specific scenario is shown below:

[0053]

[0054] As shown above, the "Parameters" item defines some parameter name keys, and the value part after the colon is the corresponding parameter name, forming a complete key-value pair. "IP_ADDR" means the IP address, and the colon is followed by the parameter name corresponding to the IP address. "username" means the admin account name of node A on the target platform, and the colon is followed by the parameter name corresponding to the admin account name of node A on the target platform. "servcie1" means the service type of node A, and the colon is followed by the service name nginx corresponding to the service type. Here, the service name nginx has been determined in the original deployment plan, and the parameter name and parameter value are the same.

[0055] The "upload" item defines an operation for transferring files, which specifically transfers files to a specific type of node on the target platform. "upload" is the name of the operation. The meaning of "nodetype" is the node type of the target platform receiving the transferred files, and the colon is followed by the node type (master is the master node) of the target platform receiving the transferred files. The meaning of "files" is the name of the file transferred to the target platform, and the colon is followed by the name of the file transferred to the target platform. The files transferred to the target platform can be pre-stored in the local memory of the device deploying the service, and obtained from the local memory of the device deploying the service according to the name of the file. In the above embodiment, the file upload operation indicates that the file name of the file transmitted to the master node is images.tar.gz.

[0056] The "command" item defines a series of operation instructions to be executed in the order of numbers 0, 1, and 2. For example, start, connect, cmd, etc. can be operations provided by the platform, or they can be a series of operations encapsulated into high-level instructions.

[0057] In some embodiments, based on the service deployment diagram, using the image recognition model, not only a standard deployment solution based on computer language can be generated, but also a confidence level corresponding to the standard deployment solution can be generated. For example, the confidence level is a score for the accuracy of the standard deployment solution.

[0058] In step S3, according to the standard deployment scheme, a deployment code corresponding to the identifier of the target platform is generated. The deployment code is used to deploy services on the target platform. In some embodiments, the deployment code can be a binary executable code or a script code. For example, in the case where the target platform is a Kubernetes-based platform, the deployment code corresponding to the target platform can be a script code in a chart format or a script code in a yaml format. For another example, in the case where the target platform is an Openstack-based platform, the deployment code corresponding to the target platform can be a series of shell execution commands or a binary executable code, or a script code in a playbook format.

[0059] In some embodiments, taking a standard deployment solution corresponding to a confidence level as an example, when the confidence level is less than or equal to the confidence level threshold, the standard deployment solution is sent to the user. The user-adjusted standard deployment solution is received. According to the adjusted standard deployment solution, a deployment code corresponding to the identifier of the target platform is generated. In the above embodiment, by sending the standard deployment solution generated by the image recognition model with a confidence level less than or equal to the confidence level threshold to the user for review and adjustment, the accuracy of the standard deployment solution can be guaranteed while improving the degree of automation, thereby ensuring the accuracy of the deployment service.

[0060] For example, by Figure 2 The above step S3 is implemented in the manner shown.

[0061] Figure 2 is a flowchart illustrating generating a deployment code corresponding to an identification of a target platform according to some embodiments of the present disclosure.

[0062] like Figure 2 As shown, generating the deployment code corresponding to the identifier of the target platform includes steps S31 and S32.

[0063] In step S31, corresponding parameter values ​​are obtained from the target platform.

[0064] Taking the case where the service deployment diagram does not include parameter names for deploying services as an example, the default parameter names for deploying services and their parameter values ​​corresponding to the operations are obtained from the target platform.

[0065] Taking the example that the service deployment diagram also includes parameter names for deploying services, the corresponding parameter values ​​are obtained from the target platform according to the parameter names. For example, the device for deploying services obtains the access address (port address, interface address or Internet protocol address, etc.) of the target platform according to the identifier of the target platform. The device for deploying services sends a parameter value request to the target platform, and the parameter value request includes the parameter name. Thus, the device for deploying services receives parameter value response information from the target platform. The parameter value response information is the response information generated by the target platform according to the parameter value request, including the parameter value corresponding to the parameter name.

[0066] In some embodiments, the target platform pre-stores a correspondence between parameter names and parameter values, and the parameter value corresponding to the parameter name can be obtained according to the correspondence.

[0067] In the above embodiment, the device for deploying the service obtains the parameter value from the target platform according to the parameter name, without exposing the parameter value information to the deployer, thereby improving the security of the platform.

[0068] In some embodiments, the service deployment graph may also include parameter values ​​for deploying services that are not related to the security of the target platform. Step S3 may also include obtaining corresponding parameter values ​​from the service deployment graph.

[0069] In step S32, a deployment code is generated according to the acquired parameter values ​​and operation information.

[0070] In some embodiments, the parameter name is one or more. The operation is one or more. The information of each operation includes the operation identifier of the operation. For example, the operation identifier is the operation name. The deployment code includes a deployment code snippet corresponding to each operation.

[0071] For example, the above step S32 may be implemented in the following manner.

[0072] First, for each operation, a template of a deployment code snippet corresponding to the operation identifier and the identifier of the target platform is obtained. The template of the deployment code snippet includes at least one of the one or more parameter names. In some embodiments, the template of the deployment code snippet can be installed in the device for deploying the service in the form of a plug-in. In this way, the scalability of the device for deploying the service can be improved.

[0073] Then, a deployment code snippet corresponding to each operation is generated according to the obtained parameter value and the obtained deployment code snippet template.

[0074] In some embodiments, for each operation, a parameter name in a template of a corresponding deployment code snippet is obtained. From the obtained parameter values, a parameter value corresponding to the parameter name in the template of the deployment code snippet is filtered. The filtered parameter value is used to replace the corresponding parameter name in the template of the deployment code snippet to obtain a deployment code snippet corresponding to each operation.

[0075] Finally, the deployment code snippets of one or more operations are encapsulated to obtain the deployment code. For example, in the case where there are multiple operations, the operation information also includes the execution order of the multiple operations. The deployment code snippets of the multiple operations can be encapsulated according to the execution order to obtain the deployment code.

[0076] return Figure 1 , in step S4, the deployment code is executed to deploy the service in the target platform. When the deployment code is an executable code, the executable code is executed directly. When the deployment code is a script code, the deployment tool corresponding to the identifier of the target platform is called to execute the script code. For example, when the target platform is a Kubernetes-based platform, the deployment tools corresponding to the target platform include Helm, Kubectl, etc. The deployment tool Helm is used to execute script code in chart format. The deployment tool Kubectl is used to execute script code in yaml format. For another example, when the target platform is an Openstack-based platform, the deployment tools corresponding to the target platform include Ansible, etc. The deployment tool Ansible is used to execute script code in playbook format.

[0077] In the above embodiment, the user only needs to provide a service deployment diagram, only needs to understand the parameter name and the information of the operation including the parameter name, and understand how to draw the service deployment diagram to complete the service deployment, without having to learn more development knowledge, thereby improving the efficiency of docking the application to the cloud. In addition, the device for deploying the service automatically generates a deployment code corresponding to the target platform, and automatically calls the deployment tool corresponding to the target platform to execute the generated deployment code. These steps enable the deployment process to automatically adapt to the target platform, reduce the workload of the deployment personnel, and thus improve the degree of automation and deployment efficiency of the deployment service. In addition, during the process of deploying the service, there is no need to expose the parameter value information related to the target platform to the deployment personnel, which can improve the security of the platform.

[0078] Drawing a service deployment diagram is intuitive and easy to understand, convenient, fast, efficient, and in line with people's expectations. The solution expression is more accurate, there is no requirement for the user's coding ability, and the deployment cost is reduced. Image recognition can adapt to the diversity of descriptions, thereby enhancing the adaptability of deployment services. Image recognition has a certain fault tolerance, which can improve the fault tolerance of deployment services. Service deployment based on service deployment diagrams greatly reduces the requirements for deployment personnel. The device for deploying services automatically parses the standard deployment plan, automatically matches the correct operation method, and executes the correct instructions, which improves the degree of automation of service deployment. The device for deploying services encapsulates the functional details of the target platform, improves docking efficiency, and at the same time improves the security of the target platform. Functional extensions are provided through plug-ins, which are suitable for different characteristics and requirements of different target platforms and are easy to expand.

[0079] In some embodiments, the device for deploying the service may be independent of the target platform. That is, the device for deploying the service may deploy the service to different target platforms, which may improve the versatility of the deployed service. In other embodiments, the device for deploying the service is located in the target platform. This may reduce the exposure of the target platform and further improve the security of the platform.

[0080] For example, the device for deploying the service may also store the scheme identifier of the original deployment scheme, the corresponding relationship between the deployment state and the deployment result. In this way, the deployment of the service can be easily monitored.

[0081] Figure 3 is a block diagram illustrating an apparatus for deploying services according to some embodiments of the present disclosure.

[0082] like Figure 3 As shown, the device 3 for deploying services includes a receiving module 31 , a first generating module 32 , a second generating module 33 and an executing module 34 .

[0083] The receiving module 31 is configured to receive a deployment request from a user, for example, Figure 1 Step S1 shown in FIG. 1 : The deployment request includes a service deployment diagram for deploying the service and an identifier of a target platform. The service deployment diagram describes information of operations for deploying the service in a graphical manner.

[0084] The first generation module 32 is configured to generate a standard deployment solution based on a computer language using an image recognition model according to the service deployment diagram, for example, Figure 1 As shown in step S2, the standard deployment solution includes information for deploying the service operation.

[0085] The second generation module 33 is configured to generate a deployment code corresponding to the identifier of the target platform according to the standard deployment scheme, for example, to execute Figure 1Step S3 shown. The deployment code is used to deploy the service on the target platform.

[0086] The execution module 34 is configured to execute the deployment code to deploy the service in the target platform, for example, Figure 1 Step S4 is shown.

[0087] Figure 4 is a block diagram illustrating an apparatus for deploying services according to some other embodiments of the present disclosure.

[0088] like Figure 4 As shown, the device 4 for deploying services includes a memory 41; and a processor 42 coupled to the memory 41. The memory 41 is used to store instructions for executing the method for deploying services corresponding to the embodiment. The processor 42 is configured to execute the method for deploying services in any of the embodiments of the present disclosure based on the instructions stored in the memory 41.

[0089] Figure 5 is a block diagram illustrating a computer system for implementing some embodiments of the present disclosure.

[0090] like Figure 5 As shown, the computer system 50 may be embodied in the form of a general purpose computing device. The computer system 50 includes a memory 510, a processor 520, and a bus 500 that connects the various system components.

[0091] The memory 510 may include, for example, a system memory, a non-volatile storage medium, etc. The system memory may store, for example, an operating system, an application program, a boot loader, and other programs. The system memory may include a volatile storage medium, such as a random access memory (RAM) and / or a cache memory. The non-volatile storage medium may store, for example, instructions for executing at least one of the corresponding embodiments of the method for deploying a service. The non-volatile storage medium may include, but is not limited to, a disk storage, an optical storage, a flash memory, etc.

[0092] The processor 520 can be implemented by a general processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistors, etc. Discrete hardware components. Accordingly, each module such as the judgment module and the determination module can be implemented by a central processing unit (CPU) running instructions in a memory that execute corresponding steps, or can be implemented by a dedicated circuit that executes corresponding steps.

[0093] The bus 500 may use any of a variety of bus architectures, including, but not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MCA) bus, and a Peripheral Component Interconnect (PCI) bus.

[0094] The computer system 50 may also include an input / output interface 530, a network interface 540, a storage interface 550, etc. These interfaces 530, 540, 550, the memory 510, and the processor 520 may be connected via a bus 500. The input / output interface 530 may provide a connection interface for input / output devices such as a display, a mouse, and a keyboard. The network interface 540 may provide a connection interface for various networked devices. The storage interface 550 may provide a connection interface for external storage devices such as a floppy disk, a USB flash drive, and an SD card.

[0095] Here, various aspects of the present disclosure are described with reference to flowcharts and / or block diagrams of methods, devices, and computer program products according to embodiments of the present disclosure. It should be understood that each frame of the flowchart and / or block diagram and the combination of frames can be implemented by computer-readable program instructions.

[0096] These computer-readable program instructions may be provided to a processor of a general-purpose computer, a special-purpose computer or other programmable device to produce a machine, so that the processor executes the instructions to produce means for implementing the functions specified in one or more blocks in the flowchart and / or block diagram.

[0097] These computer-readable program instructions may also be stored in a computer-readable memory, which cause the computer to work in a specific manner to produce an article of manufacture, including instructions for implementing the functions specified in one or more blocks in the flowchart and / or block diagram.

[0098] The present disclosure can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects.

[0099] Through the method and device for deploying services and the computer-storable medium in the above embodiments, not only can the deployment process be automatically adapted to the target platform, reducing the workload of deployment personnel, thereby improving the automation and efficiency of deployment services, but also the security of the platform can be improved.

[0100] So far, the method and device for deploying services according to the present disclosure, and the computer storable medium have been described in detail. In order to avoid obscuring the concept of the present disclosure, some details known in the art are not described. Based on the above description, those skilled in the art can fully understand how to implement the technical solution disclosed here.

Claims

1. A method for deploying a service, performed by a device for deploying a service, comprising: receiving a deployment request from a user, the deployment request including a service deployment diagram for deploying the service and an identifier of a target platform, the service deployment diagram describing information of operations for deploying the service in a graphical manner; According to the service deployment diagram, using an image recognition model, generating a standard deployment solution based on a computer language and its confidence, wherein the standard deployment solution includes information on operations for deploying the service; Generating a deployment code corresponding to the identifier of the target platform according to the standard deployment plan, including: sending the standard deployment plan to the user when the confidence level is less than or equal to a confidence level threshold, receiving the standard deployment plan adjusted by the user, and generating a deployment code corresponding to the identifier of the target platform according to the adjusted standard deployment plan, wherein the deployment code is used to deploy the service on the target platform; The deployment code is executed to deploy the service in the target platform.

2. The method for deploying services according to claim 1, wherein: Generating a deployment code corresponding to the identifier of the target platform includes: In a case where the service deployment diagram does not include a parameter name for deploying the service, acquiring, from the target platform, a default parameter name for deploying the service and a parameter value thereof corresponding to the operation; In a case where the service deployment diagram further includes parameter names for deploying the service, obtaining corresponding parameter values ​​from the target platform according to the parameter names; The deployment code is generated according to the acquired parameter values ​​and the operation information.

3. The method for deploying services according to claim 2, wherein: The parameter name is one or more, the operation is one or more, the information of each operation includes the operation identifier of the operation, the deployment code includes a deployment code snippet corresponding to each operation, and generating the deployment code according to the acquired parameter value and the operation information includes: For each operation, obtaining a template of a deployment code snippet corresponding to the operation identifier and the identifier of the target platform, wherein the template of the deployment code snippet includes at least one of the one or more parameter names; Generate a deployment code snippet corresponding to each operation according to the obtained parameter value and the obtained deployment code snippet template; Encapsulate a deployment code snippet of one or more operations to obtain the deployment code.

4. The method for deploying services according to claim 3, wherein: Generating a deployment code snippet corresponding to each operation according to the acquired parameter value and the acquired deployment code snippet template includes: For each operation, obtain the parameter name in the template of the corresponding deployment code snippet; From the obtained parameter values, filter the parameter values ​​corresponding to the parameter names in the template of the deployment code snippet; The filtered parameter values ​​are used to replace corresponding parameter names in the template of the deployment code snippet to obtain a deployment code snippet corresponding to each operation.

5. The method for deploying services according to claim 3, wherein: In the case where there are multiple operations, the operation information also includes the execution order of the multiple operations, and the deployment code fragments encapsulating the one or more operations are obtained to include: According to the execution order, the deployment code fragments of the multiple operations are encapsulated to obtain the deployment code.

6. The method for deploying services according to claim 3, wherein: The template for deploying the code snippet is installed in the device in the form of a plug-in.

7. The method for deploying services according to claim 2, wherein: The target platform pre-stores a correspondence between parameter names and parameter values, and obtaining corresponding parameter value information from the target platform includes: According to the corresponding relationship, the parameter value corresponding to the parameter name is obtained.

8. The method for deploying services according to claim 1, wherein: The deployment code is an executable code or a script code. When the deployment code is an executable code, directly executing the executable code; In the case where the deployment code is a script code, a deployment tool corresponding to the identifier of the target platform is called to execute the script code.

9. The method for deploying services according to claim 1, further comprising: The corresponding relationship between the identifier of the service deployment diagram, the deployment state and the deployment result is stored.

10. The method for deploying services according to claim 1, further comprising: The image recognition model is trained periodically.

11. A device for deploying a service, comprising: A receiving module is configured to receive a deployment request from a user, wherein the deployment request includes a service deployment diagram for deploying the service and an identifier of a target platform, wherein the service deployment diagram graphically describes information of reference operations for deploying the service; A first generating module is configured to generate a computer language-based standard deployment scheme and its confidence level using an image recognition model according to the service deployment diagram, wherein the standard deployment scheme includes information on operations for deploying the service; The second generating module is configured to generate a deployment code corresponding to the identifier of the target platform according to the standard deployment scheme, including: when the confidence level is less than or equal to a confidence threshold, sending the standard deployment scheme to the user, receiving the standard deployment scheme adjusted by the user, and generating a deployment code corresponding to the identifier of the target platform according to the adjusted standard deployment scheme, wherein the deployment code is used to deploy the service on the target platform; The execution module is configured to execute the deployment code to deploy the service in the target platform.

12. A device for deploying a service, comprising: Memory; as well as A processor coupled to the memory, wherein the processor is configured to execute the method for deploying services according to any one of claims 1 to 10 based on instructions stored in the memory.

13. A computer storable medium having computer program instructions stored thereon, which, when executed by a processor, implement the method for deploying services as claimed in any one of claims 1 to 10.

Citation Information

Patent Citations

  • Application publishing system and method applied to heterogeneous multi-cloud environment

    CN111580832A