CN110018845B - Metadata version comparison method and device - Google Patents

Metadata version comparison method and device Download PDF

Info

Publication number
CN110018845B
CN110018845B CN201910305308.XA CN201910305308A CN110018845B CN 110018845 B CN110018845 B CN 110018845B CN 201910305308 A CN201910305308 A CN 201910305308A CN 110018845 B CN110018845 B CN 110018845B
Authority
CN
China
Prior art keywords
metadata
data
version
state
piece
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.)
Active
Application number
CN201910305308.XA
Other languages
Chinese (zh)
Other versions
CN110018845A (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.)
Chengdu Sefon Software Co Ltd
Original Assignee
Chengdu Sefon Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengdu Sefon Software Co Ltd filed Critical Chengdu Sefon Software Co Ltd
Priority to CN201910305308.XA priority Critical patent/CN110018845B/en
Publication of CN110018845A publication Critical patent/CN110018845A/en
Application granted granted Critical
Publication of CN110018845B publication Critical patent/CN110018845B/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

Abstract

The application provides a metadata version comparison method and device. The method comprises the steps of analyzing a received metadata version comparison instruction to obtain respective version numbers of a first metadata version and a second metadata version, searching metadata feature sets corresponding to the two version numbers, extracting a state group and a timestamp group corresponding to each metadata in the two metadata feature sets, comparing two data states of each metadata in the corresponding state groups according to two data timestamps of each metadata in the corresponding timestamp groups, and identifying the change condition of each metadata between the first metadata version and the second metadata version according to a comparison result, so that the metadata version comparison process with low consumption of computing resources and high comparison efficiency is realized, and the influence on the operation of other application programs is avoided.

Description

