Product deployment method, product deployment device, electronic equipment and product deployment system

Through the combination of interface program module and background service program module, the automatic installation and automatic deployment of product components are realized, solving the complex problems of product deployment operations in the existing technology and improving the usability of products.

CN119045842BActive Publication Date: 2025-04-18HANGZHOU HIKVISION SYST TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411524593.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-30
Publication Date
2025-04-18
Estimated Expiration
2044-10-30

AI Technical Summary

Technical Problem

In the prior art, product deployment operations are complex and technical support personnel need to have the understanding of SFTP tools and Linux commands, which makes it difficult to deploy and reduces the availability of the product.

Method used

Provide a product deployment method, obtains component deployment list through the interface program module, and sends product packages, background service program modules and component deployment lists to the target server, realizing automatic installation and automatic deployment of components.

Benefits of technology

It reduces the operational difficulty of product deployment, improves product availability, and reduces dependence on technical support personnel.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119045842B_ABST
    Figure CN119045842B_ABST
Patent Text Reader

Abstract

The present application is applicable to the field of computer technology, and provides a product deployment method, a product deployment device, an electronic device, and a product deployment system. The method is applied to a terminal, and the terminal includes an installation package of the product, and the installation package of the product includes an interface program module, a background service program module, and a product package. The method includes: triggering the interface program module to obtain a component deployment list of the product, and the component deployment list includes a list of components that need to be installed on each target server; triggering the interface program module to send the product package, the background service program module, and the component deployment list to the first server of the target server, so that the first server triggers the background service program module to control the installation of the corresponding components in the product package on each target server based on the component deployment list. Through this application, the difficulty of product deployment operation can be reduced and the availability of the product can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of computer technology, and in particular, relates to a product deployment method, a product deployment device, an electronic device, and a product deployment system. Background Art

[0002] At present, products in various industries are basically running on Linux servers. Each project site needs technical support personnel to complete product deployment. Each product consists of dozens or even hundreds of components. When deploying products, technical support personnel need to first connect to the server through the Secure File Transfer Protocol (SFTP) tool, upload the product package to the server, and then use the Linux command line tool to complete operations such as decompressing the product package, assigning executable permissions to the installation script, and running the installation script. Technical support personnel need to have a certain understanding of the SFTP tool and Linux commands to complete product deployment. The product deployment operation is difficult, which reduces the availability of the product. Summary of the invention

[0003] The embodiments of the present application provide a product deployment method, a product deployment device, an electronic device, and a product deployment system, which can reduce the difficulty of product deployment operations and improve product availability.

[0004] In a first aspect, an embodiment of the present application provides a product deployment method, which is applied to a terminal, wherein the terminal includes an installation package of a product, wherein the installation package of the product includes an interface program module, a background service program module, and a product package, and the product deployment method includes:

[0005] Triggering the interface program module to obtain a component deployment list of the product, the component deployment list including a list of components to be installed on each target server, the target server being a server on which the product is to be deployed;

[0006] Trigger the interface program module to send the product package, the background service program module and the component deployment list to the first server of the target server, so that the first server triggers the background service program module to control each target server to install the corresponding components in the product package based on the component deployment list.

[0007] In an embodiment of the present application, the installation package of the product included in the terminal includes an interface program module, a background service program module, and a product package. The terminal can obtain a component deployment list of the product by triggering the interface program module. The component deployment list includes a list of components that need to be installed on each target server. The target server is the server to which the product is to be deployed. The interface program module is triggered to send the product package, the background service program module, and the component deployment list to the first server of the target server, so that the first server can trigger the background service program module to control the installation of the corresponding components in the product package on each target server based on the component deployment list. This solution can shield the interaction between the technical support personnel and the first server through the interface program module, and there is no need for the technical support personnel to participate in the above-mentioned product deployment process. By triggering the interface program module to send the product package, the background service program module, and the component deployment list to the first server, the first server can realize the automatic installation of the product components based on this information, thereby realizing the automatic deployment of the product, reducing the difficulty of the product deployment operation, and improving the availability of the product.

[0008] In a second aspect, an embodiment of the present application provides a product deployment method, which is applied to a first server, and the product deployment method includes:

[0009] Receiving a product package, a background service program module and a component deployment list from a terminal, wherein the component deployment list includes a list of components to be installed on each target server, wherein the target server is a server on which the product is to be deployed;

[0010] The background service program module is triggered to control each target server to install the corresponding components in the product package based on the component deployment list.

[0011] In an embodiment of the present application, the first server receives a product package, a background service program module and a component deployment list from a terminal, where the component deployment list includes a list of components that need to be installed on each target server, where the target server is the server on which the product is to be deployed, and triggers the background service program module to control the installation of corresponding components in the product package on each target server based on the product package and the component deployment list, thereby achieving automatic installation of product components and thus realizing automated deployment of the product, reducing the difficulty of product deployment operations and improving product availability.

[0012] In a third aspect, an embodiment of the present application provides a product deployment device, which is applied to a terminal, wherein the terminal includes an installation package of a product, wherein the installation package of the product includes an interface program module, a background service program module, and a product package, and the product deployment device includes:

[0013] A first interface triggering module, used to trigger the interface program module to obtain a component deployment list of the product, wherein the component deployment list includes a list of components to be installed on each target server, and the target server is a server on which the product is to be deployed;

[0014] The second interface triggering module is used to trigger the interface program module to send the product package, the background service program module and the component deployment list to the first server of the target server, so that the first server triggers the background service program module to control each target server to install the corresponding components in the product package based on the component deployment list.

[0015] In a fourth aspect, an embodiment of the present application provides a product deployment device, which is applied to a first server, and the product deployment device includes:

[0016] An information receiving module, used to receive a product package, a background service program module and a component deployment list from a terminal, wherein the component deployment list includes a list of components to be installed on each target server, wherein the target server is a server on which the product is to be deployed;

[0017] The background service triggering module is used to trigger the background service program module to control each target server to install the corresponding components in the product package based on the component deployment list.

[0018] In a fifth aspect, an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the product deployment method as described in any one of the first aspect or the second aspect is implemented.

[0019] In a sixth aspect, an embodiment of the present application provides a product deployment system, including a terminal and a server, wherein the terminal includes an installation package of a product, and the installation package of the product includes an interface program module, a background service program module, and a product package;

[0020] The terminal is used to trigger the interface program module to obtain a component deployment list of the product, wherein the component deployment list includes a list of components to be installed on each target server, wherein the target server is a server on which the product is to be deployed; and trigger the interface program module to send the product package, the background service program module and the component deployment list to a first server of the target server;

[0021] The first server is used to receive the product package, the background service program module and the component deployment list from the terminal; trigger the background service program module to control the target servers to install the corresponding components in the product package based on the component deployment list. In a seventh aspect, an embodiment of the present application provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the product deployment method described in any one of the first aspect or the second aspect.

[0022] In an eighth aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes the product deployment method described in any one of the first aspect or the second aspect.

[0023] It can be understood that the beneficial effects of the third to eighth aspects can be found in the relevant descriptions of the first and second aspects, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0025] Figure 1 It is an example diagram of the product deployment process of the prior art;

[0026] Figure 2 It is a structural diagram of a product deployment system provided in an embodiment of the present application;

[0027] Figure 3 is a schematic flow chart of a product deployment method provided in an embodiment of the present application;

[0028] Figure 4 It is a schematic diagram of the effect of the search path provided in the embodiment of the present application;

[0029] Figure 5 is a flow chart of the second allocation strategy provided in an embodiment of the present application;

[0030] Figure 6 It is a schematic diagram of the effect of resource transfer provided by an embodiment of the present application;

[0031] Figure 7 It is a schematic diagram of the effect of resource transfer provided by an embodiment of the present application;

[0032] Figure 8is another schematic flow chart of the product deployment method provided in an embodiment of the present application;

[0033] Fig. 9 This is an example diagram of the product deployment process provided by the embodiment of the present application;

[0034] Fig.10 It is a structural schematic diagram of a product deployment device provided in an embodiment of the present application;

[0035] Fig.11 is another structural schematic diagram of the product deployment device provided in an embodiment of the present application;

[0036] Fig.12 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0037] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0038] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0039] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0040] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.

[0041] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0042] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0043] like Figure 1 The following is an example diagram of a product deployment process in the prior art. The product deployment process is described as follows:

[0044] 1. When technical support personnel go to the project site to deploy the product, they copy the product package to the terminal.

[0045] A product may refer to independently marketable computer software or information systems.

[0046] A product package may refer to a file package used to install a product, including but not limited to installation packages of all components of a product, installation packages of a web container, and installation packages of an operation and maintenance platform.

[0047] 2. The terminal has a display, and the technical support personnel can interact with the terminal through the display to upload the product package in the terminal to the first server.

[0048] The first server may refer to a server on which the operation and maintenance platform is installed. The first server may be selected by a technical support staff from a project site.

[0049] 3. After the upload is completed, the technical support personnel control the first server through the terminal, decompress the product package on the first server, and execute the installation script in the product package through the shell tool to install the operation and maintenance platform. The operation and maintenance platform may refer to a software platform that provides component installation, management, and maintenance services.

[0050] 4. After the operation and maintenance platform is installed on the first server, the technical support staff can add each target server to the operation and maintenance platform to facilitate the subsequent maintenance or management of the components installed on each target server. For example, after the product is deployed on a project site, for any target server added to the operation and maintenance platform, you can install new components to the target server by checking the new components on the operation and maintenance platform, or perform patch operations on the components installed on the target server through the operation and maintenance platform.

[0051] The target server is the server where the product is to be deployed. For example, the target server can be the server where the product needs to be deployed at the project site.

[0052] In addition to the first server, each target server may also include at least one second server without the operation and maintenance platform installed, so that the product can be deployed to multiple servers. As an example but not a limitation, the first server is a central server and the second server is a distributed server.

[0053] 5. After adding all target servers, the technical support staff will select and install components in batches on the operation and maintenance platform page according to the business required by the on-site project. A component can refer to a software unit that can independently complete a certain technical or business task.

[0054] 6. After the component installation is complete, enter the authorization management page, where the technical support personnel import the authorization file and complete the product activation through the authorization service. After the product activation is complete, the technical support personnel debug whether the business functions of the product are normal. The above-mentioned authorization service may refer to the program for authorization management and control of the product.

[0055] like Figure 1 The prior art shown has the following three problems.

[0056] Question 1: Technical support personnel need to have certain Linux server operation capabilities.

[0057] Currently, Linux servers are basically used in projects. When deploying products, technical support personnel need to connect to the first server through the SFTP tool to upload the product package to the first server. The technical support personnel then use the command line tool to complete operations such as decompressing the product package, granting executable permissions to the installation script, and running the installation script. Technical support personnel need to have a certain understanding of these tools and Linux commands to complete product deployment.

[0058] Problem 2: Components are missing or over-installed.

[0059] The business functions and components of a product are not in a one-to-one relationship. Usually, one business function involves multiple components, and there are associations between the businesses. Therefore, when installing components manually, there may be situations where components are missed or installed in excess.

[0060] Missing components will cause abnormal business functions of the product. If technical support personnel find abnormalities when debugging business functions, they will contact R&D personnel for investigation. After a series of investigations, it is finally discovered that components are missing, which is time-consuming and labor-intensive.

[0061] It is usually not easy to detect the installation of multiple components, which leads to a waste of server resources and affects the overall performance of the product. If a component is scanned for vulnerabilities, it needs to be patched, which increases the subsequent maintenance work.

