CN111782909A - Method and device for recording metadata, electronic equipment and computer-readable storage medium - Google Patents

Method and device for recording metadata, electronic equipment and computer-readable storage medium Download PDF

Info

Publication number
CN111782909A
CN111782909A CN202010621792.XA CN202010621792A CN111782909A CN 111782909 A CN111782909 A CN 111782909A CN 202010621792 A CN202010621792 A CN 202010621792A CN 111782909 A CN111782909 A CN 111782909A
Authority
CN
China
Prior art keywords
metadata
data
version attribute
field
type
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010621792.XA
Other languages
Chinese (zh)
Inventor
徐雅光
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Bank of China Ltd
Original Assignee
Bank of China 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 Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202010621792.XA priority Critical patent/CN111782909A/en
Publication of CN111782909A publication Critical patent/CN111782909A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/907Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually

Landscapes

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

Abstract

The invention provides a method, a device, electronic equipment and a computer readable storage medium for recording metadata, wherein when the metadata corresponding to at least one kind of data in business data changes, the version attribute corresponding to the metadata is changed, each kind of data corresponds to one kind of metadata, the version attribute is used for representing whether the metadata corresponding to each kind of data in the business data changes, and then the change condition of the metadata is obtained according to the changed version attribute. Therefore, when the metadata corresponding to one kind of data in the service data changes or the metadata corresponding to various kinds of data in the service data changes simultaneously, the version attribute of the metadata changes correspondingly, so that the metadata corresponding to one kind or several kinds of data in the service data can be known to change according to the change of the version attribute, the change condition of the metadata can be obtained according to the changed version attribute, and the change of the metadata can be traced safely and effectively.

Description

