Remote management method of application server, electronic device and storage medium

By storing and asynchronously executing management instructions on the application server side, the network congestion caused by the large amount of tasks on the management server side is solved, and the execution efficiency and orderliness of management instructions are improved.

CN115941427BActive Publication Date: 2025-01-14SHANGHAI TIANXIANG NETWORK TECH CO LTD +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202211239988.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-10
Publication Date
2025-01-14
Estimated Expiration
2042-10-10

AI Technical Summary

Technical Problem

In a data center, when the management server centrally manages multiple remote servers, the large amount of tasks can easily lead to network congestion.

Method used

By establishing an HTTP connection on the application server side, obtaining the management instructions sent by the management server and writing them to the task database, polling the task database to execute the management instructions to be executed in sequence, realizing the asynchronous execution of the management instructions, and after the write is completed, the management instructions are implemented. Send response messages to the management server to avoid duplicate instructions from consuming the network.

Benefits of technology

It effectively avoids network congestion on the management server side, improves the execution efficiency and order of management instructions, and reduces the waiting time for tasks on the management server side.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115941427B_ABST
    Figure CN115941427B_ABST
Patent Text Reader

Abstract

The present application provides a remote management method, electronic device and storage medium for an application server. Among them, at least one application server establishes an HTTP connection with a management server, and the method is applied to each application server configured as a remote server; the method includes: obtaining a management instruction sent by the management server, and writing the management instruction into a task database; after writing is completed, sending a response message to the management server; polling the task database, and executing the acquired management instructions to be executed in sequence. The present application implements the storage and asynchronous execution of instructions issued by the management server, which effectively avoids the problem of network congestion caused by a large amount of tasks on the management server side when a management server centrally manages multiple remote servers. In addition, after the management instruction is written, a response message is sent to the management server to avoid the management server side repeatedly sending the same management instruction to occupy the network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of data centers, and in particular to a remote management method, electronic device, and storage medium for an application server. Background Art

[0002] As the scale of data center applications continues to grow, multiple data center rooms are deployed in the same core city, and even a large number of data center rooms are deployed across the country. The data center rooms of these distributed data centers are physically independent of each other. Each data center room includes servers, data switches and data routers.

[0003] When the application running on the server lags in performance due to long-term use, or runs slowly due to data carrying capacity reaching a certain limit, it is usually necessary to upgrade the application on the server to ensure that the server is continuously in a better state. Traditional application upgrade operations usually involve manually searching for the application to be upgraded when the upgrade data package is obtained, and upgrading the application by manually arranging the data package, which has a low degree of automation.

[0004] Currently, a server integrated management system is provided, which connects multiple servers through a management server and realizes automated management of multiple remote servers on the management server side. However, in the existing solution, when the management server centrally manages multiple remote servers, there is a problem of large workload and prone to network congestion on the management server side. Summary of the invention

[0005] The embodiments of the present application provide a remote management method of an application server, an electronic device, and a storage medium to solve the problem that a large amount of tasks exist on the management server side and network congestion may easily occur.

[0006] In a first aspect, an embodiment of the present application provides a remote management method for an application server, wherein at least one of the application servers establishes an HTTP connection with a management server, and the method is applied to each of the application servers configured as a remote server;

[0007] The method comprises:

[0008] Obtaining the management instruction sent by the management server, and writing the management instruction into the task database;

[0009] After writing is completed, sending a response message to the management server;

[0010] The task database is polled, and the acquired management instructions to be executed are executed in sequence.

[0011] In a possible implementation, the task database includes a first data table and a second data table, wherein the first data table includes the following index items: instruction ID, instruction name, and execution progress; the second data table includes the following index items: instruction ID, instruction name, and execution result code;

[0012] After executing the acquired management instruction to be executed, the method further includes:

[0013] Update the execution progress of each instruction item at preset intervals;

[0014] After any instruction item is executed, the information contained in the instruction item is migrated to the second data table and deleted from the first data table;

[0015] According to the execution status of the instruction item, a corresponding execution result code is assigned to it and written into the second data table.

[0016] In a possible implementation, before writing the management instruction into the task database, the method further includes: parsing the management instruction;

[0017] Writing the management instruction into the task database comprises:

[0018] When the management instruction is parsed as an operational management instruction, writing the operational management instruction into the first data table;

[0019] When the management instruction is parsed as a query-type management instruction, the query-type management instruction is written into a third data table of the task database; wherein the third data table contains the following index items: instruction ID, instruction name and ID of the queried instruction.

