Operation and maintenance task processing method and device, electronic equipment and computer readable medium
By monitoring the changes in the operation and maintenance task list in the embedded database on the proxy side, loading and executing tasks, and formatting the result data, the problem of high communication frequency between the proxy side and the server side is solved, and the efficiency and accuracy of operation and maintenance task processing is improved.
Patent Information
- Application Number
- CN202510870329.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-26
- Publication Date
- 2025-08-08
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the existing server-side delivery mode and proxy-side pull mode, the management of operation and maintenance tasks is concentrated on the server side, resulting in high frequency and low efficiency of communication between the proxy side and the server side.
By using an embedded database on the proxy side, we can monitor the changes in the operation and maintenance task list in real time, load the latest tasks, determine the task execution type and time, execute the task and format the result data, store it as a fixed format message, and reduce the frequency of communication with the server side.
It reduces the communication frequency between the proxy and the server, and improves the efficiency and accuracy of operation and maintenance tasks.
Smart Images

Figure CN120448073A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, electronic device, and computer-readable medium for processing operation and maintenance tasks. Background Art
[0002] With the rapid development of information technology, information systems have become widely used across industries, and enterprises and institutions are increasingly reliant on them. Operating systems, databases, and middleware are core components of information systems and key areas of system operation and maintenance. These operational tasks are growing in scale, diversification, and complexity. To ensure the continued secure and stable operation of information systems, efficient operation and maintenance models and system platforms are essential. Replacing manual operations with automated operations and maintenance is a key approach to improving operation and maintenance efficiency and reducing costs, necessitating the development of relevant automated operation and maintenance systems. Current automated operation and maintenance systems typically transmit and process operation and maintenance tasks between servers and agents in two common modes: server-side dispatch and agent-side pull. In these two modes, task management is centralized on the server, with the agent primarily acting as the task executor. This results in high communication frequency and low efficiency between the agent and server. Summary of the Invention
[0003] In view of this, the embodiments of the present application provide an operation and maintenance task processing method, device, electronic device and computer-readable medium, which can solve the existing problem of high frequency and low efficiency of communication between the agent and the server when processing operation and maintenance tasks through the server-side delivery mode and the agent-side pull mode.
[0004] To achieve the above-mentioned purpose, according to one aspect of an embodiment of the present application, a method for processing operation and maintenance tasks is provided, including: in response to changes in the operation and maintenance task list in an embedded database, loading the latest operation and maintenance task; determining the task execution type and task execution time corresponding to the latest operation and maintenance task, and executing the corresponding operation and maintenance task according to the task execution type and task execution time to obtain execution result data; obtaining the configuration parameters corresponding to the latest operation and maintenance task, formatting the corresponding execution result data according to the configuration parameters to obtain a fixed-format message and storing it in a list of messages to be sent in the embedded database; and sending the messages to be sent in the list of messages to be sent to the server.
[0005] Optionally, the corresponding operation and maintenance task is executed according to the task execution type and the task execution time to obtain execution result data, including: determining that the task execution type is an immediate task execution and the task execution time is immediate, executing the corresponding operation and maintenance task once immediately, and obtaining execution result data; determining that the task execution type is a scheduled task execution, executing the corresponding operation and maintenance task when each task execution time is reached, and obtaining execution result data; determining that the task execution type is a periodic task execution, executing the corresponding operation and maintenance task whenever the task execution time is reached, and obtaining execution result data; and the operation and maintenance task processing method also includes: persistently storing the execution result data in an embedded database, thereby triggering execution data processing.
[0006] Optionally, before loading the latest operation and maintenance task, the operation and maintenance task processing method also includes: obtaining the operation and maintenance task and generating operation and maintenance task acquisition status data based on the operation and maintenance task processing request received from the server; persistently storing the operation and maintenance task in the operation and maintenance task list in the embedded database, and returning the operation and maintenance task acquisition status data to the server.
[0007] Optionally, the operation and maintenance task processing method further includes: in response to executing the restart program, reading and storing all the operation and maintenance tasks in the operation and maintenance task list in the embedded database at one time.
[0008] Optionally, sending the messages to be sent in the list of messages to be sent to the server side includes: in response to the list of messages to be sent being non-empty, sending the messages to be sent in the list of messages to be sent to the server side according to preset rules; and the operation and maintenance task processing method also includes: recording the message sending status, and in response to the message sending status being message sending failure, resending the corresponding messages to be sent to the server side according to a preset retransmission mechanism until the corresponding message sending status is message sending success.
[0009] Optionally, loading the latest operation and maintenance tasks includes: determining the status of the changed operation and maintenance tasks, the status including one or more of the added status, modified status and deleted status; loading the operation and maintenance tasks corresponding to the added status and modified status in the operation and maintenance task list as the latest operation and maintenance tasks.
[0010] Optionally, the operation and maintenance task processing method further includes: determining that the state of the changed operation and maintenance task is a deletion state, and deleting the corresponding operation and maintenance task from the operation and maintenance task list.
[0011] In addition, the present application also provides an operation and maintenance task processing device, including: a task scheduling module, configured to load the latest operation and maintenance task in response to changes in the operation and maintenance task list in the embedded database; an execution module, configured to determine the task execution type and task execution time corresponding to the latest operation and maintenance task, and execute the corresponding operation and maintenance task according to the task execution type and task execution time to obtain execution result data; a data processing module, configured to obtain the configuration parameters corresponding to the latest operation and maintenance task, and format the corresponding execution result data according to the configuration parameters to obtain a fixed format message and store it in the list of messages to be sent in the embedded database; a communication module, configured to send the messages to be sent in the list of messages to be sent to the server.
[0012] Optionally, the execution module is further configured to: determine that the task execution type is an immediate task execution and the task execution time is immediate, execute the corresponding operation and maintenance task once immediately, and obtain execution result data; determine that the task execution type is a scheduled task execution, execute the corresponding operation and maintenance task when each task execution time is reached, and obtain execution result data; determine that the task execution type is a periodic task execution, execute the corresponding operation and maintenance task whenever the task execution time is reached, and obtain execution result data; and the execution module is further configured to: persistently store the execution result data in an embedded database, thereby triggering execution data processing.
[0013] Optionally, the communication module is further configured to: obtain the operation and maintenance task and generate operation and maintenance task acquisition status data based on the operation and maintenance task processing request received from the server; persistently store the operation and maintenance task in the operation and maintenance task list in the embedded database, and return the operation and maintenance task acquisition status data to the server.
[0014] Optionally, the task scheduling module is further configured to: in response to executing the restart program, read and store all the operation and maintenance tasks in the operation and maintenance task list in the embedded database at one time.
[0015] Optionally, the communication module is further configured to: in response to the list of messages to be sent being non-empty, send the messages to be sent in the list of messages to be sent to the server side according to preset rules; and the communication module is further configured to: record the message sending status, and in response to the message sending status being message sending failure, resend the corresponding messages to be sent to the server side according to a preset retransmission mechanism until the corresponding message sending status is message sending success.
[0016] Optionally, the task scheduling module is further configured to: determine the status of the changed operation and maintenance tasks, which status includes one or more of the added status, modified status and deleted status; load the operation and maintenance tasks corresponding to the added status and modified status in the operation and maintenance task list as the latest operation and maintenance tasks.
[0017] Optionally, the task scheduling module is further configured to: determine that the status of the changed operation and maintenance task is a deletion status, and delete the corresponding operation and maintenance task from the operation and maintenance task list.
[0018] In addition, the present application also provides an operation and maintenance task processing electronic device, including: one or more processors; a storage device for storing one or more programs, when one or more programs are executed by one or more processors, the one or more processors implement the operation and maintenance task processing method as described above.
[0019] In addition, the present application also provides a computer-readable medium on which a computer program is stored, and when the program is executed by a processor, the operation and maintenance task processing method as described above is implemented.
[0020] To achieve the above objective, according to another aspect of the embodiments of the present application, a computer program product is provided.
[0021] A computer program product according to an embodiment of the present application includes a computer program, which, when executed by a processor, implements the operation and maintenance task processing method provided by the embodiment of the present application.
[0022] One embodiment of the above invention has the following advantages or beneficial effects: the present application loads the latest operation and maintenance task in response to changes in the operation and maintenance task list in the embedded database; determines the task execution type and task execution time corresponding to the latest operation and maintenance task, executes the corresponding operation and maintenance task according to the task execution type and task execution time to obtain execution result data; obtains the configuration parameters corresponding to the latest operation and maintenance task, formats the corresponding execution result data according to the configuration parameters to obtain a fixed-format message and stores it in the list of messages to be sent in the embedded database; and sends the messages to be sent in the list of messages to be sent to the server. This reduces the communication frequency between the agent and the server when processing operation and maintenance tasks, and improves the efficiency of operation and maintenance task processing.
[0023] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The accompanying drawings are provided to facilitate a better understanding of the present application and do not constitute an undue limitation on the present application. Figure 1 This is a schematic diagram of the main process of the operation and maintenance task processing method according to one embodiment of the present application; Figure 2 This is a schematic diagram of the main process of the operation and maintenance task processing method according to one embodiment of the present application; Figure 3This is a schematic diagram of the main process of the operation and maintenance task processing method according to one embodiment of the present application; Figure 4 is a schematic diagram of the main modules of the operation and maintenance task processing device according to an embodiment of the present application; Figure 5 is an exemplary system architecture diagram to which embodiments of the present application may be applied; Figure 6 It is a structural diagram of a computer system of a terminal device or server suitable for implementing an embodiment of the present application. DETAILED DESCRIPTION
[0025] The following describes exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding. These should be considered merely exemplary. Therefore, those skilled in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description. It should be noted that the acquisition, transmission, storage, use, and processing of data in the technical solutions of this application comply with the relevant provisions of national laws and regulations. It should be noted that in the embodiments of this application, certain software, components, models, and other existing solutions in the industry may be mentioned. These should be considered exemplary and are intended solely to illustrate the feasibility of implementing the technical solutions of this application. It does not mean that the applicant has or will necessarily use such solutions. In the technical solutions of this application, the collection, collection, updating, analysis, processing, use, transmission, storage, and other aspects of user personal information involved comply with the provisions of relevant laws and regulations, are used for legal and reasonable purposes, do not violate public order and good morals, are not shared, disclosed, or sold outside of these legal uses, and are subject to supervision and management by regulatory authorities. Necessary measures should be taken to prevent unauthorized access to user personal information, safeguard the security of user personal information, network security, and national security, and ensure that persons with access to personal information comply with relevant laws and regulations. Once such personal information is no longer needed, risks should be minimized by restricting or even prohibiting its collection and / or deleting it.
[0026] When used, including in certain related applications, protect user privacy by de-identifying data, such as by removing specific identifiers when used, controlling the amount or specificity of stored data, controlling how data is stored, and / or other de-identification methods.
[0027] Figure 1 FIG. 1 is a schematic diagram of the main process of the operation and maintenance task processing method according to an embodiment of the present application. Figure 1As shown, the operation and maintenance task processing method mainly includes the following steps S101 to S104.
[0028] Step S101 : in response to a change in the operation and maintenance task list in the embedded database, loading the latest operation and maintenance task.
[0029] In this embodiment, the execution subject of the operation and maintenance task processing method (for example, it can be an operation and maintenance object agent, referred to as the agent, on which an agent program for operation and maintenance task processing is installed) can monitor whether the operation and maintenance task list in the embedded database has changed through the task scheduling module, and load the latest operation and maintenance task that has changed (for example, added or modified) when the operation and maintenance task list in the embedded database has changed.
[0030] Specifically, before loading the latest operation and maintenance task, the operation and maintenance task processing method also includes: obtaining the operation and maintenance task and generating operation and maintenance task acquisition status data based on the operation and maintenance task processing request received from the server; persistently storing the operation and maintenance task in the operation and maintenance task list in the embedded database, and returning the operation and maintenance task acquisition status data to the server.
[0031] For example, the communication module on the agent side obtains the operation and maintenance task based on the operation and maintenance task processing request received from the server side and generates operation and maintenance task acquisition status data. For example, the data in the operation and maintenance task may include the operation and maintenance task type, task execution type, specific command or script, configuration parameters, and task execution time. Among them, the operation and maintenance task type supports inspection and monitoring type, configuration adjustment type, application release type, service start and stop type, etc. Task execution type supports immediate execution, scheduled execution, and periodic execution type. For example, the task execution time supports immediate execution, 4 o'clock (or 5 o'clock, 6 o'clock), and every Friday. The operation and maintenance task acquisition status data can be the communication module's reception status data of the operation and maintenance task. The communication module on the agent side persistently stores the operation and maintenance task in the operation and maintenance task list in the agent's embedded database and returns the operation and maintenance task acquisition status data to the server side.
[0032] Specifically, loading the latest operation and maintenance tasks includes: determining the status of the changed operation and maintenance tasks, which includes one or more of the added status, modified status and deleted status; loading the operation and maintenance tasks corresponding to the added status and modified status in the operation and maintenance task list as the latest operation and maintenance tasks.
[0033] For example, the task scheduling module on the agent side monitors in real time whether the status of the operation and maintenance tasks in the operation and maintenance task list in the embedded database has changed. If the status of an operation and maintenance task in the operation and maintenance task list in the embedded database has changed, the agent determines the status of the changed operation and maintenance task, which may include one or more of the following: added, modified, and deleted. The agent then loads the operation and maintenance tasks corresponding to the added or modified status in the operation and maintenance task list as the latest operation and maintenance tasks. This ensures that the latest operation and maintenance tasks are obtained quickly and accurately.
[0034] Specifically, the operation and maintenance task processing method further includes: determining that the state of the changed operation and maintenance task is a deletion state, and deleting the corresponding operation and maintenance task from the operation and maintenance task list.
[0035] For example, if the task scheduling module on the agent side determines that the status of the changed operation and maintenance task is deleted, the corresponding operation and maintenance task is deleted from the operation and maintenance task list of the embedded database in a timely manner to improve the efficiency and accuracy of operation and maintenance task processing.
[0036] Specifically, the operation and maintenance task processing method further includes: in response to executing the restart program, reading and storing all the operation and maintenance tasks in the operation and maintenance task list in the embedded database at one time.
[0037] For example, if the agent is restarted, the task scheduling module reads all the operation and maintenance tasks in the operation and maintenance task list in the embedded database at one time and caches them.
[0038] Step S102: determine the task execution type and task execution time corresponding to the latest operation and maintenance task, and execute the corresponding operation and maintenance task according to the task execution type and task execution time to obtain execution result data.
[0039] For example, the agent's task scheduling module determines the task execution type (e.g., one or more of immediate execution, scheduled execution, and periodic execution) and task execution time (e.g., one or more of immediate, 4:00 (or 5:00, 6:00), or every Friday) corresponding to the latest operation and maintenance task (which may be multiple) based on the data in the latest operation and maintenance task, and associates the determined task execution type with the task execution time. The execution module is called to execute the corresponding operation and maintenance task based on the one-to-one correspondence between the task execution type and task execution time (e.g., expressed in the format of task execution type: task execution time, e.g., immediate execution: immediate, scheduled execution: 4:00 (or 5:00, 6:00), or periodic execution: every Friday) to accurately obtain execution result data, persistently store the execution result data in the embedded database, and invoke the data processing module for processing.
[0040] Step S103: obtaining the configuration parameters corresponding to the latest operation and maintenance task, formatting the corresponding execution result data according to the configuration parameters to obtain a fixed format message and storing it in a list of messages to be sent in the embedded database.
[0041] For example, after receiving a request for data processing, the data processing module on the agent side obtains the configuration parameters (for example, fixed format configuration data) corresponding to the latest operation and maintenance task from the embedded database, and formats the corresponding execution result data according to the configuration parameters (for example, fixed format configuration data) to obtain a fixed format message corresponding to the message to be sent in the list of messages to be sent in the embedded database and stores it in the list of messages to be sent in the embedded database to ensure the accuracy of message sending.
[0042] Step S104: Send the messages to be sent in the list of messages to be sent to the server.
[0043] Specifically, sending the to-be-sent messages in the to-be-sent message list to the server includes: in response to the to-be-sent message list being non-empty, sending the to-be-sent messages in the to-be-sent message list to the server according to a preset rule.
[0044] For example, the communication module of the agent side monitors that the list of messages to be sent is not empty (that is, there are messages to be sent), and according to the preset rules (for example, the preset message sending rules can be sending messages in the form of pop-up windows, sending messages in the form of text messages, etc.), the messages to be sent in the list of messages to be sent are accurately sent to the server side.
[0045] The operation and maintenance task processing method also includes: recording the message sending status, and in response to the message sending status being message sending failure, resending the corresponding to-be-sent message to the server end according to a preset retransmission mechanism until the corresponding message sending status is message sending success.
[0046] For example, after sending the pending messages in the pending message list to the server, the communication module of the agent side can record the message sending status. In response to the message sending status being a message sending failure, the corresponding pending message can be resent to the server side according to a preset retransmission mechanism (for example, retransmitting once every 3 seconds) until the corresponding message sending status is a message sending success, thereby improving the success rate of sending messages to the server side.
[0047] This embodiment responds to changes in the operation and maintenance task list in the embedded database by loading the latest operation and maintenance task; determining the task execution type and task execution time corresponding to the latest operation and maintenance task, executing the corresponding operation and maintenance task according to the task execution type and task execution time to obtain execution result data; obtaining configuration parameters corresponding to the latest operation and maintenance task, formatting the corresponding execution result data according to the configuration parameters to obtain a fixed-format message and storing it in a list of to-be-sent messages in the embedded database; and sending the to-be-sent messages in the to-be-sent message list to the server. This reduces the communication frequency between the agent and the server during operation and maintenance task processing and improves the efficiency of operation and maintenance task processing.
[0048] Figure 2 FIG. 1 is a schematic diagram of the main flow of the operation and maintenance task processing method according to an embodiment of the present application. Figure 2 As shown, the operation and maintenance task processing method mainly includes the following steps S201 to S208.
[0049] Step S201 : in response to a change in the operation and maintenance task list in the embedded database, loading the latest operation and maintenance task.
[0050] The task scheduling module on the agent side monitors in real time whether the status of the maintenance tasks in the maintenance task list in the embedded database has changed. If a change in the status of a maintenance task in the maintenance task list is detected, the agent determines the status of the changed maintenance task, which may be one or more of the following: added, modified, or deleted. The maintenance task corresponding to the added or modified status in the maintenance task list is loaded as the latest maintenance task. This ensures that the latest maintenance tasks are obtained quickly and accurately.
[0051] Step S202: Determine the task execution type and task execution time corresponding to the latest operation and maintenance task.
[0052] The agent's task scheduling module determines the task execution type and execution time for the latest maintenance task. The task execution type for the latest maintenance task can be, for example, immediate execution, scheduled execution, or periodic execution. The task execution time can be, for example, immediate execution, 4:00 (or 5:00, or 6:00), or every Friday.
[0053] Step S203: determine that the task execution type is an immediate task execution and the task execution time is immediate, execute the corresponding operation and maintenance task once immediately, and obtain execution result data.
[0054] The task scheduling module on the agent side determines that the task execution type is an immediate task and the task execution time is immediate, calls the execution module to immediately execute the corresponding operation and maintenance task once, and obtains the execution result data of the operation and maintenance task.
[0055] Step S204: determine that the task execution type is a scheduled execution task, execute the corresponding operation and maintenance task when the execution time of each task arrives, and obtain execution result data.
[0056] The task scheduling module on the agent side determines that the task execution type is a scheduled execution task. When the execution time of each task is reached (that is, when one or more specific time points are set), the execution module is called to execute the corresponding operation and maintenance task and obtain the execution result data of the operation and maintenance task.
[0057] Step S205 : Determine that the task execution type is a periodic execution task, execute the corresponding operation and maintenance task whenever the task execution time arrives, and obtain execution result data.
[0058] The task scheduling module on the agent side determines that the task execution type is a periodic execution task. Whenever the task execution time arrives (for example, every Friday), the execution module is called to execute the corresponding operation and maintenance task and obtain the execution result data of the operation and maintenance task.
[0059] Step S206: persistently store the execution result data in the embedded database, thereby triggering the execution of data processing.
[0060] The execution module of the agent side will store the execution result data of the operation and maintenance task persistently in the embedded database. When the execution result data of the operation and maintenance task is stored, it will trigger the call of the data processing module to perform data processing to improve the accuracy and efficiency of the operation and maintenance task processing.
[0061] Step S207 , obtaining the configuration parameters corresponding to the latest operation and maintenance task, formatting the corresponding execution result data according to the configuration parameters to obtain a fixed format message and storing it in a list of messages to be sent in the embedded database.
[0062] After receiving the data processing request sent by the execution module, the data processing module on the agent side obtains the configuration parameters (for example, fixed format configuration data) corresponding to the latest operation and maintenance task from the embedded database, and formats the execution result data of the corresponding operation and maintenance task according to the configuration parameters (for example, fixed format configuration data) to obtain a fixed format message corresponding to the message to be sent in the message list to be sent in the embedded database and stores it in the message list to be sent in the embedded database to ensure the accuracy of message sending.
[0063] Step S208: Send the messages to be sent in the list of messages to be sent to the server.
[0064] The communication module of the agent side monitors the list of messages to be sent in the embedded database. If there is a message to be sent, it will be sent to the server side according to the rules and the sending status will be recorded. If the sending fails, it will be resent according to the configured resending mechanism, thereby improving the success rate of sending messages to the server side.
[0065] Figure 3 This is a schematic diagram of the main flow of the operation and maintenance task processing method according to an embodiment of the present application. Figure 3 As shown, the embodiment of the present application can realize the efficient transmission and processing of operation and maintenance tasks between the automated operation and maintenance system server and the operation and maintenance object agent, standardize the storage and processing of operation and maintenance task information, operation and maintenance task execution process data, operation and maintenance task execution result data, communication data between the operation and maintenance object agent and the automated operation and maintenance system server, etc., and use embedded database technology on the operation and maintenance object agent to divide the agent into different functional modules (for example, Figure 3 The communication module, task scheduling module, embedded database, execution module, and data processing module shown in the figure enhance the operation and maintenance task management and operation and maintenance data processing capabilities of the operation and maintenance object agent. The operation and maintenance object agent in this application, hereinafter referred to as the agent, has an agent program installed on the agent for processing operation and maintenance tasks. The automated operation and maintenance system server in this application, hereinafter referred to as the server, is also referred to as the server.
[0066] The server sends the operation and maintenance tasks to the agent based on the changes in the operation and maintenance task status (for example, addition, modification or deletion). The data in the operation and maintenance tasks may include the operation and maintenance task type, task execution type, specific commands or scripts, configuration parameters and task execution time. If the operation and maintenance task status has not changed, the server does not need to repeatedly send the same operation and maintenance task to the agent. The agent stores the received operation and maintenance tasks in the embedded database and calls the execution module to execute the operation and maintenance tasks according to the task execution time requirements. The agent does not need to poll the server, which reduces the network communication cost between the server and the agent and reduces the access pressure on the server.
[0067] The operation and maintenance object agent in this application is hereinafter referred to as the agent. The automated operation and maintenance system server in this application is hereinafter referred to as the server. The main process of the operation and maintenance task processing method in the embodiment of this application is as follows: the server sends an operation and maintenance task to the agent. The data in the operation and maintenance task may include the operation and maintenance task type, task execution type, specific command or script, configuration parameters, and task execution time. Among them, the operation and maintenance task type supports inspection and monitoring type, configuration adjustment type, application release type, service start and stop type, etc. Task execution type supports immediate execution, scheduled execution, and periodic execution type. For example, task execution time supports immediate execution, 4 o'clock (or 5 o'clock, 6 o'clock), and every Friday. The communication module of the agent receives the operation and maintenance task processing request issued by the server, persistently stores the operation and maintenance task in the operation and maintenance task list in the embedded database (e.g., H2 database), and returns the received status data (i.e., the operation and maintenance task acquisition status data) to the server. The H2 database is a lightweight, open-source relational database based on the Java language. It consists of a single class library, a single JAR file, that can be easily embedded into Java applications or used as a standalone relational database server. It offers comprehensive database features, including support for standard SQL statements and stored procedures. Written purely in Java, the H2 database supports cross-platform deployment. An independent communication module is established on the agent side to facilitate communication between the agent and the server. When the server sends maintenance tasks to the agent, the communication module persistently stores these tasks in the agent's embedded database. The communication module also monitors the embedded database's list of pending messages. If a pending message exists, it is sent to the server according to the rules. If a message fails to be sent, it is resent according to the configured retransmission mechanism. The agent's task scheduling module monitors the embedded database's maintenance task list. If the task list changes (e.g., additions, modifications, or deletions), the latest maintenance task is loaded into the task scheduling module's cache. If the agent restarts, the task scheduling module reads all maintenance tasks from the embedded database's maintenance task list and caches them. The task scheduling module calls the execution module to execute the corresponding O&M task according to the task execution time. Immediate execution executes the O&M task immediately, scheduled execution executes the task at one or more specific times (for example, 4:00 (or 5:00, or 6:00)), and periodic execution executes the task according to a specific time period (for example, every Friday). The execution module on the agent side is responsible for executing specific O&M tasks. After receiving instructions from the task scheduling module, the execution module executes the specific O&M task, persistently stores the execution result data in the embedded database, and calls the data processing module for processing.The agent's data processing module is responsible for formatting the execution result data of the operation and maintenance task. Upon receiving a data processing request, the data processing module reads the configuration parameters related to the specified operation and maintenance task from the embedded database to format the execution result data of the operation and maintenance task, forming a fixed-format message, which is then stored in the embedded database's list of pending messages. The agent's embedded database is responsible for persistently storing operation and maintenance task information, operation and maintenance task execution process data, operation and maintenance task execution result data, and communication data between the operation and maintenance object agent and the automated operation and maintenance system server. The agent's communication module monitors the pending message list in the embedded database. If a pending message exists, it is sent to the server according to the rules and the sending status is recorded. If the sending fails, it is resent according to the configured resend mechanism.
[0068] The embodiments of the present application optimize the transmission and processing methods of operation and maintenance tasks between the server and the agent. On the premise of ensuring timely processing of operation and maintenance tasks, the frequency of interaction between the server and the agent is reduced, efficient and stable operation and maintenance task scheduling is achieved, network communication costs are reduced, access pressure and data processing pressure on the server are alleviated, and the standardization of operation and maintenance task data management on the agent side is improved.
[0069] Figure 4 Schematic diagram of the main modules of the operation and maintenance task processing device according to the embodiment of the present application. Figure 4 As shown, the operation and maintenance task processing device 400 includes a task scheduling module 401, an execution module 402, a data processing module 403 and a communication module 404.
[0070] The task scheduling module 401 is configured to load the latest operation and maintenance task in response to changes in the operation and maintenance task list in the embedded database.
[0071] The execution module 402 is configured to determine the task execution type and task execution time corresponding to the latest operation and maintenance task, and execute the corresponding operation and maintenance task according to the task execution type and task execution time to obtain execution result data.
[0072] The data processing module 403 is configured to obtain the configuration parameters corresponding to the latest operation and maintenance task, format the corresponding execution result data according to the configuration parameters to obtain a fixed format message and store it in the list of messages to be sent in the embedded database.
[0073] The communication module 404 is configured to send the to-be-sent messages in the to-be-sent message list to the server.
[0074] In some embodiments, the execution module 402 is further configured to: determine that the task execution type is an immediate task execution and the task execution time is immediate, execute the corresponding operation and maintenance task once immediately, and obtain execution result data; determine that the task execution type is a scheduled task execution, execute the corresponding operation and maintenance task when each task execution time is reached, and obtain execution result data; determine that the task execution type is a periodic task execution, execute the corresponding operation and maintenance task whenever the task execution time is reached, and obtain execution result data; and the execution module 402 is further configured to: persistently store the execution result data in an embedded database, thereby triggering execution data processing.
[0075] In some embodiments, the communication module 404 is further configured to: obtain the operation and maintenance task and generate the operation and maintenance task acquisition status data according to the operation and maintenance task processing request received from the server side; persistently store the operation and maintenance task in the operation and maintenance task list in the embedded database, and return the operation and maintenance task acquisition status data to the server side.
[0076] In some embodiments, the task scheduling module 401 is further configured to: in response to executing the restart program, read and store all the operation and maintenance tasks in the operation and maintenance task list in the embedded database at one time.
[0077] In some embodiments, the communication module 404 is further configured to: in response to the list of messages to be sent being non-empty, send the messages to be sent in the list of messages to be sent to the server side according to preset rules; and the communication module 404 is further configured to: record the message sending status, and in response to the message sending status being message sending failure, resend the corresponding message to be sent to the server side according to a preset retransmission mechanism until the corresponding message sending status is message sending success.
[0078] In some embodiments, the task scheduling module 401 is further configured to: determine the status of the operation and maintenance tasks that have changed, the status including one or more of the newly added status, modified status and deleted status; load the operation and maintenance tasks corresponding to the newly added status and modified status in the operation and maintenance task list as the latest operation and maintenance tasks.
[0079] In some embodiments, the task scheduling module 401 is further configured to: determine that the status of the changed operation and maintenance task is a deletion status, and delete the corresponding operation and maintenance task from the operation and maintenance task list.
[0080] It should be noted that the operation and maintenance task processing method and the operation and maintenance task processing device of the present application have a corresponding relationship in terms of specific implementation content, so the repeated content will not be explained again.
[0081] Figure 5An exemplary system architecture 500 is shown to which the operation and maintenance task processing method or operation and maintenance task processing apparatus according to the embodiments of the present application can be applied.
[0082] like Figure 5 As shown, system architecture 500 may include terminal devices 501, 502, and 503, a network 504, and a server 505 (which may be an agent terminal installed with an agent program for processing operation and maintenance tasks). Network 504 is used as a medium to provide a communication link between terminal devices 501, 502, and 503 and server 505. Network 504 may include various connection types, such as wired or wireless communication links or fiber optic cables.
[0083] Users can use terminal devices 501, 502, and 503 to interact with server 505 via network 504 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 501, 502, and 503, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).
[0084] The terminal devices 501 , 502 , and 503 may be various electronic devices that have an operation and maintenance task processing screen and support web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.
[0085] Server 505 (which may be an agent installed with an agent program for processing operation and maintenance tasks) may be a server providing various services, such as a background management server (for example only) that supports operation and maintenance tasks submitted by users using terminal devices 501, 502, and 503. In response to changes in the operation and maintenance task list in the embedded database, the background management server may load the latest operation and maintenance task; determine the task execution type and task execution time corresponding to the latest operation and maintenance task, and execute the corresponding operation and maintenance task based on the task execution type and task execution time to obtain execution result data; obtain the configuration parameters corresponding to the latest operation and maintenance task, format the corresponding execution result data according to the configuration parameters to obtain a fixed-format message, and store it in a list of pending messages in the embedded database; and send the pending messages in the list of pending messages to the server. This reduces the frequency of communication between the agent and server during operation and maintenance task processing and improves the efficiency of operation and maintenance task processing.
[0086] It should be noted that the operation and maintenance task processing method provided in the embodiment of the present application is generally executed by the server 505, and accordingly, the operation and maintenance task processing device is generally set in the server 505.
[0087] It should be understood that Figure 5The number of terminal devices, networks and servers in the embodiment is merely illustrative. Any number of terminal devices, networks and servers may be provided as required.
[0088] Reference below Figure 6 , which shows a structural diagram of a computer system 600 of a terminal device suitable for implementing an embodiment of the present application. Figure 6 The terminal device shown is merely an example and should not limit the functions and scope of use of the embodiments of the present application.
[0089] like Figure 6 As shown, computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage unit 608 into a random access memory (RAM) 603. Various programs and data required for the operation of computer system 600 are also stored in RAM 603. CPU 601, ROM 602, and RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to bus 604.
[0090] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, mouse, and the like; an output section 607 including displays such as a cathode ray tube (CRT), a liquid crystal display (LCD), and speakers; a storage section 608 including a hard disk; and a communication section 609 including a network interface card such as a LAN card or a modem. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. Removable media 611, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 610 as needed, so that computer programs read from the removable media can be installed in the storage section 608 as needed.
[0091] In particular, according to embodiments disclosed herein, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed herein include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for executing the methods illustrated in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 609 and / or installed from removable media 611. When executed by central processing unit (CPU) 601, the computer program performs the aforementioned functions defined in the system of this application.
[0092] It should be noted that the computer-readable medium described herein may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. Computer-readable storage media may include, for example, but are not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or components, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device, or component. In this application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. This propagated data signal may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wireline, optical fiber cable, RF, or any suitable combination thereof.
[0093] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the above-mentioned module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can be determined according to the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of the boxes in the block diagram or flowchart, can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a combination of dedicated hardware and computer instructions.
[0094] The modules described in the embodiments of this application may be implemented in software or hardware. The modules described may also be provided in a processor. For example, a processor may be described as including a task scheduling module, an execution module, a data processing module, and a communication module. The names of these modules do not, in some cases, limit the modules themselves.
[0095] As another aspect, the present application also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently and not be assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device responds to changes in the operation and maintenance task list in the embedded database and loads the latest operation and maintenance task; determines the task execution type and task execution time corresponding to the latest operation and maintenance task, executes the corresponding operation and maintenance task according to the task execution type and task execution time, and obtains execution result data; obtains the configuration parameters corresponding to the latest operation and maintenance task, formats the corresponding execution result data according to the configuration parameters, obtains a fixed-format message, and stores it in a list of messages to be sent in the embedded database; and sends the message to be sent in the list of messages to be sent to the server.
[0096] The computer program product of the present application includes a computer program, which, when executed by a processor, implements the operation and maintenance task processing method in the embodiment of the present application.
[0097] According to the technical solution of the embodiment of the present application, the communication frequency between the agent end and the server end when performing operation and maintenance task processing can be reduced, and the efficiency of operation and maintenance task processing can be improved.
[0098] The above specific embodiments do not constitute a limitation on the scope of protection of this application. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application shall be included within the scope of protection of this application.
Claims
1. A method for processing operation and maintenance tasks, characterized in that: include: In response to changes in the operation and maintenance task list in the embedded database, the latest operation and maintenance task is loaded; Determine the task execution type and task execution time corresponding to the latest operation and maintenance task, and execute the corresponding operation and maintenance task according to the task execution type and the task execution time to obtain execution result data; Obtaining configuration parameters corresponding to the latest operation and maintenance task, formatting corresponding execution result data according to the configuration parameters to obtain a fixed-format message and storing it in a list of messages to be sent in the embedded database; Send the messages to be sent in the list of messages to be sent to the server.
2. The method according to claim 1, characterized in that The executing the corresponding operation and maintenance task according to the task execution type and the task execution time to obtain execution result data includes: Determine that the task execution type is an immediate task execution and the task execution time is immediate, execute the corresponding operation and maintenance task once immediately, and obtain execution result data; Determine that the task execution type is a scheduled execution task, execute the corresponding operation and maintenance task when each task execution time arrives, and obtain execution result data; Determine that the task execution type is a periodic execution task, execute the corresponding operation and maintenance task whenever the task execution time arrives, and obtain execution result data; and The method further comprises: The execution result data is persistently stored in the embedded database, thereby triggering execution data processing.
3. The method according to claim 1, characterized in that Before loading the latest operation and maintenance task, the method further includes: Obtaining the operation and maintenance task according to the operation and maintenance task processing request sent by the server and generating operation and maintenance task acquisition status data; The operation and maintenance task is persistently stored in an operation and maintenance task list in an embedded database, and the operation and maintenance task acquisition status data is returned to the server side.
4. The method according to claim 1, wherein The method further comprises: In response to executing the restart program, all the operation and maintenance tasks in the operation and maintenance task list in the embedded database are read and stored at one time.
5. The method according to claim 1, wherein The sending of the to-be-sent messages in the to-be-sent message list to the server includes: In response to the list of messages to be sent being non-empty, sending the messages to be sent in the list of messages to be sent to the server according to a preset rule; and The method further comprises: Record the message sending status, and in response to the message sending status being a message sending failure, resend the corresponding to-be-sent message to the server end according to a preset resending mechanism until the corresponding message sending status is a message sending success.
6. The method according to claim 1, characterized in that The loading of the latest operation and maintenance tasks includes: Determine the status of the changed operation and maintenance task, where the status includes one or more of a new status, a modified status, and a deleted status; The operation and maintenance tasks corresponding to the newly added state and the modified state in the operation and maintenance task list are loaded as the latest operation and maintenance tasks.
7. The method according to claim 6, characterized in that The method further comprises: Determine that the status of the changed operation and maintenance task is a deletion status, and delete the corresponding operation and maintenance task from the operation and maintenance task list.
8. An operation and maintenance task processing device, characterized in that: include: The task scheduling module is configured to load the latest operation and maintenance task in response to changes in the operation and maintenance task list in the embedded database; an execution module configured to determine a task execution type and a task execution time corresponding to the latest operation and maintenance task, and execute the corresponding operation and maintenance task according to the task execution type and the task execution time to obtain execution result data; a data processing module configured to obtain configuration parameters corresponding to the latest operation and maintenance task, format corresponding execution result data according to the configuration parameters to obtain a fixed-format message and store it in a list of messages to be sent in the embedded database; The communication module is configured to send the to-be-sent messages in the to-be-sent message list to the server.
9. An electronic device for processing operation and maintenance tasks, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
10. A computer-readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
11. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Method and system for processing timing task, electronic equipment and computer readable medium
CN108874513A
Automatic operation and maintenance method and system for non-standardized application system
CN112965869A
Automatic operation and maintenance method and device
CN113424153A