Metadata version comparison method and device
Technical Field
The application relates to the technical field of data management, in particular to a metadata version comparison method and device.
Background
With the continuous development of network technology, the role of data governance technology in the field of data overall planning management becomes more important, and the data governance technology can periodically collect metadata and generate a plurality of metadata versions in the implementation process.
At present, after obtaining each metadata version, a data management manager stores a metadata set corresponding to each metadata version, and directly calls the metadata set of the corresponding version to perform data comparison when the metadata sets of different versions need to be selected for version comparison, so as to obtain a corresponding version comparison result. However, this metadata version comparison scheme needs to consume a large amount of computing resources, and the overall comparison process is time-consuming, which is likely to affect the normal operation of other application programs.
Disclosure of Invention
In order to overcome the above disadvantages in the prior art, an object of the present application is to provide a method and an apparatus for comparing metadata versions, which can save computing resources, quickly complete a metadata version comparison process, and avoid affecting the operation of other applications.
As a method, an embodiment of the present application provides a metadata version comparison method, where the method includes:
acquiring a metadata version comparison instruction, and analyzing the version comparison instruction to obtain respective version numbers of a first metadata version and a second metadata version;
according to the respective version numbers of the first metadata version and the second metadata version, searching a metadata feature set corresponding to the respective version numbers, wherein the metadata feature set comprises an identity, a data state and a data timestamp of each piece of metadata in the metadata set corresponding to the version number;
extracting a state group and a timestamp group corresponding to each piece of metadata from the two found metadata feature sets according to the identity of each piece of metadata, wherein the state group comprises data states corresponding to the metadata in the two metadata feature sets, and the timestamp group comprises data timestamps corresponding to the metadata in the two metadata feature sets;
and comparing two data states of each metadata in the corresponding state group according to two data timestamps of each metadata in the corresponding timestamp group, and identifying the change condition of each metadata between the first metadata version and the second metadata version according to the comparison result.
As for a device, an embodiment of the present application provides a metadata version comparison device, where the device includes:
the comparison instruction analysis module is used for acquiring a metadata version comparison instruction and analyzing the version comparison instruction to obtain respective version numbers of the first metadata version and the second metadata version;
the feature set searching module is used for searching a metadata feature set corresponding to each of the first metadata version and the second metadata version according to the respective version numbers of the first metadata version and the second metadata version, wherein the metadata feature set comprises an identity, a data state and a data timestamp of each piece of metadata in the metadata set corresponding to the version number;
a comparison feature extraction module, configured to extract a state group and a timestamp group corresponding to each piece of metadata from the two found metadata feature sets according to the identity of each piece of metadata, where the state group includes data states corresponding to the metadata in the two metadata feature sets, and the timestamp group includes data timestamps corresponding to the metadata in the two metadata feature sets;
and the characteristic comparison and identification module is used for comparing two data states of each piece of metadata in the corresponding state group according to two data timestamps of each piece of metadata in the corresponding timestamp group, and identifying the change condition of each piece of metadata between the first metadata version and the second metadata version according to the comparison result.
Compared with the prior art, the method has the following beneficial effects:
the method comprises the steps of analyzing a received metadata version comparison instruction to obtain respective version numbers of a first metadata version and a second metadata version, searching metadata feature sets corresponding to the two version numbers, extracting a state group and a timestamp group corresponding to each metadata in the two metadata feature sets, comparing two data states of each metadata in the corresponding state groups according to two data timestamps of each metadata in the corresponding timestamp groups, and identifying the change condition of each metadata between the first metadata version and the second metadata version according to a comparison result, so that the metadata version comparison process with low consumption of computing resources and high comparison efficiency is realized, and the influence on the operation of other application programs is avoided.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments are briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope of protection of the present application, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
FIG. 1 is a block diagram of a computing device provided by an embodiment of the present application;
FIG. 2 is a flowchart illustrating a metadata version comparison method according to an embodiment of the present application;
fig. 3 is a second flowchart illustrating a metadata version comparison method according to an embodiment of the present application;
fig. 4 is a third schematic flowchart of a metadata version comparison method according to an embodiment of the present application;
FIG. 5 is a block diagram of a metadata version comparison apparatus according to an embodiment of the present application;
FIG. 6 is a second block diagram of a metadata version comparison apparatus according to an embodiment of the present application;
fig. 7 is a third block diagram of a metadata version comparison apparatus according to an embodiment of the present application.
Icon: 10-a computing device; 11-a memory; 12-a processor; 13-a communication unit; 100-metadata version comparison means; 110-compare instruction parsing module; 120-feature set lookup module; 130-contrast feature extraction module; 140-a feature comparison identification module; 150-a data content display module; 160-data state determination module; 170-incremental storage regulation and control module; 180-feature set generation module.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
In the description of the present application, it is noted that the terms "first", "second", "third", and the like are used merely for distinguishing between descriptions and are not intended to indicate or imply relative importance. The specific meaning of the above terms in the present application can be understood in a specific case by those of ordinary skill in the art.
Some embodiments of the present application will be described in detail below with reference to the accompanying drawings. The embodiments described below and the features of the embodiments can be combined with each other without conflict.
Fig. 1 is a block diagram of a computing device 10 according to an embodiment of the present disclosure. In the embodiment of the present application, the computing device 10 may be configured to perform data governance, and perform version comparison on metadata sets of each version obtained in the data governance process. The computing device 10 includes a metadata version comparison apparatus 100, a memory 11, a processor 12, and a communication unit 13. The various elements of the memory 11, the processor 12 and the communication unit 13 are electrically connected to each other directly or indirectly to realize data transmission or interaction. For example, the memory 11, the processor 12 and the communication unit 13 may be electrically connected to each other through one or more communication buses or signal lines. The computing device 10 may be, but is not limited to, a Personal Computer (PC), a server, a tablet computer, a Personal Digital Assistant (PDA), a Mobile Internet Device (MID), and the like.
In this embodiment, the memory 11 may be configured to store the data content of each piece of metadata in the metadata set corresponding to each metadata version for incremental storage, and the memory 11 may also be configured to store the metadata feature set corresponding to each metadata version. Each metadata version corresponds to a version number, the version number is used for representing identity information of the corresponding metadata version, and the metadata feature set comprises an identity, a data state and a data timestamp of each metadata in the metadata set corresponding to the version number. The corresponding identification of the same metadata in different metadata versions is the same, the data timestamp represents the value of the acquired time point of the corresponding metadata, and the data state represents the change state of the corresponding metadata between two adjacent versions.
The data state comprises a new adding state, a deleting state and a modifying state. The new adding state represents that the corresponding metadata is added between two adjacent versions, the deleting state represents that the corresponding metadata is deleted between two adjacent versions, and the modifying state represents that the corresponding metadata is modified between two adjacent versions.
In this embodiment, the memory 11 is further configured to store a computer instruction or a computer program, and the processor 12 may execute the computer instruction or the computer program after receiving the execution instruction.
In the present embodiment, the Processor 12 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a Network Processor (NP), and the like. The general purpose processor may be a microprocessor or the processor may be any conventional processor or the like that implements or executes the methods, steps and logic blocks disclosed in the embodiments of the present application.
In this embodiment, the communication unit 13 is configured to establish a communication connection between the computing device 10 and another external device through a network, and to send and receive data through the network.
In this embodiment, the metadata version comparison apparatus 100 includes at least one software function module capable of being stored in the memory 11 in the form of software or firmware or being solidified in the operating system of the computing device 10. The processor 12 may be used to execute executable modules stored in the memory 11, such as software functional modules and computer programs included in the metadata version comparison apparatus 100. The computing device 10 can implement a metadata version comparison process with low computing resource consumption and high comparison efficiency by using the metadata version comparison apparatus 100, and avoid affecting the operation of other application programs.
It will be appreciated that the block diagram shown in FIG. 1 is merely a schematic representation of one configuration of computing device 10, and that computing device 10 may include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1. The components shown in fig. 1 may be implemented in hardware, software, or a combination thereof.
Fig. 2 is a flowchart illustrating a metadata version comparison method according to an embodiment of the present application. In the embodiment of the present application, the metadata version comparison method is applied to the computing device 10, and the specific flow and steps of the metadata version comparison method shown in fig. 2 are described in detail below.
Step S210, obtaining a metadata version comparison instruction, and analyzing the version comparison instruction to obtain respective version numbers of the first metadata version and the second metadata version.
In this embodiment, the data administration manager may issue a metadata version comparison instruction corresponding to the version comparison requirement to the computing device 10 according to the version comparison requirement, so that the computing device 10 performs a corresponding metadata version comparison process. After the computing device 10 receives the metadata version comparison instruction, the version comparison instruction is subjected to data analysis to obtain a version number corresponding to the first metadata version and a version number corresponding to the second metadata version included in the version comparison instruction. The first metadata version and the second metadata version are two metadata versions participating in the metadata version comparison process.
Step S220, according to the respective version numbers of the first metadata version and the second metadata version, searching a metadata feature set corresponding to each of the two version numbers.
In this embodiment, the computing device 10 stores metadata feature sets corresponding to a plurality of metadata versions, and the computing device 10 finds the metadata feature sets corresponding to two respective version numbers from all the stored metadata feature sets by using the respective version numbers of the first metadata version and the second metadata version as indexes. The metadata feature set comprises an identity, a data state and a data timestamp of each piece of metadata in the metadata set corresponding to the version number.
And step S230, extracting a state group and a timestamp group corresponding to each piece of metadata from the two found metadata feature sets according to the identity of each piece of metadata.
In this embodiment, the state group corresponding to each piece of metadata includes a data state corresponding to the metadata in each of the two metadata feature sets, and the timestamp group corresponding to each piece of metadata includes a data timestamp corresponding to the metadata in each of the two metadata feature sets. Extracting a state group and a timestamp group corresponding to each piece of metadata from the two found metadata feature sets according to the identity of each piece of metadata comprises the following steps:
in the two found metadata feature sets, extracting metadata features of each piece of metadata in the corresponding metadata feature set according to the identity of the metadata, wherein the metadata features comprise the identity, the data state and the data timestamp of the corresponding metadata;
and performing data sorting on the two metadata features with the same identity identifier to obtain a state group and a timestamp group of the metadata corresponding to the identity identifier at the two metadata feature sets.
Step S240, comparing the two data states of each metadata in the corresponding state group according to the two data timestamps of each metadata in the corresponding timestamp group, and identifying the change condition of each metadata between the first metadata version and the second metadata version according to the comparison result.
In this embodiment, when the computing device 10 obtains a state group and a timestamp group corresponding to each piece of metadata and matching the first metadata version and the second metadata version, the computing device 10 compares two data states of the same piece of metadata in the corresponding state group according to two data timestamps of each piece of metadata in the corresponding timestamp group, so as to identify a change condition of the piece of metadata between the first metadata version and the second metadata version according to a comparison result, and obtain a change condition of each piece of metadata between the first metadata version and the second metadata version, thereby implementing a metadata version comparison process with low computing resource consumption and high comparison efficiency, and avoiding affecting the operation of other application programs.
Optionally, in this embodiment, the step of identifying, according to the comparison result, a change condition of each piece of metadata between the first metadata version and the second metadata version includes:
for each piece of metadata, if the comparison result is that the data state of the metadata corresponding to the smaller data timestamp of the two data timestamps is a new adding state or a deleting state, and the data state of the metadata corresponding to the larger data timestamp of the two data timestamps is a modification state, determining that the metadata is modified between the first metadata version and the second metadata version;
if the comparison result is that the data state of the metadata corresponding to the smaller data timestamp of the two data timestamps is one of a new adding state, a modifying state and a deleting state, and the data state of the metadata corresponding to the larger data timestamp of the two data timestamps is a deleting state, judging that the metadata is deleted between the first metadata version and the second metadata version;
and if the comparison result is that the data state of the metadata corresponding to the smaller data timestamp of the two data timestamps is a deletion state or a modification state, and the data state of the metadata corresponding to the larger data timestamp of the two data timestamps is an addition state, determining that the metadata is added between the first metadata version and the second metadata version.
Optionally, in this embodiment, the step of identifying a change condition of each piece of metadata between the first metadata version and the second metadata version according to the comparison result further includes:
and if the comparison result shows that the two data states of the metadata in the corresponding state group are the same and are not deletion states, judging that the metadata is kept unchanged between the first metadata version and the second metadata version.
Fig. 3 is a second flowchart illustrating a metadata version comparison method according to an embodiment of the present application. In this embodiment of the present application, the metadata version comparison method may further include step S250.
Step S250, after the change condition of each piece of metadata between the first metadata version and the second metadata version is identified, displaying the incrementally stored data content of each piece of metadata corresponding to the metadata version with the larger data timestamp in the first metadata version and the second metadata version.
In this embodiment, after the computing device 10 obtains the change condition of each piece of metadata that needs to be version-compared between the first metadata version and the second metadata version, the computing device 10 displays the incrementally-stored data content of each piece of metadata corresponding to the metadata version with the larger data timestamp in the first metadata version and the second metadata version, so that a data governance manager can directly observe the change condition of the specific metadata content.
Fig. 4 is a third flowchart illustrating a metadata version comparison method according to an embodiment of the present application. In the embodiment of the present application, the metadata version comparison method further includes step S260, step S270, and step S280.
Step S260, when the currently acquired metadata set needs to be stored, determining a data state of each metadata in the current metadata set according to the data content of each metadata in the current metadata set and the data state of each metadata in the latest recorded metadata feature set.
In this embodiment, when the computing device 10 acquires a metadata set corresponding to a metadata version that needs to be stored currently, the computing device 10 determines a data state of each piece of metadata in the current metadata set according to a data content of each piece of metadata in the current metadata set and a data state of each piece of metadata in a metadata feature set of a metadata version that is recorded recently.
Optionally, the step of determining, according to the data content of each piece of metadata in the current metadata set and the data state of each piece of metadata in the most recently recorded metadata feature set, the data state of each piece of metadata in the current metadata set includes:
for each piece of metadata in the current metadata set, if the data state of the metadata in the most recently recorded metadata feature set is one of a newly added state, a modified state and a deleted state, and the data content of the metadata in the current metadata set is empty, determining that the data state of the metadata in the current metadata set is the deleted state;
if the data state of the metadata in the latest recorded metadata feature set is a deleted state and the data content of the metadata in the current metadata set is not empty, judging that the data state of the metadata in the current metadata set is a newly added state;
if the data state of the metadata in the latest recorded metadata feature set is a new addition state or a modification state, and the data content of the metadata in the current metadata set is not empty, comparing the data content of the metadata in the current metadata set with the data content of the metadata in the metadata set corresponding to the latest recorded metadata feature set;
when the comparison result is that the data contents are the same, judging that the data state of the metadata at the current metadata set is the same as the data state of the metadata in the latest recorded metadata feature set;
and when the comparison result shows that the data contents are different, judging that the data state of the metadata at the current metadata set is a modified state.
When the data state of a certain piece of metadata in the latest recorded metadata feature set is a new added state or a modified state, and the data content of the metadata in the current metadata set is not empty, the computing device 10 compares the data content corresponding to the metadata in the latest recorded metadata feature set with the data content of the metadata in the current metadata set, so as to determine the data state of the metadata in the current metadata set according to the comparison result. If the comparison result of the data content corresponding to the metadata is that the data content is the same, judging that the data state of the metadata at the current metadata set is the same as the data state of the metadata in the latest recorded metadata feature set; and if the comparison result of the data contents corresponding to the metadata is that the data contents are different, judging that the data state of the metadata at the current metadata set is a modified state.
And step S270, performing incremental storage on the data content of the corresponding metadata according to the data state of each piece of metadata in the current metadata set.
In this embodiment, when the data state of a certain piece of metadata in the current metadata set is a newly added state, the computing device 10 directly stores the current data content of the metadata; when the data state of a certain piece of metadata in the current metadata set is a deleted state, the computing device 10 directly stores the current data content of the metadata as null; when the data state of a piece of metadata in the current metadata set is a modified state, the computing device 10 compares the data content of the metadata in the current metadata set with the data content of the metadata in the latest version of the metadata set, and performs incremental storage for specific data content differences.
Step S280, generating a version number corresponding to the current metadata set, and generating and recording a corresponding metadata feature set according to the generated version number and the data state, the identity and the data timestamp corresponding to each piece of metadata in the current metadata set.
In this embodiment, when the computing device 10 generates a corresponding metadata feature set for a current metadata set, the computing device 10 generates a version number corresponding to the current metadata set, and generates a metadata feature set including an identity, a data state, and a data timestamp of each piece of metadata corresponding to the current version number of each piece of metadata according to the identity, the data state, and the data timestamp of each piece of metadata in the current metadata set.
Fig. 5 is a block diagram of a metadata version comparison apparatus 100 according to an embodiment of the present application. In the embodiment of the present application, the metadata version comparison apparatus 100 includes a comparison instruction parsing module 110, a feature set searching module 120, a comparison feature extracting module 130, and a feature comparison identifying module 140.
The comparison instruction parsing module 110 is configured to obtain a metadata version comparison instruction, and parse the version comparison instruction to obtain respective version numbers of the first metadata version and the second metadata version.
In this embodiment, the comparison instruction parsing module 110 may execute step S210 in fig. 2, and the specific execution process may refer to the above detailed description of step S210.
The feature set searching module 120 is configured to search, according to respective version numbers of the first metadata version and the second metadata version, a metadata feature set corresponding to each of the two version numbers.
In this embodiment, the metadata feature set includes an identity, a data state, and a data timestamp of each piece of metadata in the metadata set corresponding to the version number. The feature set searching module 120 may execute step S220 in fig. 2, and the specific execution process may refer to the above detailed description of step S220.
The comparison feature extraction module 130 is configured to extract a state group and a timestamp group corresponding to each piece of metadata from the two found metadata feature sets according to the identity of each piece of metadata.
In this embodiment, the state group corresponding to each piece of metadata includes a data state corresponding to the metadata in each of the two metadata feature sets, and the timestamp group corresponding to each piece of metadata includes a data timestamp corresponding to the metadata in each of the two metadata feature sets. The comparison feature extraction module 130 may execute step S230 in fig. 2, and the specific execution process may refer to the above detailed description of step S230.
The feature comparison and identification module 140 is configured to compare two data states of each piece of metadata in the corresponding state group according to two data timestamps of each piece of metadata in the corresponding timestamp group, and identify a change condition of each piece of metadata between the first metadata version and the second metadata version according to a comparison result.
In this embodiment, the feature comparison and identification module 140 may execute step S240 in fig. 2, and the specific execution process may refer to the above detailed description of step S240.
Fig. 6 is a second block diagram of a metadata version comparison apparatus 100 according to an embodiment of the present application. In the embodiment of the present application, the metadata version comparison apparatus 100 further includes a data content display module 150.
The data content display module 150 is configured to display, after a change condition of each piece of metadata between the first metadata version and the second metadata version is identified, data content of each piece of metadata that is incrementally stored and corresponds to a metadata version with a larger data timestamp in the first metadata version and the second metadata version.
In this embodiment, the data content display module 150 may execute step S250 in fig. 3, and the specific execution process may refer to the above detailed description of step S250.
Fig. 7 is a third block diagram of a metadata version comparison apparatus 100 according to an embodiment of the present application. In this embodiment, the metadata version comparison apparatus 100 may further include a data state determination module 160, an incremental storage regulation module 170, and a feature set generation module 180.
The data state determining module 160 is configured to determine, when the currently acquired metadata set needs to be stored, a data state of each piece of metadata in the current metadata set according to the data content of each piece of metadata in the current metadata set and a data state of each piece of metadata in the recently recorded metadata feature set.
In this embodiment, the data state determining module 160 may execute step S260 in fig. 4, and the specific execution process may refer to the above detailed description of step S260.
The incremental storage regulating module 170 is configured to perform incremental storage on the data content of each metadata in the current metadata set according to the data state of each metadata.
In this embodiment, the incremental storage regulating and controlling module 170 may execute step S270 in fig. 4, and the specific execution process may refer to the above detailed description of step S270.
The feature set generating module 180 is configured to generate a version number corresponding to the current metadata set, and generate and record a corresponding metadata feature set according to the generated version number and a data state, an identity, and a data timestamp corresponding to each piece of metadata in the current metadata set.
In this embodiment, the feature set generating module 180 may execute step S280 in fig. 4, and the specific execution process may refer to the above detailed description of step S280.
In summary, in the metadata version comparison method and apparatus provided by the present application, the present application obtains the respective version numbers of the first metadata version and the second metadata version by analyzing the received metadata version comparison instruction, then searching the metadata feature sets corresponding to the two version numbers respectively, extracting a state group and a time stamp group corresponding to each metadata in the two metadata feature sets, finally comparing the two data states of each metadata in the corresponding state group according to the two data time stamps of each metadata in the corresponding time stamp group, to identify the change condition of each piece of metadata between the first metadata version and the second metadata version according to the comparison result, therefore, the metadata version comparison process with low computing resource consumption and high comparison efficiency is realized, and the influence on the operation of other application programs is avoided.
The above description is only for various embodiments of the present application, but the scope of the present application is not limited thereto, and any modifications or equivalent substitutions that can be easily made by those skilled in the art within the technical scope of the present application are included in the scope of the present application.

