CN113448617A - Data object management method and device, computer equipment and storage medium - Google Patents

Data object management method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN113448617A
CN113448617A CN202111010625.2A CN202111010625A CN113448617A CN 113448617 A CN113448617 A CN 113448617A CN 202111010625 A CN202111010625 A CN 202111010625A CN 113448617 A CN113448617 A CN 113448617A
Authority
CN
China
Prior art keywords
data object
target
version
data
local
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.)
Granted
Application number
CN202111010625.2A
Other languages
Chinese (zh)
Other versions
CN113448617B (en
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.)
Taiping Financial Technology Services Shanghai Co Ltd Shenzhen Branch
Original Assignee
Taiping Financial Technology Services Shanghai Co Ltd Shenzhen Branch
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 Taiping Financial Technology Services Shanghai Co Ltd Shenzhen Branch filed Critical Taiping Financial Technology Services Shanghai Co Ltd Shenzhen Branch
Priority to CN202111010625.2A priority Critical patent/CN113448617B/en
Publication of CN113448617A publication Critical patent/CN113448617A/en
Application granted granted Critical
Publication of CN113448617B publication Critical patent/CN113448617B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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

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 a data object management method, a data object management device, computer equipment and a storage medium. The method comprises the following steps: the remote server receives a version submission request sent by the local server, determines a target baseline data object from a baseline version, determines a target local data object from a local version in the version submission request, and determines a target copied data object from a copied version in the version submission request, determines a data object difference set according to the target baseline data object, the target local data object and the target copied data object, and performs version control on the target baseline data object and the target local data object based on the data object difference set. In the scheme, the remote server performs comparison of the data objects based on the baseline version, the local version and the copy version, so that version control processing such as comparison, conflict processing, merging processing and the like of the data objects in different versions can be realized, the contrast granularity is refined, and the accuracy of version control is improved.

Description

