Snapshot generation method and device, electronic equipment, storage medium and program product

By generating snapshot difference information based on editing distance on the server side, the problem of time-consuming application snapshot generation and comparison in the existing technology is solved, efficient and accurate application change capture and management is achieved, and application management efficiency is improved.

CN119311924APending Publication Date: 2025-01-14TENCENT TECHNOLOGY (SHENZHEN) CO LTD

Patent Information

Application Number
CN202310866581.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-13
Publication Date
2025-01-14

Smart Images

  • Figure CN119311924A_ABST
    Figure CN119311924A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a snapshot generation method and device, electronic equipment, a storage medium and a program product, and can be applied to a cloud server technical scene. According to the embodiment of the invention, at least one target application is determined from applications deployed in a server according to configuration information sent by a terminal; a target task is searched in the tasks of the target application, the target task comprises an updating task, and the updating task comprises an updating character string; generating editing operation information corresponding to an editing distance according to the editing distance between the updated character string and the historical character string; and determining snapshot difference information, wherein the snapshot difference information is used for generating a current application snapshot of the target application according to the historical application snapshot. In the embodiment of the invention, only the change part of the application is recorded through the snapshot difference information, so that the generation efficiency of the application snapshot can be remarkably improved, and the change information of the application can be accurately recorded through the snapshot difference information so as to accurately capture the change condition of the application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a snapshot generation method, device, electronic device, storage medium and program product. Background Art

[0002] An application snapshot is a way to record and save the current state and related information of an application at a specific point in time. An application snapshot can include information of various dimensions and aspects of an application to help users better evaluate the progress speed, quality and efficiency of the application, as well as predict future development directions. In the prior art, application snapshots can be applied in different scenarios, such as cloud technology scenarios.

[0003] However, existing technologies usually directly capture the complete state of an application at a specific time point to generate an application snapshot. Users need to manually compare application snapshots at different time points to obtain their difference information. Frequent and large-scale snapshot comparisons not only consume a lot of time and manpower, but also make it difficult to accurately capture changes in applications. Summary of the invention

[0004] The embodiments of the present application provide a snapshot generation method, device, electronic device, storage medium and program product, which reduce the time and resource consumption of application snapshot generation and comparison, can significantly improve the efficiency of application snapshot generation, and can accurately capture changes in applications.

[0005] An embodiment of the present application provides a snapshot generation method, comprising: determining at least one target application from applications deployed on a server according to configuration information sent by a terminal, the target application being an application corresponding to the configuration information; searching for a target task in tasks of the target application, the target task comprising an update task, the update task comprising an update string; generating editing operation information corresponding to the editing distance between the update string and a historical string, the historical string being a string corresponding to the update string in a historical application snapshot of the target application; and determining snapshot difference information, the snapshot difference information comprising update difference information corresponding to the editing operation information, the snapshot difference information being used to generate a current application snapshot of the target application according to the historical application snapshot.

[0006] An embodiment of the present application also provides a snapshot generation device, including: an application determination unit, used to determine at least one target application from applications deployed on a server according to configuration information sent by a terminal, the target application being the application corresponding to the configuration information; a search unit, used to search for a target task in the tasks of the target application, the target task including an update task, the update task including an update string; a generation unit, used to generate, according to an edit distance between the update string and a historical string, editing operation information corresponding to the edit distance, the historical string being a string corresponding to the update string in a historical application snapshot of the target application; an information determination unit, used to determine snapshot difference information, the snapshot difference information including update difference information corresponding to the editing operation information, the snapshot difference information being used to generate a current application snapshot of the target application according to the historical application snapshot.

[0007] An embodiment of the present application also provides an electronic device, including a processor and a memory, wherein the memory stores multiple instructions; the processor loads instructions from the memory to execute the steps in any snapshot generation method provided in the embodiment of the present application.

[0008] The embodiment of the present application further provides a computer-readable storage medium, which stores a plurality of instructions, and the instructions are suitable for a processor to load to execute the steps in any one of the snapshot generation methods provided in the embodiment of the present application.

[0009] The embodiment of the present application further provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps in any one of the snapshot generation methods provided in the embodiment of the present application.

[0010] In an embodiment of the present application, at least one target application can be determined from applications deployed on a server based on configuration information sent from a terminal, the target application being the application corresponding to the configuration information; a target task can be searched for in tasks of the target application, the target task including an update task, the update task including an update string; based on an edit distance between the update string and a historical string, edit operation information corresponding to the edit distance is generated, the historical string being a string corresponding to the update string in a historical application snapshot of the target application; snapshot difference information is determined, the snapshot difference information including update difference information corresponding to the edit operation information, the snapshot difference information being used to generate a current application snapshot of the target application based on the historical application snapshot.

[0011] In the present application, snapshot difference information is used to record only the changed part of the application, rather than the snapshot of the entire application, which reduces the time and resource consumption of application snapshot generation and comparison, and can significantly improve the efficiency of application snapshot generation. At the same time, in the process of generating snapshot difference information, the difference information is generated based on the edit distance corresponding to the task at different time points, which can accurately capture the difference between the historical snapshot and the update task, and improve the accuracy of the snapshot difference information. As a result, the snapshot difference information can accurately record the change information of the application to accurately capture the changes in the application, help users understand the specific differences between applications at different time points, and improve application management efficiency and management quality. In addition, in the process of generating snapshot difference information, based on the configuration information sent by the terminal, a customized and personalized application snapshot can be generated according to user needs, so as to achieve targeted application management and improve management efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0013] Figure 1a is a schematic diagram of a scenario of a snapshot generation method provided in an embodiment of the present application;

[0014] Figure 1b is a flowchart of a snapshot generation method provided in an embodiment of the present application;

[0015] Figure 1c is a schematic diagram of the hierarchical relationship of tasks in the target application provided in the embodiment of the present application;

[0016] Figure 1d is a schematic diagram of an application snapshot provided in an embodiment of the present application;

[0017] Figure 1e is a schematic diagram of a visualization display effect of an application snapshot provided in an embodiment of the present application;

[0018] Figure 2a is a structural diagram of a snapshot generation system provided in an embodiment of the present application;

[0019] Figure 2b is a flowchart of a snapshot generation method provided by another embodiment of the present application;

[0020] Figure 2c It is a schematic diagram of a weekly report page and a modal box for configuring a weekly report provided in an embodiment of the present application;

[0021] Figure 2dis a schematic diagram of an advanced settings page provided in an embodiment of the present application;

[0022] Figure 2e is a schematic diagram of an alarm setting submodal box provided in an embodiment of the present application;

[0023] Figure 2f is a timing diagram of setting configuration information provided by an embodiment of the present application;

[0024] Figure 2g is a schematic diagram of a weekly report screening page provided in an embodiment of the present application;

[0025] Figure 3 is a structural schematic diagram of a snapshot generation device provided in an embodiment of the present application;

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

[0027] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0028] Embodiments of the present application provide a snapshot generation method, device, electronic device, storage medium, and program product.

[0029] Among them, the snapshot generation device can be specifically integrated in an electronic device, and the electronic device can be a terminal, a server and other devices. Among them, the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited to this. The terminal and the server can be directly or indirectly connected via wired or wireless communication, and this application is not limited here.

[0030] In some embodiments, the snapshot generating device may also be integrated into multiple electronic devices. For example, the snapshot generating device may be integrated into multiple servers, and the snapshot generating method of the present application may be implemented by multiple servers.

[0031] In some embodiments, the server may also be implemented in the form of a terminal.

[0032] For example, refer to Figure 1a , the snapshot generation method can be implemented by a server. The server can determine at least one target application from the applications deployed on the server according to the configuration information sent by the terminal, the target application being the application corresponding to the configuration information; search for the target task in the tasks of the target application, the target task including the update task, the update task including the update string; generate the edit operation information corresponding to the edit distance according to the edit distance between the update string and the historical string, the historical string being the string corresponding to the update string in the historical application snapshot of the target application; determine the snapshot difference information, the snapshot difference information including the update difference information corresponding to the edit operation information, the snapshot difference information is used to generate the current application snapshot of the target application according to the historical application snapshot, and the server can send the snapshot difference information and the current application snapshot to the terminal.

[0033] The following are detailed descriptions. It should be noted that the order of the following embodiments is not intended to limit the preferred order of the embodiments. It is understood that in the specific implementation of the present application, user identification, user operation, application identification, task identification and other user-related data are involved. When the embodiments of the present application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0034] Cloud technology refers to a hosting technology that unifies hardware, software, network and other resources within a wide area network or local area network to achieve data computing, storage, processing and sharing.

[0035] Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model. It can form a resource pool, which can be used on demand and is flexible and convenient. Cloud computing technology will become an important support. The backend services of the technical network system require a large amount of computing and storage resources, such as video websites, picture websites and more portal websites. With the rapid development and application of the Internet industry, in the future, each item may have its own identification mark, which needs to be transmitted to the backend system for logical processing. Data of different levels will be processed separately. All kinds of industry data need strong system backing support, which can only be achieved through cloud computing.

[0036] Cloud computing is a computing model that distributes computing tasks on a resource pool composed of a large number of computers, allowing various application systems to obtain computing power, storage space and information services as needed. The network that provides resources is called a "cloud". From the user's perspective, the resources in the "cloud" are infinitely scalable and can be obtained at any time, used on demand, expanded at any time, and paid for by use.

[0037] As a provider of basic cloud computing capabilities, a cloud computing resource pool (referred to as a cloud platform, generally referred to as an IaaS (Infrastructure as a Service) platform) will be established, and various types of virtual resources will be deployed in the resource pool for external customers to choose to use. The cloud computing resource pool mainly includes: computing devices (virtualized machines, including operating systems), storage devices, and network devices.

[0038] According to the logical function division, the PaaS (Platform as a Service) layer can be deployed on the IaaS (Infrastructure as a Service) layer, and the SaaS (Software as a Service) layer can be deployed on the PaaS layer. SaaS can also be deployed directly on IaaS. PaaS is a platform for software operation, such as databases, web containers, etc. SaaS is a variety of business software, such as web portals, SMS mass senders, etc. Generally speaking, SaaS and PaaS are upper layers relative to IaaS.

[0039] A private cloud is a cloud infrastructure with software and hardware resources created within a firewall so that departments within an organization or enterprise can share resources within the data center. In addition to hardware resources, cloud equipment (IaaS, Infrastructure as a Service) software is generally required to create a private cloud.

[0040] Private cloud computing also includes three levels: cloud hardware, cloud platform, and cloud service. The difference is that cloud hardware is the user's own personal computer or server, not the cloud computing vendor's data center. The purpose of cloud computing vendors to build data centers is to provide public cloud services to millions of users, so they need to have tens of millions of servers. Private cloud computing only serves friends and relatives for individuals, and only serves employees, customers, and suppliers for enterprises. Therefore, an individual or enterprise's own personal computer or server is sufficient to provide cloud services.

[0041] In this embodiment, a snapshot generation method is provided, such as Figure 1bAs shown, the specific process of the snapshot generation method can be as follows:

[0042] 110. Determine at least one target application from applications deployed on the server according to the configuration information sent by the terminal, where the target application is the application corresponding to the configuration information.