Claims (10)

1. A method for metadata version comparison, the method comprising:
acquiring a metadata version comparison instruction, and analyzing the version comparison instruction to obtain respective version numbers of a first metadata version and a second metadata version;
according to the respective version numbers of the first metadata version and the second metadata version, searching a metadata feature set corresponding to the respective version numbers, wherein the metadata feature set comprises an identity, a data state and a data timestamp of each piece of metadata in the metadata set corresponding to the version number;
extracting a state group and a timestamp group corresponding to each piece of metadata from the two found metadata feature sets according to the identity of each piece of metadata, wherein the state group comprises data states corresponding to the metadata in the two metadata feature sets, the timestamp group comprises data timestamps corresponding to the metadata in the two metadata feature sets, and the data states are used for representing the change states of the corresponding metadata between two adjacent versions;
and comparing two data states of each metadata in the corresponding state group according to two data timestamps of each metadata in the corresponding timestamp group, and identifying the change condition of each metadata between the first metadata version and the second metadata version according to the comparison result.
2. The method according to claim 1, wherein the extracting a state group and a timestamp group corresponding to each piece of metadata from the two found metadata feature sets according to the identity of each piece of metadata includes:
in the two found metadata feature sets, extracting metadata features of each piece of metadata in the corresponding metadata feature set according to the identity of the metadata, wherein the metadata features comprise the identity, the data state and the data timestamp of the corresponding metadata;
and performing data sorting on the two metadata features with the same identity identifier to obtain a state group and a timestamp group of the metadata corresponding to the identity identifier at the two metadata feature sets.
3. The method of claim 1, further comprising:
and when the change condition of each piece of metadata between the first metadata version and the second metadata version is identified, displaying the data content of each piece of metadata, which is stored in an increment mode and corresponds to the metadata version with the larger data time stamp in the first metadata version and the second metadata version.
4. The method according to any one of claims 1-3, further comprising:
when a currently acquired metadata set needs to be stored, determining the data state of each metadata in the current metadata set according to the data content of each metadata in the current metadata set and the data state of each metadata in the latest recorded metadata feature set;
performing incremental storage on data contents of corresponding metadata according to the data state of each piece of metadata in the current metadata set;
and generating a version number corresponding to the current metadata set, and generating and recording a corresponding metadata feature set according to the generated version number and the data state, the identity and the data timestamp corresponding to each piece of metadata in the current metadata set.
5. The method according to claim 4, wherein determining the data state of each piece of metadata at the current metadata set according to the data content of each piece of metadata in the current metadata set and the data state of each piece of metadata in the latest recorded metadata feature set comprises:
for each piece of metadata in the current metadata set, if the data state of the metadata in the most recently recorded metadata feature set is one of a newly added state, a modified state and a deleted state, and the data content of the metadata in the current metadata set is empty, determining that the data state of the metadata in the current metadata set is the deleted state;
if the data state of the metadata in the latest recorded metadata feature set is a deleted state and the data content of the metadata in the current metadata set is not empty, judging that the data state of the metadata in the current metadata set is a newly added state;
if the data state of the metadata in the latest recorded metadata feature set is a new addition state or a modification state, and the data content of the metadata in the current metadata set is not empty, comparing the data content of the metadata in the current metadata set with the data content of the metadata in the metadata set corresponding to the latest recorded metadata feature set;
when the comparison result is that the data contents are the same, judging the data state of the metadata at the current metadata set, and keeping the data state of the metadata in the latest recorded metadata feature set consistent with the data state of the metadata;
and when the comparison result shows that the data contents are different, judging that the data state of the metadata at the current metadata set is a modified state.
6. The method of claim 5, wherein identifying the change condition of each piece of metadata between the first metadata version and the second metadata version according to the comparison result comprises:
for each piece of metadata, if the comparison result is that the data state of the metadata corresponding to the smaller data timestamp of the two data timestamps is a new adding state or a deleting state, and the data state of the metadata corresponding to the larger data timestamp of the two data timestamps is a modification state, determining that the metadata is modified between the first metadata version and the second metadata version;
if the comparison result is that the data state of the metadata corresponding to the smaller data timestamp of the two data timestamps is one of a new adding state, a modifying state and a deleting state, and the data state of the metadata corresponding to the larger data timestamp of the two data timestamps is a deleting state, judging that the metadata is deleted between the first metadata version and the second metadata version;
and if the comparison result is that the data state of the metadata corresponding to the smaller data timestamp of the two data timestamps is a deletion state or a modification state, and the data state of the metadata corresponding to the larger data timestamp of the two data timestamps is an addition state, determining that the metadata is added between the first metadata version and the second metadata version.
7. The method of claim 6, wherein identifying the change condition of each piece of metadata between the first metadata version and the second metadata version according to the comparison result further comprises:
and if the comparison result shows that the two data states of the metadata in the corresponding state group are the same and are not deletion states, judging that the data content of the metadata is kept unchanged between the first metadata version and the second metadata version.
8. An apparatus for comparing metadata versions, the apparatus comprising:
the comparison instruction analysis module is used for acquiring a metadata version comparison instruction and analyzing the version comparison instruction to obtain respective version numbers of the first metadata version and the second metadata version;
the feature set searching module is used for searching a metadata feature set corresponding to each of the first metadata version and the second metadata version according to the respective version numbers of the first metadata version and the second metadata version, wherein the metadata feature set comprises an identity, a data state and a data timestamp of each piece of metadata in the metadata set corresponding to the version number;
a comparison feature extraction module, configured to extract a state group and a timestamp group corresponding to each piece of metadata from the two found metadata feature sets according to the identity of each piece of metadata, where the state group includes data states corresponding to the respective pieces of metadata in the two metadata feature sets, the timestamp group includes data timestamps corresponding to the respective pieces of metadata in the two metadata feature sets, and the data state is used to indicate a change state of the corresponding piece of metadata between two adjacent versions;
and the characteristic comparison and identification module is used for comparing two data states of each piece of metadata in the corresponding state group according to two data timestamps of each piece of metadata in the corresponding timestamp group, and identifying the change condition of each piece of metadata between the first metadata version and the second metadata version according to the comparison result.
9. The apparatus of claim 8, further comprising:
and the data content display module is used for displaying the data content of each piece of metadata, which is stored in an increment mode and corresponds to the metadata version with the larger data time stamp in the first metadata version and the second metadata version, after the change condition of each piece of metadata between the first metadata version and the second metadata version is identified.
10. The apparatus of claim 8 or 9, further comprising:
the data state determining module is used for determining the data state of each metadata in the current metadata set according to the data content of each metadata in the current metadata set and the data state of each metadata in the latest recorded metadata feature set when the currently acquired metadata set needs to be stored;
the incremental storage regulation and control module is used for incrementally storing the data content of the corresponding metadata according to the data state of each metadata in the current metadata set;
and the feature set generation module is used for generating a version number corresponding to the current metadata set, and generating and recording a corresponding metadata feature set according to the generated version number and the data state, the identity and the data time stamp corresponding to each piece of metadata in the current metadata set.
CN201910305308.XA 2019-04-16 2019-04-16 Metadata version comparison method and device Active CN110018845B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910305308.XA CN110018845B (en) 2019-04-16 2019-04-16 Metadata version comparison method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910305308.XA CN110018845B (en) 2019-04-16 2019-04-16 Metadata version comparison method and device