[0020] In a possible implementation, polling the task database and sequentially executing the acquired management instructions to be executed includes:

[0021] When the management instruction is an operational management instruction, enabling a first polling process to poll the first data table, and enabling an operational process to sequentially execute the acquired operational management instructions to be executed;

[0022] When the management instruction is a query-type management instruction, the second polling process is enabled to poll the third data table, and the query process is enabled to sequentially execute the acquired query-type management instructions to be executed.

[0023] In a possible implementation, the executing the acquired query management instruction to be executed includes:

[0024] According to the ID of the queried instruction in the corresponding instruction item in the third data table, querying in the second data table whether there is a corresponding instruction item, and returning the execution result code to the management server;

[0025] When no corresponding instruction item is found in the second data table, the corresponding instruction item is searched in the first data table according to the ID of the queried instruction, and the execution progress is returned to the management server.

[0026] In a possible implementation, the method further includes:

[0027] After any management instruction in the task database is executed, corresponding progress feedback information is sent to the management server; and / or,

[0028] The progress feedback information of each management instruction in the task database is sent to the management server according to the set reporting time interval.

[0029] In a possible implementation, the task database further includes a fourth data table, and the fourth data table includes the following index items: combination instruction ID, combination instruction name, sub-instruction ID, sub-instruction name and combination order;

[0030] Writing the management instruction into the task database comprises:

[0031] When the management instruction is an independent instruction, directly writing it into the first data table;

[0032] When the management instruction is a combination instruction, the sub-instruction ID, sub-instruction name and combination order are read according to the combination instruction ID and the fourth data table, and the sub-instruction ID and instruction name are written into the first data table in sequence according to the combination order.

[0033] In a possible implementation, the method further includes:

[0034] When the management instruction is a combined instruction and the fourth data table does not contain relevant information of the combined instruction, a first prompt message is sent to the management server; wherein the first prompt message is used to prompt the management server to issue a combined instruction new creation instruction;

[0035] Receive the combined instruction creation instruction sent by the management server, and add the combined instruction ID, combined instruction name, corresponding sub-instruction ID, sub-instruction name and combination order in the fourth data table according to the information contained in the combined instruction creation instruction.

[0036] In a second aspect, an embodiment of the present application provides a remote management device for an application server, wherein at least one of the application servers establishes an HTTP connection with a management server, and the device is applied to each of the application servers configured as a remote server;

[0037] The device comprises:

[0038] An acquisition module, used to acquire management instructions sent by the management server;

[0039] A writing module, used for writing the management instruction into a task database;

[0040] A sending module, used for sending a response message to the management server after writing is completed;

[0041] The execution module is used to poll the task database and execute the acquired management instructions to be executed in sequence.

[0042] In a possible implementation, the task database includes a first data table and a second data table, wherein the first data table includes the following index items: instruction ID, instruction name, and execution progress; the second data table includes the following index items: instruction ID, instruction name, and execution result code;

[0043] The writing module is further used to update the execution progress of each instruction item at a preset interval after the execution module executes the acquired management instruction to be executed; and

[0044] After any instruction item is executed, the information contained in the instruction item is migrated to the second data table and deleted from the first data table; and

[0045] According to the execution status of the instruction item, a corresponding execution result code is assigned to it and written into the second data table.

[0046] In a possible implementation manner, the device further includes:

[0047] A parsing module, used for parsing management instructions;

[0048] The writing module is specifically configured to write the operational management instruction into the first data table when the management instruction is parsed as an operational management instruction;

[0049] When the management instruction is parsed as a query-type management instruction, the query-type management instruction is written into a third data table of the task database; wherein the third data table contains the following index items: instruction ID, instruction name and ID of the queried instruction.

[0050] In a possible implementation, the execution module is specifically configured to, when the management instruction is an operational management instruction, enable a first polling process to poll the first data table, and enable an operational process to sequentially execute the acquired operational management instructions to be executed;

[0051] When the management instruction is a query-type management instruction, the second polling process is enabled to poll the third data table, and the query process is enabled to sequentially execute the acquired query-type management instructions to be executed.

[0052] In a possible implementation, the execution module is specifically configured to query whether a corresponding instruction item exists in the second data table according to the ID of the queried instruction in the corresponding instruction item in the third data table, and return the execution result code to the management server;

[0053] When no corresponding instruction item is found in the second data table, the corresponding instruction item is searched in the first data table according to the ID of the queried instruction, and the execution progress is returned to the management server.