[0043] Configuration information refers to information used to set and define application snapshots. Configuration information may include data used to set and define parameters, options, and properties of a system, application, or service, such as information used to determine a target application.

[0044] The application deployed on the server may include an application program or system deployed on the server. For example, a demand management system, a project management platform, a code version control system, and other software systems deployed on the server. An application may include one or more tasks, each of which represents an independent functional module or operation. These tasks may be executed sequentially or concurrently.

[0045] The snapshot generation method provided in the embodiment of the present application can be used to generate snapshots of different stages of the application, such as snapshots of the development stage, snapshots of the operation stage, snapshots of the test stage, etc. Thus, according to the specific project requirements and phased tasks, snapshots of different stages are captured to help developers and operation and maintenance personnel to capture application changes in a timely manner to better understand the progress speed, quality and efficiency of the application. In particular, based on the configuration information sent by the terminal, customized and personalized application snapshots can be generated according to user needs, so as to achieve targeted application management and improve management efficiency.

[0046] The snapshot generation method provided in the embodiment of the present application can be implemented by a server, and the server can provide various services or functions through the service layer to provide a necessary environment for the application deployed on the server. In some embodiments, the server can be a cloud server, and the application deployed on the server is a cloud application. Among them, the cloud application refers to an application or system deployed in a cloud computing environment such as a private cloud environment.

[0047] For example, in a cloud scenario, a cloud environment (i.e., a cloud service layer) can be hosted and run by one or more servers, and a terminal such as a mobile phone or computer with a cloud client installed can be used to interact with or access the cloud service layer. In actual applications, a user can perform a configuration operation to generate an application snapshot on the cloud client running on the terminal to generate configuration information and send it to the server, so that the server can determine the corresponding target cloud application according to the configuration information through the service layer of the cloud service.

[0048] In some implementations, the configuration information on the terminal can be transmitted to the server through the configuration information transmission interface, so as to realize the data transmission from the terminal to the server by using the configuration information transmission interface, realize the collaborative work of different terminals, and at the same time, the information transmission through the interface can automate and standardize the data transmission process, and improve the efficiency and accuracy of data transmission. Specifically, the configuration information includes an application identifier, and at least one target application is determined from the applications deployed on the server according to the configuration information sent by the terminal, including:

[0049] Call the configuration information transmission interface to obtain the configuration information passed in by the terminal;

[0050] Read the application ID from the configuration information;

[0051] The application deployed in the server and corresponding to the read application identifier is used as the target application.

[0052] The application identifier is an identifier used to uniquely identify and distinguish different applications. The application identifier can be in various forms, such as a name, a unique string, a number, a UUID (Universally Unique Identifier), etc., to ensure accurate identification and operation of a specific application.

[0053] The configuration information transmission interface refers to an interface for receiving configuration information transmitted by a terminal. It provides a set of prescribed methods and protocols, allowing the server service layer to communicate with the data source by sending requests and receiving responses, thereby obtaining the required data. The configuration information transmission interface can adopt various different implementation methods and protocols, such as SSH (Secure Shell Protocol), SCP (Secure Sockets Layer), FTP (File Transfer Protocol), SFTP (SSH File Transfer Protocol), etc.

[0054] For example, in actual applications, a saveSnap interface can be customized at the service layer of the server, which is used to process and save the configuration information submitted by the user. The saveSnap interface can receive a request containing configuration information, which can include fields of corresponding application identifiers, such as "snapProducts": [{"productid":"product id1","productName":"product 1"},{"productid":"product id2","productName":"product 2"}], where productid represents the unique identifier or ID of the product (i.e., cloud application), and productName represents the name of the product. The "snapProducts" field can be used to save information of multiple products, each of which contains its associated unique identifier and name. After receiving the request for configuration information, the service layer of the server can read the "snapProducts" field to obtain "product id1" and "product id2", and use product 1 and product 2 corresponding to "product id1" and "product id2" as target applications.

[0055] In some embodiments, the service layer of the server can query all tasks and task progress under the target application in the database through SQL statements according to the read application identifier, and save task parameters such as tasks and task progress, such as in the form of a JSON file, for searching the target task in the JSON file. The files of tasks and task progress can be stored in the database (i.e., the data layer) such as Snapshots_backup.

[0056] In some implementations, the configuration information may be stored in the data layer of the server. For example, the server may pass the configuration information received from the service layer to the data layer via the saveSnap interface for persistence operations, so as to enable long-term storage and access at any time. The data layer may use a database, file system, or other storage mechanism to store the configuration information.

[0057] In some embodiments, the configuration information may also include at least one of the following information: the user ID corresponding to the terminal, the snapshot name, whether to display the snapshot in a new window, etc. For example, the snapshot name, whether to display the snapshot in a new window, and the user ID of the user using the terminal may be set in the terminal, and the user ID of the user using the terminal may be obtained and written into the configuration information in the corresponding fields, such as the user ID field is "uuid": "UUIDA", which indicates that the user ID corresponding to the terminal is UUIDA, the snapshot name field is "snapName": "Snapshot Name A", which indicates that the snapshot name is Snapshot Name A, and the field for whether to display the snapshot in a new window is "openInWindow": true, which indicates that Snapshot A is displayed in a new window. After receiving the request for configuration information, the service layer of the server may read these fields therefrom, thereby setting the name of the generated snapshot and setting whether to display the snapshot in a new window according to the content of the corresponding fields.

[0058] In some implementations, a getAllProduct interface can be customized at the service layer of the server, which can search for all corresponding applications (i.e., applications for which the user has permissions) at the data layer according to the user identifier read from the configuration information, and return the query result. If the queried applications do not include the target application, an error alarm can be generated and returned to the terminal so that the user can reset the target application.

[0059] 120. Search for a target task in the tasks of the target application, where the target task includes an update task, and the update task includes an update string.

[0060] The update task refers to the task that has updates in the application, and the update string refers to the string updated in the update task.

[0061] For example, as the application deployed by the server progresses, there may be one or more update tasks in the application. Specifically, in actual applications, it is possible to detect the changed strings in the tasks of the target application, and use the tasks with the changed strings as update tasks.

[0062] In some implementations, it is possible to determine whether the target application has been updated based on the historical update time in the historical application snapshot, so as to search for update tasks only in the target application with updates, thereby improving search efficiency and avoiding wasting time and resources in applications without updates. Specifically, searching for the target task in the tasks of the target application includes:

[0063] Get the historical update time of the target application. The historical update time is the update time corresponding to the historical application snapshot;

[0064] If the latest update time of the target application is later than the historical update time, obtain candidate tasks from the tasks of the target application;

[0065] Searching for a target historical task corresponding to the task identifier of the candidate task in the historical application snapshot;

[0066] If the task update time of the candidate task is later than the task update time of the target historical task, the candidate task is determined as an update task.

[0067] The historical update time refers to the time when the application was updated or modified at a historical moment, and the historical update time is recorded in the historical application snapshot. For example, the latest update time of the target application recorded in the historical application snapshot can be read as the historical update time of the target application. The historical update time is compared with the latest update time. If the latest update time is later than the historical update time, it means that the target application has a new update after the historical application snapshot.

[0068] The latest update time refers to the time when the application was last updated or modified.

[0069] The task update time refers to the time when the task is updated or modified. For example, the time when the task was last updated or modified can be used as the task update time.

[0070] For example, the most recent update or modification time of the target application recorded in the historical application snapshot can be obtained from the snapshot as the historical update time, and then the latest update time of the target application can be obtained from the version information, release log, update notification or other relevant channels of the target application. Compare the historical update time with the latest update time. If the latest update time is later than the historical update time, it means that the target application has a new update after the historical application snapshot. In actual applications, the candidate tasks can be part or all of the tasks in the target application. For example, all tasks in the target task can be used as candidate tasks to obtain the task identifiers of all tasks, and obtain the task update time of the tasks corresponding to all task identifiers in the historical application snapshot (i.e., the target historical tasks). The candidate tasks with the same task identifiers are compared with the target historical tasks for task update time. If the task update time of the candidate task is later than that of the corresponding target historical task, it means that the candidate task has been updated and can be used as an update task. By analogy, all update tasks can be determined from the tasks of the target application.

[0071] In some implementations, the snapshot generation time of the historical application snapshot and the latest update time of the target application may also be combined to determine whether the target application has been updated. That is, the historical update time may be the snapshot generation time of the historical application snapshot.

[0072] Among them, historical application snapshots refer to application snapshots of the target application generated before the current moment. The snapshot generation time refers to the specific time point or time range when the snapshot is created or captured, that is, the moment or time period when the snapshot is recorded. During this time point or time period, the application status, data or configuration will be captured, saved or recorded.

[0073] In actual applications, there is usually a hierarchical relationship between multiple tasks in an application. In some implementations, candidate tasks can be acquired from the tasks of the target application step by step, so that all tasks can be traversed to avoid errors or omissions.

[0074] In some implementations, the upper-level tasks and the lower-level tasks are mutually dependent and associated, so that the update of the lower-level tasks will cause the task update time of the upper-level tasks to change. Therefore, when there is an update in the acquired upper-level tasks, the lower-level tasks are searched, and when there is no update, the lower-level tasks are no longer searched, so as to improve the search efficiency. Specifically, obtaining candidate tasks from the tasks of the target application includes:

[0075] Determine the top tasks from the tasks of the target application as candidate tasks;

[0076] Find the target task in the tasks of the target application, including:

[0077] If the task update time of the candidate task is later than the task update time of the target historical task, the next level task of the candidate task is determined as the candidate task, and the execution step is returned to search the target historical task corresponding to the task identifier of the candidate task in the historical application snapshot and subsequent steps until the leaf task is determined as the candidate task.

[0078] Among them, a leaf task refers to a task that has no subtasks in the task hierarchy.

[0079] For example, Figure 1cThe hierarchical relationship diagram of the tasks in the target application shown in the figure, any target application A includes tasks 1 to 10 in the figure, where task 1 is the top-level task, and tasks 2 and 3 are the direct subordinate tasks of task 1. Task 4 and task 5 are subordinate tasks of task 2. Similarly, task 6, task 7, task 8 and task 9 are subordinate tasks of task 3 and task 8 respectively, and task 10 is the subordinate task of task 9, where tasks 4 to 7 and task 10 are all leaf tasks. Specifically, task 1 can be determined as a candidate task first. If the task update time of task 1 is the same as the task update time of the target historical task corresponding to task 1, it indicates that task 1 and its subordinate tasks have not been updated, and the search ends. If the task update time of task 1 is different from the task update time of the target historical task corresponding to task 1, it indicates that task 1 has been updated. The next-level tasks of task 1, namely task 2 and task 3, will continue to be used as candidate tasks. If the task update time of task 2 is the same as the target historical task corresponding to task 2, and it is determined that the task update time of task 3 is different from the task update time of the target historical task corresponding to task 3, then tasks 6 to 8 will be compared with the task update time of the corresponding target historical tasks respectively. If the task update time of task 6 is the same as the corresponding target historical task, and other tasks are different, then task 8 will be compared with the task update time of the corresponding target historical tasks respectively. If they are the same, all traversable leaf tasks in the target application will be traversed to find all updated tasks. The comparison process can be ended, and tasks 1, 3, and 7 will be taken as updated tasks.

