Automatic cleaning method, system, device and storage medium for atomic operations
By generating a visual map, determining the users and usage of atomic operations and performing cleaning processing, solving the problem of historical versions not daring to clean up, simplifying version management, and improving the reuse rate of atomic operations.
Patent Information
- Application Number
- CN202010603810.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-29
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2040-06-29
AI Technical Summary
With the update and improvement of the atomic operation script, there are a large number of different historical versions of the same function in the system, which makes it difficult to maintain the organization, storage and call relationships of atomic operations, and the difficulty of withdrawing, deleting and version maintenance operations increases, and the historical version dare not be Clean up.
By generating a visual map, determine the user and usage of the atomic operation to be cleaned, send confirmation information to the user, perform cleaning processing based on the feedback results, and clean up this version of the atomic operation if it is not continued.
It accurately solves the problem of not daring to clean up historical versions, concise and clear version management, and improves the reuse rate of atomic operations.
Smart Images

Figure CN111913736B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and more specifically, to an automatic cleaning method, system, device and storage medium for atomic operations. Background Art
[0002] Atomic operations are the basic execution units of automated operation and maintenance. Atomic operations themselves can be authorized to certain users for execution, or multiple atomic operations can be combined to form a more powerful orchestration job.
[0003] Usually, when executing or arranging atomic operations, the version to be used is specified in the form of <atomic operation ID – version ID>. In addition, there are multiple layers of complex calling relationships and authorized execution status between atomic operations. When atomic operations are changed, new historical versions are usually added. With the update and iteration of atomic operation scripts, while the functions of atomic operations are more complete and the operation is more stable, there will be a large number of different historical versions of atomic operations with the same functions in the system. The existence of so many versions of atomic operations creates great difficulties in the organization, storage, and call relationship maintenance of scripts.
[0004] At the same time, with the accumulation of atomic operations on the operation and maintenance platform and the intricate calling relationships, it is becoming increasingly difficult to withdraw, delete, and maintain versions of atomic operations. Even the creators and maintainers of atomic operations usually dare not delete related atomic operations at will. Summary of the invention
[0005] In order to solve the above problems existing in the prior art, the present invention provides an automatic cleanup method, system, device and storage medium for atomic operations, which can effectively solve the problem of not daring to clean up historical versions.
[0006] According to the first aspect of the present invention, an embodiment of the present invention provides an automatic cleanup method for atomic operations, the automatic cleanup method comprising: generating a visual map based on the operation records of the atomic operations to be cleaned; determining the user of the atomic operations to be cleaned based on the visual map; determining the usage information of the user, and performing cleanup processing based on the usage information.
[0007] In some implementations of the present invention, the method further includes: querying a database to obtain the operation record according to the parameters of the atomic operation to be cleaned.
[0008] In some implementations of the present invention, the parameters include the operation ID and version ID of the atomic operation to be cleaned up.
[0009] In some embodiments of the present invention, generating a visual map based on the operation records of the atomic operations to be cleaned up includes: parsing the operation records to obtain orchestration call records and authorization execution records; and generating the visual map based on the orchestration call records and the authorization execution records.
[0010] In some embodiments of the present invention, the disaster recovery switching method also includes: determining the usage information of the user includes: sending confirmation information to the user to confirm whether to continue using the atomic operation to be cleaned up, and receiving feedback information; determining the usage information based on the feedback information.
[0011] In some embodiments of the present invention, performing the cleanup process according to the usage information includes: matching a cleanup plan according to the usage information; performing the cleanup process according to the cleanup plan; wherein the cleanup plan includes: if the usage is not to be continued, then cleaning the atomic operations to be cleaned; otherwise, ending the cleanup and retaining the atomic operations to be cleaned.
[0012] According to the second aspect of the present invention, an embodiment of the present invention provides an automatic cleanup system for atomic operations, the automatic cleanup system comprising: a view generation module, which is used to generate a visual map based on the operation records of the atomic operations to be cleaned; a user confirmation module, which is used to determine the user of the atomic operations to be cleaned based on the visual map; and a cleanup module, which is used to determine the usage information of the user and perform cleanup processing based on the usage information.
[0013] In some embodiments of the present invention, the system further includes: a data acquisition module, which is used to query a database according to the parameters of the atomic operation to be cleaned to obtain the operation record.
[0014] In some implementations of the present invention, the parameters include the operation ID and version ID of the atomic operation to be cleaned up.
[0015] In some implementations of the present invention, the view generation module is used to: parse the operation record to obtain the orchestration call record and the authorization execution record; and generate the visual map according to the orchestration call record and the authorization execution record.
[0016] In some embodiments of the present invention, the cleaning module includes a determination unit for determining the user's usage information, which is used to: send confirmation information to the user to confirm whether to continue using the atomic operation to be cleaned, and receive feedback information; determine the usage information based on the feedback information.
[0017] In some embodiments of the present invention, the cleaning module includes an execution unit that performs a cleaning process according to the usage information, which is used to: match a cleaning plan according to the usage information; perform the cleaning process according to the cleaning plan; wherein the cleaning plan includes: if the usage is not to be continued, then clean up the atomic operation to be cleaned; otherwise, end the cleaning and retain the atomic operation to be cleaned.
[0018] According to the third aspect of the present invention, an embodiment of the present invention provides an automatic cleaning device for atomic operations, including a memory and a processor, wherein the memory is used to store computer-readable instructions; the processor is used to execute the computer-readable instructions to implement the method described in any of the aforementioned embodiments.
[0019] According to a fourth aspect of the present invention, an embodiment of the present invention further provides a computer storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the method described in any of the aforementioned embodiments.
[0020] The present invention generates a visual map by combing the execution records of atomic operations and arranging the call records, showing the multi-layer complex call relationship and the authorized execution status between atomic operations, so as to accurately determine the user of the atomic operation to be cleaned up, thereby realizing accurate notification, feedback confirmation and other links, and then generating a cleanup plan based on the feedback results, effectively solving the problem of not daring to clean up historical versions, making version management more concise and clear. At the same time, it helps users to select the correct version of atomic operations when using atomic operations, greatly improving the reuse rate of atomic operations. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 is a flow chart of an automatic cleaning method of atomic operations according to an embodiment of the present invention;
[0022] Figure 2 is a block diagram of an automatic cleaning system for atomic operations according to an embodiment of the present invention. DETAILED DESCRIPTION
[0023] The various aspects of the present invention are described in detail below in conjunction with the accompanying drawings and specific embodiments. Among them, well-known modules, units and their connections, links, communications or operations are not shown or described in detail. In addition, the described features, architectures or functions can be combined in any way in one or more embodiments. It should be understood by those skilled in the art that the various embodiments described below are only used for illustration and are not intended to limit the scope of protection of the present invention. It can also be easily understood that the modules or units or processing methods in each embodiment described herein and shown in the accompanying drawings can be combined and designed in various different configurations.
[0024] An embodiment of the present invention provides an automatic cleaning method for atomic operations, such as Figure 1 As shown, in an embodiment of the present invention, the method includes:
[0025] 100: Generate a visual map according to the operation records of the atomic operations to be cleaned up;
[0026] 101: Determine the user of the atomic operation to be cleaned up according to the visualization graph;
[0027] 102: Determine the user's usage information and perform cleanup based on the usage information
[0028] Therefore, by recording the operation records of related operations of the atomic operation, a visual map is constructed, and relevant personnel are notified for confirmation, so as to determine the cleanup plan for the atomic operation.
[0029] In this embodiment, the database can be queried to obtain the operation record according to the parameters of the atomic operation to be cleaned, such as the operation ID (Identity Document) and version ID of the atomic operation. Specifically, after the atomic operation is successfully created, the text content such as the script is stored in the MongoDB database (a database based on distributed file storage), and the operation record is stored in the MySQL database (a relational database). In the MySQL database, the operation record is stored in the form of a data table, which is divided into the table autoOperation and the table autoOperRelati.
[0030] The autoOperation table is a basic information table of atomic operation entities, including operation ID, version ID, creation time, and creation user ID. The operation ID and version ID together constitute the primary key; the creation time and creation user ID respectively indicate the atomic operation of a certain user creating the version at a certain time.
[0031] The autoOperRelati table is used to record the operation information of atomic services, including operation ID, version ID, insertion time, operation type, user ID, orchestration ID, and authorization record. The operation ID and version ID together constitute the primary key; the insertion time is represented by the insertion time of the record; there are two main types of operations: execution operation and orchestration call operation, which are represented by enumeration type; the user ID represents the user number that executes the operation; the orchestration ID is mainly used when the operation type is an orchestration operation, and records which orchestration uses this version of the atomic operation. When a new orchestration job is submitted, the atomic operation and number information used need to be recorded and stored. When a version of an atomic operation is authorized to a user for execution, an authorization record also needs to be inserted into the autoOperRelati table.
[0032] Therefore, when you need to query the execution record of a certain atomic operation, you can query the MySQL database based on <operation ID-version ID> as the primary key, and display the matching results in a list.
[0033] In this embodiment, after obtaining the execution record of the atomic operation to be cleaned up, it is parsed to obtain the orchestration call record and the authorization execution record. Among them, the orchestration call record records which orchestration uses the atomic operation of this version, and the authorization execution record records which users are authorized to execute the atomic operation of this version. Based on the above information, a visual map reflecting the multi-layer complex call relationship between the atomic operations and the authorization execution status can be constructed to determine which users have used the atomic operation.
[0034] In this embodiment, after obtaining the relevant user, confirmation information can be sent to the user through methods such as in-site messages to confirm whether to continue using the atomic operation to be cleared. The user who receives the confirmation information needs to provide feedback information on whether to continue using it or not, so as to determine the usage of the atomic operation.
[0035] In this embodiment, after determining the usage of the atomic operation to be cleaned up, a relevant cleanup plan can be formulated and executed. Specifically, when all users feedback that they will not continue to use it, the atomic operation of this version can be cleaned up; as long as there is a user feedback that it will continue to be used, the atomic operation of this version cannot be cleaned up.
[0036] In summary, the present invention generates a visual map by combing the execution records and arranging the call records of atomic operations, showing the multi-layer complex call relationship and the authorized execution status between atomic operations, so as to accurately determine the user of the atomic operation to be cleaned up, thereby realizing accurate notification, feedback confirmation and other links, and then generating a cleanup plan based on the feedback results, effectively solving the problem of not daring to clean up historical versions, making version management more concise and clear. At the same time, it helps users to select the correct version of atomic operations when using atomic operations, greatly improving the reuse rate of atomic operations.
[0037] Figure 2 is a block diagram of an automatic cleaning system 1 for atomic operations according to an embodiment of the present invention, referring to Figure 2 The automatic cleaning system 1 may include: a view generation module 12, which is used to generate a visual map according to the operation records of the atomic operation to be cleaned; a user confirmation module 13, which is used to determine the user of the atomic operation to be cleaned according to the visual map; a cleaning module 14, which is used to determine the user's usage information and perform cleaning processing according to the usage information.
[0038] In an embodiment of the present invention, Figure 2 As shown, the automatic cleaning system 1 may further include: a data acquisition module 11, which is used to query the database to obtain operation records according to the parameters of the atomic operation to be cleaned, such as the operation ID and version ID of the atomic operation.
[0039] In the embodiment of the present invention, the view generation module 12 is used to parse the operation record to obtain the orchestration call record and the authorization execution record; and generate a visual map according to the orchestration call record and the authorization execution record.
[0040] In an embodiment of the present invention, the cleaning module 14 may include a determination unit 141 for determining the user's usage information, which is used to send confirmation information to the user to confirm whether to continue using the atomic operation to be cleaned, and receive feedback information, thereby determining the usage information based on the feedback information.
[0041] In an embodiment of the present invention, the cleaning module 14 may further include an execution unit 142 for executing a cleaning process according to the usage information, which is used to match a cleaning scheme according to the usage information and then execute a cleaning process according to the cleaning scheme. The cleaning scheme may include:
[0042] If the usage is not to be continued, clean up the atomic operations to be cleaned up;
[0043] Otherwise, the cleanup is completed, and the atomic operations to be cleaned up are retained.
[0044] Through the description of the above implementation modes, those skilled in the art can clearly understand that the present invention can be implemented by combining software with a hardware platform. Based on such an understanding, all or part of the contribution of the technical solution of the present invention to the background technology can be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in various implementation modes of the present invention or some parts of the implementation modes.
[0045] Therefore, the embodiment of the present invention further provides a computer storage medium storing a computer program for implementing the automatic cleaning method of atomic operations provided by the aforementioned embodiment or implementation of the present invention when executed. For example, the storage medium may include a hard disk, a floppy disk, an optical disk, a tape, a magnetic disk, a USB flash drive, a flash memory, etc.
[0046] The embodiment of the present invention also provides an automatic cleaning device for atomic operations, the device comprising a memory for storing computer-readable instructions; a processor for executing the computer-readable instructions to implement the automatic cleaning method for atomic operations provided by the aforementioned embodiment or implementation of the present invention. Optionally, in an implementation of the embodiment of the present invention, the device may also include an input and output interface for data communication. For example, the device may be a computer, an intelligent terminal, a server, etc.
[0047] The specific embodiments disclosed herein are only used to illustrate the present invention. It is obvious to those skilled in the art that various modifications can be made according to the teachings of this article, and various equivalent methods can be used to implement the present invention. Therefore, the specific embodiments disclosed above of the present invention are only exemplary, and their protection scope is not limited by the details of the structure or design disclosed herein, unless otherwise specified in the claims. Therefore, the specific exemplary embodiments disclosed above can be replaced, combined or modified in various ways, and all variations thereof fall within the scope disclosed herein.
Claims
1. An automatic cleaning method for atomic operations, characterized in that: The automatic cleaning method comprises: Generate a visual map based on the operation records of the atomic operations to be cleaned up; Determine the user of the atomic operation to be cleared according to the visual map; Determining usage information of the user, and performing a cleanup process according to the usage information; The step of generating a visual map according to the operation records of the atomic operations to be cleaned up includes: Parsing the operation record to obtain the orchestration call record and the authorization execution record; The visual map reflecting the multi-layer complex calling relationship between atomic operations and the authorization execution status is generated according to the orchestration calling record and the authorization execution record.
2. The automatic cleaning method according to claim 1, characterized in that: The method further comprises: The database is queried according to the parameters of the atomic operation to be cleared to obtain the operation record.
3. The automatic cleaning method according to claim 2, characterized in that: The parameters include the operation ID and version ID of the atomic operation to be cleaned up.
4. The automatic cleaning method according to claim 1, characterized in that: Determining the usage information of the user includes: Sending confirmation information to the user to confirm whether to continue using the atomic operation to be cleaned up, and receiving feedback information; The usage information is determined according to the feedback information.
5. The automatic cleaning method according to claim 1, characterized in that: The performing of the cleaning process according to the usage information comprises: Matching a cleaning solution according to the usage information; Execute the cleaning process according to the cleaning scheme; in, The cleaning program includes: If the usage is not to be continued, clearing the atomic operation to be cleared; Otherwise, the cleanup is terminated and the atomic operation to be cleaned up is retained.
6. An atomic operation automatic cleaning system, characterized in that: The automatic cleaning system comprises: A view generation module, which is used to generate a visual map according to the operation records of the atomic operations to be cleaned up; A user confirmation module, which is used to determine the user of the atomic operation to be cleared according to the visual map; A cleaning module, which is used to determine the usage information of the user and perform cleaning processing according to the usage information; Wherein, the view generation module is used for: Parsing the operation record to obtain the orchestration call record and the authorization execution record; The visual map reflecting the multi-layer complex calling relationship between atomic operations and the authorization execution status is generated according to the orchestration calling record and the authorization execution record.
7. The automatic cleaning system according to claim 6, characterized in that: The system further comprises: A data acquisition module is used to query a database according to the parameters of the atomic operation to be cleaned up to obtain the operation record.
8. The automatic cleaning system according to claim 7, characterized in that: The parameters include the operation ID and version ID of the atomic operation to be cleaned up.
9. The automatic cleaning system according to claim 6, characterized in that: The cleaning module includes a determining unit for determining the usage information of the user, which is used to: Sending confirmation information to the user to confirm whether to continue using the atomic operation to be cleaned up, and receiving feedback information; The usage information is determined according to the feedback information.
10. The automatic cleaning system according to claim 6, characterized in that: The cleaning module includes an execution unit for performing a cleaning process according to the usage information, which is used to: Matching a cleaning solution according to the usage information; Execute the cleaning process according to the cleaning scheme; in, The cleaning program includes: If the usage is not to be continued, clearing the atomic operation to be cleared; Otherwise, the cleanup is terminated and the atomic operation to be cleaned up is retained.
11. An atomic operation automatic cleaning device, comprising a memory and a processor, characterized in that: The memory is used to store computer-readable instructions; The processor is configured to execute the computer-readable instructions to implement the method according to any one of claims 1 to 5.
12. A computer storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the computer program implements the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Operation and maintenance visual automatic work platform and realization method
CN107291565A
Version deployment method, device and equipment and computer storage medium
CN107729019A
Operation and maintenance job scheduling engine of hierarchical control mode
CN108492006A
A tree structure basic data change recording method based on operator
CN109033323A
Distributed intelligent operation and maintenance platform, method, device and readable storage medium
CN109214704A
