Software deployment method, device and equipment and computer readable storage medium

By dividing the software into multiple candidate functional modules and determining the required resources based on the selected functions and dependent components, the problem of inflexible resource allocation in the prior art is solved, and more efficient resource utilization is achieved.

CN119829275APending Publication Date: 2025-04-15HANGZHOU DT DREAM TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411845985.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

During software deployment, the resource application information is relatively rigid, resulting in resource allocation inflexible and waste of resources.

Method used

By dividing the software into multiple candidate functional modules, the functions to be deployed are selected according to the selection instructions during deployment, and the required resources are determined based on the components on which the function depends, to achieve more flexible resource configuration.

Benefits of technology

Reduces the resources required to deploy software, avoids resource waste, improves resource utilization, and is suitable for a wider range of application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119829275A_ABST
    Figure CN119829275A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of communication, in particular to a software deployment method and device, equipment and a computer readable storage medium. The method comprises the following steps: selecting a to-be-deployed first function from candidate functions of software according to a received selection instruction; determining a first component on which the first function depends; and determining resources required to be used for deploying the software on a server according to the resources required by the first component. Based on the embodiment of the invention, the software is divided into the plurality of candidate function modules, when the software is deployed, the first function which needs to be deployed and used can be determined and selected, and other functions which do not need to be used in the software are not deployed, so that resources required for deploying the software are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of software deployment, and in particular to a software deployment method, apparatus, device, and computer-readable storage medium. Background Art

[0002] With the rapid development of cloud computing technology, container technology has also made great progress.

[0003] Kubernetes (container orchestration system, abbreviated as k8s) is a distributed architecture based on container technology. K8s can provide a series of complete functions for deployment and operation, resource scheduling, service discovery and resource scaling for applications in containers, improving the portability and availability of large-scale container cluster management. Container technology can be, for example, Docker container technology.

[0004] In the related art, a resource application information can be configured for the software to be deployed on the server, and the resource application information records the host resources or cloud resources required by the software. However, the resource application information configured in the related art is relatively rigid, and the recorded software's demand for resources is the overall demand of the software, which is fixed, but in the actual operation process, all the configured resources may not be needed. The resource configuration is not flexible enough, resulting in resource waste. Summary of the invention

[0005] In order to overcome the problems existing in the related art, the present disclosure provides a software deployment method, apparatus, device and computer-readable storage medium, which can solve the above problems.

[0006] According to a first aspect of an embodiment of the present disclosure, a software deployment method is provided, the method comprising: selecting a first function to be deployed from candidate functions of the software according to a received selection instruction; determining a first component on which the first function depends; and determining resources required to deploy the software on a server according to resources required by the first component.

[0007] According to a second aspect of an embodiment of the present disclosure, a software deployment device is provided, comprising: a selection unit, configured to select a first function to be deployed from candidate functions of the software according to a received selection instruction; a processing unit, configured to determine a first component on which the first function depends; and determine resources required to deploy the software on a server according to resources required by the first component.

[0008] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, comprising: a processor and a memory; the memory is used to store a computer program; the processor is used to execute the software deployment method as described in the first aspect by calling the computer program.

[0009] According to a fourth aspect of an embodiment of the present disclosure, there is provided a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the software deployment method as described in the first aspect is implemented.

[0010] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:

[0011] In an embodiment of the present disclosure, the software is divided into multiple candidate functions. When the software needs to be deployed on a server, the first function to be deployed can be selected from the multiple candidate functions according to the received selection instruction, and the first component on which the first function depends can be determined according to the first function, and then the resources required for software deployment can be determined according to the resources required by the first component. Based on the embodiment of the present disclosure, the software is divided into multiple candidate function modules. When deploying the software, the first function that needs to be deployed and used can be determined and selected, while other functions in the software that do not need to be used are not deployed, thereby reducing the resources required for deploying the software, and after determining the first function, the embodiment of the present disclosure determines the resources required for the software based on the resources required by the first component on which the first function depends, and the configuration is more flexible, which can effectively avoid waste of resources and has a wider range of application scenarios.

[0012] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] The accompanying drawings, which are incorporated in and constitute a part of this disclosure, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0014] Figure 1 It is a schematic flow chart of a software deployment method according to an exemplary embodiment of the present disclosure.