[0080] In some implementations, after searching for the target task in the tasks of the target application, the method further includes:

[0081] Determines the update string in the update task.

[0082] For example, after finding the update task, compare the task content of each update task with its corresponding target task, such as comparing the task progress, task description, task completion mark and other task content, to determine whether the update is caused by modifying the task description such as the title, or the task progress update is caused by modifying the task, and use the string of the modified content as the update string.

[0083] In actual applications, as the application deployed by the server progresses, new tasks and / or deleted tasks may be added to the application. The new or deleted task can be determined as the target task in the tasks of the target application to generate corresponding snapshot difference information. Snapshot difference information refers to the difference information between the state and related information of the application at different time points. In some embodiments, the snapshot difference information may include update difference information corresponding to the update task, new difference information and / or deleted difference information corresponding to the new and / or deleted tasks. Among them, the new difference information refers to the difference information corresponding to the new task, and the deleted difference information refers to the difference information corresponding to the new task.

[0084] In some implementations, since deleting a task does not affect the progress of the application (does not slow down the progress), in order to reduce resource usage and improve processing efficiency, the target task may not include the deleted task.

[0085] In some implementations, when a target task having the same task identifier as a candidate task is not found, it can be determined that the candidate task does not exist in the historical application snapshot, that is, the candidate task is a task newly created after the historical application snapshot. Specifically, the target task also includes a newly added task, the snapshot difference information also includes the newly added difference information, the newly added task is used to generate the newly added difference information, and searching for the target task in the tasks of the target application also includes:

[0086] If the target historical task is not found in the historical application snapshot, the candidate task is determined as a new task.

[0087] In some implementations, the task identifiers of the sibling tasks at any task level in the target task can be compared with the corresponding sibling tasks in the historical application snapshot to search for the newly added tasks and / or deleted tasks at the task level. Specifically, the target task also includes newly added tasks and / or deleted tasks, the snapshot difference information also includes newly added difference information and / or deleted difference information, the newly added tasks are used to generate the newly added difference information, the deleted tasks are used to generate the deleted difference information, and searching for the target task in the tasks of the target application also includes:

[0088] If the latest update time of the target application is later than the historical update time, obtain candidate sibling tasks from the tasks of the target application;

[0089] Find the target sibling task corresponding to the candidate sibling task in the historical application snapshot;

[0090] The task identifiers of the candidate sibling tasks are compared with the target sibling tasks to find newly added tasks and / or deleted tasks.

[0091] Among them, brother tasks refer to tasks of the same level belonging to the same task.

[0092] For example, you can first obtain a list of sibling tasks at any task level in the target application (i.e., a list of candidate sibling tasks), which stores the task identifiers of candidate sibling tasks, and then obtain a list of sibling tasks at the corresponding task level in the historical application snapshot (i.e., a list of target sibling tasks), which stores the task identifiers of target sibling tasks. Compare the target task with the list of sibling tasks in the historical application snapshot, and match the task identifiers in the list. For sibling tasks that exist in the target task list but do not exist in the historical application snapshot, mark them as newly added tasks. For sibling tasks that exist in the historical application snapshot but do not exist in the target task list, mark them as deleted tasks.

[0093] In some implementations, the sibling tasks in the target task can be compared level by level to quickly and accurately determine the task level where the task is added or deleted. Specifically, obtaining candidate sibling tasks from the tasks of the target application includes:

[0094] Determine candidate sibling tasks from top sibling tasks in the tasks of the target application;

[0095] After comparing the task identifiers of the candidate sibling tasks with the target sibling tasks to find the newly added tasks and / or deleted tasks, the following steps are also included:

[0096] The next-level sibling task of the candidate sibling task is determined as the candidate sibling task, and the execution step is returned to search for the target sibling task corresponding to the candidate sibling task in the historical application snapshot and subsequent steps until the leaf task is determined as the candidate sibling task.

[0097] For example, Figure 1c The hierarchical relationship diagram of tasks in the target application is shown, where Task 1 is the top-level sibling task. The task IDs of the top-level sibling tasks (i.e., the target sibling tasks) in the historical application snapshot can be compared with those of Task 1. If they are the same, Task 2 and Task 3 are taken as candidate sibling tasks, and the task IDs of Task 2 and Task 3 are compared with those of the corresponding sibling tasks in the historical application snapshot. If Task 3 is missing in the historical application snapshot at this level, Task 3 is a newly added task. Then compare Task 4 and Task 5 at the next level of Task 2 with the task IDs of the corresponding sibling tasks in the historical application snapshot. If Task 11 still exists in the historical application snapshot, Task 11 is a deleted task. In this way, it is determined that the newly added task of the target application is Task 3, and the deleted task is Task 11.

[0098] In some implementations, a scheduled task based on a snapshot generation cycle can be used to search for update tasks to automatically generate application snapshots and improve the timeliness of generating application snapshots. Specifically, the configuration information includes a snapshot generation cycle, and before searching for a target task in the tasks of a target application, it also includes:

[0099] Read the snapshot generation cycle from the configuration information;

[0100] A scheduled task is generated according to the snapshot generation cycle, and the scheduled task is used to find a target task in the tasks of the target application according to the snapshot generation cycle.

[0101] The snapshot generation cycle refers to the frequency or cycle of generating snapshots. For example, the snapshot generation cycle can be a specific time interval or time range. Scheduled tasks refer to tasks that are executed according to the snapshot generation cycle.

[0102] For example, the snapshot generation cycle can be set on the terminal to generate a snapshot once a week (snapshot generation frequency), and the corresponding snapshot generation frequency field is written into the configuration information, such as "snapConfig":{"interval":1, "unit":"week"}, which indicates that the application snapshot is generated once a week. After receiving the configuration information request, the server's service layer can read the field and create a scheduled task to generate an application snapshot once a week (i.e., set the repetition interval for generating snapshots), which includes the operation of searching for the target task in the tasks of the target application.

[0103] In some implementations, the scheduled task includes an operation of searching for the target task in the tasks of the target application according to the snapshot generation cycle. Thus, from the set cycle start time to the cycle end time, the target task will be searched for in the tasks of the target application according to the setting of the scheduled task. When the target task is found (i.e., the task of the target application has changed), a snapshot of the current application is generated. If it is not found (i.e., the task of the target application has not changed), a snapshot of the current application is not generated.

[0104] In some embodiments, the scheduled task can be persisted, for example, the state and setting information of the timer corresponding to the scheduled task is saved in a persistent storage medium, so that the running state of the timer can be restored after the server system is restarted to ensure that the scheduled task can be stably executed. Specifically, Celery (open source distributed task queue framework) can be used as the task queue of the scheduled task and Redis (remote dictionary server) as persistent storage. When the service starts, the scheduled task will be loaded from Redis, and the scheduled task will not be lost even if the service is restarted.

[0105] In some embodiments, the snapshot generation cycle also includes a cycle start time and a cycle end time (i.e., a cycle range). The cycle start time and cycle end time of the snapshot generation cycle can be set on the terminal, and written into the configuration information with the corresponding cycle range field, such as "startDate": "2022-03-03", "endDate": "2023-05-05", which indicates that the cycle range of the snapshot generation cycle is from March 3, 2022 to May 5, 2023, where startDate indicates the cycle start time and endDate indicates the cycle end time. After receiving the request for configuration information, the service layer of the server can read the snapshot generation frequency field and the period range field from it, and create a scheduled task that generates application snapshots once a week (i.e., sets the repetition interval for generating snapshots) based on the fields "startDate": "2022-03-03", "endDate": "2023-05-05", "snapConfig": {"interval": 1, "unit": "week"}. The start time of the scheduled task is March 3, 2022, and the end time is May 5, 2023. The task includes the operation of searching for the target task in the tasks of the target application.

[0106] In some implementations, when executing a scheduled task, i.e., searching for a target task in the tasks of a target application according to a snapshot generation cycle, before obtaining the historical update time of the target application, it is possible to first determine whether the scheduled task has expired according to the cycle end time (i.e., endDate) of the snapshot generation cycle. If it has expired, the process is terminated, i.e., the step of obtaining the historical update time of the target application and subsequent steps are not executed, and the scheduled task is cleared. Specifically, the current time can be compared with the cycle end time. If the current time is later than the cycle end time, the scheduled task has expired.

[0107] In some embodiments, when executing a scheduled task, when querying all tasks and task progress under the target application in the database through SQL statements based on the read application identifier, only tasks and corresponding task progress whose task creation time is not earlier than the cycle start time (i.e., startDate) can be saved to find the target task from the saved file.

[0108] 130. Generate editing operation information corresponding to the editing distance according to the editing distance between the updated character string and the historical character string.

[0109] The historical character string is a character string corresponding to the update character string in the historical application snapshot of the target application.

[0110] The edit distance is an indicator to measure the similarity between two strings. The edit distance can represent the number of operations required to convert one string into another. Specifically, the Levenshtein distance or edit distance algorithm can be used to count the number of editing operations such as insertion, deletion or substitution of characters between two strings as the edit distance.

[0111] The editing operation information refers to information including the editing operation corresponding to the editing distance.

[0112] For example, for the strings "kitten" and "sitting", "kitten" can be converted to "sitting" by the following operations: replace 'k' with 's', replace 'e' with 'i', and insert 'g' at the end of the string. Therefore, the edit distance between "kitten" and "sitting" is 3. When calculating the edit distance, for each edit operation between the two strings, such as insertion, deletion, replacement, etc., the specific operation type and operation position information can be recorded as the edit operation information. For example, for the strings "kitten" and "sitting", the edit operation information can be represented as the corresponding edit operation sequence: operation type: ['R', 'D', 'R'], operation position:

[0113] [0,1,2], where 'R' in the operation type indicates a replace operation and 'D' indicates a delete operation. The operation position indicates the position of the character targeted by the operation in the original string. In the process of generating snapshot difference information, the difference information is generated based on the edit distance corresponding to the tasks at different time points, which can accurately capture the difference between the historical snapshot and the update task, and improve the accuracy of the snapshot difference information.

[0114] In practical applications, different edit distances and edit operation information can be determined by different methods. For example, for the strings "kitten" and "sitting", the edit operation information can also be operation type: ['R','I','I','-','-','I','I'], operation position: [0,0,1,-1,-1,5,6], which requires 7 operations and the corresponding edit distance is 7.

[0115] In some implementations, the edit distance is the shortest edit distance to simplify the edit operation and reduce the data volume of the edit operation information.

[0116] In some implementations, the common subsequences between strings can be used to determine their shortest edit distance, so as to simplify the edit operation, reduce the amount of data of the edit operation information, and improve the efficiency of subsequent generation of snapshot difference information. Specifically, based on the edit distance between the updated string and the historical string, the edit operation information corresponding to the edit distance is generated, including:

[0117] Get the initial shortest edit distance matrix;

[0118] Calculate the maximum common subsequence between the update string and the historical string;

[0119] Based on the common subsequence and the initial shortest edit distance matrix, the updated character string and the historical character string are backtracked to generate the edit operation information corresponding to the shortest edit distance.