Data object management method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a data object management method and apparatus, a computer device, and a storage medium.
Background
In a multi-person cooperative work environment, version control is an important link. At present, a universal version controller in the market has GIT/SVN and the like, and is mainly used for controlling the file version of software source codes. The SVN belongs to a centralized version control system, the revised versions of all files are stored based on a single centralized management server, and a user working cooperatively can be connected with the centralized management server through a client and obtain the latest version file or submit an updated version file; the GIT belongs to a distributed version control system, when a user acquires a latest version file based on a client, a code warehouse needs to be completely mirrored, and the file is updated based on the complete mirror image of the code warehouse.
However, both the above GIT and SVN belong to the control of file and/or directory versions, and both have the problem of inaccuracy of file version control.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a data object management method, apparatus, computer device, and storage medium capable of improving control accuracy of files of different versions.
In a first aspect, a data object management method is provided, which is applied in a JAVA development environment, and the method includes:
receiving a version submitting request sent by a local server, wherein the version submitting request comprises a local version and a copy version; the copy version is the version before the local version is updated;
determining a target baseline data object from the baseline version, a target local data object from the local version, and a target replicated data object from the replicated version;
determining a data object difference set according to the target baseline data object, the target local data object and the target copy data object;
versioning the target baseline data object and the target local data object based on the set of data object differences.
In one optional embodiment, determining the data object difference set according to the target baseline data object, the target local data object, and the target replicated data object includes:
comparing the target baseline data object with the target copy data object to determine a first difference set;
and comparing the target local data object with the target copy data object to determine a second difference set.
In one optional embodiment, the comparing operation includes:
under the condition that the data object is a simple object, directly comparing the target baseline data object with the target copy data object to determine a first difference set, and comparing the target local data object with the target copy data object to determine a second difference set;
and under the condition that the data object is a complex object, calling a recursive loop algorithm, comparing the target baseline data object with the target copy data object, determining a first difference set, comparing the target local data object with the target copy data object, and determining a second difference set.
In an optional embodiment, the method further includes:
in the event that the first difference set is empty, it is determined that the target baseline data object and the target replicated data object are consistent.
In one optional embodiment, versioning the target baseline data object and the target local data object based on the set of data object differences includes:
determining conflict data and non-conflict data in the first difference set and the second difference set;
merging the non-conflict data in the first difference set and the second difference set with the target local data object to obtain a merged target local data object;
and returning the conflict data in the first difference set and the second difference set and the target local data object after the merging processing to the local server to instruct the local server to perform version control on the data object based on the conflict data set.
In an optional embodiment, the method further includes:
in the event that the first set of differences is not empty, it is determined that the target baseline data object and the target replicated data object are inconsistent.
In one optional embodiment, versioning the target baseline data object and the target local data object based on the set of data object differences includes:
traversing a first data object in the first difference set based on a second data object in the second difference set, and determining conflict data between the first data object and the second data object;
and generating a conflict data set according to the conflict data, and returning the conflict data set to the local server to instruct the local server to carry out version control on the data object based on the conflict data set.
In an optional embodiment, the method further includes:
and if the conflict data exist, performing data marking processing on the conflict data according to a preset data marking method, and returning the conflict data subjected to the data marking processing to the local server.
In one optional embodiment, determining a target baseline data object from the baseline version, a target local data object from the local version, and a target replicated data object from the replicated version comprises:
according to the preset annotation identification, determining an initial baseline data object from the baseline version, determining an initial local data object from the local version, and determining an initial copied data object from the copied version; the annotation identification is used for indicating a data object needing to be subjected to comparison operation;
according to a preset map data conversion method, an initial baseline data object is converted to obtain a target baseline data object, an initial local data object is converted to obtain a target local data object, and an initial copied data object is converted to obtain a target copied data object.
In a second aspect, a data object management apparatus is provided, which is applied in a JAVA development system, and includes:
the system comprises a receiving module, a judging module and a sending module, wherein the receiving module is used for receiving a version submitting request sent by a local server, and the version submitting request comprises a local version and a copy version; the copy version is the version before the local version is updated;
a first determination module to determine a target baseline data object from the baseline version, a target local data object from the local version, and a target replicated data object from the replicated version;
a second determination module for determining a data object difference set according to the target baseline data object, the target local data object, and the target replicated data object;
and the processing module is used for carrying out version control on the target baseline data object and the target local data object based on the data object difference set.
In a third aspect, there is provided a computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the data object management method of any of the first aspect when executing the computer program.
In a fourth aspect, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the data object management method of any of the first aspects described above.
The remote server receives a version submission request sent by the local server, determines a target baseline data object from a baseline version, determines a target local data object from a local version in the version submission request, determines a target copied data object from a copied version in the version submission request, determines a data object difference set according to the target baseline data object, the target local data object and the target copied data object, and performs version control on the target baseline data object and the target local data object based on the data object difference set. In the scheme, the remote server performs comparison of the data objects based on the baseline version, the local version and the copy version corresponding to the local version, focuses the comparison factors on the data objects, refines the granularity of comparison operation, and can realize version control processing such as comparison, conflict processing, combination processing and the like of the data objects in different versions, thereby filling the technical blank that the data objects are not compared in the prior art, optimizing the comparison granularity of different versions, and improving the accuracy of version control.
Drawings
FIG. 1 is a diagram of an application environment for a method of data object management in one embodiment;
FIG. 2 is a schematic diagram illustrating three-party database interaction in a data object management method according to an embodiment;
FIG. 3 is a flow diagram that illustrates a method for data object management in one embodiment;
FIG. 4 is a flowchart illustrating a method for managing data objects in one embodiment;
FIG. 5 is a flowchart illustrating a method for managing data objects in one embodiment;
FIG. 6 is a flowchart illustrating a method for managing data objects in one embodiment;
FIG. 7 is a flowchart illustrating a method for managing data objects in one embodiment;
FIG. 8 is a flowchart illustrating a method for managing data objects in one embodiment;
FIG. 9 is a block diagram of a data object management apparatus in one embodiment;
FIG. 10 is a block diagram of a data object management apparatus in one embodiment;
FIG. 11 is a diagram illustrating an internal structure of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
In a JAVA development environment where multiple users cooperate, it is necessary to perform version control on JAVA file versions submitted by different users. The universal version control tool in the current market has GIT/SVN and the like, and is mainly used for file version control of software source codes, wherein the SVN belongs to a centralized version control system, a single centralized management server stores revision versions of all files, and people working cooperatively are connected to the server through a client to take out the latest file or submit an update; and the GIT belongs to a distributed version control system, and the client side does not only extract the file snapshot of the latest version, but completely mirrors a code warehouse to include a complete history record.
In the prior art, a tool for performing version control on JAVA data objects is not available, a tool for comparing two JAVA objects (JAVA-object-diff) is available, and the two JAVA data objects can be compared, or the JAVA data objects are converted into JSON data format texts, and then difference detection is performed through JSON comparison tools (jsondiff, BeJson), but conflict resolution and merging processing of the objects cannot be realized, and management of data versions cannot be realized.
The data object management method provided by the application can be applied to the application environment shown in fig. 1. The remote server 1 and the local server 2 are communicated through a network, and a local storage space is arranged in the local server and used for storing a local version file generated by a user based on the local server; the remote server is provided with at least two independent storage spaces which are a baseline library and a process library respectively, a user executes a submitting operation after generating a local version file, the local version file is submitted to the process library and stored as a process library version, optionally, the remote server or a third-party user can review the process version in the process library, the process version is submitted to the baseline library for version control under the condition that the review is passed, and the process version is stored in the baseline library as a baseline version file if the process version passes the version control.
In particular, fig. 2 shows an interaction diagram of three storage spaces, which is described in conjunction with fig. 2.
Defining JAVA object data storage as three sets of storage spaces in a tool kit, wherein the first set is baseline library data and is used for recording data which are manually checked or passed by a self-core and are displayed outwards as latest data, the baseline library has a version number version no concept and is used for recording the data version after each check is passed, the version no concept is stored in an increasing mode from 1, and each set of baseline library data has a unique version number record; the second set is flow database data used for recording data which is not manually checked or passed by self-checking, the flow database data structure is kept consistent with the baseline database data structure, then a unique identifier, namely a flow number process Instance Id, is added on the basis, the flow database allows a plurality of sets of data storage with the same data version number and the unique flow number, and after the data checking of the flow database is passed, the current maximum data version number of the baseline database is added with 1 to be used as the latest data version number to be stored in the baseline database. The third set is a local space which is not stored persistently and is generally applied to interface data at the front end of the system, the data is read or copied from the baseline database or the process database when the interface is opened, if the data is not stored, the data is lost after the interface is closed, if the data is stored, the data which is not checked is stored in the process database, and the checked data is stored in the baseline database.
Defining JAVA object data into four types of data in a tool kit, wherein the first type is latest version data stored in a data version library and is called BASE baseline version data; the second type is the latest version number data copied from the baseline version library when the JAVA object modification is initiated, and the latest version number data is called COPY version data; the third type is JAVA object data modified based on COPY version data when the JAVA object modification is initiated locally or locally added JAVA object data, which is called LOCAL version data, and the data version number is consistent with the COPY version data version number of the COPY version; the fourth type of data is data stored in the process library after the LOCAL version data is submitted, and is called PROC version data, and the version number of the data is consistent with LOCAL.
As shown in fig. 2, fig. 2 includes four data definitions of a baseline library and a process library and BASE/COPY/PROC/LOCAL, which are different from the SVN in that the SVN has only two sets of data of LOCAL and BASE, only one central baseline library, and no process library, so that after the SVN is locally modified, the SVN can only choose to submit the baseline library or store the data locally, the data locally may be covered or lost for some reason, and the process library in this application is an intermediate data state that can persist between the baseline library and the LOCAL data; compared with the GIT, the baseline library is similar to the remote library of the GIT, the process library is similar to the version library of the GIT, but the difference between the process library and the GIT version library is that whether the process library conflicts with the baseline library or not needs to be checked when the process library is submitted to the process library locally, the process library can be submitted to the process library after the process library does not conflict with the baseline, the submitted version library in the GIT does not need to be checked with the remote library of the GIT, and only when the process library is submitted to the remote library from the version library, the conflict checking processing is carried out.
The following describes in detail the technical solutions of the present application and how the technical solutions of the present application solve the above technical problems by embodiments and with reference to the drawings. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. It should be noted that, in the data object management method provided in the embodiments of fig. 3 to fig. 8 of the present application, the execution subject is a remote server, and may also be a data object management apparatus, and the data object management apparatus may become a part or all of the remote server by software, hardware, or a combination of software and hardware. In the following method embodiments, the execution subject is a remote server, for example.
In one embodiment, as shown in fig. 3, a data object management method is provided, which is applied in a JAVA development environment and relates to a process in which a remote server receives a version commit request sent by a local server, determines a target baseline data object from a baseline version, determines a target local data object from a local version in the version commit request, and determines a target replicated data object from a replicated version in the version commit request, determines a data object difference set according to the target baseline data object, the target local data object, and the target replicated data object, and performs version control on the target baseline data object and the target local data object based on the data object difference set, and includes the following steps:
s201, receiving a version submitting request sent by a local server, wherein the version submitting request comprises a local version and a copy version; the copy version is the version before the local version update.
Wherein, the version submission request refers to a local version submission request after the user submits the modified data object based on the local server. In this embodiment, the remote server may obtain the local version and the copy version based on the version submission request, and generally, when a user performs a modification operation, the user needs to copy a current baseline library version from the baseline library as the copy version, so as to modify data based on the copy version, and obtain the local version after the modification.
S202, determining a target baseline data object from the baseline version, determining a target local data object from the local version, and determining a target replicated data object from the replicated version.
Wherein, the target baseline data object refers to an object which is determined from the baseline version and needs to be subjected to comparison operation; the target local data object refers to an object which is determined from the local version and needs to be subjected to comparison operation; the target replicated data object refers to an object determined from the replicated version that requires a comparison operation.
In this embodiment, since a JAVA file may include a plurality of data objects, some data objects are fixed values, or some data objects are not worth paying attention, at this time, the remote server needs to determine, from the plurality of data objects, a data object that affects version control and is of interest to a user. Alternatively, the user may manually mark these target data objects in the compiled JAVA file, so that the remote server may determine the target data objects based on the marks; in addition, the remote server may further determine the target data object in each version from a plurality of data objects in each version based on a preset target data object list and a target data object screening model, which is not limited in this embodiment.
S203, determining a data object difference set according to the target baseline data object, the target local data object and the target copy data object.
In this embodiment, in the process of comparing the data objects, in order to ensure the validity of the comparison result, the target replicated data object of the replicated version may be used as the reference version, that is, the remote server compares the target baseline data object and the target replicated data object, and compares the target local data object and the target replicated data object, so as to obtain a data object difference set between the target baseline data object and the target replicated data object, and a data object difference set between the target local data object and the target replicated data object. Optionally, the remote server may further compare the target baseline data object and the target local data object based on the target replicated data object, so as to obtain a data object difference set including the difference data objects in the three versions, which is not limited in this embodiment.
And S204, performing version control on the target baseline data object and the target local data object based on the data object difference set.
The version control refers to merging non-conflicting data and performing front-end feedback on the conflicting data. Fully automated conflict resolution does not guarantee the correctness of the retention of the data object, and therefore, in the embodiment, after determining the conflict data between different versions based on the data object difference set, the remote server may return the conflict data to the local server in a form so that the user can process the conflict data through the local server, for example, the data object in a certain version is retained, thereby implementing version control on the data objects in different versions.
In the data object management method, the remote server receives a version submission request sent by the local server, determines a target baseline data object from a baseline version, determines a target local data object from a local version in the version submission request, and determines a target copied data object from a copied version in the version submission request, determines a data object difference set according to the target baseline data object, the target local data object and the target copied data object, and performs version control on the target baseline data object and the target local data object based on the data object difference set. In the scheme, the remote server performs comparison of the data objects based on the baseline version, the local version and the copy version corresponding to the local version, focuses the comparison factors on the data objects, refines the granularity of comparison operation, and can realize version control processing such as comparison, conflict processing, combination processing and the like of the data objects in different versions, thereby filling the technical blank that the data objects are not compared in the prior art, optimizing the comparison granularity of different versions, and improving the accuracy of version control.
For different versions, the remote server mainly determines the difference between the replicated version and the local version and the difference between the replicated version and the baseline version, and in one embodiment, as shown in fig. 4, the determining the data object difference set according to the target baseline data object, the target local data object and the target replicated data object includes:
s301, comparing the target baseline data object with the target copy data object to determine a first difference set.
In this embodiment, the remote server may invoke a diffheppler checkdiff method to perform traversal comparison on the target baseline data object and the target replicated data object, and if the comparison result is inconsistent, both the target baseline data object and the target replicated data object are written into the first difference set. For example, if the comparison result is not consistent between the target baseline data object (name: zhangsan) and the target copied data object (name: zhangsi), the target baseline data object (name: zhangsan) is written as a new value attribute, the target copied data object (name: zhangsi) is written as an old value attribute into the same DiffProperty, and the DiffProperty is written into the first variance set.
S302, comparing the target local data object with the target copy data object, and determining a second difference set.
In this embodiment, the remote server may invoke a diffheppler checkdiff method to perform traversal comparison on the target local data object and the target replicated data object, and if the comparison result is inconsistent, both the target local data object and the target replicated data object are written into the second difference set. The specific comparison process can refer to the example given in step 301 above.
In the above comparison process of data objects, in combination with the dimensions of the data objects, the comparison operation needs to be performed in different data dimensions by using different methods, and in one optional embodiment, the comparison operation includes:
in one scenario, when the data object is a simple object, the target baseline data object and the target copy data object are directly compared to determine a first difference set, and the target local data object and the target copy data object are compared to determine a second difference set.
In this embodiment, the simple object refers to an object that includes eight basic types, i.e., byte type, short integer short, int, long integer long, float, double-precision float double, character type char, boolean bootie, and wrapper type thereof, as well as Number, Date, and String types as attributes, and generally, the simple object has a small data dimension. For example, if the data object is personal information of an employee, and includes the following attributes, name, identification card, gender, ethnicity, age, Date of birth, and the attribute type is String, char or Date, the data object is considered to be a simple object. In the case that the data object is a simple object, the remote server directly compares whether the attribute values of the data object are consistent to determine the first difference set diffcharacteristics base and/or the second difference set diffcharacteristics local, where the attribute values may be character strings, money, numbers, boolean values, and the like, and this embodiment does not limit this.
In another scenario, when the data object is a complex object, a recursive loop algorithm is called, the target baseline data object and the target copy data object are compared, a first difference set is determined, the target local data object and the target copy data object are compared, and a second difference set is determined.
In this embodiment, the data object is an object that includes eight basic types, Number, Date, String types, such as a single-row data set List, a double-row data set Map, or a Java simple object, and generally, the complex object has more data dimensions, for example, the data object is a staff file and includes an attribute, staff personal information, staff work history set, staff position, department, and attendance Date, wherein the staff personal information data simple object and the staff work history also belong to a simple object, but the staff has multiple work histories, and the attribute is a set of staff work history simple objects, and then the data object is considered as a complex object. In the case that the data object is a complex object, the remote server needs to set a recursive function, and may call a diffheppler.
After obtaining the first difference set and the second difference set, determining collision data to perform control processing on the data object based on the two difference sets, where the collision data may be divided into two scenarios, and in one of the scenarios, in one optional embodiment, the method further includes:
in the event that the first difference set is empty, it is determined that the target baseline data object and the target replicated data object are consistent.
In this embodiment, the first difference set is empty, which means that the target baseline data object in the baseline version is consistent with the target replication data object in the replication version, that is, the baseline version is consistent with the replication version, which means that there is no update version in the baseline library temporarily, and the current baseline version is the replication version of the user. In this scenario, as shown in fig. 5, versioning the target baseline data object and the target local data object based on the data object difference set includes:
s401, determining conflict data and non-conflict data in the first difference set and the second difference set.
In this embodiment, the remote server determines the conflicting data and the non-conflicting data based on the first difference set diffPropertiesBase and the second difference set diffPropertiesLocal. The conflict rule may refer to table 1. Table 1 gives a list of the types of results that result in conflict or no conflict under different relative operation types.
TABLE 1 result types corresponding to relative operations
Figure DEST_PATH_IMAGE002
S402, merging the non-conflict data in the first difference set and the second difference set with the target local data object to obtain the target local data object after merging.
In this embodiment, the remote server may call the merge properties method, merge non-conflicting data in the first difference set diff properties base and the second difference set diff properties local into a data object of the local version, and obtain a target local data object after merging processing.
And S403, returning the conflict data in the first difference set and the second difference set and the target local data object after merging processing to the local server to instruct the local server to perform version control on the data object based on the conflict data set.
In this embodiment, after obtaining and processing the target local data object, the remote server returns the target local data object, the conflict data in the first difference set and the second difference set to the local server, so as to instruct the user to perform version control on the data object based on the conflict data set through the local server.
In another scenario, in an optional embodiment, the method further includes:
in the event that the first set of differences is not empty, it is determined that the target baseline data object and the target replicated data object are inconsistent.
In this embodiment, the first difference set is not null, which means that the target baseline data object in the baseline version is inconsistent with the target replicated data object in the replicated version, that is, the baseline version is inconsistent with the replicated version, which indicates that the version has been updated in the baseline library, and the current baseline version is not the replicated version of the user. In this scenario, as shown in fig. 6, versioning the target baseline data object and the target local data object based on the data object difference set includes:
s501, traversing the first data object in the first difference set based on the second data object in the second difference set, and determining conflict data between the first data object and the second data object.
In this embodiment, the remote server may invoke the MergeUtils. getPropertyConflictResult method, traverse a first data object in a first difference set based on a second data object in a second difference set, and determine conflicting data.
And S502, generating a conflict data set according to the conflict data, and returning the conflict data set to the local server to instruct the local server to perform version control on the data object based on the conflict data set.
In this embodiment, after determining the conflicting data, the remote server writes the conflicting data into the conflicting data set, and returns the conflicting data set to the local server as a CheckResult comparison result to instruct the local server to perform version control on the data object based on the conflicting data set.
In this embodiment, the remote server, in different scenes where the data object is simple and complex, based on different scenes where the baseline version and the replication version are the same, implements traversal comparison of the data objects in different difference sets, thereby obtaining conflict data, and returning the local data object of the local version after merging to the user, so that the user can perform version control, and implement data conflict check and version control of the granularity of the data object.
In order to allow the user using the local server to quickly determine the conflicting data, in an alternative embodiment, the method further comprises:
and if the conflict data exist, performing data marking processing on the conflict data according to a preset data marking method, and returning the conflict data subjected to the data marking processing to the local server.
In this embodiment, the remote server may perform data tagging on the conflict data in combination with the front end, for example, to realize highlighting and color difference display of changed content in cooperation with front end rendering, and then return the conflict data subjected to data tagging to the local server.
In this embodiment, the remote server performs data marking on the conflict data and returns the conflict data to the local server, so that a user can check the version record after the data marking at any time, and review and verification are facilitated.
Since the JAVA data object formats may include a plurality of formats, in order to keep the data formats of the respective JAVA data objects consistent when performing the comparison operations of different versions of the data objects, in one optional embodiment, as shown in fig. 7, determining a target baseline data object from the baseline version, determining a target local data object from the local version, and determining a target replicated data object from the replicated version includes:
s601, according to a preset annotation mark, determining an initial baseline data object from a baseline version, determining an initial local data object from a local version, and determining an initial copied data object from a copied version; the annotation identifies the data object that indicates that a comparison operation is required.
In this embodiment, the preset annotation identifier refers to an identifier of a data object or an attribute of the data object, which is used for appointing that a comparison operation needs to be performed. For example, the convention adds an annotation "@ CompareObject" after the data object needing to be compared, or adds an annotation "@ CompareParam" on the attribute in the data object needing to be compared, so that the remote server can determine the data object needing to be compared and/or the attribute needing to be compared in each version based on the annotation "@ CompareObject" and/or the annotation "@ CompareParam". Optionally, the annotation identifier may be other appointed characters, and the annotation identifier is manually added by a user when the user writes the script.
S602, according to a preset map data conversion method, converting the initial baseline data object to obtain a target baseline data object, converting the initial local data object to obtain a target local data object, and converting the initial copied data object to obtain a target copied data object.
In this embodiment, the remote server performs mapping conversion on the data objects acquired in each version based on a map data conversion method to obtain corresponding target data objects in each version. For example, in this embodiment, the remote server may call a diffhelper · checkdiff method to convert the JAVA data objects into Map sets by the propertyuls · descriptor method, thereby obtaining the target JAVA data objects in the respective versions.
In this embodiment, based on the agreed annotation identifier, the remote server may identify and acquire a data object that needs to be compared, and perform data format conversion on the data object to obtain a data object with a standardized data format, so as to provide data support for subsequent comparison of the data object.
Describing the above method with reference to a specific scenario, as shown in fig. 8, this embodiment provides a data object management method, which specifically includes:
as shown in fig. 8, the user a adds a new service locally for the first time, at this time, the baseline library has no service data, and after the user saves the new service data, the JAVA data object is stored in the process library, where the process number is 1 and the data version number is 0.
The user A modifies the local data at the moment, the data version number is still 0, the data is updated and stored in the process library after the data is submitted, and the current baseline library does not have the JAVA object data, so that a version comparison interface is not required to be called, the data is directly submitted to the baseline library by the process library data, and the baseline data version number is 1.
User A initiates JAVA object data modification operation, at the moment, local data and baseline data are consistent, the latest baseline version is used as COPY data, the COPY data is submitted to the process library after modification, at the moment, the process number is 2, the data version number is 1, when the COPY data is submitted from the process library, the baseline version is not updated, the BASE and COPY are not different, so no conflict exists, the COPY data is directly submitted to the baseline library, and the baseline data version number is 2.
User B initiates JAVA object data modification before user A initiates 1.3 modification and submits to the baseline library, the user makes modification on the COPY by taking the baseline latest version number 1 as COPY data, the user A submits to the process library after initiating 1.3 modification and submits to the baseline library, the LOCAL data flow number of user B is 3, the data version number is 1, but the baseline version is updated to version 2, the BASE and COPY objects have difference and may have conflict, MergeUtils. checkpoint method provided by the tool kit is called (the internal processing logic is shown in figure 3), three JAVA data objects of BASE/COPY/LOCAL are transmitted, the result of checkpoint operation is returned, if the check-in is successful, it is indicated that the BASE data of LOCAL and the latest version number 2 have no conflict, the JAVA data can be submitted to the process library, otherwise, the caller needs to confirm whether to abandon LOCAL data modification or check out baseline data for conflict processing and data merging operation, if the selection is detected, the background program can continuously call the MergeUtils check method, three JAVA data objects of BASE/COPY/LOCAL are transmitted, the difference set of the BASE data and the COPY data is compared with the difference object set of the COPY data and the LOCAL data, and a conflict object set checkResultList and a data object based on the LOCAL data or based on the BASE data are returned. The caller can select three different processing modes of processing each conflict by self or receiving BASE data or receiving LOCAL data to solve the conflict, the conflict can be submitted to the BASE line library after being solved, and the data version number is 3 after the BASE line library is submitted.
In this embodiment, the remote server performs comparison of the data objects based on the baseline version, the local version, and the copy version corresponding to the local version, focuses the contrast factors on the data objects, refines the granularity of the comparison operation, and can implement version control processing such as comparison, conflict processing, merging processing, and the like on the data objects in different versions, thereby filling up the technical gap that the prior art does not perform comparison on the data objects, optimizing the contrast granularity of different versions, and improving the accuracy of version control.
The implementation principle and technical effect of the data object management method provided by the above embodiment are similar to those of the above method embodiment, and are not described herein again.
It should be understood that although the various steps in the flowcharts of fig. 3-8 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 3-8 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least some of the other steps or stages.
In one embodiment, as shown in fig. 9, there is provided a data object management apparatus including:
the receiving module 01 is configured to receive a version submission request sent by a local server, where the version submission request includes a local version and a copy version; the copy version is the version before the local version is updated;
a first determination module 02 for determining a target baseline data object from the baseline version, a target local data object from the local version, and a target replicated data object from the replicated version;
a second determining module 03, configured to determine a data object difference set according to the target baseline data object, the target local data object, and the target replicated data object;
and the processing module 04 is configured to perform version control on the target baseline data object and the target local data object based on the data object difference set.
In one optional embodiment, the second determining module 03 is configured to compare the target baseline data object and the target replicated data object to determine a first difference set; and comparing the target local data object with the target copy data object to determine a second difference set.
In one optional embodiment, the second determining module 03 is configured to, in a case that the data object is a simple object, directly compare the target baseline data object with the target replicated data object, determine the first difference set, compare the target local data object with the target replicated data object, and determine the second difference set; and under the condition that the data object is a complex object, calling a recursive loop algorithm, comparing the target baseline data object with the target copy data object, determining a first difference set, comparing the target local data object with the target copy data object, and determining a second difference set.
In an alternative embodiment, the second determining module 03 is further configured to determine that the target baseline data object and the target replicated data object are consistent if the first difference set is empty.
In an optional embodiment, the processing module 04 is configured to determine conflicting data and non-conflicting data in the first difference set and the second difference set; merging the non-conflict data in the first difference set and the second difference set with the target local data object to obtain a merged target local data object; and returning the conflict data in the first difference set and the second difference set and the target local data object after the merging processing to the local server to instruct the local server to perform version control on the data object based on the conflict data set.
In an alternative embodiment, the second determining module 03 is further configured to determine that the target baseline data object and the target replicated data object are inconsistent if the first difference set is not empty.
In one optional embodiment, the processing module 04 is configured to traverse a first data object in the first difference set based on a second data object in the second difference set, and determine conflict data between the first data object and the second data object; and generating a conflict data set according to the conflict data, and returning the conflict data set to the local server to instruct the local server to carry out version control on the data object based on the conflict data set.
In an optional embodiment, as shown in fig. 10, the data object management apparatus further includes a marking module 05, configured to perform data marking processing on the conflict data according to a preset data marking method if the conflict data exists, and return the conflict data after the data marking processing to the local server.
In one optional embodiment, the first determining module 02 is configured to determine an initial baseline data object from the baseline version, an initial local data object from the local version, and an initial copied data object from the copied version according to a preset annotation identifier; the annotation identification is used for indicating a data object needing to be subjected to comparison operation; according to a preset map data conversion method, an initial baseline data object is converted to obtain a target baseline data object, an initial local data object is converted to obtain a target local data object, and an initial copied data object is converted to obtain a target copied data object.
For specific limitations of the data object management apparatus, reference may be made to the above limitations of the data object management method, which are not described herein again. The modules in the data object management device can be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 11. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a data object management method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 11 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:
receiving a version submitting request sent by a local server, wherein the version submitting request comprises a local version and a copy version; the copy version is the version before the local version is updated;
determining a target baseline data object from the baseline version, a target local data object from the local version, and a target replicated data object from the replicated version;
determining a data object difference set according to the target baseline data object, the target local data object and the target copy data object;
versioning the target baseline data object and the target local data object based on the set of data object differences.
The implementation principle and technical effect of the computer device provided by the above embodiment are similar to those of the above method embodiment, and are not described herein again.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
receiving a version submitting request sent by a local server, wherein the version submitting request comprises a local version and a copy version; the copy version is the version before the local version is updated;
determining a target baseline data object from the baseline version, a target local data object from the local version, and a target replicated data object from the replicated version;
determining a data object difference set according to the target baseline data object, the target local data object and the target copy data object;
versioning the target baseline data object and the target local data object based on the set of data object differences.
The implementation principle and technical effect of the computer-readable storage medium provided by the above embodiments are similar to those of the above method embodiments, and are not described herein again.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (12)

