CN111078269A - Version management method, version recovery method, editor, system and storage medium - Google Patents

Version management method, version recovery method, editor, system and storage medium Download PDF

Info

Publication number
CN111078269A
CN111078269A CN201910656559.2A CN201910656559A CN111078269A CN 111078269 A CN111078269 A CN 111078269A CN 201910656559 A CN201910656559 A CN 201910656559A CN 111078269 A CN111078269 A CN 111078269A
Authority
CN
China
Prior art keywords
file
version
behavior
information
operation behavior
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910656559.2A
Other languages
Chinese (zh)
Inventor
严志恒
何健
曲海悦
谢忠甫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huakong Tsingjiao Information Technology Beijing Co Ltd
Original Assignee
Huakong Tsingjiao Information Technology Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huakong Tsingjiao Information Technology Beijing Co Ltd filed Critical Huakong Tsingjiao Information Technology Beijing Co Ltd
Priority to CN201910656559.2A priority Critical patent/CN111078269A/en
Publication of CN111078269A publication Critical patent/CN111078269A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/1734Details of monitoring file system events, e.g. by the use of hooks, filter drivers, logs

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a version management method, a version recovery method, an editor, a version management system and a storage medium, wherein the version management method comprises the following steps: monitoring the operation behavior of a user on the content of a file to obtain corresponding operation information; wherein the file content is associated with a user-managed version of the file; and saving operation information corresponding to the operation behaviors based on the association relationship between the file version and the monitored operation behaviors. The version management method, the version recovery method, the editor, the system and the storage medium can recover the operation result of any operation behavior between two file versions.

Description