[0015] Figure 2 It is a structural diagram of a dependency relationship shown in the present disclosure according to an exemplary embodiment.

[0016] Figure 3 It is a structural diagram of a dependency relationship shown in the present disclosure according to an exemplary embodiment.

[0017] Figure 4 It is a block diagram of a software deployment device according to an exemplary embodiment of the present disclosure.

[0018] Figure 5 It is a schematic block diagram of a software deployment device according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION

[0019] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0020] The terms used in this disclosure are for the purpose of describing specific embodiments only and are not intended to limit the disclosure. The singular forms of "a", "said" and "the" used in this disclosure and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0021] It should be understood that although the terms first, second, third, etc. may be used in the present disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present disclosure, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0022] K8s is an open source Linux container automated operation and maintenance platform that supports the rapid deployment of containerized application software. Docker is a container technology that can package software and software-related dependencies into a Docker container to shield environmental differences.

[0023] The software consists of multiple components, each of which can implement a small independent function. Multiple components can work together to implement a large software function, which is the business function (also known as a candidate function) provided by the software to users and can be understood by users. Within the component, it can also be divided into multiple microservices, which can run independently, reduce the coupling of the system, and provide flexible scalability.

[0024] Some software is not suitable for deployment on the public cloud. You can choose to deploy it in a private cloud or a local host cluster. However, the host specifications in the host cluster and the private cloud may be different, which makes it difficult to efficiently utilize resources when deploying software.

[0025] In the related art, a resource application information can be configured for the software, and when the software is deployed, the software is deployed according to the resource requirements recorded in the resource application information. The resource application information can be an orchestration file formed by using k8s orchestration or a more advanced orchestration method. However, the resource application information is relatively rigid, and the recorded resource requirements are fixed, including all the resources required for the entire software. However, in the actual operation process, all the resources occupied by the software deployment may not be used, resulting in a waste of resources. This method of deploying software is not flexible enough.

[0026] In order to solve the above technical problems, the present disclosure proposes a software deployment method.

[0027] Figure 1 The present invention is a schematic flow chart of a software deployment method according to an embodiment of the present invention, and the software deployment method can be executed by an electronic device. The electronic device includes but is not limited to a mobile phone, a tablet computer, a wearable device, a sensor, an Internet of Things device and other communication devices.

[0028] In some embodiments, the electronic device includes a server.

[0029] For example, the server may include a cloud server or a host cluster. Any host in the host cluster may execute the software deployment method proposed in the present disclosure.

[0030] like Figure 1 As shown, the software deployment methods include:

[0031] In step S101, according to the received selection instruction, a first function to be deployed is selected from candidate functions of the software;

[0032] In step S102, a first component on which the first function depends is determined;

[0033] In step S103, the resources required for deploying the software on the server are determined according to the resources required by the first component.

[0034] In some embodiments, the software needs to be deployed on a server, or a virtual machine, or a host cluster.

[0035] The monitoring and operation software can be deployed on the server, virtual machine or host cluster that needs to be deployed, and then the software that needs to be deployed can be deployed through the monitoring and operation software. The monitoring and operation software can include, but is not limited to, at least one of the following: k8s, docker swarm, rancher and openshift.

[0036] When the supervisory operation and maintenance software deploys the software, the software can be packaged into an image file first, and then the image file can be decompressed into a specified folder using a container, and the specified startup configuration file can be placed. The container can include but is not limited to at least one of the following: docker, containerd podman, and cri-o.

[0037] In some embodiments, the software may be packaged in a development environment.

[0038] A software contains multiple components, each of which can be packaged into an orchestration file and / or an image file. In software, a component is the smallest deployment control unit. A component can contain multiple microservices and multiple middleware instances. Microservices and middleware instances are the smallest startup units.

[0039] Software can implement multiple business functions, and each business function can be implemented based on at least one component in the software. Therefore, a business function needs to depend on at least one component.

[0040] In some embodiments, according to the received selection instruction, a first function to be deployed is selected from candidate functions of the software.

[0041] For example, before deploying the software to the target production environment (server), an initial program (such as installShell) may be installed first, and after running the initial program, a boot page may be opened.