[0062] Problem three: The allocation of web components (i.e. web applications) in the running web container is unreasonable.

[0063] More than half of the components in the product are web components, which need to run in a web container. When installing components, technical support personnel may install dozens of web components in one web container, which will affect product performance to a certain extent, and there is a high probability of memory overflow and other problems. This web component deployment method is also not conducive to later maintenance. For example, when patching a web component, it is necessary to restart the web container where the web component is located, which will cause all web components in the web container to be unable to be used normally.

[0064] In order to solve the above three technical problems existing in the prior art, the embodiments of the present application provide a product deployment method, a product deployment device, an electronic device and a product deployment system. First, the embodiments of the present application can shield the interaction between the technical support personnel and the first server through the interface program module in the installation package of the product, and there is no need for the participation of technical support personnel in the above product deployment process, and the background service program module in the installation package of the product can realize the automatic installation of the components of the product, realize the automatic deployment of the product, reduce the difficulty of the deployment operation of the product, and improve the availability of the product, thereby solving the above problem one. Secondly, the embodiments of the present application can determine the final component deployment list through the sales items in the authorization file purchased by the user, combined with the association relationship table of the sales items and components preset in the installation package of the product, avoid the problem of missing or over-installing components, and can reduce the project construction cost caused by missing or over-installing components to a certain extent, thereby solving the above problem two. Finally, the embodiment of the present application can reasonably divide the web components in the component deployment list through the web component deployment strategy in the product installation package and the number of target servers added on site. For example, important web components are installed separately in a web container, and web components related to business functions are installed in the same web container. When the web components need to be patched in the later stage, the scope of the patching impact can be reduced. At the same time, the parameters such as the memory and number of threads of the web container can be optimized according to the web components installed in the web container, which can improve the product stability and solve the above-mentioned problem three.

[0065] See also Figure 2 , Figure 2 The structural diagram of the product deployment system provided by the embodiment of the present application is shown. For the convenience of explanation, only the parts related to the embodiment of the present application are shown.

[0066] The above product deployment system includes a terminal 201 and a server 202. The terminal 201 is in communication connection with the server 202.

[0067] The terminal 201 includes an installation package of the product, and the installation package of the product includes an interface program module, a background service program module and a product package.

[0068] Terminal 201 is used to trigger the interface program module to obtain the component deployment list of the product, which includes a list of components that need to be installed on each target server, and the target server is the server 202 on which the product is to be deployed; the trigger interface program module sends the product package, background service program module and component deployment list to the first server of the target server.

[0069] The first server is used to receive the product package, the background service program module and the component deployment list from the terminal; trigger the background service program module to control each target server to install the corresponding component in the product package based on the component deployment list.

[0070] It should be noted that the specific introduction of the solutions executed by the above-mentioned terminal 201 and server 202 can refer to the relevant description in the embodiment of the product deployment method below.

[0071] See also Figure 3 , Figure 3 A schematic flow chart of a product deployment method provided in an embodiment of the present application is shown, and the product deployment method is applied to a terminal, and the terminal includes an installation package of the product, and the installation package of the product includes an interface program module, a background service program module, and a product package. As an example but not a limitation, the product deployment method includes the following steps:

[0072] Step 301, triggering the interface program module to obtain a component deployment list of the product.

[0073] In an application scenario, an installation tool can be made, and the installation tool is combined with the product package of the product to form the product installation package, and the technical support personnel copy the product installation package to the terminal. The installation tool includes an interface program module that can run on the terminal and a background service program module that can run on the first server. For example, if the operating system of the terminal is a Windows system, then the interface program module needs to be able to run on the Windows system.

[0074] Before executing step 301, the terminal needs to run the interface program module first, and then execute step 301 based on running the interface program module. For example, the technical support staff can double-click the interface program module to realize the operation of the interface program module.

[0075] The component deployment list includes a list of components that need to be installed on each target server. The target server is the server on which the product is to be deployed, that is, the server on which the components of the product need to be deployed. The number of target servers can be at least one. Optionally, the number of target servers can be determined based on the scale of the product deployment site. For example, the larger the scale of the deployment site, the more target servers there are, and the more second servers need to be added.

[0076] When the number of target servers is equal to 1, the target server is the first server. When the number of target servers is greater than 1, the target server may include at least one second server in addition to the first server, and the first server and the second server jointly implement the installation of product components. For example, the number of target servers is 2, including one first server and one second server respectively, and the component deployment list includes 20 components, 8 components can be installed on the first server, and 12 components can be installed on the second server.

[0077] In a possible implementation, the terminal may fill in the device information of each target server to the interface program module; and trigger the interface program module to determine the first server based on the device information of each target server.

[0078] The device information of the target server includes but is not limited to the Internet Protocol (IP) address, user name and password of the target server.

[0079] Optionally, the filling order of the device information of each target server may be determined, and the target server corresponding to the device information arranged at a preset position in the filling order may be determined as the first server. For example, the target server corresponding to the first filled device information may be determined as the first server.

[0080] Of course, the first server may also be determined by other means (for example, a technical support person specifies the first server), and this application does not limit this.

[0081] In one embodiment, after the terminal fills in the device information of each target server to the interface program module, it can also trigger the interface program module to send the device information of each target server to the first server, so that the first server automatically adds each target server to the operation and maintenance platform based on the device information of each target server.

[0082] The component list that needs to be installed on each target server may include identification information of at least one component to indicate that the corresponding component needs to be installed on the corresponding target server. For example, if the component list that needs to be installed on target server A includes identification information of component A and identification information of component B, then the component list may indicate that component A and component B need to be installed on target server A. The identification information of the above components may be used to identify the uniqueness of the components. For example, the name of the component may be used as the identification information of the component.

[0083] It should be noted that the product includes many components, and the components in the component list of the above component deployment list may be some of all the components of the product, or may be all the components, which are related to the sales items of the product purchased by the user. If the user has purchased all the sales items of the product, then it can be determined that the components in the component list of the above component deployment list are all the components of the product. If the user has purchased some of the sales items of the product, then it can be determined that the components in the component list of the above component deployment list are components associated with the some of the sales items purchased by the user. The sales items of the product can be understood as the business functions of the product.

[0084] In a possible implementation, the triggering interface program module obtains a component deployment list of a product, including:

[0085] The triggering interface program module obtains the target component list of the product;

[0086] The triggering interface program module determines a list of components to be installed on each target server from the target component list based on the number of target servers and available resources;

[0087] The trigger interface program module generates a component deployment list based on the list of components that need to be installed on each target server.

[0088] The target component list may include identification information of components that need to be deployed to each target server.

[0089] The available resources of the target server include, but are not limited to, at least one of the following resource types: the number of central processing units (CPUs), memory, and hard disks (including solid state drives (SSDs) and / or hard disk drives (HDDs)).

[0090] When determining the list of components that need to be installed on each target server, the interface program module can be triggered to determine the number of components of each target server based on the number of target servers and available resources, and determine the list of components that need to be installed on each target server from the target component list based on the number of components of each target server. Wherein, for any target server, when determining the corresponding number of components, the resource requirements of the corresponding number of components do not exceed the available resources of the target server, so that the available resources of the target server can meet the resource requirements of the corresponding number of components.

[0091] As an example but not limitation, based on the number of components of each target server, a corresponding number of components can be allocated to each target server according to the order of components in the target component list, or the components in the target component list can be randomly allocated to each target server and the number of components randomly allocated to each target server can be the corresponding number of components.

[0092] In one embodiment, after obtaining the target component list, the terminal can also trigger the interface program module to divide the components in the target component list into component groups to be allocated, and determine the list of components that need to be installed on each target server from the target component list based on the number of target servers, available resources and resource requirements of each component group to be allocated.

[0093] The component group includes at least one component, and the components in the same component group are allocated to the same target server.

[0094] It should be noted that the resource types included in the available resources of the target server and the resource requirements of the component grouping may be the same or different, and this application does not limit this.

[0095] Since avoiding resource preemption between components is the key to ensuring system stability and performance, in order to avoid resource preemption between components, in a possible implementation, component grouping can be obtained based on software layering and business logic division.

[0096] As an example, the components in the target component list are grouped according to business logic, and components with similar business logic or functions are divided into the same component group. This ensures that these components share the same resource pool when processing similar types of requests, thereby avoiding resource contention across business logics, improving resource utilization efficiency and system maintainability. For example: component grouping is divided into: operation management group, architecture group, retrieval group, image search group, etc.; among them, the operation management group can include components such as operation management center service, backup service, software version management service, call chain service, network time protocol (NetworkTime Protocol, ntp) timing service, system monitoring alarm service, license management service, etc.; the architecture group can include demonstration service, unified service, emergency stop service, identity authentication service, front-end service, Internet portal service, enhanced identity authentication service, mobile service, etc. The retrieval group can include resource management service, service data management center service, distributed search and analysis engine service, integrated service support center service, resource sharing service, etc. The image search group can include image indexing service, image search service, etc.

[0097] In another possible implementation, the components in the target component list are grouped by resource requirements, based on the resource requirements of these components (such as CPU, memory, hard disk, etc.). Components with similar resource requirements are grouped into the same component group to allocate resources more reasonably, thereby more accurately controlling resource allocation and avoiding components with high resource requirements from affecting other components with low resource requirements. For example, components that require a lot of computing resources (such as data analysis services) are deployed separately from components with high memory requirements (such as cache services) to avoid resource contention between them.

[0098] In another possible implementation, the components in the target component list are grouped by access mode, and the components are grouped based on their access modes (such as more reads and less writes, less reads and more writes, real-time requirements, etc.). Components with similar access modes are grouped into the same component group to better optimize access performance and resource usage, improve access efficiency and system scalability. For example, components with more reads and less writes are grouped into the same component group to improve read performance using optimization techniques such as caching.

[0099] Optionally, the terminal triggering interface program module determines a list of components to be installed on each target server from the target component list based on the number of target servers, available resources, and resource requirements of each component group to be allocated, including:

[0100] The trigger interface program module determines the total available resources based on the available resources of each target server, and determines the total resource requirements based on the resource requirements of each component group, and determines that the total available resources meet the total resource requirements; if the number of target servers is not less than the number of component groups, a first allocation strategy is used to allocate a target server to each component group; if the number of target servers is less than the number of component groups and is not less than a first threshold, or the allocation using the first allocation strategy fails, a second allocation strategy is used under constraints to allocate target servers to the component groups; wherein each component group is configured with an index category, and the first threshold is the number of index categories; the constraints include: component groups of different index categories are allocated to different target servers, and component groups of the same index category are preferentially allocated to the same target server.

[0101] Optionally, based on the required number of CPUs, the required capacity of the memory, the required capacity of the SSD hard disk, and / or the required capacity of the HDD hard disk contained in the total resource requirements, a one-to-one comparison is performed with the available number of CPUs, the remaining capacity of the memory, the remaining capacity of the SSD hard disk, and the remaining capacity of the HDD hard disk contained in the total available resources. If there is at least one item in the total available resources that is smaller than the corresponding item in the total resource requirements, it is determined that the total available resources do not meet the total resource requirements. If all items of the total available resources are greater than or equal to the corresponding items in the total resource requirements, it is determined that the total available resources meet the total resource requirements.

[0102] When the total available resources do not meet the total resource requirements, the system will provide feedback to the user or administrator that the scheduling cannot be done normally, and issue a prompt message that the target server has insufficient available resources. The system can also provide specific reasons for the shortage, such as insufficient available CPUs or insufficient required capacity of SSD hard disks.