Version management method, version recovery method, editor, system and storage medium
Technical Field
The present application relates to the field of version management technologies, and in particular, to a version management method, a version recovery method, an editor, a version management system, and a storage medium.
Background
Version management (Version control) provides a Version record that maintains the changes of the source program files in the software project from birth to release. The recorded file version is submitted according to the version of the user, and the user traces the source program file according to the file version submitted all the time.
The limitation of the corresponding relation between the version submitting operation of the user and the file version is that the user can carry out various operations on the file content between two adjacent submitted file versions and the operation cannot be reflected in the corresponding file version. Therefore, when a user needs to restore the file content, the operation results corresponding to various operation behaviors between two file versions cannot be restored.
Disclosure of Invention
In view of the above-described drawbacks of the related art, it is an object of the present application to provide a version management method and restoration method, an editor, a system, and a storage medium. The method and the device are used for solving the problem that various operations between two versions of the file cannot be recovered in the prior art.
To achieve the above and other related objects, a first aspect of the present application discloses a version management method, including: monitoring the operation behavior of a user on the content of a file to obtain corresponding operation information; wherein the file content is associated with a user-managed version of the file; and saving operation information corresponding to the operation behaviors based on the association relationship between the file version and the monitored operation behaviors.
In certain embodiments of the first aspect of the present application, the operational behavior comprises at least one of: editing the operation behavior of the file content without changing the operation behavior of the file content.
In certain embodiments of the first aspect of the present application, the operational information comprises at least one of: information for describing an operational behavior, information related to the operational behavior.
In certain embodiments of the first aspect of the present application, the information relating to operational behavior comprises: file content change information corresponding to the operation behavior or an operation result corresponding to the operation behavior.
A second aspect of the present application discloses a version restoring method, including: monitoring a recovery operation behavior of the managed file to obtain operation information indicated by the recovery operation behavior; and restoring the file content of the corresponding version based on the association relationship between the saved operation information and at least one file version.
A third aspect of the present application discloses an editor comprising: the file editing module is used for providing an editing environment for file contents; wherein the file content is associated with a managed file version; the monitoring module is used for monitoring the operation behavior of the user on the file content in the editing environment to obtain corresponding operation information; and the storage module is used for storing the operation information corresponding to the operation behaviors based on the association relationship between the file version and the monitored operation behaviors.
A fourth aspect of the present application discloses yet another editor, including a monitoring module, configured to monitor a file content recovery operation behavior on a managed file version, so as to obtain operation information indicated by the recovery operation behavior; and the file editing module is used for recovering the file content corresponding to the recovery operation behavior based on the association relationship between the saved operation information and at least one file version, and loading the recovered file content in an editing environment.
A fifth aspect of the present application discloses a version management system, comprising: a memory for storing at least one program; a processor for calling said at least one program and coordinating said memory to perform a version management method as described above and/or a version restore method as described above.
A sixth aspect of the present application discloses a computer device readable storage medium storing a computer program for executing a version management method, the computer program, when executed, implementing the version management method as previously described; and/or a computer program stored thereon for performing a version recovery method, which computer program, when executed, implements a version recovery method as described above.
A seventh aspect of the present application discloses an editor comprising an editor as defined in any of the third aspects and an editor as defined in any of the fourth aspects.
In summary, according to the version management method and recovery method, the editor, the system and the storage medium disclosed in the present application, the file version of any operation behavior can be recovered by associating the operation behavior of the user on the file with the file version and storing the operation information corresponding to the operation behavior, which is helpful for the user to modify and manage the file, reduces the workload of the user, and avoids the irreparable loss caused by the file loss.
Drawings
Fig. 1 is a schematic diagram illustrating an editor according to an embodiment of the present invention.
FIG. 2 is a diagram illustrating an example of a data structure in an editor, which is a sequence table according to the present application.
FIG. 3 is a diagram illustrating a structure of a linked list having three nodes in another embodiment of a data structure in an editor according to the present application.
Fig. 4 is a schematic diagram illustrating a structure of a sequence table holding version-up operations in an editor according to an embodiment of the present application.
FIG. 5 is a diagram illustrating a structure of a linked list having five nodes according to another embodiment of the present invention.
Fig. 6 is a schematic diagram of a structure of another editor in an embodiment of the present application.
Fig. 7 is a schematic diagram illustrating that, in an embodiment of the present application, the operation information indicated by the resume operation behavior of another editor includes file content change information corresponding to the operation behavior.
Fig. 8 is a schematic diagram illustrating that the operation information indicated by the recovery operation behavior of another editor of the present application includes an operation result corresponding to the operation behavior in another embodiment.
FIG. 9 is a diagram illustrating recovery operation behavior of another editor of the present application in one embodiment including exception recovery and user operation.
Fig. 10 is a schematic structural diagram of a version management system according to an embodiment of the present application.
Fig. 11 is a flowchart illustrating a version management method according to an embodiment of the present application.
Fig. 12 is a flowchart illustrating a version recovery method according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application is provided for illustrative purposes, and other advantages and capabilities of the present application will become apparent to those skilled in the art from the present disclosure.
Also, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context indicates otherwise. It will be further understood that the terms "comprises," "comprising," "includes" and/or "including," when used in this specification, specify the presence of stated features, steps, operations, elements, components, items, species, and/or groups, but do not preclude the presence, or addition of one or more other features, steps, operations, elements, components, species, and/or groups thereof. The terms "or" and/or "as used herein are to be construed as inclusive or meaning any one or any combination. Thus, "A, B or C" or "A, B and/or C" means "any of the following: a; b; c; a and B; a and C; b and C; A. b and C ". An exception to this definition will occur only when a combination of elements, functions, steps or operations are inherently mutually exclusive in some way.
In the process of editing the original file content, a user can form the latest current file content along with the continuous superposition of editing operation, most of the file content of the editing operation between the original file and the current file can be lost, the user does not have the repentance opportunity to obtain the file content after any editing operation between the original file and the current file, or can obtain the file content after the limited editing operation before the current file, and in addition, abnormal conditions such as power failure, crash, flash back and the like can occur at any time in the editing operation process, so that the file content after the editing operation is lost. Such increases the workload of the user and decreases the file management efficiency of the user.
For example, when an application developer develops a program by using a development tool, an original code file is formed first, a developer modifies the original code file in a later period, and a plurality of operations such as changing configuration parameters once, deleting function modules, changing configuration parameters twice and the like may be executed in the modification process. If the developer finds that the deleted functional module is deleted by mistake when the developer runs the final code file, the result of the corresponding operation cannot be recovered from the recorded code file version.
For another example, a Development tool of an online IDE (Integrated Development Environment) provides a code editing Environment for multi-user cooperative operation, and when communication between a plurality of clients and a server is unstable, each developer cannot uniformly store operation information of the same code file through different clients, so that the restored code content is the file content stored after the server is fused, and is not the latest file content during failure recovery, for example, the file content after multi-user cooperative operation during failure.
In view of the above, the present application discloses a version management method, a recovery method, an editor, a system, and a storage medium, which enable a file version of any operation behavior to be recovered by associating the operation behavior of a user on a file with the file version and storing operation information corresponding to the operation behavior, thereby facilitating the user to modify and manage the file, reducing the workload of the user, and avoiding irreparable loss caused by file loss.
Please refer to fig. 1, which is a schematic structural diagram of an editor according to an embodiment of the present application. As shown, the editor includes a file editing module 11, a monitoring module 12, and a saving module 13. Wherein, the editor can be a stand-alone editor configured at the user equipment side. The editor is more suitable for an on-line IDE development tool, and realizes the operation and preservation of various operations of file contents by a user through communication between a client configured on a user equipment side and a server configured on a server side. For example, the file editing module 11 and the monitoring module 12 in the editor are configured in the client, and the saving module 13 is configured in the server. For another example, the file editing module 11 and the monitoring module 12 of the editor, and the part of the saving module 13 that performs saving the client operation information are configured in the client, and the part of the saving module 13 that performs fusing the multi-user operation information are configured in the server. For another example, the client portion of the editor includes: monitoring operation of a single user in the file editing module 11 and the monitoring module 12; the service end part of the editor comprises: a monitoring operation of the operation information provided by each client in the monitoring module 12, and a storage module 13. As another example, the client portion of the editor includes: a file editing module 11; the service end part of the editor comprises: a monitoring module 12 and a saving module 13.
The file editing module 11 is used for providing an editing environment for a file content, wherein the file content is associated with a file version managed.
The file version refers to the collection of information that is saved by a user on storage in a computerized format. The file version includes a release date, a file name, data information, a file type, and a version number, the release date refers to the specific time when the user uploads the file version, the file name refers to the name of the user on the file version, the data information refers to the substantive information stored on the memory, the data information is called to display the file content corresponding to the file version, the file type refers to a special encoding mode for the data information used for storing the data information, which may be, for example, a text file, a picture file, a code file, a system file, a script file, etc., the version number being a number set for convenience of file version management, denoted as Vi, where i is represented as the ith version of the file stored on the memory, which can be directly queried by the version number of the file version. Including but not limited to high speed random access memory, non-volatile memory. Such as one or more magnetic disk storage devices, flash memory devices, or other non-volatile solid-state storage devices. In certain embodiments, the memory may also be, for example, a network-attached memory accessed via RF circuitry or external ports and a communication network (not shown), which may be the internet, one or more intranets, Local Area Networks (LANs), wide area networks (WLANs), storage local area networks (SANs), etc., or a suitable combination thereof. The memory controller may control access to the memory by other components of the device, such as the CPU and peripheral interfaces.
The association of the file content with a managed file version means that the file content is specific information generated based on a file version and presented to a user, and the file content may be initial information displayed by directly opening the file version or new information formed on the basis of the initial information. For example, directly opening a code file may display thousands of lines of program codes, where the displayed thousands of lines of program codes are file contents, and a user may debug and modify the program codes for program development, where the debugged and modified program codes are new program codes generated based on the displayed thousands of lines of program codes, and the new program codes are also file contents.
The editing environment is used for providing environment parameters and configuration parameters which are suitable for the type of the file version of the recognizable file type so that the data information of the file version can be correctly displayed as the file content, and meanwhile, a human-computer interaction interface is provided for a user, and the user can operate the file content in the editing environment. Wherein, in some examples, the human-machine interface comprises: the editing box is used for displaying the file content and allowing a user to edit, and the operation options are used for the user to select operation based on the file content displayed in the editing box. The edit box is used for providing text editing operation and providing identification marks such as colors, fonts and character thicknesses according to code types. The operation option is used for at least one of the following operations: character error positioning operation, code compiling operation, annotating operation, character font, color and other editing operation. In still other examples, the human-machine interface in the editing environment is a command line editing interface, and the editing interface is used for providing operations of changing the content and not changing the content of the file content. For example, the editing environment provides a user with a tertiary-based manner of operation.
The monitoring module 12 is configured to monitor an operation behavior of the user on the file content in the editing environment to obtain corresponding operation information.
In practical applications, a user performs an operation on a file content through an external input device, the external input device is electrically connected to the monitoring module 12 through an external interface, and the monitoring module 12 monitors the operation on the file content by monitoring a trigger of the user on the external input device. The external input device includes, but is not limited to, a button, a keyboard, a mouse, a touch pad, and the like. The operational behavior includes at least one of editing the file content and not changing the file content.
In an embodiment, the operation behavior is an operation behavior of editing file content. Editing the file content means that the file content is changed. For example, the operation of adding a part of content to the file content, deleting a part of content from the file content, adjusting the sequence of the part of content in the file content, and labeling the part of content in the file content is not limited to this, and all the operation behaviors in which the file content is changed are within the scope of the operation behaviors in which the file content is edited in the present application.
In another embodiment, the operational behavior is an operational behavior that does not change in the content of the file. The operation behavior of not changing the file content means that the user operates the file content but does not change the file content. For example, in program development, a programmer needs to compile written code to convert the code into a computer executable language, lexical analysis and syntactic analysis are mainly performed in the compiling process, only error prompts and operation results are given in the analyzing process, and no change is performed on the content of the written code. For another example, the user may perform word counting and wrongly written character check on the file content of the text file, and the user performs the operation to obtain only the results of the word counting and wrongly written character check, and the file content is not different.
In yet another embodiment, the operational behavior includes both an operational behavior of editing the content of the file and an operational behavior of not changing the content of the file. For example, in program development, a programmer first compiles written code and then modifies the code according to the compilation result. For another example, the user adds new content to the text file and then performs a wrongly written word check on the new file content.
The operation information is generated based on the operation behaviors, and defines that the actions of executing the same type on the file content through the external input device in continuous time are accumulated into one operation behavior, and the corresponding operation information can be obtained by the user every time the user executes the operation behavior. The operation information comprises at least one of information used for describing operation behaviors and information related to the operation behaviors, and the operation information is recorded as Oj; where j represents the jth operation behavior.
In an embodiment, the operation information includes information for describing an operation behavior. The information describing the operation behavior comprises position information and action information. The position information is used for recording the position of an operation behavior and is marked as Pv; the action information is used for recording actions executed by each operation behavior, such as deletion, thickening and the like. For example, if the monitoring module 12 monitors that a character a located at a P1-th position in the file content is thickened, the obtained operation information O1 is (P1, "thickened"), and then the monitoring module 12 monitors an operation behavior of compiling ALL the file content, and obtains another operation information O2 is (ALL, "compiled"), where both the two pieces of operation information are information for describing the operation behavior.
In another embodiment, the operation information includes information related to the operation behavior, and the information related to the operation behavior includes file content change information corresponding to the operation behavior or an operation result corresponding to the operation behavior. In an example, the operation behavior is an operation behavior for editing file content, and the information related to the operation behavior is file content change information corresponding to the operation behavior. Taking the file content as { A, B, C, D, E } as an example for explanation, for example, if the monitoring module 12 monitors that the operation behavior performed by the user is to add a character F after the character E in the file content, the corresponding file content change information is the character F; in another example, the operation behavior is an operation behavior without changing the content of the file, and the information related to the operation behavior is an operation result corresponding to the operation behavior. For example, if the monitoring module 12 monitors that the file content { A, B, C, D, E } is compiled, the information related to the operation behavior is a compilation result obtained by compiling the file content { A, B, C, D, E }.
In another embodiment, in order to accommodate multiple operation behaviors and information related to the operation behaviors, the operation information describes the information describing the operation behaviors and the information related to the operation behaviors by using a preset tag structure, so that the information related to the operation behaviors is in one-to-one correspondence with the operation behaviors in the operation information. Wherein the tag structure may be defined using XML tags or custom tag structures that are recognizable by an editor. Taking the document content as { A, B, C, D, E } as an example, for example, if the monitoring module 12 first monitors that a character F is added after a character a located at a P1 th position in the document content, the obtained operation information O1 is (P1 "add", F), then the monitoring module 12 monitors an operation behavior of deleting a character E located at a P6 th position in the operated document content, the obtained operation information O2 is (P6, "delete", E), and then the monitoring module 12 monitors an operation behavior of compiling ALL the operated document content, and then obtains an operation information O3 is (ALL, "compile", R), where R is a compilation result.
In practical application, the file versions are located in a memory of a server, and in order to enable efficient cooperative work, a plurality of users download the same file version from the server to obtain corresponding file contents, and then operate the file contents of the file versions in different labor. In view of this, the operation behavior monitored by the monitoring module 12 comes from the cooperative operation of a plurality of users.
The monitoring module 12 monitors the cooperative operation behavior of the multiple users on the same file content to obtain operation information of each user based on the respective presented file content, and integrates the operation information generated by the multiple cooperative operations to obtain uniform operation information according to the sequence of the operation information of each user on the same file content. Taking the operation behaviors of the User1 and the User2 on the file content { A, B, C, D, E } respectively as an example for explanation, the monitoring module 12 monitors that the User1 executes the operation behavior of adding a character F after a character a to the file content { A, B, C, D, E } to obtain the operation information of the User1 as (P1, "add", F), the monitoring module 12 also monitors that the User2 executes the operation behavior of adding a character G after a character E to the file content { A, B, C, D, E } to obtain the operation information of the User2 as (P5, "add", G), and the monitoring module 12 integrates the operation information of the User1 and the operation information of the User2 into one User operation information. Therefore, taking the User1 as a reference User, the monitoring module 12 considers that the operation behavior of the User2 is based on the User1, that is, the operation behavior of the User1 on the file content { A, B, C, D, E } is processed into operation information (P1, "add", F), and at this time, the corresponding file content is { A, F, B, C, D, E }; and processing the operation behavior of the User2 on the file content { A, F, B, C, D, E } into operation information (P6, "add", G), so that the file content after two operations is { A, F, B, C, D, E, G }. Taking the User2 as a reference User, the monitoring module 12 considers that the operation behavior of the User1 is based on the User2, that is, the operation behavior of the User2 on the file content { A, B, C, D, E } is processed into operation information (P5, "add", G), and at this time, the corresponding file content is { A, B, C, D, E, G }; and processing the operation behavior of the file content { A, B, C, D, E, G } by the User2 into operation information (P1, "Add", F) so that the file content after two operations is { A, F, B, C, D, E, G }.
The number of the users is not limited to the above example, and the integration manner of the operation information of each user is not limited to the above example, and all the integration of the operation information of the cooperative operation of multiple users into the operation information based on one user belongs to the scope covered by the present application.
The saving module 13 is configured to save the operation information corresponding to the operation behavior based on the association relationship between the file version and the monitored operation behavior. Here, the operation information acquired by the saving module 13 may be from a local program interface or may be acquired from the user equipment side through a network interface.
The association relationship between the file version and the monitored operation behavior means that the object of the monitored operation behavior is the file content of the file version, as described above, a user can perform multiple operation behaviors on the file content of the file version, each operation behavior corresponds to one piece of operation information, the storage module 13 stores each piece of operation information corresponding to each operation behavior in a memory, and the memory is described as above and is not described herein again. For example, the saving module 13 sequentially saves operation information generated according to the operation behavior in a log form.
The saving module 13 saves each operation information by using a preset data structure for describing an association relationship, where the data structure includes but is not limited to: sequence list, linked list, or custom data structure.
In an embodiment, the data structure is a sequence table, the sequence table includes a version number of the file version and operation information corresponding to a plurality of operation behaviors performed by a user, and the sequence table may be denoted as [ Vi, O1, O2, …, Oj ], where the version number of the file version and the operation information are sequentially stored in consecutive storage units reserved on the memory. Please refer to fig. 2, which is a schematic diagram illustrating a data structure in an editor according to the present application as a sequence table in an embodiment, as shown in the figure, taking a file version as an initial file version V1, and taking a user performing four operations as an example, the sequence table may represent [ V1, O1, O2, O3, O4 ].
In another embodiment, the data structure is a linked list, the linked list is composed of a plurality of nodes, each node is a storage unit randomly dispersed on a memory, each node is realized by an address pointer link order in the linked list, the plurality of nodes include a head node, a plurality of common nodes and a tail node, the head node is a start node of the linked list and is used for being associated with a file version, the common nodes are link nodes of the linked list, each common node stores operation information corresponding to each operation behavior, and the tail node is an end node of the linked list and is used for indicating that the linked list is not linked any more. Taking the three-time operation performed by the user as an example for explanation, please refer to fig. 3, which is a schematic diagram showing a structure of a linked list having three nodes in another embodiment of a data structure in an editor according to the present application, as shown in the figure, the linked list structure has three nodes, including a head node 131, a first common node 132, and a tail node 133, where the head node 131 stores a version number V1 of a file version or an address pointer indicating a V1 version, operation information O1 corresponding to performing a first operation on file content of the file version, an address pointer M1 of the first common node 132, and is represented as [ V1, O1, M1], the first common node 132 stores operation information O2 corresponding to a second operation, an address pointer M2 of the tail node 133, and is represented as [ M1, O2, M2], the tail node 133 stores operation information O3 corresponding to a third operation behavior, and an empty address, denoted M2, O3, null, where the head node 131 is linked to the first regular node 132 by the address pointer M1 of the first regular node 132, and the first regular node 132 is linked to the tail node 133 by the address pointer M2 of the tail node 133, thereby forming a linked list. The number of the common nodes is not limited to the above example, and the link mode between the nodes is not limited to the above example, and all the operation information corresponding to the operation behavior stored in the form of a linked list all belong to the scope covered by the present application.
In yet another embodiment, the data structure is a custom structure. Here, the custom structure includes a data structure that is constructed based on a linked list, a sequence table, and the like, which can represent a tree structure, and facilitates a recovery operation. For example, the association relationship is stored as an association relationship file according to the corresponding custom structure by using the XML tag and setting the custom structure according to the data structure of the sequence table.
It should be noted that, in the process of performing an operation action on the file content of the file version by the user, version submission may be performed on the file version to form a new file version so that the new file version is stored on the storage. In view of this, the monitoring module 12 is further configured to monitor an operation behavior of a user for performing version submission to obtain a new file version; and the storage module is also used for storing the new file version based on the operation behaviors and the operation information thereof monitored before and the incidence relation between the new file versions. In fact, a user can execute multiple versions to submit to form multiple new file versions in the process of performing an operation behavior, in this application, a file version on which the user first executes the operation behavior is referred to as an initial file version, a version number of the initial file version is referred to as V1, a version number of a new file version formed by submitting the version every time is referred to as Vi, where i is a natural number greater than 1.
In order to describe the initial file version, the multiple operation behaviors and the operation information thereof, and the association between each new file version, the saving module saves each new file version by using a preset data structure for describing the association relationship.
In an embodiment, the data structure is a sequence table, the sequence table includes a version number of an initial file version, operation information corresponding to a plurality of operation behaviors performed by a user, and a version number of a new file version, and the sequence table may be denoted as [ V1, O1, O2, …, Oj, V2, O1, O2, …, Oj, V3, … Vi ], where the version number of the file version, the operation information, and the version number of the new file version are sequentially stored in consecutive storage units reserved on the memory. Please refer to fig. 4, which is a schematic diagram illustrating a data structure in an editor according to the present application as a sequence table storing version-submitting operations in an embodiment, where, as shown in the figure, a user performs two operations on the file content of an initial file version to submit the version, and then performs two operations on the submitted version to submit the version, the sequence table may represent [ V1, O1, O2, V2, O1, O2, V3 ].
In another embodiment, the data structure adopts a linked list, and the linked list structure is similar to the above-mentioned linked list structure, except that a plurality of nodes also have intermediate nodes linked in the linked list, and the intermediate nodes are used for associated users to submit the generated new file versions. For example, a user performs two operations on the file content of the initial file version, then performs a version submission on the file content of the initial file version, and then performs a second operation on the submitted version, please refer to fig. 5, which shows a schematic diagram of a data structure of an editor of the present application, in another embodiment, the data structure is a linked list having five nodes, as shown in the figure, the linked list structure has five nodes, including a head node 131, a first common node 132, a first intermediate node 134, a second common node 132', and a tail node 133, the head node 131 stores a version number V1 of the initial file version, operation information O1 corresponding to the first operation performed on the file content of the initial file version, an address pointer M1 of the first common node 132, which is represented as [ V1, O1, M1], the first common node 132 stores operation information O2 corresponding to the second operation, and a method for performing the second operation on the file content of the initial file version, The address pointer M2 of the first intermediate node 134 is denoted as [ M1, O2, M2], the first intermediate node 134 stores the version number V2 of the new file version generated by the first version submission and the address pointer M3 of the second common node 132 ', and is denoted as [ M2, V2, M3], the second common node 132' stores the operation information O3 corresponding to the operation behavior of three times and the address pointer M4 of the tail node 133, and is denoted as [ M3, O3, M4], and the tail node 133 stores the version number V3 of the new file version generated by the second version submission and a null address, and is denoted as [ M4, V3, null ]. The number of the common nodes and the intermediate nodes is not limited to the above example, the link mode between the nodes is not limited to the above example, and all the new file versions stored in the form of a linked list belong to the scope covered by the present application.
In yet another embodiment, the data structure is a custom structure. Here, the custom structure includes a data structure that is constructed based on a linked list, a sequence table, and the like, which can represent a tree structure, and facilitates a recovery operation. For example, the association relationship is stored as an association relationship file according to the corresponding custom structure by using the XML tag and setting the custom structure according to the data structure of the sequence table.
For an editor with multi-user cooperative operation, such as an editor configured in an online IDE development tool, when operation information and an association relationship thereof corresponding to a single user generated by the multi-user cooperative operation are abnormal under the condition that the operation information and the association relationship are not uniformly stored, the monitoring module further monitors a recovery operation behavior of the file content, and the storage module further uniformly processes and stores operation information and an association relationship thereof of each of a plurality of users stored at each user equipment side or at a server side based on the abnormal recovery operation behavior provided by the monitoring module.
The application also discloses another editor, which comprises a monitoring module and a file editing module. The editor may be the same editor as mentioned above with reference to fig. 1, or may perform the following recovery operation according to the stored operation information and association relationship. Please refer to fig. 6, which is a schematic structural diagram of another editor in an embodiment of the present application, wherein, to distinguish from the editor mentioned in fig. 1, a monitoring module and a file editing module in the editor shown in fig. 6 are respectively referred to as a second monitoring module 22 and a second file editing module 21.
The second monitoring module 22 is configured to monitor a recovery operation behavior of the user on file content of the managed file version to obtain operation information indicated by the recovery operation behavior.
The file versions managed by the user are the initial file versions and the new file versions generated by submitting the user execution versions, the operation information corresponding to the operation behaviors executed by the user is associated among the file versions, the user can execute the recovery operation behavior on the file content of any file version, and the specific meanings and structures of the operation behaviors and the operation information are as described above and are not described herein again.
The recovery operation behavior comprises at least one of recovery operation behavior generated based on user operation and recovery operation behavior generated based on file version operation exception.
In an embodiment, the resume operation behavior comprises a resume operation behavior generated based on a user operation. The recovery operation behavior generated based on the user operation means that the recovery operation behavior is a recovery operation behavior actively initiated by the user through the external input device. For example, the user operates the mouse to click the operation option returning to the previous step, and the second monitoring module 22 monitors the corresponding operation recovery behavior. Here, the user operates the mouse to click and return to the operation options of the previous two steps or return to the operation options of any one step, and the second monitoring module 22 correspondingly monitors the corresponding operation recovery behavior.
Here, the second monitoring module 22 monitors various operation options generated by the external input device through the program interface, and identifies the operation options to determine a corresponding recovery operation behavior. The external input device includes, but is not limited to, a button, a keyboard, a mouse, a touch pad, and the like.
In another embodiment, the restore operation behavior comprises a restore operation behavior generated based on a file version operation exception. The file version operation abnormity refers to abnormal conditions of power failure, dead halt, flash back, communication interruption, commit failure and the like of an editor in the process of executing operation behaviors on a file version. In one example, the second monitoring module 22 automatically checks the file version before the exception occurs and the stored operation information based on the restart operation of the editor, and generates a recovery operation behavior to recover the file content of the file document to the content at the time of the exception occurrence. In another example, the second monitoring module 22 starts an undo operation and a redo operation based on the abnormal condition of the failure of submission, so as to automatically check the file version before the occurrence of the abnormality and the stored operation information, and generate a recovery operation behavior. Here, the second monitoring module 22 determines whether a recovery operation behavior generated based on the file version operation exception is generated by monitoring the working state of the editor, and triggers the second file editing module 21 to execute a corresponding recovery operation.
In yet another embodiment, the restore operation behavior includes a restore operation behavior generated based on a user operation and a restore operation behavior generated based on a file version operation exception. For example, after the file version operation is abnormal and a recovery operation behavior is generated, the user also wants to recover the information related to any previous operation, and the second monitoring module 22 triggers the file editing module to execute a corresponding recovery operation based on the recovery operation behavior of the user.
The second file editing module 21 is configured to restore file content corresponding to a restore operation behavior based on the association relationship between the saved operation information and at least one file version, and load the restored file content in an editing environment.
The editing environment is used for providing environment parameters and configuration parameters which are suitable for the types of the file versions of different file types so that the file contents of the file versions and the restored file contents can be correctly displayed, meanwhile, a human-computer interaction interface is provided for a user, and the user can perform restoring operation behaviors on the file contents of one file version in the editing environment. Wherein, in some examples, the human-machine interface comprises: the device comprises an edit box used for displaying the file content and allowing a user to recover the file content, and operation options used for allowing the user to select recovery operation based on the file content displayed in the edit box. The edit box is used for providing text recovery operation and displaying corresponding recovered file content according to the recovery operation. In still other examples, the human-machine interface in the editing environment is a command line editing interface, and the restored file content and/or operation results are displayed by using the editing interface. For example, the editing environment provides a recovery operation mode based on the terminal mode for the user, and displays the recovered file content and/or operation results.
As described above, the file version is associated with the operation behavior and the operation information corresponding to the operation behavior, and the second file editing module 21 reads the operation information corresponding to the recovery behavior according to the association relationship based on the trigger of the second monitoring module 22.
The incidence relation is used for describing a sequential relation between the operation information determined based on the sequence of operation behaviors and/or between the operation information and at least one file version. As mentioned above, the association relationship is represented by a predetermined data structure, and for a detailed description of the data structure, reference is made to the foregoing, which is not repeated herein.
In an embodiment, taking the example that the operation information indicated by the recovery operation behavior includes file content change information corresponding to the operation behavior, the second file editing module 21 obtains an association relationship between the operation information and the current file version based on the operation information indicated by the recovery operation behavior obtained by the second monitoring module 22, and obtains file content corresponding to the recovery operation behavior according to the association relationship and loads the recovered file content in the editing environment. For example, please refer to fig. 7, which is a schematic diagram illustrating that the operation information indicated by the recovery operation behavior of another editor in an embodiment of the present application includes file content change information corresponding to the operation behavior, as shown in the figure, the file version V1, the operation information O1, the operation information O2, and the operation information O3 have an association relationship constructed according to a sequence table structure; the second file editing module restores file contents { A, F, B, C, D, E } obtained after sequential operation of the operation information O1, O2 and O3 on the basis of the operation information O2 indicated by the restoration operation behavior and the association relation, and loads the restored file contents { A, F, B, C, D, E } into an editing environment for use by a user. The data structure of the association relationship between the file version and the operation information is not limited to the illustrated example, and the second file editing module 21 may restore the file content corresponding to the recovery operation behavior according to the operation information indicated by the recovery operation behavior and the association relationship between any one of the foregoing data structure components.
In another embodiment, taking the example that the operation information indicated by the recovery operation behavior includes an operation result corresponding to the operation behavior, the second file editing module 21 is further configured to recover the operation result of the file, and load the recovered operation result in the editing environment. For example, please refer to fig. 8, which is a schematic diagram illustrating that the operation information indicated by the recovery operation behavior of another editor in another embodiment of the present application includes an operation result corresponding to the operation behavior, as shown in the figure, the file version V1, the operation information O1, and the operation information O2 have an association relationship constructed according to the foregoing sequence table structure, where the operation information O1 is to perform a keyword check on a code file, and the operation information O2 is a compiled code file; the second file editing module 21 determines that the file content is not changed according to the content recorded in the operation information O1 and O2 based on the operation information O2 indicated by the recovery behavior and the association relationship, loads the operation result of the operation information O2, i.e., the compilation result R, into the editing environment without performing compilation again, thus reducing the workload of the editor and increasing the processing speed of the editor. The data structure of the association relationship between the file version and the operation information is not limited to the illustrated example, and the second file editing module 21 may restore the corresponding operation result corresponding to the recovery operation behavior according to the operation information indicated by the recovery operation behavior and the association relationship between any one of the foregoing data structure components.
The editor may also restore the file versions of the previous time, taking the operation information indicated by the restoration operation behavior as the version number of a file version as an example, that is, the user wants to open the file version that has been submitted before, and the second monitoring module 22 is further configured to monitor the restoration operation behavior that the user executes to restore any file version, so as to obtain the file version indicated by the restoration operation behavior; and the second file editing module 21 is further configured to restore the file version and load it in the editing environment. For example, when the second monitoring module 22 monitors that the recovery operation behavior is to recover a file version with a version number V1, the second file editing module 21 loads the file version stored on the memory in the editing environment according to the version number V1.
The editor also recovers the operation under the multi-User cooperative operation, and is described by taking as an example the operation information and the association relationship thereof, which are stored with the operation behaviors of the aforementioned User1 and User2 on the file content { A, B, C, D, E } respectively, wherein the file content of the file version V1 is { A, B, C, D, E }, the operation information O1 is (P1, "add", F), and the operation information O2 is (P6, "add", G), and the file version V1, the operation information O1 and the operation information O2 have the association relationship constructed according to any one of the aforementioned data structures; the second file editing module performs operation information O2 indicated by the recovery operation behavior executed by the User1 and the incidence relation, obtains file contents of { A, F, B, C, D, E } after sequential recovery operation of the operation information O1 and O2 on the basis of the file contents of { A, B, C, D, E } of the file version V1, and loads the recovered file contents of { A, F, B, C, D, E } into an editing environment for the User1 to use. The number of users is not limited to the above example, and in other embodiments, the number of users may be more than two.
In practical applications, a user may continue to execute a recovery operation behavior after the user executes a recovery operation behavior once on the content of the current file version, or continue to execute the recovery operation behavior after the user generates the recovery operation behavior due to an abnormal operation of the file version. In this way, the monitoring module is further configured to continue to monitor the recovery operation behavior when the recovered file content is obtained; and the file editing module is also used for restoring the file of the corresponding version based on the incidence relation between the currently restored file and the operation information indicated by the restoration operation behavior. Referring to fig. 9, a schematic diagram of an editor according to another embodiment of the present application showing recovery operation behaviors including abnormal recovery and user operation recovery operation behaviors is shown, as shown in the figure, there is an association relationship between a file version V1, operation information O1, operation information O2, and operation information O3, which is constructed according to the above sequence table structure; the second monitoring module 22 monitors that a recovery operation behavior is generated due to file version abnormality, triggers the second file editing module 21 to execute a corresponding recovery operation, based on the association relationship, the second file editing module 21 recovers file contents { A, F, B, C, D, E } sequentially operated by operation information O1, O2 and O3 before abnormality on the basis of the file contents { A, B, C } of the file version V1, and loads the recovered file contents { A, F, B, C, D, E } into an editing environment; at this time, the second monitoring module 22 continues to monitor the recovery operation behavior, and the second file editing module 21 recovers the file contents { a, F, B, C } reversely operated in the reverse order by the operation information O2 and O3 based on the operation information O1 indicated by the monitored recovery operation behavior and the association relation, and loads the recovered file contents { a, F, B, C } into the editing environment for the user to use. Wherein the inverse operation refers to an operation opposite to the operation information, such as an inverse operation of deleting is adding; the data structure of the association relationship between the file version and the operation information is not limited to the illustrated example, and the second file editing module 21 may restore the file content corresponding to the recovery operation behavior according to the association relationship between the operation information indicated by the recovery operation behavior and any one of the aforementioned data structure components.
The present application further provides an editor, which can perform version management and version recovery, and includes a file editing module, a monitoring module, and a saving module, where in order to distinguish from the editors mentioned in fig. 1 and fig. 6, the monitoring module, the file editing module, and the saving module in the following editors are respectively referred to as a third monitoring module, a third file editing module, and a third saving module.
The editor executes version management operation, and the third file editing module is used for providing an editing environment for file content, wherein the file content is associated with a file version managed by the editor; the third monitoring module is used for monitoring the operation behavior of the user on the file content in the editing environment to obtain corresponding operation information; the third saving module is used for saving the operation information corresponding to the operation behavior based on the incidence relation between the file version and the operation behavior monitored by the file version.
The editor executes version recovery operation, and the third monitoring module is used for monitoring the file content recovery operation behavior of the managed file version to obtain operation information indicated by the recovery operation behavior; the third file editing module is used for recovering file contents corresponding to recovery operation behaviors based on the association relationship between the saved operation information and at least one file version, and loading the recovered file contents in an editing environment.
The specific meanings and structures of the file version, the file content, the operation behavior and the operation information are as described above, and are not described herein any further.
In an example, the monitored operation behavior is from an operation of a single user, taking a file version V1 with file content { a, B, C } as an example for explanation, the third monitoring module monitors that the user performs three operation behaviors in sequence to obtain operation information O1, O2 and O3 corresponding to the three operation behaviors, and the third saving module saves each operation information based on an association relationship between the file version V1 and the operation information O1, O2 and O3 according to any one of the aforementioned data structures; at this time, the third monitoring module monitors the file version operation abnormality, and then based on the restart operation of the editor, a recovery operation behavior is generated and the third file editing module is triggered to execute a corresponding recovery operation, based on the association relationship, the third file editing module recovers the file contents { A, F, B, C, D, E } sequentially operated by the operation information O1, O2 and O3 before the abnormality on the basis of the file contents { A, B, C, D, E } of the file version V1, and loads the recovered file contents { A, F, B, C, D, E } into an editing environment; then, the third monitoring module continues to monitor the recovery operation behavior, the third file editing module recovers the file contents { A, F, B, C } which are reversely operated in the reverse order by the operation information O2 and O3 on the basis of the operation information O1 indicated by the monitored recovery operation behavior and the association relation, and loads the recovered file contents { A, F, B, C } into the editing environment for the user to use.
In another example, the monitored operation behavior is from cooperative operation of multiple users, and is described by taking an example that a User1 and a User2 respectively operate a file version V1 with file contents { a, B, C }, a third monitoring module monitors that a User1 and a User2 execute operation behaviors in sequence to obtain operation information O1 'corresponding to the User1 and operation information O2' corresponding to the User2, and then integrates operation information O1 'and O2' generated by operations of the User1 and the User2 according to the sequence of the operation information of the User1 and the User2 on the file contents { a, B, C } to obtain operation information O1 and O2, and the third saving module saves the operation information uniformly according to any one of the foregoing data structures based on an association relationship between the file version V1 and the operation information O1 and O2; at this time, the third monitoring module monitors that the file version is abnormal in operation, and then, based on the restart operation of the editor, a recovery operation behavior is generated and the third file editing module is triggered to execute a corresponding recovery operation, based on the association relationship, the third file editing module recovers the file contents { A, F, B, C, D } sequentially operated by the operation information O1 and O2 before the abnormality on the basis of the file contents { A, B, C } of the file version V1, and loads the recovered file contents { A, F, B, C, D } into an editing environment; then, the third monitoring module continues to monitor the recovery operation behavior, the third file editing module recovers the file content { A, F, B, C } inversely operated by the operation information O2 on the basis of the operation information O1 indicated by the monitored recovery operation behavior and the association relation on the basis of the currently recovered file content { A, F, B, C, D }, and loads the recovered file content { A, F, B, C } into an editing environment for use by a User1 or a User2 executing the recovery operation behavior.
In another example, still taking the example that the User1 and the User2 respectively execute multi-User cooperative operation on the file version V1 with the file Content of { a, B, C }, the third monitoring modules respectively configured at the User equipment sides respectively monitor the operation behaviors executed by the User1 and the User2 on the file Content, and respectively obtain the operation information O1 'corresponding to the User1 and the operation information O2' corresponding to the User 2; then the third storage module configured at each User equipment side respectively stores operation information O1 'and O2' generated by the operation of the User1 and the User2 at each User equipment side; when the User1 and the User2 feed back the operation information respectively stored based on the storage instruction sent by the fourth storage module configured at the server, the fourth storage module integrates to obtain unified operation information O1 and O2 according to the sequence of the operation information of the User1 and the User2 on the file content { a, B, C }, and the fourth storage module stores each operation information based on the association relationship between the file version V1 and the operation information O1 and O2 according to any one of the aforementioned data structures. During the period, if an exception such as a failure of submission, a network communication interruption and the like occurs, the third monitoring module configured in each user equipment re-executes a saving operation based on a restart operation (or a resubmission operation and the like) of the editor where the third monitoring module is located, that is, submits operation information which is not integrated to the fourth saving module, acquires the integrated operation information and the association relation thereof, and triggers the third file editing module in the editor to execute a recovery operation, the third file editing module recovers file contents { a, F, B, C, D } which are sequentially operated by operation information O1 and O2 before the exception based on the association relation on the file contents { a, B, C } of the file version V1, and loads the recovered file contents { a, F, B, C, D } into an editing environment; furthermore, the third monitoring module configured at any one of the User devices continues to monitor the recovery operation behavior, and the third file editing module recovers the file content { a, F, B, C } inversely operated by the operation information O2 based on the operation information O1 indicated by the monitored recovery operation behavior and the association relation, and loads the recovered file content { a, F, B, C } into the editing environment for use by the User1 or the User2 performing the recovery operation behavior. The number of users is not limited to the above example, and in other embodiments, the number of users may be more than two.
Please refer to fig. 10, which is a schematic structural diagram of a version management system according to an embodiment of the present application. The structure shown in fig. 10 is used to accomplish version management and version restoration. It should be noted that, the processes executed according to the structure shown in fig. 10 are only examples, and in different application scenarios, they may be executed alone or in combination with other executed processes based on actual design requirements. For example, the version management system is a user equipment. In another example, the version management system is a server to provide version management of files for single or multiple users. For another example, the version management system includes a server and at least one user device to provide version management of files by collaboratively providing single or multiple users.
As shown in fig. 10, the version management system includes a memory 31 and a processor 32. Wherein the memory and processor may be configured in a single or multiple computer devices depending on the actual design needs of the version management system.
The memory 31 stores one or more programs. The programs include corresponding programs that are called up by a processor to perform the steps of control, analysis, etc., described later. The memory 31 includes, but is not limited to, a high speed random access memory, a non-volatile memory. Such as one or more magnetic disk storage devices, flash memory devices, or other non-volatile solid-state storage devices. In certain embodiments, memory 31 may also be, for example, a network-attached memory accessed via RF circuitry or external ports and a communication network (not shown) such as the Internet, one or more intranets, a Local Area Network (LAN), a wide area network (WLAN), a Storage Area Network (SAN), etc., or a suitable combination thereof. The memory controller may control access to the memory by other components of the device, such as the CPU and peripheral interfaces.
The memory 31 is also used to store managed file versions and data structures generated during subsequent execution of the program. In one example, the memory used to store the managed file versions and the data structures may share the same memory as the memory storing the one or more programs, and processor 32 executes the programs in memory to internally retrieve and use the managed file versions and the data structures. In another example, the memory used to store the managed file versions and the data structures and the memory storing the one or more programs are two memories that are information interactive, and the processor 32 performs version management and version restoration by executing a program call of the memory storing the programs to the data stored in the memory storing the managed file versions and the data structures. The same memory will be described later in this application, but the present invention is not limited to this memory.
The processor 32 is operatively coupled to the memory 31. More specifically, the processor 32 may execute a program stored in the memory 31 to perform operations in the version management system. As such, processor 32 may include one or more general purpose microprocessors, one or more application specific processors (ASICs), one or more field programmable logic arrays (FPGAs), or any combination thereof. The processor is also operatively coupled with an external input device that may enable a user to interact with the computing device. Thus, the external input devices may include buttons, a keyboard, a mouse, a touch pad, and the like.
In one example, the processor 32 is connected to the memory 31 and the external input device through data lines, respectively. The processor 32 interacts with the memory through a data read-write technique, and the processor 32 interacts with an external input device through an interface protocol. Wherein the data reading and writing technology includes but is not limited to: high speed/low speed data interface protocols, database read and write operations, etc. The interface protocols include, but are not limited to: HDMI interface protocol, serial interface protocol, etc.
Referring to fig. 11, which is a flowchart illustrating a version management method according to an embodiment of the present application, the processor 32 executes a version management method by calling a program stored in a memory, and the version management method includes steps S41 and S42.
In step S41, the processor 32 monitors the operation behavior of the user on a file content to obtain corresponding operation information; wherein the file content is associated with a file version managed by a user.
The file version refers to the collection of information that is saved by a user on storage in a computerized format. The file version includes a release date, a file name, data information, a file type, and a version number, the release date refers to the specific time when the user uploads the file version, the file name refers to the name of the user on the file version, the data information refers to the substantive information stored on the memory, the data information is called to display the file content corresponding to the file version, the file type refers to a special encoding mode for the data information used for storing the data information, which may be, for example, a text file, a picture file, a code file, a system file, a script file, etc., the version number being a number set for convenience of file version management, denoted as Vi, where i is represented as the ith version of the file stored on the memory, which can be directly queried by the version number of the file version. Including but not limited to high speed random access memory, non-volatile memory. Such as one or more magnetic disk storage devices, flash memory devices, or other non-volatile solid-state storage devices. In certain embodiments, the memory may also be, for example, a network-attached memory accessed via RF circuitry or external ports and a communication network (not shown), which may be the internet, one or more intranets, Local Area Networks (LANs), wide area networks (WLANs), storage local area networks (SANs), etc., or a suitable combination thereof. The memory controller may control access to the memory by other components of the device, such as the CPU and peripheral interfaces.
The association of the file content with a managed file version means that the file content is specific information generated based on a file version and presented to a user, and the file content may be initial information displayed by directly opening the file version or new information formed on the basis of the initial information. For example, directly opening a code file may display thousands of lines of program codes, where the displayed thousands of lines of program codes are file contents, and a user may debug and modify the program codes for program development, where the debugged and modified program codes are new program codes generated based on the displayed thousands of lines of program codes, and the new program codes are also file contents.
In practical applications, the user performs an operation on the content of the document through the external input device, and the processor 32 monitors various operation behaviors generated by the external input device through the program interface, and identifies the operation behaviors to determine a corresponding operation behavior, where the operation behavior includes at least one of editing the content of the document and not changing the content of the document.
In an embodiment, the operation behavior is an operation behavior of editing file content. Editing the file content means that the file content is changed. For example, the operation of adding a part of content to the file content, deleting a part of content from the file content, adjusting the sequence of the part of content in the file content, and labeling the part of content in the file content is not limited to this, and all the operation behaviors in which the file content is changed are within the scope of the operation behaviors in which the file content is edited in the present application.
In another embodiment, the operational behavior is an operational behavior that does not change in the content of the file. The operation behavior of not changing the file content means that the user operates the file content but does not change the file content. For example, in program development, a programmer needs to compile written code to convert the code into a computer executable language, lexical analysis and syntactic analysis are mainly performed in the compiling process, only error prompts and operation results are given in the analyzing process, and no change is performed on the content of the written code. For another example, the user may perform word counting and wrongly written character check on the file content of the text file, and the user performs the operation to obtain only the results of the word counting and wrongly written character check, and the file content is not different.
In yet another embodiment, the operational behavior includes both an operational behavior of editing the content of the file and an operational behavior of not changing the content of the file. For example, in program development, a programmer first compiles written code and then modifies the code according to the compilation result. For another example, the user adds new content to the text file and then performs a wrongly written word check on the new file content.
The operation information is generated based on the operation behaviors, and defines that the actions of executing the same type on the file content through the external input device in continuous time are accumulated into one operation behavior, and the corresponding operation information can be obtained by the user every time the user executes the operation behavior. The operation information comprises at least one of information used for describing operation behaviors and information related to the operation behaviors, and the operation information is recorded as Oj; where j represents the jth operation behavior.
In an embodiment, the operation information includes information for describing an operation behavior. The information describing the operation behavior comprises position information and action information. The position information is used for recording the position of an operation behavior and is marked as Pv; the action information is used for recording actions executed by each operation behavior, such as deletion, thickening and the like. Taking the file content as { A, B, C, D, E } as an example, for example, if the processor 32 first monitors to thicken the character a located at the P1-th position in the file content, the obtained operation information O1 is (P1, "thickened"), and then the processor 32 monitors to compile ALL the file contents, the obtained operation information O2 is (ALL, "compiled"), where both pieces of operation information are information for describing the operation behavior.
In another embodiment, the operation information includes information related to the operation behavior, and the information related to the operation behavior includes file content change information corresponding to the operation behavior or an operation result corresponding to the operation behavior. In an example, the operation behavior is an operation behavior for editing file content, and the information related to the operation behavior is file content change information corresponding to the operation behavior. Taking the file content as { A, B, C, D, E } as an example for explanation, for example, if the processor 32 monitors that the operation behavior performed by the user is to add a character F after the character E in the file content, the corresponding file content change information is the character F; in another example, the operation behavior is an operation behavior without changing the content of the file, and the information related to the operation behavior is an operation result corresponding to the operation behavior. For example, if the processor 32 monitors that the file content { A, B, C, D, E } is compiled, the information related to the operation behavior is a compilation result obtained by compiling the file content { A, B, C, D, E }.
In another embodiment, in order to accommodate multiple operation behaviors and information related to the operation behaviors, the operation information describes the information describing the operation behaviors and the information related to the operation behaviors by using a preset tag structure, so that the information related to the operation behaviors is in one-to-one correspondence with the operation behaviors in the operation information. Wherein the tag structure may be defined using XML tags or custom tag structures that are recognizable by an editor. For example, if the processor 32 first monitors that a character a located at the P1 th position in the file content is added with a character F, the obtained operation information O1 is (P1 "add", F), then the processor 32 monitors that an operation behavior of deleting a character E located at the P6 th position in the operated file content is performed, the obtained operation information O2 is (P6, "delete", E), and then the processor 32 monitors that an operation behavior of compiling ALL the operated file content is performed, and then the obtained operation information O3 is (ALL, "compile", R), where R is a compilation result.
In practical applications, the file version is located in the memory 31 of the server, and in order to enable efficient cooperative work, a plurality of users may all download the same file version from the server to obtain the file content of the file version, and then perform operation on the file content of the file version by their own labor. In view of this, the operational behavior monitored by the processor 32 comes from the cooperative operation of multiple users.
The processor 32 monitors the cooperative operation behavior of the multiple users on the same file content to obtain operation information of each user based on the respective presented file content, and integrates the operation information generated by the multiple cooperative operations to obtain unified operation information according to the sequence of the operation information of each user on the same file content. For example, the operation behaviors of the User1 and the User2 on the file content { A, B, C, D, E } are respectively explained, the processor 32 monitors that the User1 executes the operation behavior of adding a character F after a character a on the file content { A, B, C, D, E } to obtain the operation information of the User1 as (P1, "add", F), the processor 32 also monitors that the User2 executes the operation behavior of adding a character G after a character E on the file content { A, B, C, D, E } to obtain the operation information of the User2 as (P5, "add", G), and the processor 32 integrates the operation information of the User1 and the operation information of the User2 into one User operation information. Therefore, taking the User1 as a reference User, the monitoring module 12 considers that the operation behavior of the User2 is based on the User1, that is, the operation behavior of the User1 on the file content { A, B, C, D, E } is processed into operation information (P1, "add", F), and at this time, the corresponding file content is { A, F, B, C, D, E }; and processing the operation behavior of the User2 on the file content { A, F, B, C, D, E } into operation information (P6, "add", G), so that the file content after two operations is { A, F, B, C, D, E, G }. Taking the User2 as a reference User, the monitoring module 12 considers that the operation behavior of the User1 is based on the User2, that is, the operation behavior of the User2 on the file content { A, B, C, D, E } is processed into operation information (P5, "add", G), and at this time, the corresponding file content is { A, B, C, D, E, G }; and processing the operation behavior of the file content { A, B, C, D, E, G } by the User2 into operation information (P1, "Add", F) so that the file content after two operations is { A, F, B, C, D, E, G }.
The number of the users is not limited to the above example, and the integration manner of the operation information of each user is not limited to the above example, and all the integration of the operation information of the cooperative operation of multiple users into the operation information based on one user belongs to the scope covered by the present application.
In step S42, the processor saves operation information corresponding to the operation behavior based on the association relationship between the file version and the monitored operation behavior. Here, the operation information acquired by the processor may be from a local program interface or may be acquired from the user equipment side through a network interface.
The association relationship between the file version and the monitored operation behavior means that the object of the monitored operation behavior is the file content of the file version, as described above, a user can perform multiple operation behaviors on the file content of the file version, each operation behavior corresponds to one piece of operation information, the processor 32 stores each piece of operation information corresponding to each operation behavior in the memory 31, and the memory 31 is described as above and is not described herein again. For example, the processor 32 sequentially saves operation information generated in accordance with the operation behavior in a log form.
The processor 32 stores the operation information by using a preset data structure for describing the association relationship, where the data structure includes, but is not limited to, a sequence table, a linked list, or a custom data structure.
In an embodiment, the data structure is a sequence table, the sequence table includes version numbers of file versions and operation information corresponding to multiple operation behaviors performed by a user, and the sequence table may be denoted as [ Vi, O1, O2, …, Oj ], where the version numbers of file versions and the operation information are sequentially stored in consecutive storage units reserved on the memory 31. As shown in fig. 2, taking the file version as the initial file version V1 and the user performs four operation actions as an example, the sequence table may represent [ V1, O1, O2, O3, O4 ].
In another embodiment, the data structure is a linked list, the linked list is composed of a plurality of nodes, each node is a storage unit randomly dispersed on the memory 31, each node is realized by an address pointer link order in the linked list, the plurality of nodes include a head node, a plurality of common nodes and a tail node, the head node is a start node of the linked list and is used for being associated with a file version, the common nodes are link nodes of the linked list, each common node stores operation information corresponding to each operation behavior, and the tail node is a stop node of the linked list and is used for indicating that the linked list is no longer continuously linked. Taking the three-time operation behavior performed by the user as an example, as shown in fig. 3, the head node 131 stores a version number V1 of a file version or an address pointer indicating a V1 version, operation information O1 corresponding to a first time operation behavior performed on the file content of the file version, an address pointer M1 of a first common node, denoted as [ V1, O1, M1], the first common node 132 stores operation information O2 corresponding to a second time operation behavior, an address pointer M2 of a tail node, denoted as [ M1, O2, M2], the tail node 133 stores operation information O3 corresponding to a third time operation behavior and a null address, denoted as [ M2, O3, null ], wherein the head node 131 is linked to the first common node 132 through the address pointer M1 of the first common node 132, the first common node 132 is linked to the tail node 133 through the address pointer M2 of the tail node 133, thereby forming a linked list. The number of the common nodes is not limited to the above example, and the link mode between the nodes is not limited to the above example, and all the operation information corresponding to the operation behavior stored in the form of a linked list all belong to the scope covered by the present application.
In yet another embodiment, the data structure is a custom structure. Here, the custom structure includes a data structure that is constructed based on a linked list, a sequence table, and the like, which can represent a tree structure, and facilitates a recovery operation. For example, the association relationship is stored as an association relationship file according to the corresponding custom structure by using the XML tag and setting the custom structure according to the data structure of the sequence table.
For an editor with multi-user cooperative operation, such as an editor configured in an online IDE development tool, when abnormality occurs in operation information and association relation thereof corresponding to a single user generated by the multi-user cooperative operation under the condition of non-uniform storage, the processor also monitors recovery operation behavior of file content, and uniformly processes and stores operation information and association relation thereof of a plurality of users stored at the side of each user device or at the server side in a memory based on the abnormal recovery operation behavior provided by the monitoring module.
It should be noted that, in the process of performing operation action on the file content of the file version by the user, version submission may be performed on the file version to form a new file version so that the new file version is stored on the storage 31. In view of this, the processor 32 is further configured to monitor an operation behavior of a user for performing version submission to obtain a new file version; and the storage module is also used for storing the new file version based on the operation behaviors and the operation information thereof monitored before and the incidence relation between the new file versions. In fact, a user can execute multiple versions to submit to form multiple new file versions in the process of performing an operation behavior, in this application, a file version on which the user first executes the operation behavior is referred to as an initial file version, a version number of the initial file version is referred to as V1, a version number of a new file version formed by submitting the version every time is referred to as Vi, where i is a natural number greater than 1.
In order to describe the association between the initial file version, the multiple operation behavior and the operation information thereof, and each new file version, the processor 32 saves each new file version by using a preset data structure for describing the association relationship.
In an embodiment, the data structure is a sequence table, the sequence table includes a version number of an initial file version, operation information corresponding to a plurality of operation behaviors performed by a user, and a version number of a new file version, and the sequence table may be denoted as [ V1, O1, O2, …, Oj, V2, O1, O2, …, Oj, V3, … Vi ], where the version number of the file version, the operation information, and the version number of the new file version are sequentially stored in consecutive storage units reserved on the memory 31. As shown in fig. 4, taking as an example that a user performs operation actions twice on the file content of the initial file version and then performs version commit, and then performs operation actions twice on the committed version and then performs version commit, the sequence table may represent [ V1, O1, O2, V2, O1, O2, V3 ].
In another embodiment, the data structure adopts a linked list, and the linked list structure is similar to the above-mentioned linked list structure, except that a plurality of nodes also have intermediate nodes linked in the linked list, and the intermediate nodes are used for associated users to submit the generated new file versions. To illustrate that a user performs two operations on the file content of the initial file version and then performs a second operation on the submitted version, as shown in fig. 5, the head node 131 stores a version number V1 of the initial file version, operation information O1 corresponding to the first operation on the file content of the initial file version, and an address pointer M1 of the first normal node 132, which are denoted as [ V1, O1, M1], the first normal node 132 stores operation information O2 corresponding to the second operation, an address pointer M2 of the first intermediate node 134, which is denoted as [ M1, O2, M2], the first intermediate node 134 stores a version number V2 of the new file version generated by the first version submission and an address pointer M3 of the second normal node 132', which is denoted as [ M2, v2, M3], the second ordinary node 132' stores operation information O3 corresponding to the three operation behaviors and an address pointer M4 of the tail node 133, denoted as [ M3, O3, M4], and the tail node 133 stores a version number V3 and an empty address of a new file version generated by the second version submission, denoted as [ M4, V3, null ]. The number of the common nodes and the intermediate nodes is not limited to the above example, the link mode between the nodes is not limited to the above example, and all the new file versions stored in the form of a linked list belong to the scope covered by the present application.
In yet another embodiment, the data structure is a custom structure. Here, the custom structure includes a data structure that is constructed based on a linked list, a sequence table, and the like, which can represent a tree structure, and facilitates a recovery operation. For example, the association relationship is stored as an association relationship file according to the corresponding custom structure by using the XML tag and setting the custom structure according to the data structure of the sequence table.
The processor 32 also performs a version recovery method by calling the program stored in the memory 31. Referring to fig. 12, a flowchart of a version recovering method according to an embodiment of the present application is shown, where the version recovering method includes steps S51 and S52.
In step S51, the processor 32 monitors the recovery operation behavior for the managed file to obtain operation information indicated by the recovery operation behavior.
The managed file versions are multiple new file versions generated by submitting the initial file version and the user-executed version as described above, the operation information corresponding to the operation behavior executed by the user is associated among the file versions, the user can execute the recovery operation behavior on the file content of any file version, and the specific meaning and structure of the operation behavior and the operation information are as described above and are not described herein again.
The recovery operation behavior comprises at least one of recovery operation behavior generated based on user operation and recovery operation behavior generated based on file version operation exception.
In an embodiment, the resume operation behavior comprises a resume operation behavior generated based on a user operation. The recovery operation behavior generated based on the user operation means that the recovery operation behavior is a recovery operation behavior actively initiated by the user through the external input device. For example, the user operates the mouse to click the operation option of the previous step, and the processor 32 monitors the corresponding operation recovery behavior. Here, the user operates the mouse to click the operation option returning to the previous two steps or the operation option returning to any one step, and the processor 32 correspondingly monitors the corresponding operation recovery behavior.
Here, the processor 32 monitors various operation options generated by the external input device through the program interface, and identifies the operation options to determine the corresponding recovery operation behavior.
In another embodiment, the restore operation behavior comprises a restore operation behavior generated based on a file version operation exception. The file version operation abnormity refers to abnormal conditions of power failure, dead halt, flash back, communication interruption, commit failure and the like of an editor in the process of executing operation behaviors on a file version. In one example, the processor 32 automatically checks the file version before the occurrence of the abnormality and the stored operation information based on a restart operation of the editor, and generates a restore operation behavior to restore the file contents of the file document to the contents at the time of the occurrence of the abnormality. In another example, the second monitoring module 22 starts an undo operation and a redo operation based on the abnormal condition of the failure of submission, so as to automatically check the file version before the occurrence of the abnormality and the stored operation information, and generate a recovery operation behavior. Here, the processor 32 determines whether or not a recovery operation behavior generated based on an abnormal operation of the file version is generated by monitoring the operating state of the editor, and performs a corresponding recovery operation.
In yet another embodiment, the restore operation behavior includes a restore operation behavior generated based on a user operation and a restore operation behavior generated based on a file version operation exception. For example, after the recovery operation behavior is generated due to an abnormal operation of the file version, the user also wants to recover the information related to any previous operation, and the processor 32 executes the corresponding recovery operation based on the recovery operation behavior of the user.
In step S52, the processor 32 restores the file content of the corresponding version based on the association relationship between the saved operation information and at least one file version.
As described above, the file version is associated with the operation behavior and the operation information corresponding to the operation behavior, and the processor 32 reads the operation information corresponding to the recovery behavior according to the association relationship.
The incidence relation is used for describing a sequential relation between the operation information determined based on the sequence of operation behaviors and/or between the operation information and at least one file version. As mentioned above, the association relationship is represented by a predetermined data structure, and for a detailed description of the data structure, reference is made to the foregoing, which is not repeated herein.
In an embodiment, taking the example that the operation information indicated by the recovery operation behavior includes file content change information corresponding to the operation behavior, the processor 32 obtains an association relationship between the operation information and the current file version based on the operation information indicated by the recovery operation behavior, and obtains file content corresponding to the recovery operation behavior according to the association relationship. For example, as shown in fig. 7, there is an association relationship constructed according to the sequential table structure between the file version V1, the operation information O1, the operation information O2, and the operation information O3; the processor 32 restores the file contents { a, F, B, C, D, E } obtained after the sequential operations by the operation information O1, O2 and O3, on the basis of the operation information O2 indicated by the restoration operation behavior and the association relation, on the file contents { a, B, C } of the file version V1. The data structure of the association relationship between the file version and the operation information is not limited to the illustrated example, and the processor 32 may restore the file content corresponding to the recovery operation behavior according to the association relationship between the operation information indicated by the recovery operation behavior and any one of the aforementioned data structure components.
In another embodiment, taking the example that the operation information indicated by the recovery operation behavior includes an operation result corresponding to the operation behavior, the processor 32 is further configured to recover the operation result of the file. For example, as shown in fig. 8, there is an association relationship between the file version V1, the operation information O1, and the operation information O2, which is constructed according to the aforementioned sequence table structure, where the operation information O1 is a keyword check on a code file, and the operation information O2 is a compiled code file; the processor 32 determines that the file content is not changed according to the content recorded in the operation information O1 and O2 based on the operation information O2 indicated by the restoration behavior and the association relationship, and the second file editing module 21 restores the compilation result R, which is the operation result of the operation information O2, without performing a compilation again, thereby reducing the workload of the processor 32 and increasing the processing speed of the processor 32. The data structure of the association relationship between the file version and the operation information is not limited to the example shown, and the processor 32 may restore the corresponding operation result corresponding to the recovery operation behavior according to the association relationship between the operation information indicated by the recovery operation behavior and any one of the aforementioned data structure components.
The processor 32 may also restore the file versions in the past, taking the operation information indicated by the restoration operation behavior as the version number of a file version as an example, that is, the user wants to open the file version that has been submitted before, and the processor 32 also monitors the restoration operation behavior of the user for executing the restoration file version to obtain the file version indicated by the restoration operation behavior; and restoring the file version. For example, when the processor 32 monitors that the recovery operation behavior is to recover the file version with the version number V1, the processor 32 recovers the file version stored in the memory 31 according to the version number V1.
The processor 32 further restores the operation under the multi-User cooperative operation, and takes as an example the operation information and the association relationship thereof for storing the operation behavior of the aforementioned User1 and User2 on the file content { A, B, C, D, E } respectively, where the file content of the file version V1 is { A, B, C, D, E }, the operation information O1 is (P1, "add", F), and the operation information O2 is (P6, "add", G), and the file version V1, the operation information O1, and the operation information O2 have an association relationship constructed according to any one of the aforementioned data structures; the second file editing module performs operation information O2 indicated by the recovery operation behavior executed by the User1 and the incidence relation, obtains file contents of { A, F, B, C, D, E } after sequential recovery operation of the operation information O1 and O2 on the basis of the file contents of { A, B, C, D, E } of the file version V1, and loads the recovered file contents of { A, F, B, C, D, E } into an editing environment for the User1 to use. The number of users is not limited to the above example, and in other embodiments, the number of users may be more than two.
In practical applications, a user may continue to execute a recovery operation behavior after the user executes a recovery operation behavior once on the content of the current file version, or continue to execute the recovery operation behavior after the user generates the recovery operation behavior due to an abnormal operation of the file version. In this way, the processor 32 is further configured to monitor a recovery operation behavior when the recovered file content is obtained, and recover the file content of the corresponding version based on the association relationship between the currently recovered file and the operation information indicated by the recovery operation behavior. As shown in fig. 9, there is an association relationship constructed according to the foregoing sequential table structure between the file version V1, the operation information O1, the operation information O2, and the operation information O3; the processor 32 executes corresponding recovery operation after monitoring that the file version is abnormal and generating a recovery operation behavior, and the processor 32 recovers the file contents { A, F, B, C, D, E } sequentially operated by the operation information O1, O2 and O3 before the abnormality on the basis of the file contents { A, B, C } of the file version V1 based on the association relation; at this time, the processor 32 continues to monitor the recovery operation behavior, and recovers the file contents { a, F, B, C } which are reversely operated in the reverse order by the operation information O2 and O3 on the basis of the currently recovered file contents { a, F, B, C, D, E } and the association relation, based on the operation information O1 indicated by the monitored recovery operation behavior. Wherein the inverse operation refers to an operation opposite to the operation information, such as an inverse operation of deleting is adding; the data structure of the association relationship between the file version and the operation information is not limited to the illustrated example, and the processor 32 may restore the file content corresponding to the recovery operation behavior according to the association relationship between the operation information indicated by the recovery operation behavior and any one of the aforementioned data structure components.
The present application also discloses a computer device readable storage medium storing a computer program for executing a version management method, the computer program of the version management method participating in a method for executing version management when being called, and the method of version management can refer to fig. 11 and the related description related to fig. 11; or the readable storage medium stores a computer program for executing the version recovery method, where the computer program of the version recovery method participates in executing the version recovery method when being called, and for the version recovery method, reference may be made to fig. 12 and the related description of fig. 12, and details are not repeated here.
It should be noted that, through the above description of the embodiments, those skilled in the art can clearly understand that part or all of the present application can be implemented by software and combined with necessary general hardware platform. With this understanding, the storage medium stores at least one program that, when invoked, performs any of the methods described above. With this understanding in mind, the technical solutions of the present application and/or portions thereof that contribute to the prior art may be embodied in the form of a software product that may include one or more machine-readable media having stored thereon machine-executable instructions that, when executed by one or more machines such as a computer, network of computers, or other electronic devices, may cause the one or more machines to perform operations in accordance with embodiments of the present application. For example, each step in the positioning method of the robot is performed. The machine-readable medium may include, but is not limited to, floppy diskettes, optical disks, CD-ROMs (compact disc-read only memories), magneto-optical disks, ROMs (read only memories), RAMs (random access memories), EPROMs (erasable programmable read only memories), EEPROMs (electrically erasable programmable read only memories), magnetic or optical cards, flash memory, or other type of media/machine-readable medium suitable for storing machine-executable instructions. The storage medium may be located in a server or a third-party server, for example, in an aristo service system. The application is operational with numerous general purpose or special purpose computing system environments or configurations. For example: mainframe computers, distributed computing environments that include any of the above systems or devices, and the like. The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
As described above, according to the version management method and recovery method, the editor, the system, and the storage medium disclosed in the present application, the file version of any operation behavior can be recovered by associating the operation behavior of the user on the file with the file version and storing the operation information corresponding to the operation behavior, which is helpful for the user to modify and manage the file, reduces the workload of the user, and avoids the irreparable loss caused by the file loss.
Based on the technical frameworks reflected by the examples described in the version management method, the version recovery method, the editor, the system and the storage medium, the following technical solutions are disclosed in the present application:
1. a version management method, comprising: monitoring the operation behavior of a user on the content of a file to obtain corresponding operation information; wherein the file content is associated with a user-managed version of the file; and saving operation information corresponding to the operation behaviors based on the association relationship between the file version and the monitored operation behaviors.
2. The version management method according to embodiment 1, wherein the operation behavior includes at least one of: editing the operation behavior of the file content without changing the operation behavior of the file content.
3. The version management method according to embodiment 1, wherein the operation information includes at least one of: information for describing an operational behavior, information related to the operational behavior.
4. The version management method according to embodiment 3, wherein the information relating to the operation behavior includes: file content change information corresponding to the operation behavior or an operation result corresponding to the operation behavior.
5. The version management method according to embodiment 1, wherein the step of saving each operation information based on the association relationship between the managed file version and the monitored operation behavior thereof includes: and storing each operation information by using a preset data structure for describing the association relation.
6. The version management method according to embodiment 5, wherein the data structure includes any one of: sequence list, linked list, and custom data structure.
7. The version management method according to embodiment 1, wherein the monitored operation behavior is from cooperative operation of a plurality of users.
8. The version management method according to embodiment 1, further comprising monitoring an operation behavior of a user for version submission to obtain a new file version; and saving the new file version based on the operation behavior and the operation information thereof monitored before and the incidence relation between the new file versions.
9. The version management method according to embodiment 1, wherein the file version is a code file.
10. A version recovery method, comprising: monitoring a recovery operation behavior of the managed file to obtain operation information indicated by the recovery operation behavior; and restoring the file content of the corresponding version based on the association relationship between the saved operation information and at least one file version.
11. The version recovery method according to embodiment 10, wherein the recovery operation behavior includes any one of: the recovery operation behavior generated based on user operation and the recovery operation behavior generated based on file version operation exception.
12. The version recovery method according to embodiment 10, wherein the operation information includes at least one of: information for describing an operational behavior, information related to the operational behavior.
13. The version recovery method according to embodiment 12, wherein the information relating to the operation behavior includes: file content change information corresponding to an operation behavior, or an operation result corresponding to an operation behavior.
14. The version recovery method according to embodiment 13, wherein when the indicated operation information includes an operation result corresponding to the operation behavior; correspondingly, the version recovery method further comprises the following steps: and recovering the operation result of the file.
15. The version recovery method according to embodiment 10, wherein the association is used to describe a sequential relationship between the operation information and/or between the operation information and at least one file version determined based on a sequence of operation behaviors.
16. The version recovery method according to embodiment 15, wherein the association relationship is represented by a predetermined data structure.
17. The version recovery method according to embodiment 16, wherein the data structure includes any one of: sequence list, linked list, and custom data structure.
18. The version recovery method according to embodiment 10, further comprising: and when the restored file content is obtained, monitoring the restoration operation behavior, and restoring the file content of the corresponding version based on the incidence relation between the current restored file and the operation information indicated by the restoration operation behavior.
19. The version restoring method according to embodiment 10, wherein the file of the restored version is a code file.
20. The version recovery method according to embodiment 10, further comprising: monitoring a recovery operation behavior of a user for executing a recovery file version to obtain a file version indicated by the recovery operation behavior; and restoring the file version.
21. An editor, comprising: the file editing module is used for providing an editing environment for file contents; wherein the file content is associated with a managed file version; the monitoring module is used for monitoring the operation behavior of the user on the file content in the editing environment to obtain corresponding operation information; and the storage module is used for storing the operation information corresponding to the operation behaviors based on the association relationship between the file version and the monitored operation behaviors.
22. The editor of embodiment 21 wherein the operational behavior comprises at least one of: editing the operation behavior of the file content without changing the operation behavior of the file content.
23. The editor of embodiment 21, wherein the operational information comprises at least one of: information for describing an operational behavior, information related to the operational behavior.
24. The editor of embodiment 23 wherein the information related to operational behavior comprises: file content change information corresponding to the operation behavior or an operation result corresponding to the operation behavior.
25. The editor of embodiment 21, wherein the saving module is configured to save each operation information by using a preset data structure for describing the association relationship.
26. The editor of embodiment 25 wherein the data structure comprises any of: linked list, custom data structure.
27. The editor of embodiment 25 wherein the operational behavior monitored by the monitoring module is from a collaborative operation of a plurality of users.
28. The editor of embodiment 21, wherein the monitoring module is further configured to monitor an operation performed by a user for version submission to obtain a new file version; and the storage module is also used for storing the new file version based on the operation behaviors and the operation information thereof monitored before and the incidence relation between the new file versions.
29. The editor of embodiment 21 wherein the file version is a code file.
30. An editor, comprising: the monitoring module is used for monitoring the file content recovery operation behavior of the managed file version to obtain operation information indicated by the recovery operation behavior; and the file editing module is used for recovering the file content corresponding to the recovery operation behavior based on the association relationship between the saved operation information and at least one file version, and loading the recovered file content in an editing environment.
31. The editor of embodiment 30 wherein the resume operation behavior comprises any of: the recovery operation behavior generated based on user operation and the recovery operation behavior generated based on file version operation exception.
32. The editor of embodiment 30 wherein the operational information includes at least one of: information for describing an operational behavior, information related to the operational behavior.
33. The editor of embodiment 32 wherein the information related to operational behavior comprises: file content change information corresponding to an operation behavior, or an operation result corresponding to an operation behavior.
34. The editor of embodiment 33 wherein when the indicated operational information includes an operational result corresponding to the operational behavior; correspondingly, the file editing module is further configured to restore the operation result of the file and load the restored operation result in the editing environment.
35. The editor of embodiment 30, wherein the association is used to describe a sequential relationship between the operation information and/or between the operation information and at least one file version determined based on the sequence of operation behaviors.
36. The editor of embodiment 35 wherein the relationship is represented by a predetermined data structure.
37. The editor of embodiment 36 wherein the data structure comprises any of: linked list, custom data structure.
38. The editor of embodiment 30 wherein the monitoring module is further configured to continue monitoring recovery operations when the recovered file content is obtained; and the file editing module is also used for restoring the file of the corresponding version based on the incidence relation between the currently restored file and the operation information indicated by the restoration operation behavior.
39. The editor of embodiment 30 wherein the file version of the restored version is a code file.
40. The editor of embodiment 30, wherein the monitoring module is further configured to monitor a recovery operation behavior performed by a user to recover any file version, so as to obtain the file version indicated by the recovery operation behavior; and the file editing module is also used for recovering the file version and loading the file version in the editing environment.
41. An editor, comprising: an editor as in any one of embodiments 21-29 and an editor as in any one of embodiments 30-40.
42. A version management system, comprising: a memory for storing at least one program; a processor configured to invoke the at least one program and coordinate the memory to perform the version management method according to any one of embodiments 1-9 and/or the version restore method according to any one of embodiments 10-20.
43. A computer-device-readable storage medium in which a computer program for executing a version management method is stored, the computer program, when executed, implementing the version management method according to any one of embodiments 1 to 9; and/or a computer program stored thereon for executing the version restoring method, which when executed implements the version restoring method described in any one of embodiments 10 to 20.
The above embodiments are merely illustrative of the principles and utilities of the present application and are not intended to limit the application. Any person skilled in the art can modify or change the above-described embodiments without departing from the spirit and scope of the present application. Accordingly, it is intended that all equivalent modifications or changes which can be made by those skilled in the art without departing from the spirit and technical concepts disclosed in the present application shall be covered by the claims of the present application.