[0054] In a possible implementation, the sending module is also used to send corresponding progress feedback information to the management server after the execution of any management instruction in the task database is completed; and / or, to send progress feedback information of each management instruction in the task database to the management server according to a set reporting time interval.

[0055] In a possible implementation, the task database further includes a fourth data table, and the fourth data table includes the following index items: combination instruction ID, combination instruction name, sub-instruction ID, sub-instruction name and combination order;

[0056] Writing the management instruction into the task database comprises:

[0057] When the management instruction is an independent instruction, directly writing it into the first data table;

[0058] When the management instruction is a combination instruction, the sub-instruction ID, sub-instruction name and combination order are read according to the combination instruction ID and the fourth data table, and the sub-instruction ID and instruction name are written into the first data table in sequence according to the combination order.

[0059] In a possible implementation, the writing module is further used to send a first prompt message to the management server when the management instruction is a combined instruction and the relevant information of the combined instruction does not exist in the fourth data table; wherein the first prompt message is used to prompt the management server to issue a new combined instruction;

[0060] Receive the combined instruction creation instruction sent by the management server, and add the combined instruction ID, combined instruction name, corresponding sub-instruction ID, sub-instruction name and combination order in the fourth data table according to the information contained in the combined instruction creation instruction.

[0061] In a third 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 processor implements the steps of the remote management method of the application server as described in the first aspect or any possible implementation method of the first aspect.

[0062] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps of the remote management method of the application server as described in the first aspect or any possible implementation method of the first aspect.

[0063] The embodiment of the present application provides a remote management method, electronic device and storage medium for an application server, which realizes the storage and asynchronous execution of instructions issued by the management server by storing the management instructions sent from the management server to the local task database, and combining with the polling task database, sequentially executing the operations of the management instructions to be executed, and effectively avoids the problem of network congestion caused by a large amount of tasks on the management server side when a management server centrally manages multiple remote servers. In addition, after the management instruction is written, a response message is sent to the management server to avoid the management server side repeatedly sending the same management instruction to occupy the network. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] 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 creative labor.

[0065] Figure 1 This is an application scenario diagram of a remote management method for an application server provided in an embodiment of the present application;

[0066] Figure 2 It is a flowchart of a remote management method for an application server provided in an embodiment of the present application;

[0067] Figure 3 It is a structural diagram of a remote management device for an application server provided in one embodiment of the present application;

[0068] Figure 4 It is a schematic diagram of the structure of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0069] 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.

[0070] The terms "first", "second", etc. in the specification and claims of the embodiments of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. Unless otherwise specified, the term "plurality" means two or more.

[0071] Figure 1 : is an application scenario diagram of a remote management method for an application server provided in an embodiment of the present application. Figure 1 As shown, it includes a management server and multiple application servers, and each application server establishes an HTTP connection with the management server. Each application server is scattered in various areas of the city and is configured as a remote server. The management personnel can complete the remote control of the remote application server on the management server side.

[0072] The management server is equipped with a monitoring system to monitor the status of local servers and application servers, restore applications, view interface details, modify parameters, manage logs, and manage applications. The application server is equipped with a cluster monitoring sub-service system to monitor the status of local server applications, restore applications, view application details, modify application parameters, manage logs, and manage applications.

[0073] In view of the fact that the management server set and multiple application servers communicate based on the HTTP protocol, there is a problem of large workload and prone to network congestion on the management server side. This application aims to solve this technical problem. The method provided in the embodiment of this application is used on each application server side.

[0074] In order to make the purpose, technical solutions and advantages of the present application clearer, specific embodiments will be described below in conjunction with the accompanying drawings.

[0075] Figure 2is a flowchart of a remote management method for an application server provided in an embodiment of the present application, such as Figure 2 As shown, the method comprises the following steps:

[0076] S201. Obtain a management instruction sent by a management server, and write the management instruction into a task database.

[0077] The execution subject of the method provided in the embodiment of the present application is an application server. Each application server includes its own task database.

[0078] After receiving the management instruction sent by the management server, the application server writes the management instruction into the local task database to realize the asynchronous execution of the management instruction, and each application server executes the management instruction independently without affecting each other.

[0079] S202: After writing is completed, a response message is sent to the management server.

[0080] After the application server completes the operation of writing the management instruction into the task database, it sends a response message to the management server to instruct the management server to initiate a new management instruction, thereby avoiding network congestion caused by the management server executing multiple management instruction sending tasks at the same time. In addition, it can avoid the management server from repeatedly sending the same management instruction and occupying the network.