[0120] The initial two-dimensional matrix refers to the shortest edit distance matrix, which is used to record the minimum number of edit operations required to transform one sequence into another sequence.

[0121] The maximum common subsequence refers to the longest common subsequence found in two strings. The subsequence is not required to appear continuously and can be obtained by deleting elements and maintaining the order.

[0122] The shortest edit distance refers to the minimum number of edit operations required to transform one string into another.

[0123] For example, for the update string a and the historical string b, a two-dimensional matrix matrix can be initialized, the number of rows of the matrix matrix is ​​the length of a plus 1, and the number of columns is the length of b plus 1. Next, starting from the upper left corner, the matrix matrix is ​​traversed. For each position matrix[i][j], if a[i-1] and b[j-1] are equal (that is, they are both part of the largest common subsequence), then matrix[i][j] is matrix[i-1][j-1] plus one; otherwise, matrix[i][j] is the larger of matrix[i-1][j] and matrix[i][j-1]. In other words, if the current characters a[i-1] and b[j-1] are equal, then the value of matrix[i][j] is the value of matrix[i-1][j-1] plus one. Because the current character can be part of the largest common subsequence, the length of the largest common subsequence increases. Otherwise, if the current characters are not equal, then the value of matrix[i][j] is the larger value of matrix[i-1][j] and matrix[i][j-1]. This is because the current character cannot appear in the largest common subsequence of a[i-1] and b[j-1] at the same time, so the previous state needs to be considered. Through this dynamic programming filling method, the initialized two-dimensional matrix matrix can be filled to obtain the filled two-dimensional matrix matrix, where each element matrix[i][j] represents the length of the largest common subsequence of the first i characters of string a and the first j characters of string b. Specifically, if a two-dimensional array LCS is used to represent the length of the LCS of the corresponding first i and first j characters in strings X and Y, the following formula can be obtained:

[0124]

[0125] In the above formula, LCS(i,j) represents the length of the longest common subsequence between the first i characters of string A and the first j characters of string B, the value range of i is 0 to the length of string A, the value range of j is 0 to the length of string B, A represents the given string A (that is, string a), and B represents the given string B (that is, string b).

[0126] After filling the shortest edit distance matrix, you can backtrack from the lower right corner of the filled two-dimensional matrix to find the difference between the two strings. Starting from the lower right corner, if a[i-1] and b[j-1] are equal, it means that the character at the current position is part of the longest common subsequence. During the backtracking process, both i and j are reduced by one, and the backtracking continues to the upper left corner. If a[i-1] and b[j-1] are not equal, the operation needs to be determined according to the value in the shortest edit distance matrix. Each element in the matrix represents the minimum edit distance required to convert from the prefix sequence of a to the prefix sequence of b. Specifically, if matrix[i-1][j] is greater than matrix[i][j-1], it means that a smaller edit distance can be obtained by deleting a[i-1]. Therefore, during the backtracking process, a[i-1] is deleted and i is reduced by one. If matrix[i][j-1] is greater than matrix[i-1][j], it means that a smaller edit distance can be obtained by inserting b[j-1]. Therefore, during the backtracking process, insert b[j-1] and reduce j by one. By continuously backtracking until the upper left corner of the matrix is ​​reached, when i or j reaches zero, there may be some remaining characters that need to be deleted or inserted at the beginning of string a or string b. At this time, the remaining characters of a can be deleted, or the remaining characters of b can be inserted until i and j both become zero. The backtracking is completed, that is, the minimum difference sequence between the two strings is found. The minimum difference sequence can be expressed as:

[0127]

[0128] In the above formula, dif(i,j) represents the minimum editing operation sequence required to convert the first i characters of string A to the first j characters of string B, the value range of i is 0 to the length of string A, the value range of j is 0 to the length of string B, delete represents deletion, insert represents insertion, and LCS(i,j) represents the length of the longest common subsequence between the first i characters of string A and the first j characters of string B. It should be noted that each operation (insertion or deletion) in the backtracking process can be expressed as an operation on the original string (i.e., string a). By recording these operations (i.e., editing operations), the specific editing operation sequence (i.e., editing operation information) for converting from string a to string b can be obtained.

[0129] 140. Determine snapshot difference information, where the snapshot difference information includes update difference information corresponding to the editing operation information.

[0130] The snapshot difference information is used to generate a current application snapshot of the target application based on the historical application snapshot. The current application snapshot refers to the currently generated application snapshot.

[0131] For example, the editing operation information can be directly used as the update difference information in the snapshot difference information, so that the historical application snapshot can be edited according to the editing operation information to generate the current application snapshot. By recording only the changed part of the application by snapshot difference information, rather than the snapshot of the entire application, the time and resource consumption of application snapshot generation and comparison can be reduced, and the efficiency of application snapshot generation can be significantly improved. At the same time, the snapshot difference information can accurately record the change information of the application to accurately capture the change of the application, help users understand the specific differences of the application at different time points, and improve the efficiency and quality of application management.

[0132] In some embodiments, the snapshot difference information also includes added difference information and / or deleted difference information, and the task content of the added task can be used as the added difference information, and the task content of the deleted task can be used as the deleted difference information. The task content of the task can be set according to the actual needs of the application snapshot, such as the task content can include but is not limited to one or more of the task name, task identifier, task progress, task description, task attachment, task participant, task completion mark, etc.

[0133] In some implementations, the server may generate a snapshot identifier of the current application snapshot to facilitate storage of the current application snapshot. For example, a unique snapshot identifier may be generated using md5 (message digest algorithm 5) and a hash algorithm. The input of the algorithm may be a random number or a snapshot name in the configuration information. For example, after the current application snapshot is generated, it may be stored in a database table such as Snapshots_backup. The snapshot stored in the database may include information such as snapshot content, creation date, and creator.

[0134] In some implementations, the historical application snapshot can be converted into the current application snapshot through the editing operation recorded in the editing operation information. Specifically, the editing operation information includes at least one editing operation, and after determining the snapshot difference information, it also includes:

[0135] Get the editing operation information from the snapshot difference information;

[0136] Edit the historical character string in the historical application snapshot to obtain the current application snapshot of the target application.

[0137] For example, the editing operation information obtained from the snapshot difference information includes the editing operation information operation type: ['R', 'D', 'R'], the operation position: [0, 1, 2]. For the historical string "kitten", it can be converted to "sitting" through the following editing operations: replace the character 'k' at index position 0 with 's' to obtain "sitten", delete the character 'i' at index position 1 to obtain "stten", replace the character 't' at index position 2 with 't', and obtain the final result "sitting", thereby replacing the string "kitten" in the historical application snapshot with "sitting" to obtain the current application snapshot. In this way, the server can only store the historical application snapshots and snapshot difference information, and generate the corresponding current application snapshot when needed, so as to reduce server resource usage and reduce server load. In actual applications, the process of generating the current application snapshot from the historical application snapshot can also be generated in the terminal, so that the server only needs to send the snapshot difference information to the terminal, which can reduce the amount of data to be transmitted and improve data transmission efficiency.

[0138] It should be noted that when the target task includes a new task, the new difference information corresponding to the new task can be added to the historical application snapshot, such as adding the task content of the new task to obtain the current application snapshot. When the target task includes a deleted task, the deleted difference information can be deleted from the historical application snapshot, such as deleting the task content of the deleted task to obtain the current application snapshot.

[0139] In some implementations, according to actual needs or application scenarios, the current application snapshot can be sent to the alarm recipient along with the alarm information, or the current application snapshot can be uploaded to the cloud server so that relevant personnel of the application snapshot can obtain it.

[0140] In some implementations, the snapshot file format set by the terminal can be obtained through configuration information to generate a corresponding snapshot according to the terminal requirements. Specifically, the configuration information includes the snapshot file format, and after determining the snapshot difference information, it also includes:

[0141] Read the snapshot file format from the configuration information;

[0142] Convert the current application snapshot into a snapshot file format to obtain a converted application snapshot.

[0143] The snapshot file format refers to the file format of the current application snapshot, for example, it can be a data format such as JSON, XML, Excel, Markdown, etc.

[0144] For example, the terminal can write the file format field corresponding to the snapshot file format into the configuration information, such as "snapDataType":JSON; where "snapDataType" indicates the snapshot file format, and the snapshot format in this example is JSON. Thus, after receiving the configuration information request, the service layer of the server can read the file format field from it and convert the current application snapshot into JSON format for output. Figure 1d As shown, a schematic diagram of application snapshots is shown. In the figure, application snapshots of target applications A to D are written into an Excel table. By clicking an application name in the table, detailed information of the application snapshot of the application can be accessed.

[0145] In some implementations, the snapshot difference information may also be converted into the snapshot file format according to the snapshot file format read from the configuration information to obtain the converted snapshot difference information.

[0146] In some implementations, according to actual needs or application scenarios, the generated target application snapshot and / or snapshot difference information may be processed again, or the converted application snapshot and / or converted snapshot difference information may be processed again to generate reports, visualization views, Gantt charts and other data visualization forms for easy reading and viewing. For example, the terminal may visually display the generated application snapshot, such as Figure 1e The schematic diagram of the application snapshot visualization effect shown shows the snapshot generation time of the same target application and the name set for the snapshot in the order of snapshot generation time, where the name is a button link, which can jump to the corresponding application snapshot after clicking.

[0147] In some implementations, the historical application snapshot is an application snapshot generated in the previous snapshot generation cycle, and the current application snapshot is an application snapshot generated in the current snapshot generation cycle. The previous snapshot generation cycle is the snapshot generation cycle before the current snapshot generation cycle, so that the difference between the historical application snapshot and the current application snapshot can be reduced, the amount of snapshot difference information data can be reduced, and the efficiency of generating application snapshots can be improved.

[0148] In some implementations, the task parameters of the target task may be compared with preset parameter threshold conditions, and when the task parameters meet the preset parameter threshold conditions, an alarm message is generated.

[0149] Among them, task parameters refer to the variables, data or information involved in task execution, such as task progress, resource usage, and execution time.

[0150] The preset parameter threshold condition refers to a threshold condition for triggering an alarm based on task parameter settings. For example, the threshold in the preset parameter threshold condition may be a relative percentage threshold, a relative numerical threshold, or an absolute numerical threshold.

[0151] For example, the preset parameter threshold conditions may include at least one of a task progress threshold, a resource occupation threshold, and an execution time threshold. When the task progress of the target task does not reach the task progress threshold, or the resource occupation of the target task exceeds the resource occupation threshold, or the execution time of the target task exceeds the execution time threshold, an alarm message is generated. The alarm message may include the task identifier of the target task corresponding to the task parameters that meet the preset parameter threshold conditions and the task progress of the target task.

[0152] In some implementations, in order to provide project progress and help users manage overdue tasks in a timely manner, the task parameter may be task progress, so that an alarm message is generated to prompt the user when the task is overdue.