[0103] Among them, the first allocation strategy can be adopted: sorting the component groups according to resource requirements from small to large or from large to small, and sorting the target servers according to available resources from small to large or from large to small, matching the resource requirements in the component groups from small to large with the target servers in order from small to large; or, matching the resource requirements in the component groups from large to small with the target servers in order from large to small.

[0104] For example, assume that the resource requirements of the four component groups are in the order of a1, a2, b1, and b2 from small to large. If there are five target servers 1 to 5, they are assumed to be target server 1, target server 2, and target server 3 based on the order of available resources from small to large. First, assign a server to component group a1, search for target server 1, and determine whether the available resources of target server 1 meet the resource requirements of component group a1; if so, assign component group a1 to target server 1. After the component group a1 is assigned to the target server 1, since a target server is assigned to each component, when a2 is assigned to a server, it is directly matched with the target server 2 to determine whether the available resources of the target server 2 meet the resource requirements of the component group a2. If so, the component group a2 is assigned to the target server 2. If not, it is determined whether the available resources of the target server 3 meet the resource requirements of the component group a2. If so, the component group a2 is assigned to the target server 3, and so on. Assuming that the component group a2 is assigned to the target server 3 (the available resources of the target server 2 do not meet the resource requirements of the component group a2), the component group b1 is assigned to the target server 4, and the component group b2 is assigned to the target server 5, the matching is successful. Assuming that target server 4 cannot meet the resource requirements of component group b1, and target server 5 meets the resource requirements of component group b1, component group b1 is allocated to target server 5. Since the resource requirements of component group b2 are greater than the resource requirements of component group b1, target server 4 will inevitably be unable to meet the resource requirements of component group b2, ultimately resulting in no matching independent server resources for component group b2, and the resource allocation fails.

[0105] Therefore, it can be understood that when the number of component groups is less than the number of target servers, in the process of matching the resource requirements in the component groups in order from small to large according to the order of the target servers, it is allowed that the available resources of the target servers not exceeding the first number do not meet the resource requirements of the component groups. The first number is the difference between the number of component groups and the number of target servers.

[0106] In a possible implementation, when the number of component groups is the same as the number of target servers, in the process of matching the resource requirements in the component groups in order from small to large according to the order of the target servers in order from small to large, if there is a target server that does not meet the resource requirements of the component group that matches it, it indicates that the first allocation strategy allocation fails. The same is true for the order from large to small, which will not be repeated here.

[0107] In one implementation, the first allocation strategy adopts a depth-first search strategy to form multiple search paths according to various combinations of target servers, and each target server is regarded as a node in the path. Specifically, a recursive function is first defined, and the input parameters include the component groups to be allocated and the current search path. The recursive benchmark case includes: selecting one of the search paths, if the component groups to be allocated in the search path have been successfully allocated, then the current allocation plan is recorded and returned, and no other search paths are searched. If there is an unsuccessful allocation in the search path, the search for subsequent nodes in the search path is terminated, and another unsearched path is selected to re-search and allocate all component groups.

[0108] Optionally, during the search process of each search path, if it is found that the node currently searching the search path cannot successfully allocate the resource requirements of the unallocated smallest unit group in the target set (for example, in the current search path, if the resources of the current search node cannot meet the unallocated component group with the smallest resource requirements in the component set), the search of the current search path is terminated prematurely.

[0109] As an example, see Figure 4 , assuming that there are three component groups, namely a1, a2, and a3, and the arrangement order of the component groups is a1, a2, and a3, and there are three target servers 1 to 3 in the server cluster, the corresponding search paths may include: {1, 2, 3}, {1, 3, 2}, {2, 1, 3}, {2, 3, 1}, {3, 1, 2}, {3, 2, 1}. Take {1, 2, 3} as the current search path, and match the resources of component group a1 with target server 1, component group a2 with target server 2, and component group a3 with target server 3 in turn, to confirm whether the available resources of each target server can meet the resource requirements of the corresponding component group. If satisfied, no other search paths will be searched, and {1, 2, 3} will be taken as the component allocation result of the first allocation strategy. If it is not satisfied, then select one of the remaining unsearched search paths {1, 3, 2}, {2, 1, 3}, {2, 3, 1}, {3, 1, 2}, {3, 2, 1} as the current search path. For example, {1, 3, 2} can be selected as the current search path to match the resources of component group a1 with target server 1, component group a2 with target server 3, and component group a3 with target server 2 respectively to confirm whether the available resources of each target server can meet the resource requirements of the corresponding component group, and so on, until a search path that meets the resource requirements of the component group is matched or all search paths are searched, then the search ends.

[0110] It should be noted that if there are high requirements for the security level or deployment in the same target server may lead to resource preemption or component groups that need to be deployed on different target servers according to deployment requirements, if they are deployed in the same target server, they will form a potential mutually exclusive relationship, for example, they will preempt each other's memory and network resources in the target server, or because the security policy requires the isolation of different data processing and access control, or because abnormal situations occur due to failure to meet deployment requirements, so these component groups are divided into different index categories, and when allocating target servers, component groups of different index categories are restricted from being allocated to different target servers. For example, there may be a risk of resource preemption between the inspection component and the operation management center component, so it is not recommended to deploy them on the same target server.

[0111] It is understandable that mutually exclusive component groupings are not limited to situations where there is resource competition or high security requirements between component groups. In fact, according to specific deployment requirements, even if there is no resource competition or no special security requirements between components, they may need to be deployed on different target servers.

[0112] Optionally, the assigned component groups are divided into index categories according to the "peak shaving and valley filling" merge index strategy to balance the server load and avoid resource overload during peak hours and idleness during valley hours. The core of the "peak shaving and valley filling" strategy is to balance the resource requirements of different time periods, ensuring that the target server can operate normally during high-load periods and fully utilize resources during low-load periods. Therefore, index categories can be configured for component groups based on their resource demand patterns.

[0113] Specifically, if two component groups have high resource demands in the same period, different index categories should be configured for them to avoid resource competition when they are allocated to the same target server. On the contrary, if one component group has high resource demands in the first period, and another component group has high resource demands in the second period, the same index category can be configured for them so that component groups of the same index category are allocated to the same target server, which can achieve resource complementarity and balance and avoid resource competition.

[0114] In one implementation, identification information is used to represent the index category of the component grouping. Different identification information corresponds to different index categories. For example, 1, 2, 3, 4 or A, B, C, D, etc. may be used.

[0115] In actual applications, for the convenience of management, a list is usually used to record the components contained in all component groups, and an index identifier is given to each component group.

[0116] As an example, referring to Table 1, a grouping list of component groups included in all component collections is shown.

[0117]

[0118] In some embodiments, in the process of assigning target servers to component groups, component groups with the same index identifier are taken as a set, and the component groups with the same index identifier are searched in sequence, and for the resource requirements of each component group searched, the target server to which the component group with the same index identifier has been assigned is searched first. If the available resources of the target server to which the component group with the same index identifier has been assigned cannot meet the resource requirements of the component group, the target server to which the component group has not been assigned is searched. That is, the component groups with the same index category are preferentially assigned to the same target server.

[0119] Optionally, integrate the resources of multiple target servers into one or more virtual resource pools to form a unified resource management platform. Dynamically allocate resources to component groups of different index categories based on real-time resource requirements and available resources. Optionally, use containerization technology (such as Kubernetes) or virtualization technology (such as VMware) to automatically manage resource allocation in resource pools.

[0120] As an example, suppose there are 4 target servers (S1, S2, S3, S4), and their resources are integrated into a resource pool. The total resources of the resource pool are: total CPU: 16, total memory: 64GB, total hard disk: 2000GB; the resource configuration of each server is as follows: S1: 4 CPUs, 16GB memory, 500GB hard disk; S2: 4 CPUs, 16GB memory, 500GB hard disk; S3: 4 CPUs, 16GB memory, 500GB hard disk; S4: 4 CPUs, 16GB memory, 1000GB hard disk.

[0121] Assume that there are three component groups, namely component group a1, component group a2, and component group b1. The index categories of component group a1 and component group a2 are the same, and the index categories of component groups a1, a2 and component group b1 are different. The resource requirements of component group a1 are: 4 CPUs, 16GB memory, 100GB hard disk; the resource requirements of component group a2 are: 2 CPUs, 8GB memory, 50GB hard disk. The resource requirements of component group b1 are: 2 CPUs, 8GB memory, 300GB hard disk.

[0122] In the resource pool, the process of dynamically allocating resources is as follows: Check the resource pool status: Check the available resources of each server. First, assign a target server to component set a1: Select a target server (such as S1) from the resource pool; If the requirements of component set a1 are met, assign target server S1 to component set a1 and update the resource pool status: S1: 0 CPU, 0GB memory, 400GB hard disk (remaining); S2: 4 CPU, 16GB memory, 500GB hard disk, S3: 4 CPU, 16GB memory, 500GB hard disk; S4: 4 CPU, 16GB memory, 1000GB hard disk. To allocate a server for component set a2, first confirm whether the available resources of the updated target server S1 meet the resource requirements of component set a2. If so, allocate component set a2 to target server S1. If not, select another target server (for example, target server S2). If it meets the requirements of component set a2, allocate target server S2 to component set a2 and update the resource pool status: S1: 0 CPUs, 0GB memory, 400GB hard disk, S2: 2 CPUs, 8GB memory, 450GB hard disk (remaining), S3: 4 CPUs, 16GB memory, 500GB hard disk, S4: 4 CPUs, 16GB memory, 1000GB hard disk. When assigning target servers to component group b1, since target servers S1 and S2 have been assigned to index categories corresponding to component groups a1 and a2, and the index category corresponding to component group b1 is different from the index category corresponding to component groups a1 and a2, component group b1 cannot be assigned to target servers S1 and S2, and can only be assigned to the remaining target servers S3 and S4. The allocation method refers to component set a1 and will not be repeated here.

[0123] In a possible implementation, in order to prevent component groups of different index categories from being scheduled to the same target server, the Kubernetes anti-affinity policy can be used. In Kubernetes, by configuring the anti-affinity rule (Pod Anti-Affinity Rule) in the deployment (Deployment), it is ensured that component groups of different index categories are scheduled to different target servers, thereby achieving decentralized deployment of component groups of different index categories.

[0124] Furthermore, in Kubernetes, there are two component groups A and B with different index categories, each with different resource requirements and images. To ensure that these two component groups are not scheduled to the same target server, anti-affinity rules can be used in their Deployment configuration. Specifically, anti-affinity rules are defined under the affinity field in the Specification section of the Deployment. Pods with specific labels are selected by specifying a labelSelector, and a topologyKey is set to determine the granularity of scheduling. In this example, topologyKey is set to "kubernetes.io / hostname" to represent the node level. After completing this configuration, when the Kubernetes scheduler schedules a new Pod, it checks whether the Pod matches the label selector defined in the podAntiAffinity rule with the Pod that has been scheduled to a node. If it matches, the scheduler will not schedule the Pod to the node, thereby ensuring that component group A and component group B are not scheduled to the same target server. In this way, the distribution of component groups of different index categories in the Kubernetes cluster can be effectively managed to ensure that component groups of different index categories do not interfere with each other.