[0081] S203: poll the task database, and execute the acquired management instructions to be executed in sequence.

[0082] When the application server receives multiple management instructions, in order to avoid long waiting time for the execution of management instructions, the acquired management instructions to be executed are executed in sequence by polling the task database, thereby improving the orderliness and efficiency of the execution of management instructions.

[0083] In this embodiment, the acquired management instructions sent from the management server are stored in the local task database, and combined with the polling task database, the operations of the management instructions to be executed are executed in sequence, so that the storage and asynchronous execution of the instructions issued by the management server are realized, which effectively avoids the problem of network congestion caused by a large amount of tasks on the management server side when a management server centrally manages multiple remote servers. In addition, after the management instruction is written, a response message is sent to the management server to avoid the management server side repeatedly sending the same management instruction to occupy the network.

[0084] In different embodiments, the manner of writing the management instruction into the task database in step S201 is different.

[0085] In a possible implementation, the management instructions are written into the task database in a rolling manner. After a period of time has passed since the management instructions were executed, the executed management instructions are deleted from the task database to avoid occupying storage space for a long time.

[0086] In another possible implementation, the task database includes a first data table and a second data table, the first data table includes the following index items: instruction ID, instruction name and execution progress; the second data table includes the following index items: instruction ID, instruction name and execution result code.

[0087] like Figure 2 The method shown, after executing the acquired management instructions to be executed in step S203, also includes: updating the execution progress of each instruction item at a preset time interval; after any instruction item is executed, migrating the information contained in the instruction item to the second data table and deleting it from the first data table; according to the execution status of the instruction item, assigning it a corresponding execution result code and writing it into the second data table.

[0088] In this implementation, two data tables are set up, and the management instructions to be executed or being executed are specifically stored in the first data table, and the management instructions that have been executed are stored separately in the second data table. Physical isolation of data is achieved through the table structure, thereby improving data storage and reading efficiency.

[0089] In different embodiments, the types of management instructions include multiple types. Optionally, the management instructions include operation-type management instructions and query-type management instructions.

[0090] In a possible implementation, before writing the management instruction into the task database in step S201, the method further includes: parsing the management instruction to obtain a specific type of the management instruction.

[0091] Correspondingly, in step S201, writing the management instruction into the task database includes:

[0092] When the management instruction is parsed as an operational management instruction, writing the operational management instruction into the first data table;

[0093] When the management instruction is parsed as a query-type management instruction, the query-type management instruction is written into the third data table of the task database; wherein the third data table contains the following index items: instruction ID, instruction name and ID of the queried instruction.

[0094] In this implementation, separate tables are used for storage according to the specific types of management instructions, which can not only achieve physical isolation of different types of management instructions, but also provide conditions for the simultaneous operation of operational management instructions and query management instructions, thereby improving the execution efficiency of management instructions and the response speed to the management server.

[0095] In a possible implementation, in step S203, polling the task database and sequentially executing the acquired management instructions to be executed includes:

[0096] When the management instruction is an operational management instruction, the first polling process is enabled to poll the first data table, and the operational process is enabled to sequentially execute the acquired operational management instructions to be executed;

[0097] When the management instruction is a query-type management instruction, the second polling process is enabled to poll the third data table, and the query process is enabled to sequentially execute the acquired query-type management instructions to be executed.

[0098] The query type management instructions include but are not limited to query instructions for the execution process of the operation type management instructions.

[0099] In this implementation, the application server starts two processes to execute the operations of the management instructions in the first data table and the third data table respectively, so as to realize the simultaneous execution of operational management instructions and query management instructions under different processes, improve the execution efficiency of management instructions, and the execution of the two types of management instructions will not affect each other.

[0100] In the aforementioned embodiment, on the basis of storing the operational management instructions in separate tables according to the execution progress, when the execution progress of the operational management instructions is queried based on the query management instructions in different embodiments, the specific table query methods are different.

[0101] In a possible implementation, executing the acquired query management instruction to be executed includes:

[0102] According to the ID of the queried instruction in the corresponding instruction item in the third data table, query whether there is a corresponding instruction item in the second data table, and return an execution result code to the management server;

[0103] When no corresponding instruction item is found in the second data table, the corresponding instruction item is searched in the first data table according to the ID of the queried instruction, and the execution progress is returned to the management server.

[0104] Optionally, the result code includes 0 and 1. When the result code is 0, it indicates that the execution of the operational management instruction fails, and when the result code is 1, it indicates that the execution of the operational management instruction is successful.