[0153] In some embodiments, the preset parameter threshold condition can be set by the terminal and sent to the server by the terminal through configuration information. Specifically, the configuration information also includes the preset parameter threshold condition. For example, the preset parameter threshold condition can be set in the terminal and written into the configuration information with the corresponding threshold condition field, such as "condition": <= 80;, which field represents the regular expression corresponding to the parameter threshold condition. After receiving the request for configuration information, the service layer of the server can read the field therefrom and generate corresponding alarm information according to the regular expression therein.

[0154] In some implementations, the configuration information may further include at least one of alarm recipient information, alarm frequency, and the like. For example, the alarm notification method, alarm receiver information, and alarm frequency can be set on the terminal and written into the configuration information in corresponding fields. For example, the field of the alarm notification method is "notifications": ["mail", "sms", "wecom"], which indicates that the alarm information can be notified to the alarm receiver in three ways: mail, sms, and wecom (instant messaging application). The field of the alarm receiver information is "contact": "A", which indicates that the contact method of the alarm receiver is A. A can be the contact method corresponding to different alarm notification methods, such as email, mobile phone number, instant messaging account, etc. The field of the alarm frequency is "alarmInterval": 60, which indicates that the alarm frequency is once every 60 minutes". After receiving the request for configuration information, the service layer of the server can read these fields from it to obtain the task parameters of the target task every 60 minutes, and compare it with the preset parameter threshold conditions to determine whether to generate alarm information, and send the generated alarm information to mailbox A in the form of an email to notify the alarm receiver.

[0155] In some implementations, a validate interface can be customized in the service layer of the server, which can be used to verify whether the alarm recipient information is valid. For example, after reading the alarm recipient information, the service layer can call the validate interface for verification. If the value of the returned result is true, it means that the alarm recipient information is valid, otherwise, it means that the information is invalid.

[0156] In some implementations, regular expressions can be used to compare task parameters with preset parameter threshold conditions to convert the parameter threshold conditions into brief template descriptions, thereby reducing the amount of code and improving processing efficiency. Specifically, after searching for the target task in the tasks of the target application, the following is also included:

[0157] Obtain the task parameters of the target task, and obtain the regular expression corresponding to the preset parameter threshold condition;

[0158] A verification formula is obtained by parsing the regular expression, and the verification formula includes a logical operator;

[0159] Get the verification rules corresponding to the logical operator;

[0160] According to the verification rules, the task parameters of the target task are compared with the verification formula to determine the comparison operation value;

[0161] If the comparison operation value is true, an alarm message is generated.

[0162] The validation formula is a logical expression used to verify the integrity and accuracy of data. The validation formula can be used to determine whether the data meets the expected requirements. The validation formula is usually based on mathematical or logical operators (such as equal, greater than, less than, and, or, not, etc.), and can also include elements such as keywords, functions and variables.

[0163] Among them, logical operators refer to symbols or keywords that perform logical operations in logical expressions.

[0164] Among them, the validation rules are a set of defined conditions or rules used to verify whether the data meets specific requirements or specifications.

[0165] For example, you can use regular expressions to extract the content in a given template (schema) and convert it into the following validation formula:

[0166] (op1(v1)){∧∨}(op2(v2)){∧∨}…{∧∨}(op n (v n ));

[0167] Among them, op i represents the ith operator, v irepresents the i-th value, and {∧∨} ​​represents a logical operator.

[0168] Then parse the logical operator and get the corresponding identifier according to the preset mapping table of logical operators and identifiers. Create a method for performing mathematical verification operations such as compare in the object, call the compare method, perform the corresponding mathematical comparison operation on the verification formula and the logical operator, and return the comparison operation value. For example, >=2000, call compare to perform the following process:

[0169]

[0170] In the above formula, y represents a Boolean value, which is determined by the result of the conditional judgment, and x represents a number or variable used for comparison operations. According to the conditional judgment, when x is greater than or equal to 2000, the value of y is true; otherwise, that is, when the value of x is less than 2000, the value of y is false.

[0171] After the comparison operation is performed according to the above formula, if the return value of the compare method is true (true value), an alarm message is generated.

[0172] In some implementations, alarm information may be generated based on the snapshot difference information so that the user can timely understand the changes of the application at two different time points. For example, the alarm information may include the snapshot difference information.

[0173] In some implementations, the target application snapshots corresponding to the merge keyword set by the terminal can be merged and stored in the same key-value pair, so that all application snapshots related to the merge keyword can be directly and quickly accessed. Specifically, the method also includes:

[0174] Receive the merge keyword sent by the terminal, and obtain the merged storage set and the application snapshot of the target application;

[0175] Determine, from the application snapshots of the target application, the target application snapshot corresponding to the merge keyword;

[0176] Generate a key-value pair based on the merge keyword and the target application snapshot, where the key of the key-value pair is the merge keyword and the value of the key-value pair is the target application snapshot;

[0177] The key-value pair is written into the merged storage set so that the target application snapshot corresponding to the merge keyword can be queried from the merged storage set.

[0178] The merge keyword refers to an identifier used to identify the application snapshot to be merged in the application snapshot of the target application. For example, the specified identifier may include the name of the person who handles the application, the geographic location, the snapshot tag, and other keywords in the application snapshot. The application snapshot of the target application includes all application snapshots of the target application, that is, including historical application snapshots and current application snapshots.

[0179] The merged storage set refers to an object used to store application snapshots corresponding to the same merge keyword. For example, the merged storage set can be a data structure such as a hash table or a dictionary.

[0180] For example, the merge keyword can be set as the name of the processor such as "Person A" in the terminal, and the processor name "Person A" can be sent to the service layer of the server. The service layer can create a new merged storage set such as a hash table, and after obtaining the processor name "Person A", read all application snapshots of all target applications from the data layer, and write all the application snapshots containing the "Person A" field as target application snapshots into the hash table in the form of key-value pairs, where the key of the key-value pair is "Person A" and the value is all target application snapshots, such as. If it is detected during the writing process that the key-value pair containing the key "Person A" already exists in the hash table, all the queried application snapshots can be written into the value of the key-value pair, and the merged storage set can be stored in the data layer. In this way, when the terminal wants to call all application snapshots related to "Person A", the service layer of the server can call the merged storage set from the data layer according to the call instruction sent by the terminal, and read the value in the key-value pair with the key "Person A", so that all application snapshots related to a specific processor can be directly and quickly accessed.

[0181] In some embodiments, the merge keyword can be sent by the terminal to the server through the configuration information. Specifically, the configuration information also includes the merge keyword. For example, whether to merge the application snapshots can be set on the terminal, and it can be written into the configuration information with the corresponding merge field, such as merged:false, which means that the application snapshots are not merged, or such as "merge":true, "person":"person in charge A", which means merging the application snapshots containing "person in charge A". After receiving the request for the configuration information, the service layer of the server can read the field therefrom and write all application snapshots containing the "person in charge A" field into the merged storage set.

[0182] In some embodiments, a getAllSnaps interface can be customized at the service layer of the server. When obtaining the application snapshot of the target application, the interface can search for all application snapshots corresponding to the user identifier in the data layer (which may include but are not limited to application snapshots of one or more target applications) based on the user identifier read from the configuration information, and return a list of all snapshots to determine the target application snapshot corresponding to the merge keyword from the list of all snapshots, so that all application snapshots corresponding to the merge keyword and related to the user identifier can be queried from the merged storage set.

[0183] In some implementations, a supportDataTypes interface may be customized at the server service layer, which may be used to return the result of querying the application snapshot, such as querying a snapshot list of all application snapshots corresponding to the merge keyword and associated with the user identifier from the merged storage set to the terminal.

[0184] In some implementations, the application snapshots in the merged storage set may be sorted according to actual needs or application scenarios, such as in the order of generation time or the order of size of snapshot identifiers, to return an ordered snapshot list of application snapshots to the terminal. When there are multiple key-value pairs in the merged storage set, the multiple key-value pairs may also be sorted according to the key value.

[0185] The snapshot generation scheme provided by the embodiment of the present application can be applied in various application management scenarios. For example, taking the generation of a snapshot of the development phase of an application as an example, according to the configuration information sent by the terminal, at least one target application is determined from the applications deployed on the server, and the target application is the application corresponding to the configuration information; the target task is searched in the tasks of the target application, and the target task includes an update task, and the update task includes an update string; according to the edit distance between the update string and the historical string, the edit operation information corresponding to the edit distance is generated, and the historical string is the string corresponding to the update string in the historical application snapshot of the target application; the snapshot difference information is determined, and the snapshot difference information includes the update difference information corresponding to the edit operation information, and the snapshot difference information is used to generate the current application snapshot of the target application based on the historical application snapshot.

[0186] As can be seen from the above, the embodiment of the present application only records the changed part of the application through snapshot difference information, rather than the snapshot of the entire application, which reduces the time and resource consumption of application snapshot generation and comparison, and can significantly improve the efficiency of application snapshot generation. At the same time, in the process of generating snapshot difference information, the difference information is generated based on the edit distance corresponding to the task at different time points, which can accurately capture the difference between the historical snapshot and the update task, and improve the accuracy of the snapshot difference information. Therefore, the snapshot difference information can accurately record the change information of the application to accurately capture the change of the application, help users understand the specific differences of the application at different time points, and improve the application management efficiency and management quality. In addition, in the process of generating snapshot difference information, based on the configuration information sent by the terminal, a customized and personalized application snapshot can be generated according to user needs, so as to achieve targeted application management and improve management efficiency.

[0187] The method described in the above embodiment will be further described in detail below.

[0188] In this embodiment, the method of the embodiment of the present application will be described in detail by taking application in a private cloud scenario as an example.

[0189] The snapshot generation method provided in the embodiment of the present application can be implemented by a snapshot generation system, such as Figure 2a The schematic diagram of the structure of the snapshot generation system shown in FIG. 1 may include a service layer and a data layer deployed in a terminal visual layer and a server. In a private cloud scenario, the server is a private cloud server.

[0190] In actual applications, the applications installed on the private cloud server may include one or more of a demand management system, a project management platform, a code version control system, a payment system background, a generation model background, etc. Among them, when the application is a demand management system, the snapshot generation method is used to automatically generate a demand progress snapshot report, and at the same time, alarm detection is performed according to user configuration. The GUI interaction diagram of the system includes: demand list, snapshot configuration, alarm setting and other interfaces; when the application is a project management platform, the snapshot generation method can provide a progress snapshot function, so that users can more conveniently follow up and understand the progress of the project at different stages. The GUI interaction diagram of the platform includes: project list, snapshot configuration, alarm setting and other interfaces; when the application is a code version control system, the snapshot generation method provides regular code submission and review progress snapshots, and the GUI interaction diagram of the system includes: code repository list, snapshot configuration, alarm setting and other interfaces; when the application is a payment system background, the snapshot generation method can help operation and maintenance personnel to timely check the operation of the payment system and issue problem warnings by generating a transaction flow progress snapshot report; when the application is a model generation background, the snapshot generation method can regularly generate snapshot reports of model performance indicators, such as accuracy, recall rate, etc., and at the same time ensure that the model performance is not lower than the expected threshold through alarm detection.

[0191] like Figure 2b As shown, a specific process of a snapshot generation method is as follows:

[0192] 210. In response to a configuration operation performed at the terminal, the terminal generates configuration information.