Publications (2)

Publication Number Publication Date
CN110018845A CN110018845A (en) 2019-07-16
CN110018845B true CN110018845B (en) 2020-09-18

Family

ID=67191520

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910305308.XA Active CN110018845B (en) 2019-04-16 2019-04-16 Metadata version comparison method and device

Country Status (1)

Country Link
CN (1) CN110018845B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110427384A (en) * 2019-07-30 2019-11-08 北京明略软件系统有限公司 The sending method and device of prompt information, storage medium, electronic device
CN111427966B (en) * 2020-06-10 2020-09-22 腾讯科技(深圳)有限公司 Database transaction processing method and device and server
CN111782909A (en) * 2020-07-01 2020-10-16 中国银行股份有限公司 Method and device for recording metadata, electronic equipment and computer-readable storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9280568B2 (en) * 2012-11-20 2016-03-08 Sap Se Zero downtime schema evolution
CN105893512A (en) * 2016-03-30 2016-08-24 北京忆唐创元文化有限公司 Any version compatible data structure access method and device based on metadata
CN107943930A (en) * 2017-11-22 2018-04-20 用友金融信息技术股份有限公司 Dynamic list generation method, device, computer equipment and readable storage medium storing program for executing
CN109241358A (en) * 2018-08-14 2019-01-18 中国平安财产保险股份有限公司 Metadata management method, device, computer equipment and storage medium
CN109144980A (en) * 2018-08-21 2019-01-04 成都四方伟业软件股份有限公司 Metadata management method, device and electronic equipment