[0105] In this implementation, when querying based on the query-type management instruction in the third data table, the second data table is first queried, that is, the execution completion status of the operational management instruction is queried. When the second data table contains relevant information, it is determined that the operational management instruction has been executed. When the second data table does not contain relevant information, it is determined that the operational management instruction is to be executed or is being executed, and then the query is specifically performed based on the first data table.

[0106] In another possible implementation, executing the acquired query management instruction to be executed includes:

[0107] According to the ID of the queried instruction in the corresponding instruction item in the third data table, query whether there is a corresponding instruction item in the first data table, and return the execution progress to the management server;

[0108] When no corresponding instruction item is found in the first data table, the corresponding instruction item is searched in the second data table, and an execution result code is returned to the management server.

[0109] In this implementation, when querying based on the query-type management instructions in the third data table, the first data table is queried first, that is, the execution progress of the operational management instructions is queried. When the first data table does not contain relevant information, it is determined that the operational management instructions have been executed, and the execution result code is queried in the second data table and feedback is provided.

[0110] It can be understood that the above embodiment introduces a method of query-type management instructions to query the execution progress and execution status of instructions, but query-type management instructions are not limited to this. They also include query instructions such as application status monitoring and application details of the application manager. It is only necessary to enable the query process to execute the corresponding instruction script, which will not be elaborated here.

[0111] The above-mentioned embodiment mainly introduces how the application server side stores, executes and queries the management instructions, wherein the execution progress of the management instructions is completed based on the active request of the remote server.

[0112] In a possible implementation, the method further includes: after any management instruction in the task database is executed, sending corresponding progress feedback information to the management server.

[0113] In this implementation, the application server actively sends corresponding progress feedback information to the management server after the execution of any management instruction is completed, wherein the progress feedback information includes a result code, which facilitates the management server to understand and manage the execution results of each management instruction.

[0114] In a possible implementation manner, the method further includes: sending progress feedback information of each management instruction in the task database to the management server according to a set reporting time interval.

[0115] The reporting time interval is set to be greater than or equal to the preset time in the above-mentioned embodiment. The preset time is the preset time for updating the execution progress of each instruction item at the preset interval. The reporting time interval can be optionally adjusted according to the amount of tasks to avoid network congestion caused by excessive single reporting of data.

[0116] In this implementation, the application server queries the execution progress of each management instruction according to the set reporting time interval and reports to the management server in a unified manner, so that the management server can understand and manage the execution progress of each management instruction.

[0117] In a possible implementation, the method further includes:

[0118] After any management instruction in the task database is executed, corresponding progress feedback information is sent to the management server; and, progress feedback information of each management instruction in the task database is sent to the management server according to a set reporting time interval.

[0119] In this implementation, during the execution of a management instruction, it is sent to the management server together with the execution progress of other management instructions according to the set reporting time interval, and after the execution of the management instruction is completed, a separate execution result code is sent to facilitate the management server to understand and manage the execution progress of each management instruction and to understand the execution results in a timely manner.

[0120] In a possible implementation, the task database further includes a fourth data table, which includes the following index items: combination instruction ID, combination instruction name, sub-instruction ID, sub-instruction name, and combination order;

[0121] Writing management instructions to the task database includes:

[0122] When the management instruction is an independent instruction, it is directly written into the first data table;

[0123] When the management instruction is a combination instruction, the sub-instruction ID, sub-instruction name and combination order are read according to the combination instruction ID and the fourth data table, and the sub-instruction ID and instruction name are sequentially written into the first data table according to the combination order.

[0124] Among them, independent instructions complete a task alone, while combined instructions include multiple tasks.

[0125] In the implementation method, during the specific operation process, operational instructions often include combined instructions. Therefore, when the management instruction is an operational management instruction and is a combined instruction, the self-instruction corresponding to the combined instruction is written into the first data table, and is written into the first data table in the order of execution of the specific operation to avoid confusion during the execution process and cause execution errors.

[0126] For example, when application a in application server A fails, the management server sends a combined instruction 201 to application server A, and application server A parses and determines that the sub-instruction IDs corresponding to combined instruction 201 include 1, 2, and 3. In normal circumstances, the update or installation of application a can be completed based on independent instructions.

[0127] Among them, application a fails, and in order to avoid data loss during the update of application a, three tasks need to be completed: data backup-application uninstallation-application installation-data recovery. In order to simplify the congestion caused by the management server sending task instructions multiple times, the management server can send a combined instruction 201 to the application server side. The sub-instructions of the combined instruction 201 include: data backup, application uninstallation, application installation and data recovery, and correspondingly, the sub-instruction IDs are 1, 2, 3 and 4 respectively.