1. A data object management method applied to a JAVA development environment, the method comprising:
receiving a version submission request sent by a local server, wherein the version submission request comprises a local version and a copy version; the copy version is the version before the local version is updated;
determining a target baseline data object from the baseline version, a target local data object from the local version, and a target replicated data object from the replicated version;
determining a data object difference set according to the target baseline data object, the target local data object, and the target replicated data object;
versioning the target baseline data object and the target local data object based on the set of data object differences.
2. The method of claim 1, wherein determining a set of data object differences from the target baseline data object, the target local data object, and the target replicated data object comprises:
comparing the target baseline data object with the target replicated data object to determine a first difference set;
and comparing the target local data object with the target copy data object to determine a second difference set.
3. The method of claim 2, wherein the comparing operation comprises:
under the condition that a data object is a simple object, directly comparing the target baseline data object with the target copy data object to determine a first difference set, and comparing the target local data object with the target copy data object to determine a second difference set;
and under the condition that the data object is a complex object, calling a recursive loop algorithm, comparing the target baseline data object with the target copy data object, determining a first difference set, comparing the target local data object with the target copy data object, and determining a second difference set.
4. The method of claim 3, further comprising:
determining that the target baseline data object and the target replicated data object are consistent if the first difference set is empty.
5. The method of claim 4, wherein versioning the target baseline data object and the target local data object based on the set of data object differences comprises:
determining conflicting data and non-conflicting data in the first and second difference sets;
merging the non-conflict data in the first difference set and the second difference set with the target local data object to obtain a merged target local data object;
and returning the conflict data in the first difference set and the second difference set and the target local data object after the merging processing to the local server to instruct the local server to perform version control on the data object based on the conflict data set.
6. The method of claim 3, further comprising:
determining that the target baseline data object and the target replicated data object are inconsistent if the first set of differences is not empty.
7. The method of claim 6, wherein versioning the target baseline data object and the target local data object based on the set of data object differences comprises:
traversing a first data object in the first difference set based on a second data object in the second difference set, determining conflicting data between the first data object and the second data object;
and generating a conflict data set according to the conflict data, and returning the conflict data set to the local server to instruct the local server to carry out version control on the data object based on the conflict data set.
8. The method according to claim 5 or 7, characterized in that the method further comprises:
and if the conflict data exist, performing data marking processing on the conflict data according to a preset data marking method, and returning the conflict data subjected to data marking processing to the local server.
9. The method of claim 1, wherein determining a target baseline data object from the baseline version, a target local data object from the local version, and a target replicated data object from the replicated version comprises:
according to a preset annotation mark, determining an initial baseline data object from the baseline version, determining an initial local data object from the local version, and determining an initial copied data object from the copied version; the annotation identification is used for indicating a data object needing to be subjected to comparison operation;
according to a preset map data conversion method, converting the initial baseline data object to obtain the target baseline data object, converting the initial local data object to obtain the target local data object, and converting the initial copied data object to obtain the target copied data object.
10. A data object management apparatus, applied to a JAVA development system, the apparatus comprising:
the system comprises a receiving module, a judging module and a sending module, wherein the receiving module is used for receiving a version submitting request sent by a local server, and the version submitting request comprises a local version and a copy version; the copy version is the version before the local version is updated;
a first determination module to determine a target baseline data object from the baseline version, a target local data object from the local version, and a target replicated data object from the replicated version;
a second determination module to determine a data object difference set based on the target baseline data object, the target local data object, and the target replicated data object;
a processing module to perform version control on the target baseline data object and the target local data object based on the data object difference set.
11. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor realizes the steps of the method of any one of claims 1 to 9 when executing the computer program.
12. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 9.
CN202111010625.2A 2021-08-31 2021-08-31 Data object management method and device, computer equipment and storage medium Active CN113448617B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111010625.2A CN113448617B (en) 2021-08-31 2021-08-31 Data object management method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111010625.2A CN113448617B (en) 2021-08-31 2021-08-31 Data object management method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113448617A true CN113448617A (en) 2021-09-28
CN113448617B CN113448617B (en) 2022-01-25