[0193] Among them, in the embodiment of the present application, the snapshot generation period is set to "this Friday 18:00 to next Friday 18:00", that is, the application snapshot is triggered to be generated once a week, so in the embodiment of the present application, "weekly report" refers to the corresponding application snapshot.

[0194] Specifically, the configuration information includes application identification, snapshot generation cycle, snapshot file format, merge keywords, user identification corresponding to the terminal, snapshot name, whether to display the snapshot in a new window, etc. In the UI interface (i.e., user interface) of the snapshot generation system displayed on the terminal, the user can generate configuration information through the following configuration operations:

[0195] 1. Access the deployment URL at the UI operation level and enter Figure 2c The weekly report page and the modal box for configuring the weekly report are shown. The weekly report page displays a "Weekly Report Configuration" button.

[0196] 2. Click the "Weekly Report Configuration" button and a pop-up window will pop up. Figure 2c The modal box shown in the figure can be used to perform the following configuration operations (i.e. generate configuration information): a) In the product selection column, the following Figure 2c b) You can also click the product filter box to pop up a drop-down box with a search function, in which you can enter the product / project (i.e. target application) you want to generate a weekly report for. c) In the weekly report name (i.e. snapshot name) input box, set the name of the "weekly report" for this period, and the generated weekly report will be stored according to the entered name. If no entry is made, the file name will be generated dynamically according to the effective date of the timer. d) Choose whether to merge the "weekly reports" of each product. If it is turned on, the weekly report data will be merged according to the same owner through the "merge algorithm" if multiple products / projects have the same merge keyword such as owner (processor); if it is turned off, all products / projects selected in step a) will be generated one by one and stored separately. The file name is the weekly report name entered in step c) + product / project name ${weekly report name} + ${product / project name}.

[0197] 3. Advanced settings: a) Open Figure 2d In the Advanced Settings page shown, you can select the data format (i.e. snapshot file format) of the snapshot output, such as JSON, XML, Markdown, Excel. Usually the default is Excel. b) Set the switch to display the snapshot in a new window when entering the list page (i.e. whether to display the snapshot in a new window). If turned on, when you click the link, it will open in a new window. If turned off, a drawer will pop up on the right side of the current page for display. The default is on.

[0198] 4. Click the "Confirm" button to save the configuration operation to generate configuration information, or click the "Cancel" button to cancel the current configuration operation.

[0199] In actual applications, configuration information can also include alarm configuration information such as parameter threshold conditions, alarm notification methods, alarm receiver information, and alarm frequency. Set alarm configuration information on the "Weekly Report" page through the following configuration operations:

[0200] 1. In the weekly report configuration modal box, add the alarm configuration section (i.e. the "Alarm Settings" button).

[0201] 2. Click the "Alarm Settings" button and a pop-up window will pop up. Figure 2e The alarm setting submodal box is shown.

[0202] 3. In the Alarm Settings sub-modal box, make alarm-related settings (i.e., set alarm configuration information): a) Select the alarm method: email, SMS, instant messaging application, etc. b) Configure the alarm recipient list (i.e., alarm recipient information). You can enter the recipient's email, mobile phone number, or instant messaging application account in the input box. c) Set the alarm condition (i.e., parameter threshold condition): Alarm according to the relative percentage threshold, relative numerical threshold, or absolute numerical threshold. When the progress in the current application snapshot does not meet expectations, the alarm is triggered. d) Set the alarm time window: Set the alarm frequency, for example, check once an hour whether the progress meets the standard.

[0203] 4. Click the "Confirm" button to write the set alarm configuration information into the configuration information, or click the "Cancel" button to cancel the current configuration operation.

[0204] In practical applications, such as Figure 2f The timing diagram of setting configuration information shown in the figure can use the visual layer carried by the terminal to respond to the above configuration operation to generate configuration information, as follows:

[0205] 1. When a user accesses the visual layer through a terminal, the UI page sends a getALLSnaps request to the service layer, and obtains all snapshot information associated with the current user through the uuid (that is, the user ID corresponding to the terminal).

[0206] 2. When the user accesses the snapshot list in the visual layer through the terminal, the service layer is accessed through the getAllSnaps interface, and the list of all snapshots related to the current user is obtained through the user's uuid.

[0207] 3. Users can filter projects on the weekly report filtering page through the terminal. They can use the getAllSnaps interface to pass the current user's uuid and the products id (i.e., application identifier), which can be an array, for filtering queries.

[0208] 4. When the user clicks the "Configure Snapshot" button on the page, a modal box will pop up, and the user can add snapshot-related settings in the modal box.

[0209] 5. The visual layer carries the current user uuid through the API and sends a getAllProduct request to the service layer to obtain the items that the current user has permissions for. The service layer searches the data layer using the user uuid. The query results are returned in JSON format through the API. The JSON contains an object array, {productid, productName}[].

[0210] 6. The user can select the snapshot range (i.e., the period range in the snapshot generation period) of the corresponding project by selecting the project information returned in step 5. After selection, the project selected in step 5 is used as the parameter snapProducts and is temporarily saved.

[0211] 7. The user selects the snapshot time range (i.e. the period range in the snapshot generation cycle), which is divided into startDate and endDate. It can be used as the time range for the snapshot to take effect, and snapshots are captured only within this range. (For example, the start time is 2022-3-3 and the end time is 2023-5-5. The current snapshot task will start on March 3, 2022 and end on May 5, 2023. After May 5, 2023, the current task will no longer generate snapshots.) After the user selects the time, the startDate and endDate are stored temporarily. The startDate defaults to the current log, and the endDate defaults to the current date one year later (yyyy+1).

[0212] 8. The user enters the snapshot repetition frequency (i.e. the snapshot generation frequency in the snapshot generation cycle), and the subsequent optional units are day / week / quarter / month / year. Stored in the field {snapConfig:{interval, unit}}. The default is {interval:1, unit:"week"}.

[0213] 9. The user enters the snapshot name and stores it in the snapName field (i.e. snapshot name).

[0214] 10. The user checks whether to merge the snapshot (i.e. whether to display the snapshot in a new window) and stores it in the merged field. The default value is merged: false.

[0215] 11. The user configures the "Data Format" (i.e. snapshot file format) in the "Advanced Settings". The "Data Format" is a drop-down box, and the data in the drop-down box comes from the service layer. The user accesses the service layer through apisupportDataTypes in the visual layer, and the service layer returns all currently supported snapshot data formats to the visual layer in the array object format of {dataType, typeName}[].

[0216] 12. The user selects the data returned by step 11 and selects the "data format". The selected data will be stored in the snapDataType field.

[0217] 13. The user checks whether to display the snapshot in a new window (i.e. whether to display the snapshot in a new window), and the option is stored in the openInWindow field. The default value is openInWindow: true.

[0218] 14. In the alarm configuration, the user selects the alarm method (i.e. the alarm notification method), which includes email, SMS, and WeChat for Enterprise (WeChat for Enterprise needs to be implemented by accessing the WeChat for Enterprise webhooks address). Multiple selections can be made and stored in the notifications field.

[0219] 15. The user enters the email account / mobile phone number (SMS and instant messaging applications can be associated through mobile phone numbers) and stores it in the contact field to set the alarm recipient (i.e. the alarm recipient information). After the user completes the input, the visual layer will use the validate API to access the service layer, carrying the contact field information entered by the user to verify whether the current contact information is valid.

[0220] 16. Set the alarm condition (i.e. parameter threshold condition) and store the alarm trigger condition in the condition field.

[0221] 17. Alarm frequency (i.e. alarm frequency), enter a number and store it in the field alarmInterval.

[0222] 220. The terminal sends the configuration information to the server.

[0223] When the user finishes entering information, click the OK button. Figure 2f As shown, the terminal will pass all the above fields (ie, configuration information) to the service layer through the saveSnap interface, and the saveSnap containing all configuration fields will be persisted in the data layer after being processed by the service layer.

[0224] Compared with the above process, in the service layer of the private cloud server, such as Figure 2f As shown, the service layer provides the getAllSnaps interface, which is used to obtain all snapshot information associated with the user according to the user's uuid and return a list of all snapshots; the service layer provides the getAllProduct interface, which is used to obtain the items that the current user has permissions for according to the user's uuid. The service layer searches the data layer through the user's uuid and returns the query results; the service layer provides the supportDataTypes interface, which is used to return a list of all currently supported snapshot data formats; the service layer provides the validate interface, which is used to verify whether the contact information entered by the user is valid.

[0225] 230. The server calls the configuration information transmission interface to obtain the configuration information transmitted by the terminal.

[0226] like Figure 2fAs shown in the figure, the service layer provides the saveSnap interface, which is used to process and save the configuration information submitted by the user, receive a request containing all configuration fields, and persist it in the data layer. The interface is also responsible for processing related configuration settings, such as generating weekly reports and alarm trigger conditions.

[0227] 240. According to the configuration information sent by the terminal, the server determines at least one target application from the applications deployed on the server.

[0228] like Figure 2f As shown, when the service layer generates a snapshot, it first obtains the endDate passed in by the user from the database to check whether the current task has expired. If it has expired, it will no longer generate a snapshot, clear the current task from the database, and use the data passed in by the user in saveSnap to establish a snapshot configuration (i.e., the configuration file of the service layer).

[0229] Specifically, the service layer can determine the target application based on the snapshot configuration, as follows:

[0230] 1. Lock the products passed in through snapProducts. Use SQL statements in the database to query the current progress of the products and specific task items. Find all the tasks and progress under these products and store them in JSON format.

[0231] 2. According to the startDate (if the startDate is less than the day the task is executed, the day is used), store all the tasks and progress of the product passed in (JSON result queried in step 1), and store the target task and the task progress of the target task in another database table (Snapshots_backup). And use the md5+hash algorithm to generate a unique id as the id of the current snapshot. The Snapshots_backup database table is used to store all snapshots, including snapshot content, creation date, creator, etc.

[0232] The service layer can also set up scheduled tasks based on snapshot configuration, as follows:

[0233] 1. According to snapConfig, set the snapshot repetition interval. Set the server timer and make the timer persistent so that the timer will still be turned on when the service is restarted to perform subsequent alarm and detection services. Persistence can use Celery as the task queue and Redis as persistent storage. Whenever the service starts, the scheduled task will be loaded from Redis, and the scheduled task will not be lost even if the service is restarted.

[0234] 2. Within the range of endDate, the algorithm comparison will be performed according to the timer in step c. If the comparison result changes, a snapshot will be taken and the result will be stored in the database. If the result does not change, no snapshot will be taken.

[0235] 3. At this time, you need to compare the condition (i.e. parameter threshold condition) field. If the progress of the current snapshot triggers the condition field, you need to use the alarmInterval frequency to issue an alarm in the form of notifications.

[0236] 250. The server obtains the historical update time of the target application.

[0237] Specifically, the service layer first checks the most recent update time of the target application recorded in the historical application snapshot generated in the previous snapshot generation cycle, that is, the historical update time.

[0238] 260. If the latest update time of the target application is later than the historical update time, the server searches for the target task in the tasks of the target application.