[0042] Users can upload the software's arrangement compressed package and image compressed package through the guide page. According to the prompt information given, select the first function to be deployed from all the candidate functions listed, and remove the functions that are not needed temporarily, so as to save deployment resources.

[0043] In some embodiments, a first component on which the first function depends is determined.

[0044] As mentioned above, each business function of the software is implemented by relying on at least one component. Therefore, after selecting the first function to be deployed from the candidate functions, it is necessary to determine the first component on which the first function depends. In the actual deployment process of the software, the resources required are also the resources required by the first component. The remaining components in the software that are not relied on by the first function can be left undeployed, thereby achieving flexible deployment. The resources required for deployment are also the resources that the software will occupy in actual operation, and do not include resources wasted due to non-use of software functions, thus saving resources corresponding to components that have not been deployed.

[0045] In some embodiments, the resources required to deploy the software on the server are determined based on the resources required by the first component.

[0046] After the first component is determined, resources required by the first component may be determined, and resources required for software deployment may be determined based on the resources required by the first component.

[0047] For example, the sum of the resources required by the first component can be used as the resources required for software deployment. This embodiment is conducive to saving resources required by the software.

[0048] For another example, a certain offset can be added to the resources required by the first component and then used as the resources required for software deployment, or the resources required by the first component can be reduced or enlarged at a certain ratio. Although adding a certain offset or scaling at a certain ratio may lead to the waste of some resources, it leaves a certain surplus for deployment resources, which is conducive to improving the overall robustness of the system.

[0049] When deploying software on a server based on an embodiment of the present disclosure, a first function to be deployed can be selected from multiple candidate functions of the software, and a first component on which the first function depends can be determined. The resources required for software deployment can be determined based on the resources required by the first component. When deploying the software, only the first component is deployed, and components corresponding to other unselected functions are not deployed, or other components in the software that are not depended on by the first function are not deployed, thereby saving deployment resources and improving resource utilization. In addition, users can flexibly perform deployment based on the selection instructions issued.

[0050] In some embodiments, the software to be deployed may be at least one software.

[0051] Users can deploy at least one software on the server at one time. Each software corresponds to at least one component. If the software contains the same component as other software, the same component can be deployed only once, thus avoiding the deployment of duplicate components on the server.

[0052] For example, a user can deploy software A and software B on the server at one time, where software A contains components 1, 2, 3, and 4, and software B contains components 4, 5, and 6. When deploying software A and software B, component 4 can be deployed only once, and software A and software B can share component 4.

[0053] In some embodiments, the first component on which the first function depends includes a component in other software.

[0054] Some business functions of the software may depend on components in other software. In this case, when the business function is selected as the first function to be deployed, the components in other software that the first function depends on also constitute the first component.

[0055] If the components in other software have been deployed, there is no need to recalculate the resources required for this component. If the components in other software have not been deployed, the resources required for this component should also be calculated.

[0056] In some embodiments, the method of uploading all arrangement compressed packages and image compressed packages of the software to the boot page can be determined according to requirements.

[0057] For example, the requirement can be based on the server's network environment. For software deployment scenarios in private areas such as government affairs and banks, the server has an internal network and cannot be connected to the external network, so the upload can be completed in the private domain. For software deployment scenarios where the software development environment and the target production environment are network-connected, it is not necessary to upload on the boot page, but to remotely pull all the arrangement compression packages and image compression packages of the software from the specified remote end (i.e., the development environment), or, the image of the software to be deployed can be pushed from the development environment to the target production environment.

[0058] In some embodiments, the software is packaged in a software dimension, and multiple components included in the software can be packaged into an orchestration file and an image file respectively.

[0059] The compressed package of the software contains multiple components, each of which can be packaged into an arrangement file and an image file.

[0060] The orchestration file of each component can be a folder compressed package, which contains multiple orchestration files corresponding to the microservices. Each orchestration file in the compressed package can describe the information of each microservice in the component and the information of the middleware instance. These orchestration files can contain the resources required by each microservice and the middleware instance. As an example, the format of the orchestration file of a microservice can be as follows:

[0061] Microservice A:

[0062] Version address: hub.example.com / xxx / yy:v1.0

[0063] Description: This is a test application

[0064] Resource requirements:

[0065] CPU: 1

[0066] Memory: 2048

[0067] Number of instances: 2

[0068] Default start: No