Claims (10)

1. A version management method, comprising:
monitoring the operation behavior of a user on the content of a file to obtain corresponding operation information; wherein the file content is associated with a user-managed version of the file;
and saving operation information corresponding to the operation behaviors based on the association relationship between the file version and the monitored operation behaviors.
2. The version management method of claim 1, wherein the operational behavior comprises at least one of: editing the operation behavior of the file content without changing the operation behavior of the file content.
3. The version management method according to claim 1, wherein the operation information includes at least one of: information for describing an operational behavior, information related to the operational behavior.
4. The version management method according to claim 3, wherein the information related to the operation behavior comprises: file content change information corresponding to the operation behavior or an operation result corresponding to the operation behavior.
5. A version recovery method, comprising:
monitoring a recovery operation behavior of the managed file to obtain operation information indicated by the recovery operation behavior;
and restoring the file content of the corresponding version based on the association relationship between the saved operation information and at least one file version.
6. An editor, comprising:
the file editing module is used for providing an editing environment for file contents; wherein the file content is associated with a managed file version;
the monitoring module is used for monitoring the operation behavior of the user on the file content in the editing environment to obtain corresponding operation information;
and the storage module is used for storing the operation information corresponding to the operation behaviors based on the association relationship between the file version and the monitored operation behaviors.
7. An editor, comprising:
the monitoring module is used for monitoring the file content recovery operation behavior of the managed file version to obtain operation information indicated by the recovery operation behavior;
and the file editing module is used for recovering the file content corresponding to the recovery operation behavior based on the association relationship between the saved operation information and at least one file version, and loading the recovered file content in an editing environment.
8. An editor, comprising: an editor as claimed in claim 6, and an editor as claimed in claim 7.
9. A version management system, comprising:
a memory for storing at least one program;
a processor for invoking said at least one program and coordinating said memory to perform a version management method as claimed in any one of claims 1 to 4 and/or a version restore method as claimed in claim 5.
10. A computer-device-readable storage medium, characterized in that a computer program for executing a version management method is stored, which computer program, when executed, implements the version management method according to any one of claims 1-4; and/or a computer program stored thereon for performing a version recovery method, which computer program, when executed, implements the version recovery method as claimed in claim 5.
CN201910656559.2A 2019-07-19 2019-07-19 Version management method, version recovery method, editor, system and storage medium Pending CN111078269A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910656559.2A CN111078269A (en) 2019-07-19 2019-07-19 Version management method, version recovery method, editor, system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910656559.2A CN111078269A (en) 2019-07-19 2019-07-19 Version management method, version recovery method, editor, system and storage medium