[0239] Among them, the target tasks include update tasks and new tasks. If the update date has not changed (that is, when the latest update time of the target application is not later than the historical update time), it is considered that there is no modification and the process ends. If the latest update time of the target application is later than the historical update time, find the update tasks and new tasks, and determine whether the date update is caused by modifying the description (which does not affect the overall progress of the project) or modifying the task (which will cause an increase and rollback of the progress).

[0240] Specifically, first, based on the incoming project ID, all tasks in the project are recursively checked to see if there are any new tasks. If there are new tasks, a snapshot can be taken and the task can be marked as new and recorded. A diff version (new difference information) is generated, and an alarm is processed if a condition is triggered.

[0241] If there are no new tasks, recurse level by level to check whether the existing tasks in the current project have been marked as completed or the progress has been modified. If there are changes from last week, mark this task as new. Make a record, generate a diff (update difference information) and perform alarm processing.

[0242] It should be noted that the target task in the embodiment of the present application may not include the deletion task. This is because deleting the task does not affect the progress (will not slow down the progress) and will not trigger an alarm, so it can be ignored.

[0243] 270. The server generates snapshot difference information and a current application snapshot according to the found target task.

[0244] Specifically, the server generates a diff version of the two snapshot comparisons (including new difference information and updated difference information), and generates the current application snapshot from the diff version of the two snapshot comparisons. The current application snapshot can be associated with the uuid of the current user to facilitate searching in the main database (ie, the data layer).

[0245] For example, if the title of the task has changed (the change in the title will affect the intent of the task, indicating that the task has changed, affecting the progress of the task, and needs to be marked). You can use the Myers difference algorithm, which is an optimized difference algorithm based on LCS (Longest Common Subsequence) to find the shortest edit distance between two strings. The shortest edit distance is defined as the minimum number of operations (adding, deleting, or modifying characters) required to convert one string into another.

[0246] The service layer can receive two strings ("a" and "b") as input through the "myers_diff" function and then compare them. A table (called a "matrix") is created to store the comparison information between the two strings. In this table, operations are performed row by row and column by column to see where the strings have the same characters and where they are different. When the table operation is completed, start from the lower right corner of the table and backtrack to the upper left corner to find the differences between the strings. This backtracking process will tell you what operations need to be done (such as adding a character, deleting a character) to make the two strings the same. The diff list returned by the function is the shortest edit distance between the two strings. It contains a series of deletion and insertion operations, so all the recorded operations can be returned to the object that called the function.

[0247] 280. The server sends the snapshot difference information and the current snapshot information to the terminal.

[0248] Specifically, the service layer can associate the snapshot with the current user through the uuid to facilitate search in the main database.

[0249] In actual applications, the server can also perform a series of conversions on the back end according to the export file type m passed in by the interface, converting JSON data into XML, Excel, Markdown and other formats; or notify the alarm person according to subsequent webhook calls; or upload to the cloud according to subsequent webhook calls; or perform secondary processing on the data according to subsequent webhook calls, such as generating reports, visualization views, and Gantt charts, etc.

[0250] The terminal can visualize the generated application snapshots, specifically the snapshot generation time and the name set for the snapshot. The name is a button link that can be clicked to open the specific application snapshot. If the new window display snapshot is turned on in the configuration settings, the current weekly report will be opened in a new window. Otherwise, the weekly report details will be expanded in the form of a drawer on the right side of the page. The display format of the weekly report will be displayed according to the data format setting in the configuration settings.

[0251] When there are many snapshots generated, or when there are many products / projects involved, you can use the snapshot filter on the left side of the terminal UI page for quick operation. When the product / project filter box is selected, it means that the current product / project is checked. Figure 2g In the weekly report filtering page shown, Application A and Application C are selected, and the "Snapshot Display" is linked to perform corresponding list changes, that is, the weekly reports of Application A and Application C are displayed on the terminal.

[0252] 290. The server compares the task parameters of the target task with the preset parameter threshold conditions. When the task parameters meet the preset parameter threshold conditions, a task alarm is generated and sent to the terminal.

[0253] Specifically, the service layer can compare the alarm condition (i.e., the preset parameter threshold condition) with the task parameter of the target task, and when the task parameter meets the preset parameter threshold condition, generate the alarm information according to the snapshot difference information. For example, the alarm information may include the task identifier and snapshot difference information of the target task corresponding to the task parameter that meets the preset parameter threshold condition, and may also include the task progress of the target task.

[0254] In the private cloud scenario, the existing technology lacks progress snapshots of private deployment. The progress difference between two time nodes can only be compared manually. It is also impossible to export and reprocess the current snapshot content, and it is impossible to effectively warn it.

[0255] The snapshot generation method of the embodiment of the present application is applicable to various application snapshots in private cloud scenarios, such as demand management systems, project management platforms, code version control systems, etc., to achieve cross-domain versatility. The method can reduce the time and energy of manual comparison and data collection through the automated progress snapshot function, making progress management faster and easier, and improving work efficiency. The method supports exporting snapshots into different formats (such as JSON, XML, Markdown, Excel, etc.), which is convenient for users to perform secondary processing and sharing of data, and improves the availability and value of data. The method timely warns the project progress that is not carried out as planned through the alarm function, ensuring that users find problems in time and take measures to solve them, reducing the risk of delays. The method can intuitively understand every detail of the project progress snapshot through visual display, and manage the project progress more conveniently and efficiently. In addition, the method can also be customized according to user needs, such as alarm mode, alarm conditions, etc., to ensure that user personalized needs are met.

[0256] Therefore, the snapshot generation method of the embodiment of the present application can solve the problems of low efficiency, limited data processing capability and lack of alarm detection in the prior art, and provide users with a more efficient, convenient and practical project progress management solution with high practical application value.

[0257] In order to better implement the above method, the embodiment of the present application also provides a snapshot generation device, which can be integrated in an electronic device, and the electronic device can be a terminal, a server, etc. Among them, the terminal can be a mobile phone, a tablet computer, a smart Bluetooth device, a laptop, a personal computer, etc.; the server can be a single server or a server cluster composed of multiple servers.

[0258] For example, in this embodiment, the method of the embodiment of the present application will be described in detail by taking the snapshot generation device being specifically integrated in the server as an example.

[0259] For example, Figure 3 As shown, the snapshot generation device may include an application determination unit 310, a search unit 320, a generation unit 330, and an information determination unit 340, as follows:

[0260] (I) Application determination unit 310

[0261] Used to determine at least one target application from applications deployed on the server according to the configuration information sent by the terminal, where the target application is the application corresponding to the configuration information.

[0262] In some implementations, the configuration information includes an application identifier, and the application determination unit 310 may be specifically configured to:

[0263] Call the configuration information transmission interface to obtain the configuration information passed in by the terminal;

[0264] Read the application ID from the configuration information;

[0265] The application deployed in the server and corresponding to the read application identifier is used as the target application.

[0266] (II) Search unit 320

[0267] Used to find a target task in the tasks of a target application, where the target task includes an update task, and the update task includes an update string.

[0268] In some implementations, the search unit 320 may be specifically configured to:

[0269] Get the historical update time of the target application. The historical update time is the update time corresponding to the historical application snapshot;

[0270] If the latest update time of the target application is later than the historical update time, obtain candidate tasks from the tasks of the target application;

[0271] Searching for a target historical task corresponding to the task identifier of the candidate task in the historical application snapshot;

[0272] If the task update time of the candidate task is later than the task update time of the target historical task, the candidate task is determined as an update task.

[0273] In some implementations, the target task further includes a newly added task, the snapshot difference information further includes the newly added difference information, the newly added task is used to generate the newly added difference information, and the search unit 320 may further be used to:

[0274] If the target historical task is not found in the historical application snapshot, the candidate task is determined as a new task.

[0275] In some implementations, the target task further includes a newly added task, the snapshot difference information further includes the newly added difference information, the newly added task is used to generate the newly added difference information, and the search unit 320 may further be used to:

[0276] If the latest update time of the target application is later than the historical update time, obtain candidate sibling tasks from the tasks of the target application;

[0277] Find the target sibling task corresponding to the candidate sibling task in the historical application snapshot;

[0278] Compare the task identifiers of the candidate sibling tasks with the target sibling tasks to find the newly added tasks.

[0279] In some implementations, the snapshot generation device further includes a timing unit, the configuration information includes a snapshot generation period, and the timing unit can be specifically used to:

[0280] Read the snapshot generation cycle from the configuration information;

[0281] A scheduled task is generated according to the snapshot generation cycle, and the scheduled task is used to find a target task in the tasks of the target application according to the snapshot generation cycle.

[0282] (III) Generation Unit 330

[0283] It is used to generate editing operation information corresponding to the editing distance between the updated string and the historical string according to the editing distance between the updated string and the historical string, where the historical string is a string corresponding to the updated string in the historical application snapshot of the target application.

[0284] In some implementations, the generating unit 330 may be specifically configured to:

[0285] Get the initial shortest edit distance matrix;

[0286] Calculate the maximum common subsequence between the update string and the historical string;

[0287] Based on the common subsequence and the initial shortest edit distance matrix, the updated character string and the historical character string are backtracked to generate the edit operation information corresponding to the shortest edit distance.

[0288] (IV) Information determination unit 340

[0289] The snapshot difference information is used to determine snapshot difference information, where the snapshot difference information includes update difference information corresponding to the edit operation information, and the snapshot difference information is used to generate a current application snapshot of the target application based on the historical application snapshot.

[0290] In some implementations, the snapshot generation device further includes a snapshot generation unit, the editing operation information includes at least one editing operation, and the snapshot generation unit may be specifically configured to:

[0291] Get the editing operation information from the snapshot difference information;

[0292] Edit the historical character string in the historical application snapshot to obtain the current application snapshot of the target application.

[0293] In some implementations, the snapshot generation device further includes an alarm unit, which can be specifically used to:

[0294] Obtain the task parameters of the target task, and obtain the regular expression corresponding to the preset parameter threshold condition;

[0295] A verification formula is obtained by parsing the regular expression, and the verification formula includes a logical operator;

[0296] Get the verification rules corresponding to the logical operator;

[0297] According to the verification rules, the task parameters of the target task are compared with the verification formula to determine the comparison operation value;

[0298] If the comparison operation value is true, an alarm message is generated.

[0299] In some implementations, the snapshot generation device further includes a merging unit, which can be specifically used to:

[0300] Receive the merge keyword sent by the terminal, and obtain the merged storage set and the application snapshot of the target application;

[0301] Determine, from the application snapshots of the target application, the target application snapshot corresponding to the merge keyword;

[0302] Generate a key-value pair based on the merge keyword and the target application snapshot, where the key of the key-value pair is the merge keyword and the value of the key-value pair is the target application snapshot;

[0303] The key-value pair is written into the merged storage set so that the target application snapshot corresponding to the merge keyword can be queried from the merged storage set.

[0304] In some implementations, the snapshot generating device further includes a format conversion unit, the configuration information includes the snapshot file format, and the format conversion unit can be specifically used to:

[0305] Read the snapshot file format from the configuration information;

[0306] Convert the current application snapshot into a snapshot file format to obtain a converted application snapshot.

[0307] In specific implementation, the above units can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above units can refer to the previous method embodiments, which will not be repeated here.