[0069] Among them, CPU: 1, Memory: 2048, means that 1 core and 2048 MB of host resources are required. This parameter is enabled by default and will be described in detail later.

[0070] In some embodiments, determining the first component on which the first function depends includes: determining the first component on which the first function depends according to a dependency relationship in a description file of the software, wherein the dependency relationship includes a dependency relationship between a function and a component.

[0071] The compressed package corresponding to the software may contain a description file (also called a package description file), which may describe the function information, component information, dependency information, and additional resource information of the software.

[0072] A description file in a compressed package of the software may be obtained, a dependency relationship may be determined based on the description file, and then a first component on which the first function depends may be determined based on the dependency relationship.

[0073] Taking the YAML format as an example, an example of a description file is as follows:

[0074] ApplicationName: Application A

[0075] PackageName: Application A

[0076] Description:xxx

[0077] Functions:

[0078] -EngName:Single_Doc_Chat

[0079] ChName: Single document chat service

[0080] Dependency:

[0081] -Chat-Robot

[0082] -EngName:Multi_Doc_Chat

[0083] ChName: Document library chat service

[0084] Dependency:

[0085] -Chat-Robot

[0086] Chat-DocAnalysis

[0087] Components:

[0088] -EngName:Chat-Robot

[0089] ChName: Chatbot component

[0090] Orchestration:Chat-Robot-orch.gz

[0091] Image:Chat-Robot-image.gz

[0092] Dependency:

[0093] -Name:Intelligent-LLM

[0094] Version:'>=V1.1.8'

[0095] -EngName:Chat-DocAnalysis

[0096] ChName: Document analysis component

[0097] Orchestration:Chat-DocAnalysis-orch.gz

[0098] Image:Chat-DocAnalysis-image.gz

[0099] Dependency:

[0100] -Name:Intelligent-VectorServ

[0101] Version:'>=V1.1.8'

[0102] AdditionalResource:

[0103] ResourceGroup:intelli

[0104] CPUCore:2

[0105] Memory:2048

[0106] GPU: 1

[0107] Instance:d001

[0108] The following is a brief description of the above description file example:

[0109] The name of the software is "Application A", the identifier of the description file is "xxx", the functions included in the software include single document chat service and document library chat service, and the components included in the software include chat robot component and document analysis component.

[0110] The single document chat service needs to rely on the chat robot component, and the document library chat service needs to rely on the chat robot component and the document analysis component. The chat robot component's orchestration file is "Chat-Robot-orch.gz", and the image file is "Chat-Robot-image.gz". The chat robot component relies on the middleware instance "Intelligent-LLM", and the version requirement is greater than or equal to "V1.1.8"; the document analysis component's orchestration file is "Chat-DocAnalysis-orch.gz", and the image file is "Chat-DocAnalysis-image.gz". The middleware instance it needs to rely on is "Intelligent-VectorServ", and the version requirement is greater than or equal to "V1.1.8".

[0111] It should be noted that the description file also records additional resources (AdditionalResource). The additional resources required are 2 CPU cores, 2048M memory, and 1 GPU card. The specific meaning and function of the additional resources will be introduced in detail later.

[0112] In some embodiments, the candidate functions of the software may also be determined through the description file of the software.

[0113] Based on the functional information describing the software recorded in the description file, candidate functions may be determined for the user to select the first function to be deployed.

[0114] For example, taking the above description file example, the candidate functions include a single document chat service and a document library chat service. Based on the selection instruction, the first function to be deployed can be selected from the candidate functions.

[0115] Figure 2 It is a structural diagram showing a dependency relationship according to an embodiment of the present disclosure.

[0116] like Figure 2 As shown, in some embodiments, the dependency relationship also includes a dependency chain between components, wherein the determining the first component (component 1 and component 3) on which the first function (function 1 and function 2) depends also includes: determining other components (component 4, component 5 and component 6) on which the first component (component 1 and component 3) depends according to the dependency chain; wherein, determining the resources required to deploy the software on the server according to the resources required by the first component includes: determining the resources required for the software according to the resources required by the other components and the resources required by the first component.

[0117] like Figure 2As shown, function 1 depends on component 1, and component 1 depends on component 4 and component 5; function 2 depends on component 1 and component 3, where component 1 depends on component 4 and component 5, and component 3 depends on component 5 and component 6.