[0125] This embodiment obtains the available resources of each target server and the resource requirements of each component group to be allocated by triggering the interface program module, and summarizes the total available resources of the target server and the total resource requirements of the component group. Under the basic principle that the total available resources need to meet the total resource requirements, the comparison result of the two resource amounts is used as a preliminary assessment of the resource status, which can effectively avoid resource scheduling problems caused by insufficient hardware resources of the target server before actually starting to allocate resources. This not only helps to reduce the invalid resource allocation that may occur later, but also greatly improves the executability and success rate of the resource allocation strategy.

[0126] In addition, on the basis of ensuring that the total available resources meet the total resource requirements, two different allocation strategies are formulated based on the number of target servers and the number of component groups, and taking into account possible failures in the allocation process. When the number of target servers is not less than the number of component groups, the first allocation strategy is adopted to deploy the components in the same component group on the same target server, and each component group is allocated to an independent target server to ensure resource isolation and optimal performance. This allocation strategy can not only simplify the allocation process when the server resources are sufficient; it can also maximize the use of server resources while reducing resource conflicts between component groups.

[0127] When the number of target servers is limited (that is, the number of target servers is less than the number of component groups and not less than the number of index categories) or the first allocation strategy fails, the second allocation strategy is introduced, and resource allocation is performed under the constraint of combining index categories. Under the limited number of target servers, by following the constraint that component groups of different index categories are allocated to different servers, and component groups of the same index category are preferentially allocated to the same target server, not only the probability of component groups successfully matching target servers is greatly increased, but also conflicts caused by resource competition between component groups of different index categories are successfully avoided; at the same time, this strategy greatly improves the utilization efficiency of target servers, effectively reduces the degree of resource fragmentation, and promotes the concentration and efficient use of resources.

[0128] In a possible implementation, given that the available resources of each target server are different, and the resource requirements of the component groupings are also different, coupled with the large number of target servers and component groups, a complex and possibly messy allocation environment is formed. In order to ensure that in such an environment, the first search strategy can be fully utilized to comprehensively allocate target servers to the component groupings, while avoiding the failure of the allocation strategy due to ignoring a certain server combination, this embodiment adopts a method of traversing all potential server combinations. It is intended to significantly improve the success probability of the first allocation strategy, ensure that each component grouping can be accurately matched to a target server that meets its resource requirements, thereby optimizing resource allocation and improving overall system performance. Therefore, in an implementation, a first allocation strategy is used to allocate a target server to each component group, including: traversing each target server combination, determining the final server combination, and using the final server combination as the component allocation result; wherein the order of the target servers in a target server combination corresponds to the order of the component groupings; and the available resources of each target server in the final server combination meet the resource requirements of the corresponding component grouping.

[0129] Optionally, the target servers are combined in various forms according to the number of component groups. In the process of combining the target servers, it is necessary to ensure that the number of target servers included in each target server combination is not less than the number of component groups, and the total available resources in the target server combination meet the total resource requirements. The target server combination represents the order of the target servers in the combination during the search process.

[0130] Further, the number of target servers in the target server combination is consistent with the number of component groups.

[0131] Optionally, in the process of traversing each target server combination, the arrangement order of the component groups remains unchanged.

[0132] In some embodiments, when the number of target servers is greater than the number of component groups, and the number of target servers in the target server combination is consistent with the number of component groups, in order to avoid invalid traversal, when determining the target server combination, first determine whether the total available resources under various combinations of the target servers must meet the total resource requirements of the component groups.

[0133] As an example, suppose there are three component groups, namely a1, a2, and a3, and the arrangement order of the component groups is a1, a2, and a3, and there are four target servers 1 to 4. If the total available resources of the combination including target server 1, target server 2, and target server 3 cannot meet the total resource demand, then various combinations including target server 1, target server 2, and target server 3 are excluded from the target server combination. Specifically, the combinations {1, 2, 3}, {1, 3, 2}, {2, 1, 3}, {2, 3, 1}, {3, 1, 2}, and {3, 2, 1} are not used as target server combinations.

[0134] In one embodiment, when traversing target server combinations, the available resources of target servers that failed to match in the currently traversed target server combinations are used to screen target server combinations that have not been traversed, so as to avoid subsequent unnecessary traversal operations. In this way, target server combinations that cannot produce results are pre-empted, thereby reducing the amount of search tasks and significantly improving search efficiency.

[0135] Based on the above, each target server combination is traversed to determine the final server combination, including: based on the currently traversed target server combination, the target servers in the target server combination are matched with the component groups in turn for resource requirements; in the case where the target server fails to match the component group, the currently traversed target server combination is updated, and the step of matching the target servers in the target server combination with the component groups in turn for resource requirements based on the currently traversed target server combination and subsequent steps is returned to execute until the target server combination that meets the search criteria is traversed, and the target server combination that meets the search criteria is determined as the final server combination.

[0136] The search conditions are satisfied including: the target servers in the target server combination correspond to the component groups one by one, and the available resources of the target servers in the target server combination are not less than the resource requirements of the corresponding component groups.

[0137] Optionally, updating the currently traversed target server combination includes: updating the currently traversed target server combination based on the available resources of each target server in the traversed target server combination, wherein the updated currently traversed target server combination does not include a replacement combination of the traversed target server combination, and the replacement combination is: replacing the third server in the traversed target server combination with a fourth server, the third server being a target server that fails to match the component grouping, and the fourth server being a target server whose available resources are not greater than those of the third server.

[0138] Optionally, the fourth server is a server whose available resources of the target resource type are not greater than those of the third server, and the target resource type is a resource type in the third server that does not satisfy the component grouping.