Publications (1)

Publication Number Publication Date
CN111078269A true CN111078269A (en) 2020-04-28

Family

ID=70310101

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910656559.2A Pending CN111078269A (en) 2019-07-19 2019-07-19 Version management method, version recovery method, editor, system and storage medium

Country Status (1)

Country Link
CN (1) CN111078269A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111897567A (en) * 2020-07-06 2020-11-06 上海泛微网络科技股份有限公司 Code version management method and device
CN113535682A (en) * 2021-07-23 2021-10-22 中信银行股份有限公司 Data version management system, method, device and storage medium
CN116467037A (en) * 2023-06-09 2023-07-21 成都融见软件科技有限公司 Graphic user interface work state recovery method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1786942A (en) * 2005-12-02 2006-06-14 无锡永中科技有限公司 Saving method for file editing environment and return method thereof
CN102073554A (en) * 2009-11-24 2011-05-25 新奥特(北京)视频技术有限公司 Method and device for recovering files closed abnormally
CN102339321A (en) * 2011-11-09 2012-02-01 上海盛霄云计算技术有限公司 Network file system with version control and method using same
US20190147048A1 (en) * 2017-11-14 2019-05-16 Microsoft Technology Licensing, Llc Responding to requests by tracking file edits

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1786942A (en) * 2005-12-02 2006-06-14 无锡永中科技有限公司 Saving method for file editing environment and return method thereof
CN102073554A (en) * 2009-11-24 2011-05-25 新奥特(北京)视频技术有限公司 Method and device for recovering files closed abnormally
CN102339321A (en) * 2011-11-09 2012-02-01 上海盛霄云计算技术有限公司 Network file system with version control and method using same
US20190147048A1 (en) * 2017-11-14 2019-05-16 Microsoft Technology Licensing, Llc Responding to requests by tracking file edits

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111897567A (en) * 2020-07-06 2020-11-06 上海泛微网络科技股份有限公司 Code version management method and device
CN113535682A (en) * 2021-07-23 2021-10-22 中信银行股份有限公司 Data version management system, method, device and storage medium
CN113535682B (en) * 2021-07-23 2024-05-17 中信银行股份有限公司 Data version management system, method, device and storage medium
CN116467037A (en) * 2023-06-09 2023-07-21 成都融见软件科技有限公司 Graphic user interface work state recovery method
CN116467037B (en) * 2023-06-09 2023-09-22 成都融见软件科技有限公司 Graphic user interface work state recovery method