[0118] Therefore, to implement Function 1 and Function 2, in addition to the first components Component 1 and Component 3, it is also necessary to deploy other components Component 4, Component 5 and Component 6 on which the first component depends.

[0119] In this case, when deploying the first function of the software, in addition to deploying the first component, other components that the first component depends on need to be deployed. For example, when deploying function 1, the first component component 1 needs to be deployed, and other components component 4 and component 5 also need to be deployed. Therefore, the resources used to deploy the software on the server include the resources of component 1, the resources of component 4, and the resources of component 5.

[0120] For example, any Figure 2 For example, the resources required by component 1 should be the resources required by all microservices in component 1, plus the resources required by components 4 and 5, and the resources required by components 4 and 5 are the resources required by the microservices in their respective components.

[0121] The computing resources required by each component can be determined based on the compressed package of the orchestration file of the component.

[0122] It should be noted that Figure 2 For example, it can be found that among components 1-6 provided by the software, function 1 and function 2 do not need to rely on component 2. Therefore, when deploying function 1 and function 2, the resources required by component 2 may not participate in the calculation of software deployment resources.

[0123] In some embodiments, the software deployment method further includes: based on the determined resources required for software deployment on the server, adding the required resources and deploying the software.

[0124] After counting the resources required by the first component and determining the resources required for software deployment, the total amount of resources required can be prompted. For example, the total amount of resources required can be converted into the number of 4-core 8G hosts, or the number of 8-core 16G hosts, thereby guiding the user to add host resources.

[0125] If deployed on the cloud, it can automatically connect to the cloud management interface to apply for or create the required resources.

[0126] After adding resources, you can deploy the software and display the deployment progress and results.

[0127] In some embodiments, the software deployment method further includes: determining resources required by the first component according to an orchestration file of the first component; wherein the orchestration file records the resources required by the first component.

[0128] The number of the first component can be one or more. Each component has an orchestration file compression package, which contains the orchestration file of each microservice corresponding to the component, and records the resources required by the corresponding microservice.

[0129] In some embodiments, the first component includes at least one microservice, and determining the resources required by the first component includes: determining resources of a first microservice recorded in the orchestration file, wherein the first microservice is a microservice that is started by default in the at least one microservice; and ignoring resources of a second microservice recorded in the orchestration file, wherein the second microservice is a microservice that is not started by default in the at least one microservice.

[0130] In the component, the first microservice is set to be started by default, and the second microservice is set to be not started by default.

[0131] The first microservice can be a common service and basic service in the component, while the second microservice can be a service that is not used frequently. The second microservice can be packaged as an advanced service. The second microservice can be a non-core service in the component and is not a necessary service. When the user needs to start a second microservice, the corresponding second microservice is started.

[0132] Not all microservices in the first component need to be deployed. Only the first microservice can be deployed, and the second microservice can be not deployed first because it is used less frequently. Therefore, when determining the resources required by the first component, only the resources corresponding to the first microservice can be determined, while the resources corresponding to the second microservice can be ignored, thereby further saving deployment resources at the granularity of microservices.

[0133] In some embodiments, the software deployment method further includes: receiving an instruction to start the second microservice; and determining and adding resources for the second microservice.

[0134] The second microservice is not started by default, so the deployed software cannot directly start the second microservice. When an instruction to start the second microservice is received, the resources required by the second microservice can be dynamically determined, and the user can be guided or the resources required by the second microservice can be automatically added for the second microservice to start.

[0135] In some embodiments, the software deployment method further includes: determining a second component in the first component, wherein the second component is not configured with an orchestration file; when calling a microservice in the second component, starting the called microservice using resources in a preset resource pool; and when the called microservice ends, stopping the called microservice from occupying the resources in the resource pool.

[0136] It should be noted that the second component can be any component in the first component. The second component is not configured with an orchestration file, only an image file, or the orchestration file configured by the second component does not contain the orchestration file of the microservice, and the resources required by the second component cannot be determined based on the orchestration file.

[0137] In this case, a preset resource pool can be set for the second component and other microservices with unspecified resource requirements through additional resources (AdditionalResource) in the description file in the compressed package of the software, so that the second component and other microservices with unspecified resource requirements can share resources in a resource pool.