Method and device for recording metadata, electronic equipment and computer-readable storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method and an apparatus for recording metadata, an electronic device, and a computer-readable storage medium.
Background
During the product and project life cycle, the metadata corresponding to the data may change due to changes in demand or other factors. At present, only the change of data is recorded, an effective method is not available for recording the change of metadata, and the change of the metadata cannot be traced safely and effectively, so that the problems of information distortion and the like of the data in development and maintenance are caused.
Disclosure of Invention
In view of the above, the present invention provides a method, an apparatus, an electronic device and a computer-readable storage medium for recording metadata, which can safely and effectively trace back the change of the metadata.
In order to achieve the purpose, the invention has the following technical scheme:
a method of recording metadata, comprising:
when metadata corresponding to at least one type of data in the service data changes, changing the version attribute corresponding to the metadata; each kind of the data corresponds to a kind of metadata; the version attribute is used for representing whether metadata corresponding to each type of the service data is changed;
and acquiring the change condition of the metadata according to the changed version attribute.
Optionally, the obtaining the change condition of the metadata according to the changed version attribute specifically includes:
and acquiring metadata corresponding to different version attributes respectively to acquire the change condition of the metadata.
Optionally, obtaining a change condition of the metadata according to the modified version attribute specifically includes:
and acquiring the modified version attribute according to the ID identification of the metadata, and acquiring the metadata corresponding to the data in the service data according to the modified version attribute, wherein the ID identification is fixed and unchangeable.
Optionally, the data includes at least one of: a field english name, a field chinese name, a field type, a field length, a partition type, a field mode type, a decimal place, whether null, a sequence number, a default value, whether primary key, a field description, a status, a version, a creator, a creation time, an updater, an update time, and remarks.
An apparatus for recording metadata, comprising:
the system comprises a changing unit, a processing unit and a processing unit, wherein the changing unit is used for changing the version attribute corresponding to at least one kind of data in the service data when the metadata corresponding to the metadata changes; each of the data corresponds to a metadata; the version attribute is used for representing whether metadata corresponding to each piece of data in the business data changes or not;
and the acquisition unit acquires the change condition of the metadata according to the changed version attribute.
Optionally, the obtaining unit is specifically configured to,
and acquiring metadata corresponding to different version attributes respectively to acquire the change condition of the metadata.
Optionally, the obtaining unit is specifically configured to obtain a modified version attribute according to the ID identifier of the metadata, and obtain metadata corresponding to data in the service data according to the modified version attribute, where the ID identifier is fixed and unchangeable.
Optionally, the data includes at least one of: a field english name, a field chinese name, a field type, a field length, a partition type, a field mode type, a decimal place, whether null, a sequence number, a default value, whether primary key, a field description, a status, a version, a creator, a creation time, an updater, an update time, and remarks.
An electronic device comprising a memory and a processor for implementing the steps of recording metadata as described in any one of the above when executing a computer program stored in the memory.
A computer-readable storage medium, having stored thereon a computer program which, when executed by a processor, carries out the steps of recording metadata as claimed in any one of the preceding claims.
In the method for recording metadata provided in the embodiment of the present invention, when metadata corresponding to at least one type of data in service data changes, a version attribute corresponding to the metadata is changed, where each type of data corresponds to one type of metadata, and the version attribute is used to represent whether the metadata corresponding to each type of data in the service data changes, and then, a change condition of the metadata is obtained according to the changed version attribute. Therefore, when the metadata corresponding to one kind of data in the service data changes or the metadata corresponding to various kinds of data in the service data changes simultaneously, the version attribute of the metadata changes correspondingly, so that the metadata corresponding to one kind or several kinds of data in the service data can be known to change according to the change of the version attribute, the change condition of the metadata can be obtained according to the changed version attribute, and the change of the metadata can be traced safely and effectively.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a flow diagram illustrating a method of recording metadata according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram illustrating an apparatus for recording metadata according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an electronic device according to an embodiment of the invention;
fig. 4 shows a schematic structural diagram of a computer-readable storage medium according to an embodiment of the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in detail below.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention, but the present invention may be practiced in other ways than those specifically described and will be readily apparent to those of ordinary skill in the art without departing from the spirit of the present invention, and therefore the present invention is not limited to the specific embodiments disclosed below.
As described in the background, metadata corresponding to data may change during the product and project lifecycle due to changes in demand or other factors. At present, only the change of data is recorded, an effective method is not available for recording the change of metadata, and the change of the metadata cannot be traced safely and effectively, so that the problems of information distortion and the like of the data in development and maintenance are caused.
Therefore, the application provides a method for recording metadata, when metadata corresponding to at least one type of data in business data changes, version attributes corresponding to the metadata are changed, each type of data corresponds to one type of metadata, the version attributes are used for representing whether the metadata corresponding to each type of data in the business data changes, and then the change condition of the metadata is obtained according to the changed version attributes. Therefore, when the metadata corresponding to one kind of data in the service data changes or the metadata corresponding to various kinds of data in the service data changes simultaneously, the version attribute of the metadata changes correspondingly, so that the metadata corresponding to one kind or several kinds of data in the service data can be known to change according to the change of the version attribute, the change condition of the metadata can be obtained according to the changed version attribute, and the change of the metadata can be traced safely and effectively.
In order to facilitate understanding of the technical solutions and effects of the present application, specific embodiments will be described in detail below with reference to the accompanying drawings.
Referring to fig. 1, in step S01, when metadata corresponding to at least one type of data in the service data changes, a version attribute corresponding to the metadata is changed; each kind of the data corresponds to a kind of metadata; the version attribute is used for representing whether metadata corresponding to each piece of the business data changes.
In the embodiment of the present application, the service data includes a plurality of types of data, such as table data, field data, and the like, each type of data corresponds to one type of metadata, and one type of data includes a plurality of types of data, each type of data has metadata corresponding to the data. The version attribute is used for representing whether metadata corresponding to each type of data in the service data changes. When metadata corresponding to one type of data changes or metadata corresponding to multiple types of data respectively changes at the same time, version attributes corresponding to the metadata are changed, it can be understood that the version attributes corresponding to the metadata change once every time the metadata corresponding to the data in the service data changes, and the change of the metadata corresponding to the data at this point can be a change of metadata corresponding to multiple types of data respectively in one type of data in the service data at the same time, or a change of the metadata corresponding to one type of data in the service data. Data comprising at least one of: a field english name, a field chinese name, a field type, a field length, a partition type, a field mode type, a decimal place, whether null, a sequence number, a default value, whether primary key, a field description, a status, a version, a creator, a creation time, an updater, an update time, and remarks.
Referring to table 1, when data is field data, table 1 shows metadata corresponding to a plurality of data in a field, and the metadata corresponding to an english name of the field is CUST _ NO; metadata corresponding to the field Chinese name is a core client number of the mobile banking; the metadata corresponding to the field type is VARCHAR; the field length corresponds to 16 metadata; the metadata corresponding to the partition type is a day; the metadata corresponding to the field mode type (discrete-0 or continuous-1) is 1; the metadata corresponding to the decimal point digit is NULL; whether the metadata corresponding to the null is 0; the metadata corresponding to the sequence number is 1; the metadata corresponding to the default value is 1; whether the metadata corresponding to the primary key is Y; the field describes that the corresponding metadata is a core client number of the mobile banking; the metadata corresponding to the state is 1; the metadata corresponding to the version is 1.0.1; the creator corresponds to metadata of 80956849186447dd926385031d90b 048; the metadata corresponding to the creation time is 2019-10-0212:45: 00; the updater corresponding metadata is 80956849186447dd926385031d90b 043; the metadata corresponding to the updating time is 2019-10-0212:45: 00; and the metadata corresponding to the remarks is the core client number of the remark bank.
Table 1 when data is a field, metadata corresponding to the data in the field respectively
Figure BDA0002565407100000051
Figure BDA0002565407100000061
Referring to table 2, the metadata corresponding to the field length changes from original 16 to 20, and correspondingly, the metadata corresponding to the version attribute also changes from 1.0.1 to 1.0.2.
TABLE 2 metadata corresponding to data in a field when the metadata changes
Figure BDA0002565407100000062
Figure BDA0002565407100000071
In step S02, a change condition of the metadata is acquired based on the modified version attribute.
In this embodiment, the metadata corresponding to the modified version attribute is obtained according to the modified version attribute, so as to know the change condition of the metadata. And acquiring corresponding metadata according to different version attributes, for example, the metadata comprises the metadata corresponding to the initial version attribute and the metadata corresponding to the version attribute after the metadata changes continuously, and then acquiring the change condition of the metadata.
In this embodiment, since the ID of the metadata is fixed and unchangeable, the modified version attribute may be obtained according to the ID of the metadata, that is, the original version attribute and the plurality of changed version attributes may be obtained according to the ID of the metadata, so that a plurality of different version attributes may be obtained, then the metadata corresponding to each of the different version attributes may be obtained, and the metadata of the data in each of the different metadata may be compared, so that the change condition of the metadata may be known.
The method for recording metadata provided in this embodiment of the present application is described in detail above, and when metadata corresponding to at least one type of data in business data changes, a version attribute corresponding to the metadata is changed, where each type of data corresponds to one type of metadata, and the version attribute is used to represent whether the metadata corresponding to each type of data in the business data changes, and then, a change condition of the metadata is obtained according to the changed version attribute. Therefore, when the metadata corresponding to one kind of data in the service data changes or the metadata corresponding to various kinds of data in the service data changes simultaneously, the version attribute of the metadata changes correspondingly, so that the metadata corresponding to one kind or several kinds of data in the service data can be known to change according to the change of the version attribute, the change condition of the metadata can be obtained according to the changed version attribute, and the change of the metadata can be traced safely and effectively.
An embodiment of the present application further provides an apparatus for recording metadata, which is shown in fig. 2 and includes:
a changing unit 201, configured to change a version attribute corresponding to at least one type of data in service data when metadata corresponding to the metadata changes; each kind of the data corresponds to a kind of metadata; the version attribute is used for representing whether metadata corresponding to each piece of data in the business data changes or not;
the obtaining unit 202 obtains the change condition of the metadata according to the modified version attribute.
In this embodiment, the obtaining unit 202 is specifically configured to obtain metadata corresponding to different version attributes, so as to obtain a change condition of the metadata.
In this embodiment, the obtaining unit 202 is configured to obtain the modified version attribute according to the ID identifier of the metadata, and obtain the corresponding metadata according to the modified version attribute, where the ID identifier is fixed.
In this embodiment, one type of data includes at least one of: a field english name, a field chinese name, a field type, a field length, a partition type, a field mode type, a decimal place, whether null, a sequence number, a default value, whether primary key, a field description, a status, a version, a creator, a creation time, an updater, an update time, and remarks.
An electronic device 300 is further provided in the embodiment of the present application, and as shown in fig. 3, the electronic device includes a memory 301 and a processor 302, and when the processor 302 is configured to execute a computer program 311 stored in the memory 301, the following steps of recording metadata are implemented, including:
when metadata corresponding to at least one type of data in the service data changes, changing the version attribute corresponding to the metadata; each kind of the data corresponds to a kind of metadata; the version attribute is used for representing whether metadata corresponding to each piece of data in the business data changes or not;
and acquiring the change condition of the metadata according to the changed version attribute.
An embodiment of the present application further provides a computer-readable storage medium 400, as shown in fig. 4, on which a computer program 411 is stored, where the following steps of recording metadata when the computer program 411 is executed by a processor include:
the method comprises the following steps:
when metadata corresponding to at least one type of data in the service data changes, changing the version attribute corresponding to the metadata; each kind of the data corresponds to a kind of metadata; the version attribute is used for representing whether metadata corresponding to each type of the service data is changed;
and acquiring the change condition of the metadata according to the changed version attribute.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus embodiment, since it is substantially similar to the method embodiment, it is relatively simple to describe, and reference may be made to some descriptions of the method embodiment for relevant points.
The foregoing is only a preferred embodiment of the present invention, and although the present invention has been disclosed in the preferred embodiments, it is not intended to limit the present invention. Those skilled in the art can make numerous possible variations and modifications to the present teachings, or modify equivalent embodiments to equivalent variations, without departing from the scope of the present teachings, using the methods and techniques disclosed above. Therefore, any simple modification, equivalent change and modification made to the above embodiments according to the technical essence of the present invention are still within the scope of the protection of the technical solution of the present invention, unless the contents of the technical solution of the present invention are departed.