[0128] In another possible implementation, both the operational management instruction and the query management instruction have combined instructions and independent instructions. Accordingly, before writing the management instruction into the task database, the process further includes: parsing the management instruction. Writing the management instruction into the task database includes:

[0129] When the management instruction is parsed as an operational management instruction and is an independent instruction, it is directly written into the first data table; when the management instruction is parsed as an operational management instruction and is a combined instruction, the sub-instruction ID, sub-instruction name and combination order are read according to the combined instruction ID and the fourth data table, and the sub-instruction ID and instruction name are sequentially written into the first data table according to the combination order;

[0130] When the management instruction is parsed as a query-type management instruction and is an independent instruction, it is directly written into the third data table; when the management instruction is parsed as a query-type management instruction and is a combination instruction, the sub-instruction ID, sub-instruction name and combination order are read according to the combination instruction ID and the fourth data table, and the sub-instruction ID and instruction name are written into the third data table in sequence according to the combination order.

[0131] For another example, when the management server is used to query the running status of each application in server B, it sends a combined instruction 202 to the application server B. The sub-instructions of the combined instruction 202 include: application 1 running status query, application 2 status query... application n status query. Correspondingly, the sub-instruction IDs are 4, 5,..., n+2.

[0132] Optionally, when storing the combined instructions in the fourth data table, the combined instructions of the two types of instructions, the operation-type management instructions and the query-type management instructions, are stored in an integrated manner to reduce the storage quantity of the data table. Optionally, the combined instructions of the operation-type management instructions and the combined instructions of the query-type management instructions are stored in the fourth data table in a classified manner to simplify the difficulty of searching for the combined instructions and improve the search efficiency.

[0133] Based on any storage method, after reading the sub-instructions of the operation-type management instruction combination instruction, they are correspondingly written into the first data table, and after reading the sub-instructions of the query-type management instruction combination instruction, they are correspondingly written into the third data table.

[0134] In this implementation, the fourth data table stores the combined instructions, which can simplify the transmission process of multiple task instructions between the management server and the application server, thereby helping to reduce the task volume of the management server sending instructions and avoiding network congestion.

[0135] In a possible implementation, the method further includes:

[0136] When the management instruction is a combined instruction and the fourth data table does not contain relevant information of the combined instruction, a first prompt message is sent to the management server; wherein the first prompt message is used to prompt the management server to issue a new combined instruction;

[0137] Receive the combined instruction creation instruction sent by the management server, and add the combined instruction ID, combined instruction name, corresponding sub-instruction ID, sub-instruction name and combination order in the fourth data table according to the information contained in the combined instruction creation instruction.

[0138] In this embodiment, when a new management server is added or as the application is innovated, there is a situation where the management instruction is updated. In order to meet the management needs of the management server for the application server, the relevant personnel on the management server side generate a combination instruction creation instruction according to the specific combination method of the instruction, and send the combination instruction creation instruction to the application server side. Specifically, the application server side adds the relevant information of the combination instruction in the fourth data table, which can simplify the subsequent management instruction sending and execution process, reduce the subsequent task volume of the management server sending instructions, and avoid network congestion.

[0139] In a specific implementation process, when a management instruction to be executed is polled based on the first data table and the third data table, a corresponding execution script is determined based on the instruction ID, and the corresponding relationship between the instruction ID and the script is preset in the management server.

[0140] 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.

[0141] The following is an embodiment of the device of the present application. For details not described in detail, please refer to the corresponding method embodiment described above.

[0142] Figure 3 is a schematic diagram of the structure of a remote management device for an application server provided in an embodiment of the present application, such as Figure 3 For the sake of convenience, only the parts related to the embodiment of the present application are shown. Figure 3 As shown, the device includes: an acquisition module 301, a writing module 302, a sending module 303 and an execution module 304.

[0143] The acquisition module 301 is used to acquire the management instruction sent by the management server;

[0144] A writing module 302, used to write the management instruction into the task database;

[0145] A sending module 303 is used to send a response message to the management server after writing is completed;

[0146] The execution module 304 is used to poll the task database and execute the acquired management instructions to be executed in sequence.

[0147] In a possible implementation, the task database includes a first data table and a second data table, the first data table includes the following index items: instruction ID, instruction name and execution progress; the second data table includes the following index items: instruction ID, instruction name and execution result code;