[0138] When calling the second component, or calling other microservices without specified resource requirements, the called microservice can be started using the resources in the preset resource pool. After the call ends or the call completes the first duration, the called microservice can be shut down to stop the called microservice from occupying the resources in the resource pool.

[0139] By setting additional resources in the description file, the second component and other microservices with unspecified resource requirements can share resources in the resource pool in turn. In some embodiments, the number of resources in the resource pool is less than the sum of the resources of the second component and other microservices with unspecified resource requirements. Thus, by staggered calling of the resource pool, fewer resources are used to support the second component and other microservices with unspecified resource requirements, saving deployment resources.

[0140] In some embodiments, when the software is deployed, the description file is obtained, and the additional resources in the description file are also determined as resources required for the software deployment. The preset resource pool can be recorded in the additional resources.

[0141] Figure 3 It is a structural diagram showing a dependency relationship according to an embodiment of the present disclosure.

[0142] In some embodiments, when at least two first components depend on the same other components, the software deployment method further includes: determining the resource requirements of each first component for the other components and the instance requirements of each first component for the other components according to the description file; when each first component has the same instance requirements for the other components, selecting the largest resource requirement among the resource requirements as the resources required by the other components; when each first component has different instance requirements for the other components, taking the sum of the resource requirements of each first component for the other components as the resources required by the other components.

[0143] like Figure 3 As shown, both component 1 and component 3 depend on component 5, and component 5 itself may not be configured with an orchestration file. In the description files of the compressed packages where components 1 and 3 are located, the dependency relationship between components 1 and 3 on component 5 may be described respectively, and the resources required for the dependency of components 1 and 3 on component 5 may be recorded in the corresponding additional resources.

[0144] like Figure 3 As shown, component 1 records resource requirement 1 for component 5 in the description file, and component 3 records resource requirement 2 for component 5 in the description file. In some embodiments, the resource requirements also include instance requirements.

[0145] In some embodiments, examples of resource requirement 1 and resource requirement 2 may be as follows:

[0146] Resource requirement 1 includes a 2-core CPU, 2048M memory, and the instance number is d001. Resource requirement 2 includes a 4-core CPU, 4096M memory, and the instance number is d002.

[0147] If the instance requirement of resource requirement 1 is the same as the instance requirement of resource requirement 2 (can be implemented in the same instance, for example, both instance requirement numbers are d001), the resource required by dependent component 5 can be calculated only once, and the larger resource in the resource requirement is selected. For example, if resource requirement 2 is larger than resource requirement 1 in the above resource requirements, resource requirement 2 is selected.

[0148] In some embodiments, the first parameter of resource requirement 1 is larger than resource requirement 2, and the second parameter of resource requirement 1 is smaller than resource requirement 2. When the instance requirements for other components are the same, the first parameter of resource requirement 1 and the second parameter of resource requirement 2 are selected.

[0149] When a resource requirement includes multiple parameters and the instance requirements are the same, the largest parameter among the resource requirements may be selected as the resource requirement for the parameter.

[0150] If the instance requirement of resource requirement 1 is different from the instance requirement of resource requirement 2 (cannot be achieved in the same instance, such as the above instance, the instance requirement numbers are d001 and d002 respectively), all the resources required by the dependent component 5 need to be involved in the calculation, that is, both resource requirement 1 and resource requirement 2 need to be met. Taking the above resource requirement instance as an example, 2 cores with 2048MB of resources and 4 cores with 4096MB of resources need to be configured for component 5.

[0151] After the deployment is completed and the software is running, if the first component needs to call other components, the server needs to start the services of other components in the resources corresponding to the instance requirements specified by the called first component, and shut them down after the call ends or the call completes the first period of time.

[0152] For example, if component 5 is called through component 1, the service of component 5 needs to be started in the resource specified by resource requirement 1, and if component 5 is called through component 3, the service of component 5 needs to be started in the resource specified by resource requirement 2.

[0153] In some embodiments, determining the resources required for deploying the software on the server further includes: determining additional resources in the description files of the first component and other components on which the first component depends.

[0154] In fact, additional resources can also be regarded as part of the resources required by the component. The calculation timing of additional resources can be flexibly set, for example, when calculating the resource requirements of the component, or they can be excluded from the calculation of the member requirements of the component and calculated separately when determining the resources required for software deployment.