Claims (10)

1. A method of recording metadata, comprising:
when metadata corresponding to at least one type of data in the service data changes, changing the version attribute corresponding to the metadata; each kind of the data corresponds to a kind of metadata; the version attribute is used for representing whether metadata corresponding to each type of the service data is changed;
and acquiring the change condition of the metadata according to the changed version attribute.
2. The method according to claim 1, wherein the obtaining of the change condition of the metadata according to the modified version attribute specifically comprises:
and acquiring metadata corresponding to different version attributes respectively to acquire the change condition of the metadata.
3. The method according to claim 1, wherein the obtaining of the change condition of the metadata according to the modified version attribute specifically includes:
and acquiring the modified version attribute according to the ID identification of the metadata, and acquiring the metadata corresponding to the data in the service data according to the modified version attribute, wherein the ID identification is fixed and unchangeable.
4. A method according to any of claims 1-3, wherein said one data comprises at least one of: a field english name, a field chinese name, a field type, a field length, a partition type, a field mode type, a decimal place, whether null, a sequence number, a default value, whether primary key, a field description, a status, a version, a creator, a creation time, an updater, an update time, and remarks.
5. An apparatus for recording metadata, comprising:
the system comprises a changing unit, a processing unit and a processing unit, wherein the changing unit is used for changing the version attribute corresponding to at least one kind of data in the service data when the metadata corresponding to the metadata changes; each kind of the data corresponds to a kind of metadata; the version attribute is used for representing whether metadata corresponding to each type of the service data is changed;
and the acquisition unit acquires the change condition of the metadata according to the changed version attribute.
6. The device according to claim 5, characterized in that the acquisition unit, in particular for,
and acquiring metadata corresponding to different version attributes respectively to acquire the change condition of the metadata.
7. The apparatus according to claim 5, wherein the obtaining unit is specifically configured to obtain a modified version attribute according to an ID identifier of the metadata, and obtain metadata corresponding to data in the service data according to the modified version attribute, where the ID identifier is fixed and unchangeable.
8. The apparatus of any of claims 5-7, wherein the one data comprises at least one of: a field english name, a field chinese name, a field type, a field length, a partition type, a field mode type, a decimal place, whether null, a sequence number, a default value, whether primary key, a field description, a status, a version, a creator, a creation time, an updater, an update time, and remarks.
9. An electronic device comprising a memory and a processor, wherein the processor is configured to implement the steps of recording metadata as claimed in any one of claims 1-4 when executing a computer program stored in the memory.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the step of recording metadata according to any one of claims 1 to 4.
CN202010621792.XA 2020-07-01 2020-07-01 Method and device for recording metadata, electronic equipment and computer-readable storage medium Pending CN111782909A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010621792.XA CN111782909A (en) 2020-07-01 2020-07-01 Method and device for recording metadata, electronic equipment and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010621792.XA CN111782909A (en) 2020-07-01 2020-07-01 Method and device for recording metadata, electronic equipment and computer-readable storage medium