[0139] For example, assuming that there are three component groups, namely a1, a2, and a3, and assuming that the arrangement order of the component groups is {a1, a2, a3}, and assuming that the arrangement order of the component groups is a1, a2, and a3, there are four target servers 1-4, which may include: {1, 2, 3}, {1, 2, 4}, {1, 3, 2}, {1, 3, 4}, {1, 4, 2}, {1, 4, 3}, {2, 1, 3}, { {2, 1, 4}, {2, 3, 1}, {2, 3, 4}, {2, 4, 1}, {2, 4, 3}, {3, 1, 2}, {3, 1, 4}, {3, 2, 1}, {3, 2, 4}, {3, 4, 1}, {3, 4, 2}, {4, 1, 3}, {4, 1, 2}, {4, 2, 1}, {4, 2, 3}, {4, 3, 1}, {4, 3, 2}, a total of 24 combinations. Assume that the total available resources of each of the 24 combinations are not less than the total resource requirements. Take {1, 2, 3} as the current traversal target server combination, and traverse the target servers according to component groups, including:

[0140] First, component group a1 is matched with target server 1 to determine whether the available resources of target server 1 meet the resource requirements of component group a1; if so, component group a1 is allocated to target server 1. If not, the subsequent matching task of the target server combination is terminated, and one of the remaining 23 target server combinations is used to update the currently traversed target server combination.

[0141] Among them, before the update, since the target server 1 failed to match the component group a1, that is, the available resources of the target server 1 were less than the resource requirements of the component group a1, the remaining 23 groups of target server combinations were eliminated, and the combination that included the target server designated to match the component group a1 and whose available resources did not exceed the target server 1 was eliminated.

[0142] The elimination process includes two parts: In the first part, the remaining 23 target server combinations with the same position of target server 1 in the target server combination {1, 2, 3} are eliminated. That is, {1, 2, 4}, {1, 3, 2}, {1, 3, 4}, {1, 4, 2}, {1, 4, 3} are eliminated to obtain the remaining 18 target server combinations. In the second part, the combinations containing the target servers designated to match component group a1 and with less available resources than target server 1 are eliminated from the remaining 18 target server combinations. Assuming that the available resources of target server 2 are less than the available resources of target server 1, {2, 1, 3}, {2, 1, 4}, {2, 3, 1}, {2, 3, 4}, {2, 4, 1}, {2, 4, 3} are eliminated. Afterwards, the currently traversed target server combination is updated with one of the groups {3, 1, 2}, {3, 1, 4}, {3, 2, 1}, {3, 2, 4}, {3, 4, 1}, {3, 4, 2}, {4, 1, 3}, {4, 1, 2}, {4, 2, 1}, {4, 2, 3}, {4, 3, 1}, {4, 3, 2}, and the process returns to the step of matching the component group a1 with the target server 1. However, it should be noted that the target server 1 needs to be replaced with the target server at the corresponding position in the updated currently traversed target server combination.

[0143] It can be understood that {1, 2, 4}, {1, 3, 2}, {1, 3, 4}, {1, 4, 2}, {1, 4, 3}, {2, 1, 3}, {2, 1, 4}, {2, 3, 1}, {2, 3, 4}, {2, 4, 1}, {2, 4, 3} are replacement combinations of {1, 2, 3}.

[0144] If component group a1 successfully matches target server 1, component group a2 is matched with target server 2 to determine whether the available resources of target server 2 meet the resource requirements of component group a2; if so, component group a2 is allocated to target server 2. If not, the subsequent matching task of the target server combination is terminated, and one of the remaining 23 target server combinations is used to update the currently traversed target server combination in accordance with the above-mentioned update method, which will not be described in detail here. Component group a3 can refer to the matching process of component group a2, which will not be described in detail.

[0145] In another possible implementation, in the target server combination currently traversed, the target servers in the target server combination may be grouped with components for parallel matching of resource requirements.

[0146] Optionally, the parallel matching method can be executed by relying on multi-threading or distributed computing. In the multi-threading solution, a dynamic thread pool is constructed to flexibly adjust the number of threads according to the number of target servers currently in the system. The main thread creates a worker thread. After the main thread creates and starts all worker threads (each worker thread is used to process the matching task of a specific component group), it can wait for these worker threads to complete the task, collect the matching results of each worker thread, and summarize the results to determine whether the currently traversed target server combination is matched successfully. If there is no match, the main thread updates the currently traversed target server combination, and sends the target servers in the target server combination to the corresponding worker thread, so that the worker thread can perform a new round of matching tasks. This maximizes the use of system resources and improves the matching speed.

[0147] In one embodiment of the present application, when the number of target servers is limited (i.e., the number of target servers is less than the number of component groups and not less than the number of index categories) or the first allocation strategy fails, the index category is configured for the component group, the target servers are sorted according to the available resources of the target servers, and the component groups are sorted according to the resource requirements of the component groups, and the target servers are matched with the component groups according to the sorting of the target servers and the sorting of the component groups under the constraint conditions to overcome the allocation problem of the component groups due to the limited number of target servers or the failure of the first allocation strategy. The success rate of resource allocation is improved under the premise of avoiding conflicts caused by resource competition between component groups of different index categories.

[0148] Therefore, under the constraint condition, the second allocation strategy is adopted to allocate the target server for the component group, including: for the component group under the current index category, under the constraint condition, matching is performed according to the preset order of available resources and the preset order of resource requirements of the component group until the match is successful or the matching of the last target server is completed; if the component group under the current index category successfully matches the target server, the available resources of the target server are updated based on the resource requirements of the component group, and the next index category is used as the current index category, and the step of matching the component group under the current index category under the constraint condition according to the preset order of available resources and the preset order of resource requirements of the component group and subsequent steps are returned. In the case that all component groups successfully match the target server, the component allocation result is obtained based on the successfully matched component group and the target server.

[0149] Optionally, the preset order can be from large to small (corresponding to the maximum adaptation strategy) or from small to large (corresponding to the minimum adaptation strategy). Among them, the minimum adaptation strategy prioritizes matching target servers with smaller available resources with component groups with smaller resource requirements under the constraints, which helps to reduce resource waste and ensure that the resources of each target server are fully utilized. The maximum adaptation strategy prioritizes matching target servers with larger available resources with component groups with larger resource requirements under the constraints, which helps to reduce resource fragmentation. It can achieve centralized allocation of component groups of the same index category, making operations more focused and avoiding the scattered deployment of these components on multiple target servers, thereby improving management and maintenance efficiency.

[0150] In some embodiments, the resource types in the target server are compared in the order of memory, CPU, and hard disk, that is, the available resources of the memory, the available resources of the CPU, and the available resources of the hard disk are compared in sequence. Of course, the comparison order and resource types can be adjusted at any time according to actual needs.

[0151] For example, the available memory resources of target server 1 are 16GB, the available CPU resources are 4, and the available hard disk resources are 500GB; the available memory resources of target server 2 are 16GB, the available CPU resources are 8, and the available hard disk resources are 500GB; the available memory resources of target server 3 are 32GB, the available CPU resources are 4, and the available hard disk resources are 1000GB; then the target server 3 has the highest memory usage, and the memory usage of target server 1 and target server 2 is the same. Then compare the available CPU resources of target server 1 and target server 2, where the available CPU resources of target server 2 are higher than the available CPU resources of target server 1. It is concluded that the order of available resources from large to small is target server 3, target server 2, and target server 1.

[0152] Optionally, the preset order is an order from small to large; for the component grouping under the current index category, the target server and the component grouping are matched according to the preset order of available resources and the preset order of resource requirements of the component grouping under the constraint condition until the match is successful or the matching of the last target server is completed, and the component allocation result is obtained, including:

[0153] For the component groups under the current index category, the target server is matched with the component group in the order of available resources from small to large and the order of resource requirements of the component group from small to large under the constraints until the match is successful or the matching of the last target server is completed.

[0154] If the component group under the current index category successfully matches the target server, the available resources of the corresponding target server are updated based on the resource requirements of the current index category, and the next index category is used as the current index category, and the target server and the component group are matched according to the order of available resources from small to large and the order of resource requirements of the component group from small to large under the constraints, until the match is successful or the matching of the last target server is completed and the subsequent steps. In the case that all component groups are assigned with target servers, the component allocation results are determined based on the successfully matched component groups and target servers.

[0155] Optionally, the component groups are allocated according to the index category, that is, after the component groups in the previous index category are allocated, the component groups in the next index category are allocated.

[0156] For example, refer to Figure 5 , taking the preset order from small to large as an example, assuming that the index categories are labeled A and B, wherein index category A includes 2 component groups, namely component group a1 and component group a2. Index category B includes 2 component groups, namely component group b1 and component group b2. Assume that the resource requirements of the above 4 component groups are in the order of a1, a2, b1, b2 from small to large. Of course, it can also be a random allocation, and this application does not limit this. If there are 3 servers 1~3, based on the order of available resources from small to large, they are assumed to be target server 1, target server 2, and target server 3.

[0157] First, assign a target server to component group a1, search target server 1, and determine whether the available resources of target server 1 meet the resource requirements of component group a1; if so, assign component group a1 to target server 1. If not, search target server 2 and perform the same determination steps as target server 1, and so on.

[0158] If component group a1 is allocated to target server 1, the available resources in target server 1 are updated. Then, target server a2 is allocated. First, server 1 is searched. If the updated available resources of target server 1 can meet the needs of component group a2, component group a2 is deployed in target server 1. If not, target server 2 is searched to determine whether the available resources of target server 2 meet the resource requirements of component group a2. If so, component group a2 is allocated to target server 2. If not, target server 3 is searched and the same determination steps as those for target server 1 are performed.

[0159] If component group a1 is allocated to target server 1 and component group a2 is allocated to target server 2, the available resources in target server 2 are updated. Since component group a1 is allocated to target server 1 and component group a2 is allocated to target server 2, and the component groups of different index categories included in the constraint conditions are allocated to different target servers, the resource demand judgment process of target server 1 and target server 2 for component group b1 is skipped, and target server 3 is searched to judge whether the available resources of target server 3 meet the resource demand of component group b1. If so, component group b1 is allocated to target server 3. If not, a prompt message is displayed.

[0160] If component group b1 is allocated to target server 3, the available resources in target server 3 are updated. Next, target server is allocated to component group b2. First, target server 3 is searched. If the updated available resources of target server 3 can satisfy component group b2, component group b2 is deployed in target server 3. If not, it is confirmed that the second allocation strategy fails.

[0161] Understandably, Figure 5 The allocation process using the second allocation strategy under the constraint condition is simply shown, and the specific details are subject to the above text description.

[0162] In one implementation, matching is performed according to a preset order of available resources and a preset order of resource requirements of component groups until a match is successful, including: determining the current component grouping according to the preset order of resource requirements, and determining the current server that matches the current component grouping according to the preset order of available resources; if the current component grouping successfully matches the current server, updating the available resources of the current server using the resource requirements of the current component grouping; updating the preset order of available resources using the updated available resources of the current server, and returning to execute the step of determining the current component grouping according to the preset order of resource requirements and subsequent steps.

[0163] As an example, taking the preset order as the order from small to large, based on the above Figure 5In the index category, component group and target server, first assign a target server to component group a1, assuming that component group a1 is assigned to target server 2, and update the available resources in target server 2. Then re-sort the three target servers 1 to 3, assuming that the new sorting is target server 2, target server 1, and target server 3. Use the new sorting to update the preset sequence of the target servers, and when subsequently assigning a target server to component group a2, first match component group a2 with target server 2 to confirm whether the available resources of target server 2 meet the resource requirements of component group a2. The same applies to other unassigned component groups, which will not be repeated here.

[0164] In a possible implementation, the preset order includes an order from small to large and / or an order from large to small; if the second allocation strategy fails to allocate the target servers in an order from small to large, in order to successfully allocate the target servers to the component groups, the available resources of the target servers and the resource requirements of the component groups are matched again in an order from large to small. Therefore, the method also includes: if the component groups under the current index category are matched in an order from small to large according to the constraints, and in an order from small to large according to the resource requirements of the component groups, until the last target server is matched, then the preset order is updated to an order from large to small, and the component groups under the current index category are re-executed in an order from small to large according to the constraints, and in an order from small to large according to the preset order of available resources and resource requirements of the component groups, until the matching is successful or the matching of the last target server is completed and the subsequent steps.

[0165] Therefore, for the component groupings under the current index category, the target servers and component groupings are matched according to the order of available resources from small to large and the order of resource requirements of the component groupings from small to large under the constraints until the match is successful or the matching of the last target server is completed, and then it also includes: if the component groupings under the current index category fail to match with all target servers, then, under the constraints, the third allocation strategy is used to allocate target servers for all component groups; the target servers and component groupings are matched according to the order of available resources of the target servers from large to small and the order of resource requirements of the component groupings from large to small.

[0166] For the component grouping under the current index category, the target server and the component grouping are matched according to the order of available resources of the target server from large to small and the order of resource requirements of the component grouping from large to small under the constraint conditions until the match is successful or the matching of the last target server is completed; if the component grouping under the current index category is successfully matched with the target server, the available resources of the corresponding target server are updated based on the resource requirements of the current index category, and the next index category is used as the current index category, and the target server and the component grouping are matched according to the order of available resources of the target server from large to small and the order of resource requirements of the component grouping from large to small under the constraint conditions until the match is successful or the matching of the last target server is completed and subsequent steps; when all component groups are successfully matched with the target server, the component allocation result is determined based on the successfully matched component grouping and the target server.

[0167] It should be noted that, in the embodiment of using the third allocation strategy to allocate component groups, Figure 5 The resource requirements of the four component groups are modified to be in the order of b2, b1, a2, a1 from large to small, and the available resources of the target servers are modified to be in the order of target server 3, target server 2, target server 1 from large to small. Figure 5 The embodiment in which the component groups are allocated in the order from small to large is not described in detail here.

[0168] After the component group allocation is initially completed, in order to further optimize the resource utilization efficiency, the component groups between the target servers will be allocated and adjusted according to the resource occupancy rate of each target server and / or the allocated number of component groups based on the principle of resource balancing. Therefore, after using the first allocation strategy to allocate a target server to each component group or using the second allocation strategy to allocate target servers to component groups under constraints, it also includes: determining the resource occupancy rate of each target server and / or the allocated number of component groups based on the component allocation result; and adjusting the allocation of component groups based on the resource occupancy rate of each target server and / or the allocated number of component groups.

[0169] Optionally, the resource occupancy rate of the target server obtained based on the resource occupancy in the target server includes: memory occupancy percentage, CPU occupancy percentage, mechanical hard disk occupancy percentage and / or solid state disk occupancy percentage.

[0170] In some embodiments, the comparison order is based on the memory occupancy percentage, CPU occupancy percentage, mechanical hard disk occupancy percentage, and solid-state hard disk occupancy percentage (comparison rules can also be customized). If two target servers are compared, they are compared in sequence in the above comparison order. If the previous item in the comparison order is the same, the next item is compared. If the previous item is different, the resource occupancy rate of the two target servers can be determined.

[0171] For example, the memory usage percentage of target server 1 is 80%, and the CPU usage percentage is 40%, the memory usage percentage of target server 2 is 75%, and the CPU usage percentage is 40%, and the memory usage percentage of target server 3 is 75%, and the CPU usage percentage is 41%. By comparison, it can be seen that the target server 1 has the highest memory usage percentage, followed by target server 2 and target server 3, which have the same memory usage percentage; then comparing the CPU usage percentages of target server 2 and target server 3, the usage percentage of target server 3 is higher than that of target server 2. It can be obtained that the order of resource usage from high to low is target server 1, target server 3, and target server 2.

[0172] In order to fully and efficiently utilize server resources, the component groups of a server with high resource utilization rate are exchanged with the target server with low resource utilization rate, or some component groups of a target server with a large number of component groups are transferred to a target server with a small number of component groups, so as to achieve balanced configuration of target server resources and ensure that the resources of each target server can be efficiently utilized.

[0173] Therefore, based on the resource occupancy rate of each target server and / or the allocated quantity of the component group, the allocation adjustment of the component group is performed, including:

[0174] Optionally, if the target server exists a fifth server and a sixth server, the component groups in the fifth server are adjusted and allocated to the sixth server with the goal that the difference between the allocated number of component groups in the fifth server and the allocated number of component groups in the sixth server is not greater than a preset difference; wherein the allocated number of component groups in the fifth server is greater than the allocated number of component groups in the sixth server, and the difference between the allocated number of component groups in the fifth server and the allocated number of component groups in the sixth server is greater than the preset difference, and the index categories of the component groups in the fifth server and the sixth server are the same, and the resource configuration data of the fifth server is consistent with the resource configuration data in the sixth server.

[0175] Optionally, the resource configuration data of the target server is used to represent the configured resource amount of the CPU, memory, and hard disk, and the configured resource amount includes occupied resources and unoccupied resources.

[0176] As an example, see Figure 6 , set the preset difference value to 1, traverse all target servers, and select target servers with the same index category of the allocated component resources and the same resource configuration data. Select two target servers (assuming they are target server 1 and target server 2), and compare the number of component groupings allocated in target server 1 and target server 2. Assume that the number of component groups in target server 1 (such as Figure 6 3) and the number of components grouped with the target server 2 (as shown in Figure 6 If the difference between the target server 1 and the target server 2 is greater than 1, one of the component groups of the target server 1 is transferred to the target server 2 based on the preset difference. In this way, through adjustment, the resource allocation between the target servers is balanced and the stability and efficiency of the system are maintained.

[0177] Optionally, the difference between the difference between the allocated number of component groups in the fifth server and the allocated number of component groups in the sixth server and a preset difference is determined, and if the difference is less than or equal to the preset difference, the component groups in the fifth server with the difference are transferred to the sixth server. If the difference is greater than the preset difference, the component groups in the fifth server with half the difference are transferred to the sixth server.

[0178] It can be understood that if the difference is an odd number, after the fifth server is transferred to the sixth server, the number of component groups allocated in the sixth server is one less than the number of component groups allocated in the fifth server. For example, when the difference is 3, one component group in the fifth server is transferred to the sixth server. If the difference is an even number, half of the number of component groups of the difference is transferred to the sixth server.

[0179] Optionally, if the target server contains a seventh server and an eighth server, the component grouping in the seventh server and the component grouping in the eighth server are allocated and exchanged; wherein the resource occupancy rate of the seventh server is less than the resource occupancy rate of the eighth server, and the resource configuration data of the seventh server is greater than the resource configuration data of the eighth server.

[0180] It is understandable that the allocation exchange of component groups between two target servers is applied to different resource configuration data between the target servers, and the number of component groups allocated in the target server with larger resource configuration data is smaller.

[0181] As an example, see Figure 7 , refer to Figure 6, set the preset difference value to 1, traverse all target servers, select target server 3 and target server 4; among them, the resource configuration data of target server 3 is larger and the number of component groupings allocated is smaller, and the resource configuration data of target server 4 is smaller and the number of component groupings allocated is larger. Then exchange the component groups of target server 4 and target server 3.

[0182] In a possible implementation, considering that the logic of component allocation is allocated with component group as the smallest unit, the middleware selection set in the component group is firstly used. If the component group does not have a specific middleware assigned, the corresponding middleware will be searched from the target server where the component group is deployed. If the target server does not have a middleware, the target server with the component group of the same "index category" deployed will be searched for middleware. If no middleware is found, the global default middleware will be used.

[0183] Among them, the middleware is a component that can provide a single basic service, including database, message service, cache service, etc. For example, the middleware can be a component module corresponding to the dependent component shown in Table 1. In a possible implementation, the installation package of the product also includes the sales items of the product and the association relationship table of the components, and the trigger interface program module obtains the target component list of the product, including:

[0184] The trigger interface program module determines the component list associated with the sales item in the authorization file of the product from the association relationship table and generates a target component list.

[0185] In one application scenario, in addition to making an installation tool, you can also make a relationship table between the sales items and components of the product, and combine the made installation tool, the relationship table and the product package to form the installation package of the product. Therefore, the above relationship table can be determined from the installation package of the product. Optionally, the above relationship table describes the list of components associated with each sales item of the product, that is, the list of components involved in each business function of the product.

[0186] The interface program module can determine the components that need to be installed through the sales items in the authorization file purchased by the user in combination with the above-mentioned association relationship table, thereby generating a target component list.

[0187] In a possible implementation, the terminal can import the authorization file into the interface program module, and on this basis, the interface program module can generate a target component list based on the authorization file. For example, after the terminal runs the interface program module, the interface program module can be triggered to display an authorization file import page, and the technical support personnel import the authorization file of the product purchased by the user on the authorization file import page, thereby importing the authorization file into the interface program module.

[0188] Since the above-mentioned association table describes the list of components associated with each sales item of the product, you can first find the sales item in the authorization file from the above-mentioned association table, and then find the list of components associated with the sales item in the above-mentioned association table, so as to obtain the list of components associated with the sales item in the authorization file.

[0189] In a possible implementation, the installation package of the product also includes a web component deployment strategy of the product, the web component deployment strategy represents the allocation rules of the web components in the web container of the product and the parameter configuration information of the web container, and the triggering interface program module generates a component deployment list based on the list of components to be installed on each target server, including:

[0190] The triggering interface program module determines the number of web containers to be installed on each target server, the list of web components to be run in each web container, and the parameter configuration information of each web container based on the list of components to be installed on each target server and the web component deployment strategy;

[0191] The trigger interface program module generates a component deployment list based on a list of components to be installed on each target server, the number of web containers, a list of web components to be run in each web container, and parameter configuration information of each web container.

[0192] In one application scenario, in addition to making installation tools and a relationship table between the sales items and components of the product, a web component deployment strategy can also be made, and the installation tools, relationship table, web component deployment strategy and product package are combined to form the product installation package. Therefore, the web component deployment strategy can be determined from the product installation package. By configuring the above installation tools, relationship table and web component deployment strategy in the product installation package in advance, all configuration operations involved in the product deployment process can be completed in advance. After the configuration is completed, the product installation and subsequent authorization activation operations can be completed at one time.

[0193] Optionally, the allocation rules of the product's web components and the parameter configuration information of the web container can be set on the basis of considering improving product stability and facilitating later maintenance. The above allocation rules include, but are not limited to, specifying that a certain web component is deployed separately in a web container, limiting the upper limit of web components deployed in a web container, and specifying that certain web components are deployed in the same web container. For example, the device access component is deployed separately in a web container, and the corresponding web components such as the one-card pass and the parking lot are deployed in the same web container. When setting the parameter configuration information of the web container, it can be set based on the performance of the web components that need to be installed in the web container and / or the number of web components that need to be installed. For example, if the performance of a web component is relatively high, more memory can be allocated to the web container where the web component is installed; if there are many web components that need to be installed in a web container, more memory and threads can be allocated to the web container.

[0194] Step 302, triggering the interface program module to send the product package, the background service program module and the component deployment list to the first server of the target server, so that the first server triggers the background service program module to control each target server to install the corresponding components in the product package based on the component deployment list.

[0195] The terminal sends the product package, the background service program module, the component deployment list and other contents to the first server by triggering the interface program module, which does not require the participation of technical support personnel and can shield the interaction between the technical support personnel and the first server.

[0196] In one possible implementation, after executing step 302, the terminal can also trigger the interface program module to obtain the installation progress of the components on each target server, where the components on each target server are components in the list of components that need to be installed on each target server; when the installation progress of the components on each target server indicates that the installation is complete, the interface program module is triggered to activate the components installed on each target server based on the product authorization file.

[0197] Since the authorization file is imported into the interface program module before the component is installed, the interface program module can directly activate the component based on the authorization file after the component is installed. This process does not require human intervention, which improves the authorization activation efficiency of the product.

[0198] In order to facilitate technical support personnel to understand the installation progress of the components, after the first server feeds back the installation progress of the components on each target server to the terminal, the terminal can trigger the interface program module to display the installation progress of the components on each target server in real time.

[0199] The embodiment of the present application can shield the interaction between technical support personnel and the first server through the interface program module, and there is no need for technical support personnel to participate in the above-mentioned product deployment process. By triggering the interface program module to send the product package, background service program module and component deployment list to the first server, the first server can automatically install the components of the product based on this information, thereby realizing automatic deployment of the product, reducing the difficulty of product deployment operations, and improving product availability.

[0200] See also Figure 8 , Figure 8 Another schematic flow chart of a product deployment method provided in an embodiment of the present application is shown, and the product deployment method is applied to a first server. As an example but not a limitation, the product deployment method includes the following steps:

[0201] Step 801, receiving a product package, a background service program module and a component deployment list from a terminal.

[0202] The component deployment list includes a list of components that need to be installed on each target server, where the target server is the server on which the product is to be deployed. The background service program module is used to complete the product installation. Product installation includes but is not limited to the installation of the product's operation and maintenance platform and the installation of components.

[0203] In one possible implementation, when the number of target servers is an integer greater than 1, the target server also includes a second server, and when receiving the product package, the background service program module and the component deployment list from the terminal, the device information of each target server can also be received from the terminal; the background service program module is triggered to install the operation and maintenance platform of the product based on the product package, and each target server is added to the operation and maintenance platform based on the device information of each target server.

[0204] The first server adds each target server to the operation and maintenance platform by triggering the background service program module. This process does not require human intervention, thereby improving the efficiency of adding target servers.

[0205] The above product package includes an installation package of the product's operation and maintenance platform. The first server can trigger the background service program module to install the operation and maintenance platform based on the installation package of the operation and maintenance platform in the product package. After each target server is added to the operation and maintenance platform, the components installed on each target server can be managed and maintained through the operation and maintenance platform.

[0206] After adding each target server to the operation and maintenance platform, the background service program module can add more target servers at the product deployment site, thereby achieving coordinated allocation of product components and improving component installation efficiency and product operation efficiency.

[0207] Step 802 , triggering the background service program module to control each target server to install the corresponding components in the product package based on the component deployment list.

[0208] The first server can automatically install the components of the product based on the component deployment list by triggering the background service program module to control the corresponding components in the product package installed on each target server, thereby realizing automatic deployment of the product, reducing the difficulty of product deployment operations, and improving product availability.

[0209] The component deployment list includes a list of components that need to be installed on each target server. Any component list includes identification information of at least one component. Based on the identification information of the component, the installation package of the component can be found in the product package, and the component can be installed on the corresponding target server based on the installation package of the component. For example, the list of components that need to be installed on target server A includes identification information of component A and identification information of component B. Based on the identification information of component A and identification information of component B, the installation packages of component A and component B can be found in the product package. Based on the installation package of component A, target server A can be controlled to install component A, and based on the installation package of component B, target server A can be controlled to install component B.

[0210] In a possible implementation, the component deployment list also includes the number of web containers to be installed on each target server, a list of web components to be run in each web container, and parameter configuration information of each web container. The triggering background service program module controls each target server to install the corresponding component in the product package based on the component deployment list, including:

[0211] For any target server, trigger the background service program module to determine the installation package of the non-web component of the target server, the installation package of the web container, and the installation package of the web component to be run in each web container from the product package based on the component deployment list, and the non-web component of the target server is the non-web component in the list of components to be installed on the target server;

[0212] The triggering background service program module controls the target server to install the corresponding components based on the installation package of the non-web components of the target server, the installation package of the web container, the installation packages of the web components that need to be run in each web container, and the parameter configuration information of each web container.

[0213] In order to distinguish web components from other components in the product, the components of the product can be divided into web components and non-web components. Non-web components are components of the product other than web components. The components that need to be installed on any target server usually include web components and non-web components. Web components are usually installed in web containers, so the product package also includes the installation package of the web container. Based on the installation package of the web container, a corresponding number of web containers can be installed on the corresponding target server.

[0214] Of course, it is understandable that the components that need to be installed on any target server may all be web components or all be non-web components. For a target server where all components that need to be installed are web components, the background service program module can be triggered to determine the installation package of the web container and the installation package of the web component that needs to be installed on the target server from the product package based on the component deployment list, and based on the installation package of the web container, the installation package of the web component that needs to be installed on the target server, and the parameter configuration information of each web container that needs to be installed on the target server, control the target server to install the corresponding web component. For a target server where all components that need to be installed are non-web components, the background service program module can be triggered to determine the installation package of the non-web component that needs to be installed on the target server from the product package based on the component deployment list, and based on the installation package of the non-web component, control the target server to install the corresponding non-web component.

[0215] Of course, it is understandable that the first server can also trigger the background service program module in other ways to control the corresponding components in the installation product package of each target server based on the component deployment list, and this application does not limit this.

[0216] In a possible implementation, the process of controlling the first server to install the corresponding component is as follows:

[0217] Triggering the background service program module to install a corresponding number of web containers on the first server based on the installation package of the web container, and updating the parameters of the corresponding web container based on the parameter configuration information of each web container;

[0218] The background service program module is triggered to install the web components into the corresponding web containers based on the installation packages of the web components that need to be run in each web container;

[0219] The background service program module is triggered to install the non-web component to a designated location of the first server based on the installation package of the non-web component.

[0220] For the first server, the corresponding number may refer to the number of web containers that need to be installed on the first server.

[0221] The updating of the parameters of the corresponding web container based on the parameter configuration information of each web container may be that after each web container is installed, the parameters of each web container are set or updated to the corresponding parameter configuration information.

[0222] The above-mentioned designated location may refer to a pre-set installation path of the non-web component.

[0223] In a possible implementation, when the number of target servers is greater than 1, the target server further includes a second server, and a process of controlling the second server to install a corresponding component is as follows:

[0224] The background service program module is triggered to send the installation package of the non-web component of the second server, the installation package of the web container, the installation package of the web component that needs to be run in each web container, and the parameter configuration information of each web container to the second server. The installation package of the non-web component of the second server, the installation package of the web container, the installation package of the web component that needs to be run in each web container, and the parameter configuration information of each web container are used to instruct the second server to install the corresponding component.

[0225] After the second server receives the installation package of the non-web component, the installation package of the web container, the installation package of the web component to be run in each web container, and the parameter configuration information of each web container sent by the first server, the installation process of its components is the same as the installation process of the components on the first server. The specific process can be found in the relevant description of the component installation on the first server, which will not be repeated here.

[0226] In a possible implementation, the process of controlling each target server to install a corresponding component in the product package further includes:

[0227] The background service program module is triggered to obtain the installation progress of the components on each target server, and send the installation progress of the components on each target server to the terminal. The components on each target server are components in the component list that needs to be installed on each target server.

[0228] The first server sends the installation progress of the components on each target server to the terminal, which can facilitate the terminal to understand the installation status of the components on each target server and quickly activate the components installed on each target server when the installation is completed, thereby improving the authorization activation efficiency of the product.

[0229] The embodiment of the present application receives the product package, background service program module and component deployment list from the terminal, and triggers the background service program module to control the installation of corresponding components on each target server based on the product package and the component deployment list, thereby realizing automatic installation of product components, thereby realizing automatic deployment of the product, reducing the difficulty of product deployment operations, and improving product availability.

[0230] like Fig. 9 The following is an example diagram of a product deployment process provided by an embodiment of the present application. The product deployment process is described as follows:

[0231] 1. Create a product installation package and copy the product installation package to the terminal. That is, the technical support personnel copy the installation package to the terminal.

[0232] 2. The terminal runs the interface program module in the product installation package, and imports the authorization file purchased by the user on the authorization file import page displayed in the interface program module, and fills in the server information (that is, the device information of each target server to be added) on the server filling page displayed in the interface program module.

[0233] 3. The terminal trigger interface program module generates a final component deployment list through the authorization file, combined with the web deployment strategy preset in the product installation package, the association table between sales items and components, and the number of added target servers.

[0234] 4. The terminal triggers the interface program module to upload the product package, the background service program module and the component deployment list to the first server.

[0235] 5. The first server runs the background service program module so that the background service program module can be triggered and used later.

[0236] 6. The first server triggers the background service program module to install the operation and maintenance platform based on the installation package of the operation and maintenance platform in the product package.

[0237] 7. The first server triggers the background service program module to add each target server to the operation and maintenance platform.

[0238] 8. The first server triggers the background service program module to install the component based on the product package and the component deployment list.

[0239] 9. After the installation is completed on each target server, the terminal triggers the interface program module to import the authorization file and activate the product.

[0240] Depend on Fig. 9It can be seen from the described product deployment process that the embodiment of the present application can deploy the product to each target server by running the interface program module on the terminal, which reduces the difficulty of technical support personnel to deploy the product. The list of components to be installed this time can be determined by the sales items purchased in the authorization file, which can avoid the problem of missing or overinstalling. According to the web component deployment strategy, the web components running in the web container are reasonably allocated and the parameters are optimized, which improves the stability of the product to a certain extent and facilitates later maintenance.

[0241] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0242] Fig.10 A schematic diagram of a product deployment device provided in an embodiment of the present application is shown, wherein the product deployment device is applied to a terminal, wherein the terminal includes an installation package of a product, and the installation package of the product includes an interface program module, a background service program module, and a product package. For ease of description, only the parts related to the embodiment of the present application are shown.

[0243] Reference Fig.10 , the product deployment device includes:

[0244] The first interface triggering module 1001 is used to trigger the interface program module to obtain a component deployment list of the product, where the component deployment list includes a list of components that need to be installed on each target server, where the target server is the server on which the product is to be deployed;

[0245] The second interface trigger module 1002 is used to trigger the interface program module to send the product package, background service program module and component deployment list to the first server of the target server, so that the first server triggers the background service program module to control the installation of corresponding components in the product package on each target server based on the component deployment list.

[0246] Optionally, the first interface triggering module 1001 includes:

[0247] A first interface triggering unit, used to trigger the interface program module to obtain a target component list of the product;

[0248] A second interface triggering unit, configured to trigger the interface program module to determine a list of components to be installed on each target server from the target component list based on the number of target servers and available resources;

[0249] The third interface triggering unit is used to trigger the interface program module to generate a component deployment list based on the component list that needs to be installed on each target server.

[0250] Optionally, the product installation package also includes a sales item of the product and an association table of components, and the first interface triggering unit is specifically used for:

[0251] The trigger interface program module determines the component list associated with the sales item in the authorization file of the product from the association relationship table and generates a target component list.

[0252] Optionally, the above product deployment device further includes:

[0253] The authorization import module is used to import the authorization file into the interface program module.

[0254] Optionally, the product installation package further includes a web component deployment strategy for the product, where the web component deployment strategy represents allocation rules of web components in the web container of the product and parameter configuration information of the web container. The third interface triggering unit is specifically used to:

[0255] The triggering interface program module determines the number of web containers to be installed on each target server, the list of web components to be run in each web container, and the parameter configuration information of each web container based on the list of components to be installed on each target server and the web component deployment strategy;

[0256] The trigger interface program module generates a component deployment list based on a list of components to be installed on each target server, the number of web containers, a list of web components to be run in each web container, and parameter configuration information of each web container.

[0257] Optionally, the above product deployment device further includes:

[0258] The information filling module is used to fill in the device information of each target server into the interface program module;

[0259] The third interface triggering module is used to trigger the interface program module to determine the first server based on the device information of each target server. Optionally, the above product deployment device also includes:

[0260] A fourth interface triggering module, used to trigger the interface program module to obtain the installation progress of the components on each target server, where the components on each target server are components in the component list to be installed on each target server;

[0261] The fifth interface triggering module is used to trigger the interface program module to activate the components installed on each target server based on the authorization file when the installation progress of the components on each target server indicates that the installation is completed.

[0262] Fig.11Another structural diagram of a product deployment device provided in an embodiment of the present application is shown, and the product deployment device is applied to a first server. For ease of description, only the parts related to the embodiment of the present application are shown.

[0263] Reference Fig.11 , the product deployment device includes:

[0264] The information receiving module 1101 is used to receive the product package, the background service program module and the component deployment list from the terminal, the component deployment list includes a list of components to be installed on each target server, and the target server is the server to which the product is to be deployed;

[0265] The background service triggering module 1102 is used to trigger the background service program module to control each target server to install the corresponding components in the product package based on the component deployment list.

[0266] Optionally, the component deployment list also includes the number of web containers that need to be installed on each target server, a list of web components that need to be run in each web container, and parameter configuration information of each web container. The background service triggering module 1102 includes:

[0267] The first triggering unit is used for triggering the background service program module to determine, for any target server, an installation package of a non-web component of the target server, an installation package of a web container, and an installation package of a web component to be run in each web container from a product package based on a component deployment list, wherein the non-web component of the target server is a non-web component in a list of components to be installed on the target server;

[0268] The second triggering unit is used to trigger the background service program module to control the target server to install the corresponding component based on the installation package of the non-web component of the target server, the installation package of the web container, the installation package of the web component to be run in each web container, and the parameter configuration information of each web container.

[0269] Optionally, for the first server, the second triggering unit is specifically used to:

[0270] Triggering the background service program module to install a corresponding number of web containers on the first server based on the installation package of the web container, and updating the parameters of the corresponding web container based on the parameter configuration information of each web container;

[0271] The background service program module is triggered to install the web components into the corresponding web containers based on the installation packages of the web components that need to be run in each web container;

[0272] The background service program module is triggered to install the non-web component to a designated location of the first server based on the installation package of the non-web component.

[0273] Optionally, when the number of target servers is greater than 1, the target server further includes a second server, and for the second server, the second triggering unit is specifically configured to:

[0274] The background service program module is triggered to send the installation package of the non-web component of the second server, the installation package of the web container, the installation package of the web component that needs to be run in each web container, and the parameter configuration information of each web container to the second server. The installation package of the non-web component of the second server, the installation package of the web container, the installation package of the web component that needs to be run in each web container, and the parameter configuration information of each web container are used to instruct the second server to install the corresponding component.

[0275] Optionally, the background service triggering module 1102 is further used to:

[0276] The background service program module is triggered to obtain the installation progress of the components on each target server, and send the installation progress of the components on each target server to the terminal. The components on each target server are components in the component list that needs to be installed on each target server.

[0277] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0278] Fig.12 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Fig.12 As shown, the electronic device 12 of this embodiment includes: at least one processor 1200 ( Fig.12 Only one is shown in the figure), a memory 1201 and a computer program 1202 stored in the memory 1201 and executable on the at least one processor 1200, wherein the processor 1200 implements the steps in the above-mentioned product deployment method embodiments when executing the computer program 1202.