[0155] The embodiments of the present disclosure can flexibly select the method of deploying software to save resources based on the dependency between functions and components, and between components. And the first function to be deployed is selected so that component services can be enabled on demand, and a shared resource pool can be set for some components and microservices to save resources. In the scenario where multiple components depend on the same component, the embodiments of the present disclosure can flexibly calculate the required resources, and control the resource occupancy of microservices in a finer granularity through the default startup mark. The embodiments of the present disclosure can complete the deployment through the guide page, and the deployment process is simple and the flow is clear.

[0156] Corresponding to the embodiments of the software deployment method of the present disclosure, the present disclosure also provides embodiments of corresponding software deployment devices.

[0157] See also Figure 4 , Figure 4 FIG. 1 is a block diagram of a software deployment device in one embodiment of the present disclosure. Figure 4 As shown, the software deployment device includes:

[0158] The selection unit 410 is configured to select a first function to be deployed from the candidate functions of the software according to the received selection instruction;

[0159] The processing unit 420 is configured to determine a first component on which the first function depends; and determine resources required to deploy the software on a server according to resources required by the first component.

[0160] In some embodiments, the apparatus is further configured to: determine resources required by the first component according to an orchestration file of the first component; wherein the orchestration file records the resources required by the first component.

[0161] In some embodiments, the first component includes at least one microservice, and determining the resources required by the first component includes: determining resources of a first microservice recorded in the orchestration file, wherein the first microservice is a microservice that is started by default in the at least one microservice; and ignoring resources of a second microservice recorded in the orchestration file, wherein the second microservice is a microservice that is not started by default in the at least one microservice.

[0162] In some embodiments, the apparatus is further configured to: receive an instruction to start the second microservice; and determine and add resources for the second microservice.

[0163] In some embodiments, the device is further configured to: determine a second component in the first component, wherein the second component is not configured with an orchestration file; when calling a microservice within the second component, start the called microservice using resources in a preset resource pool; and when the called microservice ends, stop the called microservice from occupying the resources in the resource pool.

[0164] In some embodiments, determining the first component on which the first function depends includes: determining the first component on which the first function depends according to a dependency relationship in a description file of the software, wherein the dependency relationship includes a dependency relationship between a function and a component.

[0165] In some embodiments, the dependency relationship also includes a dependency chain between components, wherein the determining the first component on which the first function depends also includes: determining other components on which the first component depends based on the dependency chain; wherein the determining the resources required to deploy the software on the server based on the resources required by the first component includes: determining the resources required for the software based on the resources required by the other components and the resources required by the first component.

[0166] In some embodiments, when at least two first components depend on the same other components, the device is further configured to: determine the resource requirements of each first component for the other components and the instance requirements of each first component for the other components according to the description file; when each first component has the same instance requirements for the other components, select the largest resource requirement among the resource requirements as the resources required by the other components; when each first component has different instance requirements for the other components, use the sum of the resource requirements of each first component for the other components as the resources required by the other components.

[0167] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.

[0168] An embodiment of the present disclosure further proposes an electronic device, comprising: a processor and a memory; the memory is used to store a computer program; the processor is used to execute the software deployment method as any of the above embodiments by calling the computer program.

[0169] The embodiments of the present disclosure further provide a computer-readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the software deployment method as described in any of the above embodiments.

[0170] Figure 5 1 is a schematic block diagram of a software deployment apparatus 500 according to an embodiment of the present disclosure. For example, the apparatus 500 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0171] Reference Figure 5 , the device 500 may include one or more of the following components: a processing component 502 , a memory 504 , a power component 506 , a multimedia component 508 , an audio component 510 , an input / output (I / O) interface 512 , a sensor component 514 , and a communication component 516 .

[0172] The processing component 502 generally controls the overall operation of the device 500, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 502 may include one or more processors 520 to execute instructions to complete all or part of the steps of the above-mentioned information receiving method. In addition, the processing component 502 may include one or more modules to facilitate the interaction between the processing component 502 and other components. For example, the processing component 502 may include a multimedia module to facilitate the interaction between the multimedia component 508 and the processing component 502.