Family

ID=77819330

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111010625.2A Active CN113448617B (en) 2021-08-31 2021-08-31 Data object management method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113448617B (en)

Citations (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1591405A (en) * 2001-11-09 2005-03-09 无锡永中科技有限公司 Edition compatible data processing system
CN101326497A (en) * 2005-12-13 2008-12-17 国际商业机器公司 Generating backup sets to a specific point in time
CN101404567A (en) * 2007-03-30 2009-04-08 赛门铁克公司 Implementing read/write, multi-versioned file system on backup data
CN104025087A (en) * 2011-12-22 2014-09-03 艾玛迪斯简易股份公司 Method and system for data filing systems
US20160357594A1 (en) * 2010-03-31 2016-12-08 Netapp Inc. Virtual machine redeployment
CN107577476A (en) * 2017-08-07 2018-01-12 中国科学院软件研究所 A kind of Android system source code difference analysis method, server and medium based on Module Division
US20180060065A1 (en) * 2016-09-01 2018-03-01 Dropbox, Inc. Advanced packaging techniques for improving work flows
EP3296862A1 (en) * 2016-09-19 2018-03-21 Palantir Technologies Inc. Version control machine
CN107870774A (en) * 2017-11-24 2018-04-03 武汉精测电子集团股份有限公司 A kind of system for AOI system software version management
US20180157486A1 (en) * 2016-12-07 2018-06-07 Sap Se Software version fingerprint generation and identification
US20190004904A1 (en) * 2014-12-19 2019-01-03 EMC IP Holding Company LLC Restore process using incremental inversion
WO2019062770A1 (en) * 2017-09-26 2019-04-04 C-Sky Microsystems Co., Ltd. System version upgrading method and apparatus
CN109582726A (en) * 2018-12-18 2019-04-05 网易(杭州)网络有限公司 The treating method and apparatus of tables of data
CN109857423A (en) * 2018-12-20 2019-06-07 Oppo广东移动通信有限公司 Program version update method, device, server and readable storage medium storing program for executing
US20190286438A1 (en) * 2018-03-15 2019-09-19 Red Hat Israel, Ltd. Incorporating version control into packaging
CN110619235A (en) * 2018-06-18 2019-12-27 松下电器(美国)知识产权公司 Management method, management apparatus, and recording medium
CN111475100A (en) * 2019-01-23 2020-07-31 伊姆西Ip控股有限责任公司 Method, apparatus and computer program product for managing a storage system
CN111949604A (en) * 2020-08-24 2020-11-17 北京明略昭辉科技有限公司 File storage method and device, electronic equipment and readable storage medium
CN111984307A (en) * 2020-08-24 2020-11-24 北京思特奇信息技术股份有限公司 Processing method and device for automatically repairing baseline version
CN112083927A (en) * 2020-07-06 2020-12-15 宁波三星医疗电气股份有限公司 Method for acquiring software SVN version information in power acquisition terminal on site

Patent Citations (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1591405A (en) * 2001-11-09 2005-03-09 无锡永中科技有限公司 Edition compatible data processing system
CN101326497A (en) * 2005-12-13 2008-12-17 国际商业机器公司 Generating backup sets to a specific point in time
CN101404567A (en) * 2007-03-30 2009-04-08 赛门铁克公司 Implementing read/write, multi-versioned file system on backup data
US20160357594A1 (en) * 2010-03-31 2016-12-08 Netapp Inc. Virtual machine redeployment
CN104025087A (en) * 2011-12-22 2014-09-03 艾玛迪斯简易股份公司 Method and system for data filing systems
US20190004904A1 (en) * 2014-12-19 2019-01-03 EMC IP Holding Company LLC Restore process using incremental inversion
US20180060065A1 (en) * 2016-09-01 2018-03-01 Dropbox, Inc. Advanced packaging techniques for improving work flows
EP3296862A1 (en) * 2016-09-19 2018-03-21 Palantir Technologies Inc. Version control machine
US20180157486A1 (en) * 2016-12-07 2018-06-07 Sap Se Software version fingerprint generation and identification
CN107577476A (en) * 2017-08-07 2018-01-12 中国科学院软件研究所 A kind of Android system source code difference analysis method, server and medium based on Module Division
WO2019062770A1 (en) * 2017-09-26 2019-04-04 C-Sky Microsystems Co., Ltd. System version upgrading method and apparatus
CN107870774A (en) * 2017-11-24 2018-04-03 武汉精测电子集团股份有限公司 A kind of system for AOI system software version management
US20190286438A1 (en) * 2018-03-15 2019-09-19 Red Hat Israel, Ltd. Incorporating version control into packaging
CN110619235A (en) * 2018-06-18 2019-12-27 松下电器(美国)知识产权公司 Management method, management apparatus, and recording medium
CN109582726A (en) * 2018-12-18 2019-04-05 网易(杭州)网络有限公司 The treating method and apparatus of tables of data
CN109857423A (en) * 2018-12-20 2019-06-07 Oppo广东移动通信有限公司 Program version update method, device, server and readable storage medium storing program for executing
CN111475100A (en) * 2019-01-23 2020-07-31 伊姆西Ip控股有限责任公司 Method, apparatus and computer program product for managing a storage system
CN112083927A (en) * 2020-07-06 2020-12-15 宁波三星医疗电气股份有限公司 Method for acquiring software SVN version information in power acquisition terminal on site
CN111949604A (en) * 2020-08-24 2020-11-17 北京明略昭辉科技有限公司 File storage method and device, electronic equipment and readable storage medium
CN111984307A (en) * 2020-08-24 2020-11-24 北京思特奇信息技术股份有限公司 Processing method and device for automatically repairing baseline version

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
曹原: "利用版本管理工具实现定制软件文档的自动化生成", 《信息通信》 *

Also Published As

Publication number Publication date
CN113448617B (en) 2022-01-25

Similar Documents

Publication Publication Date Title
CN107644286B (en) Workflow processing method and device
US20190026106A1 (en) Associating software issue reports with changes to code
US7743071B2 (en) Efficient data handling representations
US11580096B2 (en) System for uploading information into a metadata repository
US20130054539A1 (en) Database Record Repair
WO2021217846A1 (en) Interface data processing method and apparatus, and computer device and storage medium
CN111507086A (en) Automatic discovery of translation text location in localized applications
CN114925084B (en) Distributed transaction processing method, system, equipment and readable storage medium
US9116934B2 (en) Holistic database record repair
EP3113016A1 (en) Tracing dependencies between development artifacts in a development project
US11823086B2 (en) Membership analyzing method, apparatus, computer device and storage medium
EP3495971A1 (en) Method and device for database design and creation
CN113448617B (en) Data object management method and device, computer equipment and storage medium
CN111984659A (en) Data updating method and device, computer equipment and storage medium
CN113867700B (en) Model construction method, display platform, server and storage medium
CN113515444B (en) Test case generation method, device, computer equipment and storage medium
CN113254455A (en) Dynamic configuration method and device of database, computer equipment and storage medium
WO2021234019A1 (en) Database management methods and associated apparatus
WO2017072872A1 (en) Business program generation assistance system and business program generation assistance method
JP4957043B2 (en) Information processing apparatus, program, and business application introduction method
CN113377367B (en) Data collection method, device, computer equipment and storage medium
CN117687681B (en) Version management method and system for low-code application
CN114327435A (en) Technical document generation method and device and computer readable storage medium
CN117389862A (en) Method, device, computer equipment and storage medium for processing code conflict
CN110162507B (en) Snapshot overwriting method, device, computer equipment 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
GR01 Patent grant
GR01 Patent grant