[0148] The writing module 302 is further used to update the execution progress of each instruction item at a preset interval after the execution module 304 executes the acquired management instruction to be executed; and

[0149] After any instruction item is executed, the information contained in the instruction item is migrated to the second data table and deleted from the first data table; and

[0150] According to the execution status of the instruction item, a corresponding execution result code is assigned to it and written into the second data table.

[0151] In a possible implementation, the device further includes:

[0152] A parsing module, used for parsing management instructions;

[0153] The writing module 302 is specifically configured to write the operational management instruction into the first data table when the management instruction is parsed as an operational management instruction;

[0154] When the management instruction is parsed as a query-type management instruction, the query-type management instruction is written into the third data table of the task database; wherein the third data table contains the following index items: instruction ID, instruction name and ID of the queried instruction.

[0155] In a possible implementation, the execution module 304 is specifically configured to enable the first polling process to poll the first data table when the management instruction is an operation-type management instruction, and enable the operation process to sequentially execute the acquired operation-type management instructions to be executed;

[0156] When the management instruction is a query-type management instruction, the second polling process is enabled to poll the third data table, and the query process is enabled to sequentially execute the acquired query-type management instructions to be executed.

[0157] In a possible implementation, the execution module 304 is specifically configured to query whether a corresponding instruction item exists in the second data table according to the ID of the queried instruction in the corresponding instruction item in the third data table, and return an execution result code to the management server;

[0158] When no corresponding instruction item is found in the second data table, the corresponding instruction item is searched in the first data table according to the ID of the queried instruction, and the execution progress is returned to the management server.

[0159] In one possible implementation, the sending module 303 is also used to send corresponding progress feedback information to the management server after the execution of any management instruction in the task database is completed; and / or, to send progress feedback information of each management instruction in the task database to the management server according to a set reporting time interval.

[0160] In a possible implementation, the task database further includes a fourth data table, which includes the following index items: combination instruction ID, combination instruction name, sub-instruction ID, sub-instruction name, and combination order;

[0161] The writing module 302 is specifically used to directly write the management instruction into the first data table when the management instruction is an independent instruction;

[0162] When the management instruction is a combination instruction, the sub-instruction ID, sub-instruction name and combination order are read according to the combination instruction ID and the fourth data table, and the sub-instruction ID and instruction name are sequentially written into the first data table according to the combination order.

[0163] In a possible implementation, the sending module 303 is further used to send a first prompt message to the management server when the management instruction is a combined instruction and the relevant information of the combined instruction does not exist in the fourth data table; wherein the first prompt message is used to prompt the management server to issue a new combined instruction;

[0164] The acquisition module 301 is also used to receive the combination instruction creation instruction sent by the management server, and add the combination instruction ID, combination instruction name, corresponding sub-instruction ID, sub-instruction name and combination order in the fourth data table according to the information contained in the combination instruction creation instruction.

[0165] In this embodiment, the acquired management instructions sent from the management server are stored in the local task database, and combined with the polling task database, the operations of the management instructions to be executed are executed in sequence, so that the storage and asynchronous execution of the instructions issued by the management server are realized, which effectively avoids the problem of network congestion caused by a large amount of tasks on the management server side when a management server centrally manages multiple remote servers. In addition, after the management instruction is written, a response message is sent to the management server to avoid the management server side repeatedly sending the same management instruction to occupy the network.

[0166] Figure 4 Schematic diagram of the structure of an electronic device provided by an embodiment of the present application. Figure 4 As shown, the electronic device 4 of this embodiment includes: a processor 40, a memory 41, and a computer program 42 stored in the memory 41 and executable on the processor 40. When the processor 40 executes the computer program 42, the steps in the above-mentioned remote management method embodiments of each application server are implemented, such as Figure 2 Alternatively, when the processor 40 executes the computer program 42, the functions of each module / unit in the above-mentioned device embodiments are realized, for example Figure 3 Functions of modules 301 to 304 are shown.

[0167] Exemplarily, the computer program 42 may be divided into one or more modules / units, which are stored in the memory 41 and executed by the processor 40 to complete the present application. The one or more modules / units may be a series of computer program instruction segments that can complete specific functions, and the instruction segments are used to describe the execution process of the computer program 42 in the electronic device 4. For example, the computer program 42 may be divided into Figure 3 Modules 301 to 304 are shown.

[0168] The electronic device 4 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The electronic device 4 may include, but is not limited to, a processor 40 and a memory 41. Those skilled in the art will appreciate that Figure 4 It is only an example of the electronic device 4 and does not constitute a limitation of the electronic device 4. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device may also include input and output devices, network access devices, buses, etc.