[0279] The electronic device 12 may be a server, a tablet computer, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, etc. The electronic device 12 may include, but is not limited to, a processor 1200 and a memory 1201. Those skilled in the art will appreciate that Fig.12 It is only an example of the electronic device 12 and does not constitute a limitation on the electronic device 12. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access devices, etc.

[0280] The processor 1200 may be a CPU, or other general-purpose processors, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0281] In some embodiments, the memory 1201 may be an internal storage unit of the electronic device 12, such as a hard disk or memory of the electronic device 12. In other embodiments, the memory 1201 may also be an external storage device of the electronic device 12, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 12. Further, the memory 1201 may also include both an internal storage unit of the electronic device 12 and an external storage device. The memory 1201 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program. The memory 1201 may also be used to temporarily store data that has been output or is to be output.

[0282] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0283] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the device / electronic device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electric carrier signal, a telecommunication signal, and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.

[0284] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

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

[0286] In the embodiments provided in the present application, it should be understood that the disclosed devices / electronic devices and methods can be implemented in other ways. For example, the device / electronic device embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

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

[0288] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A product deployment method, characterized in that: Applied to a terminal, the terminal includes an installation package of a product, the installation package of the product includes an interface program module, a background service program module and a product package, and the product deployment method includes: Triggering the interface program module to obtain a component deployment list of the product, the component deployment list including a list of components to be installed on each target server, the target server being a server on which the product is to be deployed; Triggering the interface program module to send the product package, the background service program module and the component deployment list to the first server of the target server, so that the first server triggers the background service program module to control each target server to install the corresponding component in the product package based on the component deployment list; The triggering of the interface program module to obtain the component deployment list of the product includes: triggering the interface program module to obtain a target component list of the product; Triggering the interface program module to determine a list of components to be installed on each target server from the target component list based on the number and available resources of the target servers; Triggering the interface program module to generate the component deployment list based on the list of components to be installed on each target server; The triggering of the interface program module determines, based on the number of target servers and available resources, from the target component list, a list of components to be installed on each target server, including: The interface program module is triggered to divide the components in the target component list into component groups to be allocated, determine the total available resources based on the available resources of each target server, and determine the total resource requirements based on the resource requirements of each component group, and determine that the total available resources meet the total resource requirements; if the number of the target servers is not less than the number of the component groups, allocate one target server to each of the component groups; if the number of the target servers is less than the number of the component groups and not less than a first threshold, or the allocation of one target server to each of the component groups fails, allocate the target server to the component group under constraints; wherein each of the component groups is configured with an index category, and the first threshold is the number of index categories; the constraints include: the component groups of different index categories are allocated to different target servers, and the component groups of the same index category are preferentially allocated to the same target server; The allocating the target server to the component group under the constraint condition includes: under the constraint condition, according to the preset order of the available resources and the preset order of the resource requirements of the component group, matching the component group with the target server and allocating the target server to the component group.