[0308] Therefore, the embodiment of the present application records only the changed part of the application through snapshot difference information, rather than the snapshot of the entire application, which reduces the time and resource consumption of application snapshot generation and comparison, and can significantly improve the efficiency of application snapshot generation. At the same time, the snapshot difference information can accurately record the change information of the application to accurately capture the change of the application, help users understand the specific differences of applications at different time points, and improve application management efficiency and management quality.

[0309] The embodiment of the present application also provides an electronic device, which can be a terminal, a server, etc. The terminal can be a mobile phone, a tablet computer, a smart Bluetooth device, a laptop, a personal computer, etc. The server can be a single server or a server cluster composed of multiple servers, etc.

[0310] In some embodiments, the snapshot generating device may also be integrated into multiple electronic devices. For example, the snapshot generating device may be integrated into multiple servers, and the snapshot generating method of the present application may be implemented by multiple servers.

[0311] In this embodiment, the electronic device of this embodiment is a server as an example for detailed description, for example, Figure 4 As shown, it shows a schematic diagram of the structure of the server involved in the embodiment of the present application, specifically:

[0312] The server may include one or more processing core processors 410, one or more computer-readable storage media memories 420, a power supply 430, an input module 440, and a communication module 450. Those skilled in the art will appreciate that Figure 4 The server structure shown in the figure does not constitute a limitation on the server, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0313] The processor 410 is the control center of the server, and uses various interfaces and lines to connect various parts of the entire server. It executes various functions of the server and processes data by running or executing software programs and / or modules stored in the memory 420, and calling data stored in the memory 420. In some embodiments, the processor 410 may include one or more processing cores; in some embodiments, the processor 410 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 410.

[0314] The memory 420 can be used to store software programs and modules. The processor 410 executes various functional applications and data processing by running the software programs and modules stored in the memory 420. The memory 420 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the server, etc. In addition, the memory 420 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 420 may also include a memory controller to provide the processor 410 with access to the memory 420.

[0315] The server also includes a power supply 430 for supplying power to various components. In some embodiments, the power supply 430 can be logically connected to the processor 410 through a power management system, so that the power management system can manage charging, discharging, and power consumption. The power supply 430 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.

[0316] The server may further include an input module 440, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls.

[0317] The server may further include a communication module 450. In some embodiments, the communication module 450 may include a wireless module. The server may perform short-range wireless transmission through the wireless module of the communication module 450, thereby providing wireless broadband Internet access to the user. For example, the communication module 450 may be used to help the user send and receive emails, browse web pages, and access streaming media.

[0318] Although not shown, the server may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 410 in the server will load the executable files corresponding to the processes of one or more application programs into the memory 420 according to the following instructions, and the processor 410 will run the application programs stored in the memory 420, thereby realizing various functions, as follows:

[0319] According to the configuration information sent by the terminal, at least one target application is determined from the applications deployed on the server, the target application being the application corresponding to the configuration information; the target task is searched for in the tasks of the target application, the target task comprising an update task, the update task comprising an update string; according to the edit distance between the update string and the historical string, editing operation information corresponding to the edit distance is generated, the historical string being a string corresponding to the update string in the historical application snapshot of the target application; snapshot difference information is determined, the snapshot difference information comprising update difference information corresponding to the editing operation information, the snapshot difference information being used to generate a current application snapshot of the target application based on the historical application snapshot.

[0320] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0321] As can be seen from the above, the embodiment of the present application records only the changed part of the application through the snapshot difference information, rather than the snapshot of the entire application, which reduces the time and resource consumption of application snapshot generation and comparison, and can significantly improve the efficiency of application snapshot generation. At the same time, the snapshot difference information can accurately record the change information of the application to accurately capture the change of the application, help users understand the specific differences of the application at different time points, and improve the efficiency and quality of application management.

[0322] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0323] To this end, an embodiment of the present application provides a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps in any of the snapshot generation methods provided in the embodiments of the present application. For example, the instructions can execute the following steps:

[0324] According to the configuration information sent by the terminal, at least one target application is determined from the applications deployed on the server, the target application being the application corresponding to the configuration information; the target task is searched for in the tasks of the target application, the target task comprising an update task, the update task comprising an update string; according to the edit distance between the update string and the historical string, editing operation information corresponding to the edit distance is generated, the historical string being a string corresponding to the update string in the historical application snapshot of the target application; snapshot difference information is determined, the snapshot difference information comprising update difference information corresponding to the editing operation information, the snapshot difference information being used to generate a current application snapshot of the target application based on the historical application snapshot.

[0325] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0326] According to one aspect of the present application, a computer program product or computer program is provided, the computer program product or computer program including a computer program / instruction, the computer program / instruction being stored in a computer-readable storage medium. A processor of an electronic device reads the computer program / instruction from the computer-readable storage medium, and the processor executes the computer program / instruction, so that the electronic device executes the method provided in various optional implementations provided in the above embodiments.

[0327] Since the instructions stored in the storage medium can execute the steps in any snapshot generation method provided in the embodiments of the present application, the beneficial effects that can be achieved by any snapshot generation method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0328] The above is a detailed introduction to a snapshot generation method, device, electronic device, storage medium and program product provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as limiting the present application.

Claims

1. A snapshot generation method, characterized in that: include: Determine, according to the configuration information sent by the terminal, at least one target application from the applications deployed on the server, the target application being the application corresponding to the configuration information; Searching for a target task in the tasks of the target application, wherein the target task includes an update task, and the update task includes an update string; Generate editing operation information corresponding to the editing distance according to the editing distance between the updated character string and the historical character string, wherein the historical character string is a character string corresponding to the updated character string in the historical application snapshot of the target application; Snapshot difference information is determined, where the snapshot difference information includes update difference information corresponding to the editing operation information, and the snapshot difference information is used to generate a current application snapshot of the target application based on the historical application snapshot.

2. The snapshot generation method according to claim 1, characterized in that: The searching for the target task in the tasks of the target application includes: Obtaining the historical update time of the target application, where the historical update time is the update time corresponding to the historical application snapshot; If the latest update time of the target application is later than the historical update time, obtaining a candidate task from the tasks of the target application; Searching the historical application snapshot for a target historical task corresponding to the task identifier of the candidate task; If the task update time of the candidate task is later than the task update time of the target historical task, the candidate task is determined as the update task.

3. The snapshot generation method according to claim 2, characterized in that: The target task also includes a newly added task, the snapshot difference information also includes newly added difference information, the newly added task is used to generate the newly added difference information, and searching for the target task in the tasks of the target application also includes: If the target historical task is not found in the historical application snapshot, the candidate task is determined as a new task.

4. The snapshot generation method according to claim 2, characterized in that: The target task also includes a newly added task, the snapshot difference information also includes the newly added difference information, the newly added task is used to generate the newly added difference information, and searching the target task in the tasks of the target application also includes: If the latest update time of the target application is later than the historical update time, obtaining candidate sibling tasks from the tasks of the target application; Searching for a target sibling task corresponding to the candidate sibling task in the historical application snapshot; The task identifiers of the candidate sibling tasks and the target sibling tasks are compared to find the newly added task.

5. The snapshot generation method according to claim 1, characterized in that: The step of generating, according to the edit distance between the updated character string and the historical character string, edit operation information corresponding to the edit distance includes: Get the initial shortest edit distance matrix; Calculating the maximum common subsequence between the update string and the historical string; Based on the common subsequence and the initial shortest edit distance matrix, the updated character string and the historical character string are backtracked to generate the edit operation information corresponding to the shortest edit distance.

6. The snapshot generation method according to claim 1, characterized in that: The editing operation information includes at least one editing operation, and after determining the snapshot difference information, the method further includes: Acquire the editing operation information from the snapshot difference information; The editing operation is performed on the historical character string in the historical application snapshot to obtain a current application snapshot of the target application.

7. The snapshot generation method according to claim 1, characterized in that: After searching the target task in the tasks of the target application, the method further includes: Obtaining task parameters of the target task, and obtaining a regular expression corresponding to a preset parameter threshold condition; A verification formula is obtained by parsing the regular expression, wherein the verification formula includes a logical operator; Obtaining the verification rule corresponding to the logical operator; According to the verification rule, the task parameter of the target task is compared with the verification formula to determine a comparison operation value; If the comparison operation value is a true value, an alarm message is generated.

8. The snapshot generation method according to claim 1, characterized in that: The method further comprises: receiving a merge keyword sent by the terminal, and obtaining a merged storage set and an application snapshot of the target application; Determining, from the application snapshots of the target application, the target application snapshot corresponding to the merged keyword; Generate a key-value pair according to the merge keyword and the target application snapshot, wherein the key of the key-value pair is the merge keyword, and the value of the key-value pair is the target application snapshot; The key-value pair is written into the merged storage set, so as to query the target application snapshot corresponding to the merged keyword from the merged storage set.

9. The snapshot generation method according to claim 1, characterized in that: The configuration information includes a snapshot generation period, and before searching for a target task in the tasks of the target application, the configuration information also includes: Reading the snapshot generation period from the configuration information; A scheduled task is generated according to the snapshot generation cycle, and the scheduled task is used to search for a target task in the tasks of the target application according to the snapshot generation cycle.

10. The snapshot generation method according to claim 1, characterized in that: The configuration information includes an application identifier, and determining at least one target application from applications deployed on the server according to the configuration information sent by the terminal includes: Calling a configuration information transmission interface to obtain the configuration information passed in by the terminal; Reading the application identifier from the configuration information; The application deployed in the server and corresponding to the read application identifier is used as the target application.

11. The snapshot generation method according to any one of claims 1 to 10, characterized in that: The configuration information includes the snapshot file format, and after determining the snapshot difference information, the following further includes: Reading the snapshot file format from the configuration information; The current application snapshot is converted into the snapshot file format to obtain a converted application snapshot.

12. A snapshot generation device, characterized in that: include: an application determining unit, configured to determine at least one target application from applications deployed on the server according to the configuration information sent by the terminal, wherein the target application is an application corresponding to the configuration information; A searching unit, configured to search for a target task in the tasks of the target application, wherein the target task includes an update task, and the update task includes an update string; a generating unit, configured to generate, according to an edit distance between the update string and a historical string, edit operation information corresponding to the edit distance, wherein the historical string is a string corresponding to the update string in a historical application snapshot of the target application; The information determination unit is used to determine snapshot difference information, wherein the snapshot difference information includes update difference information corresponding to the editing operation information, and the snapshot difference information is used to generate a current application snapshot of the target application based on the historical application snapshot.

13. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a plurality of instructions; the processor loads instructions from the memory to execute the steps in the snapshot generation method according to any one of claims 1 to 11.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps in the snapshot generation method according to any one of claims 1 to 11.

15. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps in the snapshot generation method according to any one of claims 1 to 11 are implemented.

Citation Information

Patent Citations

  • Method for reserving and recovering user snapshots in a virtualization backup system

    CN111309527A

  • Moving snapshots from a local snapshot lineage on a storage system to a cloud snapshot lineage on cloud storage

    US20210286539A1

Cited By

  • Snapshot generation method and device, electronic equipment and storage medium

    CN119719030A