Similar Documents

Publication Publication Date Title
Bronevetsky et al. Automated application-level checkpointing of MPI programs
US7398514B2 (en) Test automation stack layering
EP3435235A1 (en) Method and device for executing data recovery operation
CN111078269A (en) Version management method, version recovery method, editor, system and storage medium
JP5123291B2 (en) Generic interface for deep embedding of expression trees in programming languages
CN111930489B (en) Task scheduling method, device, equipment and storage medium
CN115617327A (en) Low code page building system, method and computer readable storage medium
US8543975B2 (en) Behavior-first event programming model
CN111796855B (en) Incremental version updating method and device, storage medium and computer equipment
US20050268281A1 (en) Portable annotated merge model and methods of using the same
CN116088846A (en) Processing method, related device and equipment for continuous integrated code format
CN102073554A (en) Method and device for recovering files closed abnormally
Biernacki et al. A dynamic continuation-passing style for dynamic delimited continuations
CN111400128B (en) Log management method and device, computer equipment and storage medium
WO2023168875A1 (en) Method and apparatus for starting model service, and device, medium and product
Vidal From reversible computation to checkpoint-based rollback recovery for message-passing concurrent programs
Scott Methods of network analysis
CN117687681B (en) Version management method and system for low-code application
Wordsworth The CICS application programming interface definition
CN112015560A (en) Device for constructing IT infrastructure
Wong Validation of HOL proofs by proof checking
Pollack et al. What Is Dynamic SQL?
Stutsman et al. Toward Common Patterns for Distributed, Concurrent,{Fault-Tolerant} Code
Singh et al. Accelerating Model Training: Performance Antipatterns Eliminator Framework
CN114265629A (en) Method for finally unifying distributed transactions

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200428