2. The product deployment method according to claim 1, characterized in that: The installation package of the product also includes the sales items of the product and the association relationship table of components, and the triggering of the interface program module to obtain the target component list of the product includes: The interface program module is triggered to determine the component list associated with the sales items in the authorization file of the product from the association relationship table, and generate the target component list.

3. The product deployment method according to claim 2, characterized in that: Before triggering the interface program module to determine the component list associated with the sales item in the authorization file of the product from the association relationship table, the method further includes: Import the authorization file into the interface program module.

4. The product deployment method according to claim 1, characterized in that: The installation package of the product also includes a web component deployment strategy of the product, wherein the web component deployment strategy represents a distribution rule of web components in a web container of the product and parameter configuration information of the web container, and the triggering of the interface program module generates the component deployment list based on the list of components to be installed on each target server, including: Triggering the interface program module to determine the number of web containers to be installed on each target server, the list of web components to be run in each web container, and parameter configuration information of each web container based on the list of components to be installed on each target server and the web component deployment strategy; The interface program module is triggered to generate the component deployment list based on the component list to be installed on each target server, the number of web containers, the list of web components to be run in each web container, and the parameter configuration information of each web container.

5. The product deployment method according to claim 1, characterized in that: The method further comprises: Filling the device information of each target server into the interface program module; The interface program module is triggered to determine the first server based on the device information of each target server.