[0173] The memory 504 is configured to store various types of data to support operations on the device 500. Examples of such data include instructions for any application or method operating on the device 500, contact data, phone book data, messages, pictures, videos, etc. The memory 504 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.

[0174] The power supply component 506 provides power to the various components of the device 500. The power supply component 506 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 500.

[0175] The multimedia component 508 includes a screen that provides an output interface between the device 500 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 508 includes a front camera and / or a rear camera. When the device 500 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0176] The audio component 510 is configured to output and / or input audio signals. For example, the audio component 510 includes a microphone (MIC), and when the device 500 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 504 or sent via the communication component 516. In some embodiments, the audio component 510 also includes a speaker for outputting audio signals.

[0177] I / O interface 512 provides an interface between processing component 502 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, a home button, a volume button, a start button, and a lock button.

[0178] The sensor assembly 514 includes one or more sensors for providing various aspects of status assessment for the device 500. For example, the sensor assembly 514 can detect the open / closed state of the device 500, the relative positioning of components, such as the display and keypad of the device 500, and the sensor assembly 514 can also detect the position change of the device 500 or a component of the device 500, the presence or absence of user contact with the device 500, the orientation or acceleration / deceleration of the device 500, and the temperature change of the device 500. The sensor assembly 514 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 514 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 514 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0179] The communication component 516 is configured to facilitate wired or wireless communication between the device 500 and other devices. The device 500 can access a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G LTE, 5G NR, or a combination thereof. In an exemplary embodiment, the communication component 516 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 516 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0180] In an exemplary embodiment, the apparatus 500 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above-mentioned information receiving method.

[0181] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 504 including instructions, and the instructions can be executed by the processor 520 of the device 500 to complete the above-mentioned information receiving method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0182] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the disclosure disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0183] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

[0184] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. The terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprises a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0185] The method and device provided in the embodiments of the present disclosure are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present disclosure. The description of the above embodiments is only used to help understand the method of the present disclosure and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present disclosure, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present disclosure.

Claims

1. A software deployment method, characterized in that: The method comprises: Selecting a first function to be deployed from candidate functions of the software according to the received selection instruction; determining a first component on which the first function depends; The resources required for deploying the software on the server are determined according to the resources required by the first component.

2. The method according to claim 1, characterized in that: The method further comprises: Determine resources required by the first component according to the orchestration file of the first component; wherein the orchestration file records the resources required by the first component.

3. The method according to claim 2, characterized in that The first component includes at least one microservice, and the determining of resources required by the first component includes: Determining resources of a first microservice recorded in the orchestration file, wherein the first microservice is a microservice started by default in the at least one microservice; and The resources of a second microservice recorded in the orchestration file are ignored, wherein the second microservice is a microservice that is not started by default in the at least one microservice.

4. The method according to claim 3, characterized in that The method further comprises: Receive an instruction to start the second microservice; Identify and add resources for the second microservice.

5. The method according to claim 2, characterized in that: The method further comprises: Determining a second component in the first components, wherein the second component is not configured with an orchestration file; When the microservice in the second component is called, the called microservice is started using resources in a preset resource pool; when the call of the called microservice ends, the occupation of the resources in the resource pool by the called microservice is stopped.

6. The method according to claim 1, characterized in that The determining the first component on which the first function depends includes: According to the dependency relationship in the description file of the software, a first component on which the first function depends is determined, wherein the dependency relationship includes a dependency relationship between a function and a component.

7. The method according to claim 6, characterized in that The dependency relationship also includes a dependency chain between components, wherein determining the first component on which the first function depends further includes: Determine other components on which the first component depends according to the dependency chain; The step of determining the resources required to deploy the software on the server according to the resources required by the first component includes: The resources required by the software are determined according to the resources required by the other components and the resources required by the first component.

8. A software deployment device, characterized in that: The device comprises: A selection unit, configured to select a first function to be deployed from candidate functions of the software according to the received selection instruction; The processing unit is configured to determine a first component on which the first function depends; and determine resources required to deploy the software on a server based on resources required by the first component.

9. An electronic device, characterized in that: include: Processor, memory; The memory is used to store computer programs; The processor is used to execute the software deployment method according to any one of claims 1 to 7 by calling the computer program.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the software deployment method described in any one of claims 1 to 7 is implemented.