[0169] The processor 40 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (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.

[0170] The memory 41 may be an internal storage unit of the electronic device 4, such as a hard disk or memory of the electronic device 4. The memory 41 may also be an external storage device of the electronic device 4, 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 4. Further, the memory 41 may also include both an internal storage unit and an external storage device of the electronic device 4. The memory 41 is used to store the computer program and other programs and data required by the electronic device. The memory 41 may also be used to temporarily store data that has been output or is to be output.

[0171] 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.

[0172] 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.

[0173] 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.

[0174] 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.

[0175] 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.

[0176] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0177] If the integrated module / 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, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned remote management method embodiments of each application server when executed by the processor. 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 include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0178] 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 remote management method for an application server, characterized in that: At least one of the application servers establishes an HTTP connection with the management server, and the method is applied to each of the application servers configured as a remote server; The method comprises: Obtaining the management instruction sent by the management server, and writing the management instruction into the task database; After writing is completed, sending a response message to the management server; Polling the task database and executing the acquired management instructions to be executed in sequence; The task database includes a first data table and a third data table; the first data table includes the following index items: instruction ID, instruction name and execution progress; the third data table includes the following index items: instruction ID, instruction name and ID of the queried instruction; Before writing the management instruction into the task database, the method further includes: parsing the management instruction; Writing the management instruction into the task database comprises: When the management instruction is parsed as an operational management instruction, writing the operational management instruction into the first data table; When the management instruction is parsed as a query-type management instruction, writing the query-type management instruction into a third data table of the task database; The polling of the task database and sequentially executing the acquired management instructions to be executed includes: When the management instruction is an operational management instruction, enabling a first polling process to poll the first data table, and enabling an operational process to sequentially execute the acquired operational management instructions to be executed; When the management instruction is a query-type management instruction, the second polling process is enabled to poll the third data table, and the query process is enabled to sequentially execute the acquired query-type management instructions to be executed.

2. The remote management method of the application server according to claim 1, characterized in that: The task database also includes a second data table, which includes the following index items: instruction ID, instruction name and execution result code; After executing the acquired management instruction to be executed, the method further includes: Update the execution progress of each instruction item at preset intervals; After any instruction item is executed, the information contained in the instruction item is migrated to the second data table and deleted from the first data table; According to the execution status of the instruction item, a corresponding execution result code is assigned to it and written into the second data table.

3. The remote management method of the application server according to claim 2, characterized in that: The query management instruction to be executed obtained by executing includes: According to the ID of the queried instruction in the corresponding instruction item in the third data table, querying in the second data table whether there is a corresponding instruction item, and returning the execution result code to the management server; When no corresponding instruction item is found in the second data table, the corresponding instruction item is searched in the first data table according to the ID of the queried instruction, and the execution progress is returned to the management server.

4. The remote management method of the application server according to claim 1, characterized in that: Also includes: After any management instruction in the task database is executed, corresponding progress feedback information is sent to the management server; and / or, The progress feedback information of each management instruction in the task database is sent to the management server according to the set reporting time interval.

5. The remote management method of the application server according to claim 2 or 3, characterized in that: The task database further includes a fourth data table, wherein the fourth data table includes the following index items: combination instruction ID, combination instruction name, sub-instruction ID, sub-instruction name and combination order; Writing the management instruction into the task database comprises: When the management instruction is an independent instruction, directly writing it into the first data table; When the management instruction is a combination instruction, the sub-instruction ID, sub-instruction name and combination order are read according to the combination instruction ID and the fourth data table, and the sub-instruction ID and instruction name are written into the first data table in sequence according to the combination order.

6. The remote management method of the application server according to claim 5, characterized in that: Also includes: When the management instruction is a combined instruction and the related information of the combined instruction does not exist in the fourth data table, sending a first prompt message to the management server; wherein the first prompt message is used to prompt the management server to issue a combined instruction new creation instruction; Receive the combination instruction creation instruction sent by the management server, and add the combination instruction ID, combination instruction name, corresponding sub-instruction ID, sub-instruction name and combination order in the fourth data table according to the information contained in the combination instruction creation instruction.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the remote management method of the application server as described in any one of claims 1 to 6 are implemented.

8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the remote management method of the application server as described in any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Mobile equipment software automation test cluster system and test method thereof

    CN104978259A

  • Data processing method, data processing device and information processing system

    CN106874334A

  • Asynchronous task inquiry method and device

    CN107798108A