6. The product deployment method according to any one of claims 1 to 5, characterized in that: After triggering the interface program module to send the product package, the background service program module and the component deployment list to the first server of the target server, the method further includes: Triggering the interface program module to obtain the installation progress of the components on each target server, where the components on each target server are components in a list of components that need to be installed on each target server; The interface program module is triggered to activate the components installed on each target server based on the authorization file of the product when the installation progress of the components on each target server indicates that the installation is completed.

7. A product deployment method, characterized in that: Applied to the first server, the product deployment method includes: Receive a product package, a background service program module and a component deployment list from a terminal, wherein the component deployment list includes a list of components to be installed on each target server, wherein the target server is a server to be deployed with the product; the list of components to be installed on each target server is determined by the interface program module by dividing the components in the target component list of the product into component groups to be allocated, determining the total available resources based on the available resources of each target server, and determining the total resource requirements based on the resource requirements of each component group, and determining that the total available resources meet the total resource requirements; if the number of the target servers is not less than the number of the component groups, then allocate one target server to each of the component groups; if the number of the target servers is less than the number of the component groups and is not less than a first threshold, or if the allocation of one target server to each component group fails, the target server is determined for the component group under the constraint condition; wherein each component group is configured with an index category, and the first threshold is the number of index categories; the constraint condition includes: the component groups of different index categories are allocated to different target servers, and the component groups of the same index category are preferentially allocated to the same target server; the allocation of the target server to the component group under the constraint condition includes: matching the component group with the target server according to the preset order of the available resources and the preset order of the resource requirements of the component group under the constraint condition, and allocating the target server to the component group; The background service program module is triggered to control each target server to install the corresponding components in the product package based on the component deployment list.

8. The product deployment method according to claim 7, characterized in that: The component deployment list also includes the number of web containers to be installed on each target server, a list of web components to be run in each web container, and parameter configuration information of each web container. The triggering of the background service program module to control each target server to install the corresponding component in the product package based on the component deployment list includes: For any of the target servers, trigger the background service program module to determine, based on the component deployment list, from the product package, the installation package of the non-web component of the target server, the installation package of the web container, and the installation packages of the web components that need to be run in each web container, wherein the non-web component of the target server is a non-web component in the list of components that need to be installed on the target server; The background service program module is triggered to control the target server to install corresponding components based on the installation package of the non-web component of the target server, the installation package of the web container, the installation packages of the web components to be run in each web container, and the parameter configuration information of each web container.

9. The product deployment method according to claim 8, characterized in that: For the first server, the triggering of the background service program module controls the target server to install corresponding components based on the installation package of the non-web component of the target server, the installation package of the web container, the installation packages of the web components to be run in each web container, and the parameter configuration information of each web container, including: Triggering the background service program module to install a corresponding number of the web containers on the first server based on the installation package of the web container, and updating the parameters of the corresponding web containers based on the parameter configuration information of each web container; Triggering the background service program module to install the web component into the corresponding web container based on the installation package of the web component to be run in each web container; The background service program module is triggered to install the non-web component to a designated location of the first server based on the installation package of the non-web component.

10. The product deployment method according to claim 8, characterized in that: In the case that the number of the target servers is greater than 1, the target servers further include a second server, and for the second server, the triggering of the background service program module controls the target server to install a corresponding component based on an installation package of a non-web component of the target server, an installation package of the web container, an installation package of a web component to be run in each web container, and parameter configuration information of each web container, including: The background service program module is triggered to send an installation package of a non-web component of the second server, an installation package of the web container, an installation package of a web component to be run in each web container, and parameter configuration information of each web container to the second server, wherein the installation package of the non-web component of the second server, the installation package of the web container, the installation package of a web component to be run in each web container, and the parameter configuration information of each web container are used to instruct the second server to install corresponding components.

11. The product deployment method according to any one of claims 7 to 10, characterized in that: The process of controlling each target server to install the corresponding component in the product package also includes: The background service program module is triggered to obtain the installation progress of the components on each target server, and send the installation progress of the components on each target server to the terminal, where the components on each target server are components in a list of components that need to be installed on each target server.

12. A product deployment device, characterized in that: Applied to a terminal, the terminal includes an installation package of a product, the installation package of the product includes an interface program module, a background service program module and a product package, and the product deployment device includes: A first interface triggering module, used to trigger the interface program module to obtain a component deployment list of the product, wherein the component deployment list includes a list of components to be installed on each target server, and the target server is a server on which the product is to be deployed; A second interface triggering module is used to trigger the interface program module to send the product package, the background service program module and the component deployment list to the first server of the target server, so that the first server triggers the background service program module to control each target server to install the corresponding component in the product package based on the component deployment list; The first interface triggering module includes: A first interface triggering unit, used to trigger the interface program module to obtain a target component list of the product; A second interface triggering unit, configured to trigger the interface program module to determine a list of components to be installed on each target server from the target component list based on the number and available resources of the target servers; A third interface triggering unit, configured to trigger the interface program module to generate the component deployment list based on the list of components to be installed on each target server; The second interface triggering unit is specifically used for: The interface program module is triggered to divide the components in the target component list into component groups to be allocated, determine the total available resources based on the available resources of each target server, and determine the total resource requirements based on the resource requirements of each component group, and determine that the total available resources meet the total resource requirements; if the number of the target servers is not less than the number of the component groups, allocate one target server to each of the component groups; if the number of the target servers is less than the number of the component groups and not less than a first threshold, or the allocation of one target server to each of the component groups fails, allocate the target server to the component group under constraints; wherein each of the component groups is configured with an index category, and the first threshold is the number of index categories; the constraints include: the component groups of different index categories are allocated to different target servers, and the component groups of the same index category are preferentially allocated to the same target server; The allocating the target server to the component group under the constraint condition includes: under the constraint condition, according to the preset order of the available resources and the preset order of the resource requirements of the component group, matching the component group with the target server and allocating the target server to the component group.

13. A product deployment device, characterized in that: Applied to the first server, the product deployment device comprises: The information receiving module is used to receive a product package, a background service program module and a component deployment list from a terminal, wherein the component deployment list includes a list of components to be installed on each target server, wherein the target server is a server to be deployed with the product; the list of components to be installed on each target server is divided by the interface program module into component groups to be allocated by the components in the target component list of the product, and the total available resources are determined based on the available resources of each target server, and the total resource requirements are determined based on the resource requirements of each component group, and it is determined that the total available resources meet the total resource requirements. If the number of the target servers is not less than the number of the component groups, one target server is allocated to each of the component groups; if the number of the target servers is less than the number of the component groups and not less than The first threshold value is set, or if the allocation of one target server to each component group fails, the target server is allocated to the component group under the constraint condition; wherein each component group is configured with an index category, and the first threshold value is the number of index categories; the constraint condition includes: the component groups of different index categories are allocated to different target servers, and the component groups of the same index category are preferentially allocated to the same target server; the allocation of the target server to the component group under the constraint condition includes: matching the component group with the target server according to the preset order of the available resources and the preset order of the resource requirements of the component group under the constraint condition, and allocating the target server to the component group; The background service triggering module is used to trigger the background service program module to control each target server to install the corresponding components in the product package based on the component deployment list.

14. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the product deployment method according to any one of claims 1 to 6 or any one of claims 7 to 11 is implemented.

15. A product deployment system, characterized in that: It includes a terminal and a server, wherein the terminal includes an installation package of the product, and the installation package of the product includes an interface program module, a background service program module and a product package; The terminal is used to trigger the interface program module to obtain a component deployment list of the product, wherein the component deployment list includes a list of components to be installed on each target server, wherein the target server is a server on which the product is to be deployed; and trigger the interface program module to send the product package, the background service program module and the component deployment list to a first server of the target server; The first server is used to receive the product package, the background service program module and the component deployment list from the terminal; trigger the background service program module to control each target server to install the corresponding component in the product package based on the component deployment list; The terminal is specifically used for: triggering the interface program module to obtain a target component list of the product; Triggering the interface program module to determine a list of components to be installed on each target server from the target component list based on the number and available resources of the target servers; Triggering the interface program module to generate the component deployment list based on the list of components to be installed on each target server; The terminal is specifically used for: The interface program module is triggered to divide the components in the target component list into component groups to be allocated, determine the total available resources based on the available resources of each target server, and determine the total resource requirements based on the resource requirements of each component group, and determine that the total available resources meet the total resource requirements; if the number of the target servers is not less than the number of the component groups, allocate one target server to each of the component groups; if the number of the target servers is less than the number of the component groups and not less than a first threshold, or the allocation of one target server to each of the component groups fails, allocate the target server to the component group under constraints; wherein each of the component groups is configured with an index category, and the first threshold is the number of index categories; the constraints include: the component groups of different index categories are allocated to different target servers, and the component groups of the same index category are preferentially allocated to the same target server; The allocating the target server to the component group under the constraint condition includes: under the constraint condition, according to the preset order of the available resources and the preset order of the resource requirements of the component group, matching the component group with the target server and allocating the target server to the component group.

Citation Information

Patent Citations

  • Server-oriented application system deployment method and device and medium

    CN113778466A