Publications (1)

Publication Number Publication Date
CN111782909A true CN111782909A (en) 2020-10-16

Family

ID=72760452

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010621792.XA Pending CN111782909A (en) 2020-07-01 2020-07-01 Method and device for recording metadata, electronic equipment and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN111782909A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120233186A1 (en) * 2011-03-09 2012-09-13 Microsoft Corporation Exposing and using metadata and meta-metadata
JP2013190888A (en) * 2012-03-13 2013-09-26 Hitachi Ltd Computer resource management method
CN109710591A (en) * 2018-12-27 2019-05-03 福建南威软件有限公司 Metadata version automatic management method
CN110018845A (en) * 2019-04-16 2019-07-16 成都四方伟业软件股份有限公司 Metadata version control methods and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120233186A1 (en) * 2011-03-09 2012-09-13 Microsoft Corporation Exposing and using metadata and meta-metadata
JP2013190888A (en) * 2012-03-13 2013-09-26 Hitachi Ltd Computer resource management method
CN109710591A (en) * 2018-12-27 2019-05-03 福建南威软件有限公司 Metadata version automatic management method
CN110018845A (en) * 2019-04-16 2019-07-16 成都四方伟业软件股份有限公司 Metadata version control methods and device

Similar Documents

Publication Publication Date Title
CN108228817B (en) Data processing method, device and system
CN108536745B (en) Shell-based data table extraction method, terminal, equipment and storage medium
CN108334609B (en) Method, device, equipment and storage medium for realizing JSON format data access in Oracle
CN109522332A (en) Customer profile data merging method, device, equipment and readable storage medium storing program for executing
CN105900093A (en) Keyvalue database data table updating method and data table updating device
CN107103035B (en) Local table data updating method and device
US20110264703A1 (en) Importing Tree Structure
CN111460232A (en) Functional module searching method, device, terminal and computer readable storage medium
CN109815240A (en) For managing method, apparatus, equipment and the storage medium of index
US8539048B2 (en) Electronic device and method for loading configuration files using the same
CN111159040A (en) Test data generation method, device, equipment and storage medium
CN108694172B (en) Information output method and device
CN106777285B (en) Method and device for clustering labels of user communication consumption data
CN112965939A (en) File merging method, device and equipment
CN109063215B (en) Data retrieval method and device
CN111858581A (en) Page query method and device, storage medium and electronic equipment
CN111782909A (en) Method and device for recording metadata, electronic equipment and computer-readable storage medium
CN111125087A (en) Data storage method and device
CN114385657A (en) Data storage method, device and storage medium
CN114218261A (en) Data query method and device, storage medium and electronic equipment
CN109582330B (en) Data model upgrading method, device, equipment and readable storage medium
JP6870454B2 (en) Analytical equipment, analytical programs and analytical methods
JP2018109898A (en) Data migration system
CN112446812A (en) Block chain based government affair information automatic pushing method and terminal
CN112948485B (en) Question-answer data synchronization method, device, system, 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