Also Published As

Publication number Publication date
CN110018845A (en) 2019-07-16

Similar Documents

Publication Publication Date Title
CN110018845B (en) Metadata version comparison method and device
CN108399072B (en) Application page updating method and device
CN110245069B (en) Page version testing method and device and page display method and device
CN108536745B (en) Shell-based data table extraction method, terminal, equipment and storage medium
CN110347399B (en) Data processing method, real-time computing system and information system
CN112162965A (en) Log data processing method and device, computer equipment and storage medium
US20220138074A1 (en) Method, electronic device and computer program product for processing data
CN111274256A (en) Resource control method, device, equipment and storage medium based on time sequence database
CN111400126A (en) Network service abnormal data detection method, device, equipment and medium
CN110442439B (en) Task process processing method and device and computer equipment
CN112114907A (en) Application loading method based on e-commerce cloud computing and artificial intelligence computing center
CN116955856A (en) Information display method, device, electronic equipment and storage medium
CN111737443A (en) Answer text processing method and device and key text determining method
CN115454971A (en) Data migration method and device, electronic equipment and storage medium
CN113590447B (en) Buried point processing method and device
CN113849195A (en) Application program loading method and device, storage medium and terminal
CN112184027A (en) Task progress updating method and device and storage medium
CN114090083A (en) Visual component configuration method, device, equipment and storage medium
CN113656443B (en) Data disassembling method and device, electronic equipment and storage medium
CN113312050B (en) Content display method, device, equipment and medium
US20230013075A1 (en) Determining candidates for circuit breaker patterns in cloud applications using machine learning techniques
CN110880999B (en) Electronic red packet identification method and device and terminal equipment
CN115878464A (en) Method, device and equipment for scheduling use case tasks and storage medium
CN117376340A (en) File uploading method, device, computer equipment and storage medium
CN113282814A (en) Characteristic data processing method, device, server 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