CN116594669A - Version management method - Google Patents
Version management method Download PDFInfo
- Publication number
- CN116594669A CN116594669A CN202310410147.7A CN202310410147A CN116594669A CN 116594669 A CN116594669 A CN 116594669A CN 202310410147 A CN202310410147 A CN 202310410147A CN 116594669 A CN116594669 A CN 116594669A
- Authority
- CN
- China
- Prior art keywords
- version
- management object
- user
- management
- object version
- 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
Links
- 238000007726 management method Methods 0.000 title claims abstract description 183
- 238000000034 method Methods 0.000 claims abstract description 27
- 238000012217 deletion Methods 0.000 claims description 20
- 230000037430 deletion Effects 0.000 claims description 20
- 238000010586 diagram Methods 0.000 claims description 16
- 230000004048 modification Effects 0.000 claims description 13
- 238000012986 modification Methods 0.000 claims description 13
- 238000004064 recycling Methods 0.000 claims description 4
- 230000008569 process Effects 0.000 description 8
- 230000008859 change Effects 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- 230000003044 adaptive effect Effects 0.000 description 1
- 238000011084 recovery Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The application relates to the technical field of computers, and provides a version management method, which comprises the following steps: checking version reference information of the management object version according to an update instruction of the management object version; judging whether the management object version currently has user reference according to the version reference information; when the user reference condition does not exist, the management object version is directly updated; and when the user reference condition exists, copying the copy of the management object version, feeding back the copy to the user for updating, and establishing a version father-son relationship by taking the copy as a child version of the management object version. By adopting the method, the management efficiency can be improved.
Description
Technical Field
The application belongs to the technical field of computers, and particularly relates to a version management method.
Background
The version is a snapshot of each state of the specific object, the task of version management is to record and maintain the history evolution process of the object, and a proper object version is selected according to the actual application scene. Version management mainly comprises functions of version generation, version updating, version deletion, rollback and the like. And, it is necessary to uniformly and cooperatively manage each version, effectively record the evolution process of different versions and effectively manage different versions, so as to record versions with as little data redundancy as possible, and ensure the consistency and relative independence of different versions in logic.
Currently, version management techniques mainly have two modes, lock Modification Unlocking (LMU) and Copy Modification Merge (CMM). In the LMU working mode, conflicts caused by simultaneous modification of files by multiple persons can be effectively avoided through locking, but the number of concurrent operation of users is reduced, and if the users forget to unlock the operation after finishing modification, the users who want to modify the version later are in a waiting unlocking state, so that the management efficiency is low. In the CMM working mode, when the user modifies the file, the server file may be updated to the local end, then the copy is modified at the local end, and after the modification operation is completed, the copy is submitted to the server. If the original file has been modified and submitted by other users before this user commit, then the version number on the server will be different from the version number on the local side, the server will abort the version commit, the user must reacquire the new version and re-modify the commit, this CMM mode, although less than the LMU latency, can increase operational concurrency, but may require repeated modification operations, again reducing management efficiency.
Disclosure of Invention
In view of the above, it is necessary to provide a version management method capable of improving management efficiency.
The application provides a version management method, which comprises the following steps:
checking version reference information of the management object version according to an update instruction of the management object version;
judging whether the management object version currently has user reference according to the version reference information;
when the user reference condition does not exist, the management object version is directly updated;
and when the user reference condition exists, copying the copy of the management object version, feeding back the copy to the user for updating, and establishing a version father-son relationship by taking the copy as a child version of the management object version.
In one embodiment, when the user reference condition does not exist, updating the management object version directly includes:
when the user reference condition does not exist, locking the management object version, copying the copy and feeding back to the user for modification, obtaining the modified copy and secondarily checking the user reference condition of the management object version;
if the secondary check determines that the user reference does not exist, replacing the copy with the management object version;
and if the secondary check determines that the user reference exists, establishing a version father-son relationship by taking the copy as a child version of the management object version.
In one embodiment, the method further comprises:
displaying a working version of a management object according to an instruction of a user for calling the management object;
if a version switching instruction of a user is received, feeding back and displaying a version relation diagram to the user;
and switching the working version into a management object version selected by a user according to the version relation diagram and updating corresponding version reference information.
In one embodiment, the method further comprises:
judging whether the management object version is a working version or not according to a deletion instruction of the management object version and checking the reference information of the management object version;
when the management object version is a working version, refusing to delete operation and prompting version switching;
and when the management object version is not the default working version, executing corresponding deleting operation on the management object version according to the reference information of the management object version.
In one embodiment, the performing, according to the reference information of the management object version, a corresponding deletion operation on the management object version includes:
when the management object version has a user reference condition, the management object version is moved to a version recycling station in a offline mode;
when the management object version does not have the user reference condition, after the management object version is moved to a version recycle bin after the management object version is in the offline state, the management object version is thoroughly deleted in the version recycle bin.
In one embodiment, the version relationship map is synchronously invoked to update the version relationship when the version parent-child relationship is established.
In one embodiment, the version relationship graph is presented in a tree structure.
According to the version management method, version reference information of the management object version is checked through the update instruction of the management object version, whether the management object version is currently provided with user reference is judged according to the version reference information, when the user reference condition does not exist, the management object version is directly updated, when the user reference condition exists, the copy of the copy management object version is fed back to a user for updating, and the copy is used as a sub-version of the management object version to establish a version father-son relationship. According to the method, an adaptive updating mode is selected according to recorded version quotation conditions, version updating can be completed rapidly when operation concurrency is low, and updating efficiency can be improved in a sub-version mode when operation concurrency is high, so that version management efficiency is improved.
Drawings
FIG. 1 is a flow diagram of a version management method in one embodiment.
FIG. 2 is a flow chart of a version updating method in one embodiment.
FIG. 3 is a schematic diagram of a version relationship diagram in one embodiment.
FIG. 4 is a flow diagram of a version deletion method in one embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
In one embodiment, as shown in fig. 1, a version management method is provided, which includes the following steps:
step S101, the version reference information of the management object version is checked according to the update instruction of the management object version. Step S102, judging whether the management object version currently has user reference according to the version reference information.
Step S103, when the user reference condition does not exist, the management object version is directly updated.
Step S104, when the user reference condition exists, the copy of the copy management object version is fed back to the user for updating, and the copy is used as a sub-version of the management object version to establish a version father-son relationship.
Wherein the management object refers to a managed object, and the management object version is a version of the management object. One management object can establish multiple versions in turn, and only one version of each management object is in use, namely the working version. That is, the management object may have a plurality of versions, wherein one version to be used is called a working version, and the working version may be the latest version by default or may be specified according to actual requirements. Each version of the management object has a corresponding version reference information, the service condition of the version of the management object is recorded, the service condition comprises the use condition, the associated information, the reference condition and the like of the version, and when the version of the management object is called and used by a user, the corresponding reference information of the version of the management object is synchronously updated.
Specifically, when a user needs to update a version of a certain management object and a server receives an update instruction issued by the user, firstly checking and judging the reference condition of the version of the management object, and obtaining version reference information corresponding to the version to obtain the reference condition judgment of the version. If the version of the management object to be updated has the user reference condition, signing out the updated version of the management object, copying to generate a new copy for user modification, then taking the modified copy as the original version, namely a sub-version of the management object, establishing a version father-son relationship, initializing version reference information of the sub-version, and updating the version relationship in a version relationship graph. If the updated management object version does not have the user reference condition, the management object version is directly modified and updated, and the version number of the updated management object version does not change.
In one embodiment, step S103 includes: when the user reference condition does not exist, locking the management object version, copying the copy and feeding back to the user for modification, obtaining the modified copy, and secondarily checking the user reference condition of the management object version; if the secondary check determines that the user reference does not exist, replacing the copy with the management object version; if the secondary check determines that the user reference exists, the copy is used as a sub-version of the management object to establish a version father-son relationship.
Specifically, the version updating process of the embodiment adopts the processes of locking version modification, version copying and version signing. The version service before updating is not interrupted in the version updating process, the user reference condition of the updated management object version is checked again when the version is signed, if the secondary check determines that the user reference exists, the process of generating the new version is shifted, namely, the copy is used as the sub-version of the management object version to establish the version father-son relationship, the version reference information of the sub-version is initialized, and the version relationship is updated in the version relationship diagram. Otherwise, the content data of the updated management object version is directly updated, namely, the modified copy is checked in to the updated management object version, and the original version content is replaced by the modified content. In addition, when the version father-son relationship is established, the version relationship graph is synchronously called to update the version relationship of the management object, such as adding a new child node in the version relationship graph when adding the child version.
The version management method flow in the above embodiment specifically refers to the version update method flow schematic diagram shown in fig. 2, and the method selects an appropriate update mode according to the recorded version reference condition, so that the version update can be quickly completed when the operation concurrency is low, and the update efficiency can be improved in the form of sub-versions when the operation concurrency is high, thereby improving the version management efficiency. In addition, by adopting a version update reference checking mechanism, a user can be ensured to trace back the specific content of the corresponding version of the management object at any time according to the version record.
In one embodiment, the version management method further includes a version switching method, including: displaying the working version of the management object according to the instruction of the user for calling the management object; if a version switching instruction of a user is received, feeding back and displaying a version relation diagram to the user; and switching the working version into the management object version selected by the user according to the version relation diagram and updating the corresponding version reference information.
Specifically, when the user needs to call the management object, the server responds with the working version of the management object, that is, after the user selects the management object, the system defaults to return the content of the working version of the management object to the user, and updates the version reference information corresponding to the working version. And then, the user can further switch the working version of the management object according to the requirement, when the version is switched, the user instructs the server to list all version information of the management object by clicking the issued version switching instruction and presents a version relation diagram, and then the user selects the version to be switched to by clicking the issued instruction again, and the server switches the working version into the version of the management object selected by the user according to the version relation diagram and updates version reference information corresponding to the version selected by the user, so that the switching of the working version is completed. The version user needing to be switched can select according to the scene needs and the reference relation, and after the working version is switched, the object acquired again by the user is the corresponding content after the version is switched. In this embodiment, all versions of the object are managed, and the user can flexibly and freely select and switch, so that the version rollback operation does not exist in the version switching, the version rollback operation can be quickly completed in a short time, the number of versions is not increased, and any storage and performance overhead is not generated.
The version relation diagram of the embodiment is preferably presented in a tree structure, the version relation of the tree structure is used for carrying out full life cycle version management on the management object, the version history evolution process of the management object is recorded, the relation among the versions of the management object can be presented, the version relation display can be carried out in a visual mode, the difference of the publications can be intuitively embodied, and references and services can be provided for users to select the most suitable version. The version relationship of the management object is mainly divided into the following three types: parent-child relationships, sibling relationships, grandchild relationships. The version relationship refers to a relationship among multiple versions of the same management object, and different management objects do not have the version relationship. The version father-son relationship is divided into the following cases, firstly, when a new version is created, the new version is a child version of the original version, and the new version and the original version relationship are father-son relationships. The relationship between two versions with the same parent version forms a brother relationship, and two or more layers of parent-child relationships form a grandchild relationship. That is, the version relationship of the management object may be represented by an inverted tree, where each version corresponds to a node on the tree, the parent node corresponds to a parent version, the child node corresponds to a child version, the two parent-child relationship node corresponds to a parent-child relationship, the sibling node corresponds to a sibling relationship, the version relationship tree is called a version tree in this embodiment, the root node (without the parent node) of the version tree is the earliest version, and the leaf node (without the child node) is the latest version. The process of truly recording the version change of the management object through the version relation graph management is not modifiable, not deletable, and the version relation management is not influenced by the deletion of the version.
In this embodiment, version rollback is replaced by version switching, which has the characteristics of flexible version switching and free switching, and avoids new version information generated by version rollback and version content that is to be copied and retracted by the new version. Therefore, version switching is adopted to improve the version management efficiency, improve the utilization rate of storage resources, avoid the waste of storage space, enable a user to select a switched version according to requirements, and enable the user to be used as a reference for selecting the version according to related properties such as scenes and descriptions of the object version and version reference conditions. In addition, full life cycle version relation management of management objects is provided, and the version relation of the management objects is displayed in a graphical mode, see the version relation diagram shown in fig. 3, so that the generation of any version can be traced through version management.
In one embodiment, the version management method further includes a version deletion method, including: judging whether the management object version is a working version or not according to the deletion instruction of the management object version and checking the reference information of the management object version; when the management object version is the working version, refusing the deleting operation and prompting version switching; and when the management object version is not the default working version, executing corresponding deleting operation on the management object version according to the reference information of the management object version.
In one embodiment, performing a corresponding delete operation on the management object version according to the reference information of the management object version includes: when the management object version has a user reference condition, the management object version of the management object is moved to a version recycling station; when the management object version does not have the user reference condition, after the management object version of the management object is moved to the version recycle bin, the management object version is thoroughly deleted in the version recycle bin.
Specifically, referring to the version deletion flowchart shown in fig. 4, when a user needs to delete a management object version, the server first needs to determine whether the deleted management object version is a working version and its reference. If the deleted management object version is in the current working version state, direct deletion is not allowed, version switching is needed, and the deletion operation can be executed only by switching the version of the deletion target management object to the non-working version. If the deleted management object version is a non-working version, the deletion operation can be executed, but the version is not completely cleared, the version is processed in a offline mode, the deleted version enters a version recycling station, namely, the deleted version is subjected to soft deletion but is not actually subjected to physical deletion, and after the soft deletion, a user cannot set the deleted version as the working version for use. That is, the version in the version recycle bin is version data which is not actually deleted, and the version recycle bin of the embodiment has three functions: the deleted version can be recovered in the version recovery station management, and the recovered version can continue to provide services for users. Secondly, the specific version content is tracked and found out for the user according to the version record, so that the tracking management of all life cycles of the version is realized. And thirdly, thoroughly deleting the version without the reference condition, wherein the system removes the data content, and the version with the reference condition cannot be removed. That is, after the management object version is moved offline to the version recycle bin, whether complete deletion is performed can be further determined according to the reference condition of the management object version, complete deletion can be performed without the reference condition, and deletion is prohibited by the reference condition.
In the embodiment, a version soft deletion recycle bin mechanism is adopted to ensure that a user can trace back specific contents of corresponding versions of management objects at any time according to the version records, and the deleted versions can be restored through the version recycle bin, so that the problem of version loss is effectively avoided.
In addition, the version management data stored in the database of the application mainly comprises version management information, version relation information and the like. In order to better manage version data, under the general principle of considering database design, the application further synthesizes the data frequency of the version management system. The database table structure is specifically shown in the following table, and includes a version relationship table (table 1), a management object information table (table 2), and a version information table (table 3).
TABLE 1 version relationship Table
Name of the name | Label (Label) | Content type | Must be filled with | Unique item | Description of the application |
Numbering device | code | varchar(12) | Is that | Is that | Self-increasing |
Managing object numbers | objectId | varchar(10) | Is that | Whether or not | |
Version number | version | varchar(12) | Is that | Is that | |
Version name | name | varchar(20) | Is that | Whether or not | |
Father number | pcode | int(4) | Is that | Is that |
Table 2 management object information table
Name of the name | Label (Label) | Content type | Must be filled with | Unique item | Description of the application |
Numbering device | rule_id | int(4) | Is that | Is that | Self-increasing |
Managing object names | rule_name | varchar(15) | Is that | Is that | |
Work version number | rule_work_id | int(4) | Is that | Is that | |
Fingerprint | rule_md5 | int(4) | Is that | Whether or not | |
Description of the application | rule_bz | varchar(100) | Is that | Whether or not |
Table 3 version information table
Name of the name | Label (Label) | Content type | Must be filled with | Unique item | Description of the application |
Version number | version_id | int(4) | Is that | Is that | Self-increasing |
Version name | version_name | varchar(15) | Is that | Whether or not | |
Version description | version_desc | varchar(10) | Is that | Whether or not | |
Object numbering | version_no | int(4) | Is that | Whether or not | |
Delete markers | version_deleted | int(4) | Is that | Whether or not | |
Scene(s) | version_scene | varchar(10) | Is that | Whether or not | |
Creation time | create_time | Date | Is that | Whether or not | |
Modification time | update_time | Date | Is that | Whether or not | |
Description of the application | version_desc | varchar(20) | Whether or not | Whether or not |
It should be understood that, although the steps in the flowcharts of fig. 1, 2, and 4 are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps of fig. 1, 2, 4 may include steps or stages that are not necessarily performed at the same time, but may be performed at different times, nor do the order in which the steps or stages are performed necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least a portion of the steps or stages in other steps.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples illustrate only a few embodiments of the application, which are described in detail and are not to be construed as limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of protection of the present application is to be determined by the appended claims.
Claims (7)
1. A version management method, comprising:
checking version reference information of the management object version according to an update instruction of the management object version;
judging whether the management object version currently has user reference according to the version reference information;
when the user reference condition does not exist, the management object version is directly updated;
and when the user reference condition exists, copying the copy of the management object version, feeding back the copy to the user for updating, and establishing a version father-son relationship by taking the copy as a child version of the management object version.
2. The method of claim 1, wherein the updating the management object version directly when no user reference exists comprises:
when the user reference condition does not exist, locking the management object version, copying the copy and feeding back to the user for modification, obtaining the modified copy and secondarily checking the user reference condition of the management object version;
if the secondary check determines that the user reference does not exist, replacing the copy with the management object version;
and if the secondary check determines that the user reference exists, establishing a version father-son relationship by taking the copy as a child version of the management object version.
3. The method according to claim 1, wherein the method further comprises:
displaying a working version of a management object according to an instruction of a user for calling the management object;
if a version switching instruction of a user is received, feeding back and displaying a version relation diagram to the user;
and switching the working version into a management object version selected by a user according to the version relation diagram and updating corresponding version reference information.
4. The method according to claim 1, wherein the method further comprises:
judging whether the management object version is a working version or not according to a deletion instruction of the management object version and checking the reference information of the management object version;
when the management object version is a working version, refusing to delete operation and prompting version switching;
and when the management object version is not the default working version, executing corresponding deleting operation on the management object version according to the reference information of the management object version.
5. The method of claim 4, wherein the performing a corresponding delete operation on the management object version based on the reference information of the management object version comprises:
when the management object version has a user reference condition, the management object version is moved to a version recycling station in a offline mode;
when the management object version does not have the user reference condition, after the management object version is moved to a version recycle bin after the management object version is in the offline state, the management object version is thoroughly deleted in the version recycle bin.
6. A method according to any one of claims 1 or 2, wherein the version relationship map is synchronously invoked for version relationship updating when the version parent-child relationship is established.
7. A method according to claim 3, wherein the version relationship map is presented in the form of a tree structure.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310410147.7A CN116594669A (en) | 2023-04-18 | 2023-04-18 | Version management method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310410147.7A CN116594669A (en) | 2023-04-18 | 2023-04-18 | Version management method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116594669A true CN116594669A (en) | 2023-08-15 |
Family
ID=87588896
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310410147.7A Pending CN116594669A (en) | 2023-04-18 | 2023-04-18 | Version management method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116594669A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117112011A (en) * | 2023-08-16 | 2023-11-24 | 北京冠群信息技术股份有限公司 | Version management method and device |
-
2023
- 2023-04-18 CN CN202310410147.7A patent/CN116594669A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117112011A (en) * | 2023-08-16 | 2023-11-24 | 北京冠群信息技术股份有限公司 | Version management method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8370311B2 (en) | Using versioning to back up multiple versions of a stored object | |
US11023448B2 (en) | Data scrubbing method and apparatus, and computer readable storage medium | |
JP4117265B2 (en) | Method and system for managing file system versions | |
US8296271B1 (en) | System and method for optimizing data recovery in a parallel database | |
US5761678A (en) | Creation of clone storage area with identification of base storage area and deferred cloning of metadata | |
CA2595922C (en) | Managing the status of documents in a distributed storage system | |
EP1696346A1 (en) | File system represented inside a database | |
US20060004756A1 (en) | Method and system for in-place updating content stored in a storage device | |
CN101593185A (en) | Utilize and carry out the method and system that data are recovered synchronously | |
US20040215998A1 (en) | Recovery from failures within data processing systems | |
US7099889B2 (en) | System and method for decoupling object identification for the purpose of object switching in database systems | |
US20080228802A1 (en) | System and Method for Rebuilding Indices for Partitioned Databases | |
CN105630865A (en) | N-BIT compressed versioned column data array for in-memory columnar stores | |
US11960363B2 (en) | Write optimized, distributed, scalable indexing store | |
CN107545015B (en) | Processing method and processing device for query fault | |
US20100088270A1 (en) | Data versioning concept including time dependency and active and inactive states | |
CN116594669A (en) | Version management method | |
CN106446044B (en) | Storage space recovery method and device | |
CN104166661A (en) | Data storage system and method | |
US20120185440A1 (en) | Method and apparatus for providing address book restoration | |
US20220092083A1 (en) | Asynchronous storage management in a distributed system | |
US20190243712A1 (en) | Versioned records management using restart era | |
CN111090701B (en) | Service request processing method, device, readable storage medium and computer equipment | |
CN110045983B (en) | Version library management method and device and server | |
CN111782619A (en) | Document increment synchronization method and device between servers and storage medium |
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 |