Metadata collection method, device and equipment

By determining the collection components according to the database type, calling token information to obtain data source information, and collecting metadata based on scheduling, the problem of insufficient metadata collection efficiency and pertinence in the existing technology is solved, and efficient and flexible metadata is achieved. Collection to support data-driven and business development.

CN117785977BActive Publication Date: 2024-09-17INFORMATION & COMM BRANCH OF STATE GRID JIANGSU ELECTRIC POWER
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311818045.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-27
Publication Date
2024-09-17
Estimated Expiration
2043-12-27

AI Technical Summary

Technical Problem

Existing metadata collection methods are inefficient, lack pertinence and scalability, and are difficult to adapt to changing business needs and data environments.

Method used

Determine the corresponding collection component according to the type of external source database, obtain the data source information through token information, collect metadata based on the scheduling method, and store it in the database within the metadata service.

Benefits of technology

It improves the efficiency and pertinence of metadata collection, has good scalability, can meet different types of metadata collection needs, helps organizations better understand data assets, supports decision-making analysis and reduces data management costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117785977B
    Figure CN117785977B
Patent Text Reader

Abstract

The disclosed embodiments provide a method, device and equipment for collecting metadata. The method includes: determining a corresponding collection component according to the database type of an external source; the collection component calls token information to obtain data source information; wherein the data source information includes a connection address for connecting to an external source database; the metadata service sets a scheduling method for metadata collection tasks; the collection component collects metadata based on the scheduling method and the data source information; the metadata service stores the collected metadata in a database within the metadata service. The disclosed embodiments can improve the efficiency and pertinence of metadata collection by determining a corresponding collection component according to the database type of an external source and collecting metadata based on the scheduling method and the data source information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the field of data processing technology, and in particular to a metadata collection method, device and equipment. Background Art

[0002] At present, as enterprises become increasingly dependent on data, it is becoming increasingly important to effectively manage and utilize data. In the development process of data analysis application products, it involves the coordination of tasks in multiple links such as data access and transmission, data processing and governance, data analysis and mining, and data service applications. These tasks require the computing power and storage resources of the IT cloud platform. However, due to the lack of relevant information description, there are currently some common problems: tasks cannot be seen, data cannot be understood, data is repeated, and logic is not transparent.

[0003] Metadata is data used to describe data. It is the description and context of data, which helps to organize, find and understand data. In an enterprise, wherever there is data, there is corresponding metadata. As enterprises improve their ability to collect and store data, the role of metadata in data management becomes increasingly important. To achieve data-driven, enterprises must first achieve metadata-driven. Therefore, for enterprises, establishing a complete metadata management system can help enterprises better understand and use data, improve data analysis efficiency, and reduce data management costs, thereby promoting the digital transformation and business development of enterprises.

[0004] Metadata runs through the entire process of business system data production, data extraction and transmission, data processing and storage, service and application packaging, and end-user use. The scope is wide and the types are diverse. The collection work requires standard interfaces and multi-platform adaptation, horizontally covering multiple enterprise-level data processing and analysis platforms, and vertically extending to the source data system and data users.

[0005] At present, in the process of metadata collection, common methods include obtaining metadata using database query interfaces, accessing metadata through application programming interfaces (APIs), and obtaining metadata using ETL (Extract-Transform-Load, ETL) tools, etc. However, these methods have some limitations, such as lack of pertinence, low efficiency, and insufficient scalability. Therefore, the industry has been exploring more efficient and targeted metadata collection technologies to adapt to the ever-changing business needs and data environment. Summary of the invention

[0006] The embodiments of the present disclosure provide a metadata collection method, apparatus, and device, which can improve the efficiency and accuracy of metadata collection.

[0007] In a first aspect, an embodiment of the present disclosure provides a method for collecting metadata, comprising: determining a corresponding collection component according to a database type of an external source; the collection component calling token information to obtain data source information; wherein the data source information includes a connection address for connecting to an external source database; a metadata service sets a scheduling method for metadata collection tasks; the collection component collects metadata based on the scheduling method and the data source information; and the metadata service stores the collected metadata in a database within the metadata service.

[0008] In a second aspect, an embodiment of the present disclosure further provides a metadata collection device, comprising: a determination module, used to determine a corresponding collection component according to a database type of an external source; an acquisition module, used by the collection component to call token information to obtain data source information; wherein the data source information includes a connection address for connecting to an external source database; a setting module, used by a metadata service to set a scheduling method for metadata collection tasks; a metadata collection module, used by the collection component to collect metadata based on the scheduling method and the data source information; and a storage module, used by the metadata service to store the collected metadata in a database within the metadata service.

[0009] In a third aspect, an embodiment of the present disclosure further provides an electronic device, the electronic device comprising:

[0010] one or more processors;

[0011] a storage device for storing one or more programs,

[0012] When the one or more programs are executed by the one or more processors, the one or more processors implement the metadata collection method as described in the embodiment of the present disclosure.

[0013] The technical solution of the disclosed embodiment is to determine the corresponding collection component according to the database type of the external source; the collection component calls the token information to obtain the data source information; wherein the data source information includes the connection address for connecting to the external source database; the metadata service sets the scheduling method of the metadata collection task; the collection component collects metadata based on the scheduling method and the data source information; the metadata service stores the collected metadata in the database within the metadata service. The disclosed embodiment can improve the efficiency and pertinence of metadata collection by determining the corresponding collection component according to the database type of the external source and collecting metadata based on the scheduling method and the data source information. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.

[0015] Figure 1 A flowchart of a metadata collection method provided by an embodiment of the present disclosure;

[0016] Figure 2 A schematic diagram of a graph ontology model provided by an embodiment of the present invention;

[0017] Figure 3 A schematic diagram of the structure of a metadata collection device provided by an embodiment of the present disclosure;

[0018] Figure 4 It is a structural schematic diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0019] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0020] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0021] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0022] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0023] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0024] Metadata collection is an important part of data governance and management, which involves collecting information about data, including but not limited to the structure, content, source, relationship, storage location, update frequency, etc. With the development of big data and cloud computing, organizations' demand for metadata is also increasing, because metadata is essential for understanding data assets, supporting decision analysis, and meeting regulatory requirements.

[0025] Figure 1 The present invention provides a flowchart of a metadata collection method provided by an embodiment of the present invention. The present invention is applicable to the case of collecting metadata. The method can be executed by a metadata collection device, which can be implemented in the form of software and / or hardware. Optionally, it can be implemented by an electronic device, which can be a mobile terminal, a PC or a server. Figure 1 As shown, the method includes:

[0026] S110. Determine a corresponding acquisition component according to the database type of the external source.

[0027] Among them, the database types of external sources may include multiple types, which are not limited in this embodiment, such as data warehouse database, MySQL database, Oracle database, Clickhouse database, (Hive Metastore, HMS) database, Gauss GAUSS database.

[0028] In this embodiment, there can be multiple collection components, and different data sources have different collection components. The corresponding collection component can be selected according to the database type. The collection component has a certain flexibility and scalability to adapt to the ever-changing data environment and business needs. Different collection components can have the same collection process. In this embodiment, a special collection component is developed for the database type to obtain metadata from these data sources. In this embodiment, general collection components can also be developed for various common data sources (such as relational databases, file systems, APIs, etc.) to adapt to the ever-changing data environment and business needs.

[0029] S120: The collection component calls the token information to obtain data source information.

[0030] The data source information includes a connection address for connecting to an external source database. The connection address may be a Java Database Connectivity (JDBC) address. The token information may be understood as an identity identifier, which may identify the corresponding acquisition component and the corresponding external source database.

[0031] In this embodiment, the platform information can be pre-registered in the metadata service to obtain the corresponding token information Token, that is, the token information Token is pre-selected and configured, and the data source information and platform information can be obtained through the token information Token. The external source can include multiple platforms, and a platform can include one or more databases. Among them, the platform information includes the platform identity document ID (ID).

[0032] In the whole process, token information token call plays a key role. According to the token information, platform information and data source information can be obtained, which facilitates subsequent data collection and processing.

[0033] S130: The metadata service sets a scheduling method for the metadata collection task.

[0034] Among them, the metadata service may include a collection service and a metadata service. The collection method may include full collection and incremental collection. In this embodiment, after the collection component obtains the data source information and platform information, the scheduling method and the collection method of the collection task can be set through the metadata service. Among them, the scheduling method includes timed scheduling and time priority scheduling. In this embodiment, through a unified scheduling method, the collection component can be scheduled, responsible for managing and coordinating different collection tasks, and ensuring that they run according to the predetermined schedule and time priority scheduling method.

[0035] S140: The collection component collects metadata based on the scheduling method and the data source information.

[0036] In this embodiment, the collection component can trigger the collection process according to the scheduling method and perform collection according to the set collection method. Specifically, it can connect to the corresponding external source database according to the data source information and obtain metadata from the external source database.

[0037] The metadata includes a variety of different metadata entities and a variety of different metadata relationships.

[0038] In this embodiment, there is no restriction on the number and type of specific metadata entities and metadata relationships. Figure 2 Schematic diagram of a graph ontology model provided by an embodiment of the present invention. Figure 2As shown in the figure, the graph ontology model includes 13 types of metadata entities and 29 types of metadata relationships. Among them, the 13 types of entities include data sets, tasks, data elements, fields, data tables, business entities, charts, indicators, data services, business label entities, business relationship entities, dashboards, and data users. Figure 2 In the figure, the edges with arrows represent relationships. The 29 types of metadata relationships are as follows: the directed edge between the dataset and the data table is the data access relationship, the directed edge between the task and the data table is the task output, the directed edge between the data table and the task is the verification relationship and the task input, the directed edge between the data element and the field includes the data element specification field, the directed edge between the field and the field is the field processing relationship, the directed edge between the data table and the field is the data table containing the field, the directed edge between the data table and the business entity is the business entity implementation, the directed edge between the data table and the data table is the data table processing relationship, the directed edge between the field and the chart is the field-chart relationship, the directed edge between the field and the indicator is the field-indicator relationship, the directed edge between the field and the data service is the field-service relationship, the field and the business label entity relationship is the field-business label relationship, the field and the business relationship entity The directed edge is the field-business relationship relationship, and the directed edge between the data table and the chart is the table-chart relationship , the directed edge between the data table and the indicator is the table-indicator relationship, the directed edge between the data table and the data service is the table publishing service relationship, the directed edge between the data table and the business tag entity is the business tag implementation relationship, the directed edge between the data table and the business relationship entity is the business relationship implementation, the directed edge between the business entity and the data service is the entity-data service relationship, the directed edge between the business entity and the business tag entity is the entity-tag relationship, the directed edge between the business entity and the business relationship entity is the entity-relationship relationship, the directed edge between the chart and the dashboard indicates the chart constitutes the dashboard relationship, the directed edge between the chart and the data user is the chart being used, the directed edge between the indicator and the data user is the indicator being used, the directed edge between the data service and the data user is the service being called, the directed edge between the business tag entity and the data user is the relationship reference, the directed edge between the business relationship entity and the data user is the tag reference, and the directed edge between the dashboard and the data user is the dashboard being used.

[0039] It should be noted that a graph ontology model was designed based on the storage, use, processing, and circulation logic of the data middle platform and measurement center, and the metadata was organized into a graph, covering the full range of data asset elements including business data production, data extraction and transmission, data processing and storage, service application packaging, and end-user use, and can be expanded sustainably and flexibly based on demand.

[0040] Optionally, the collection component collects metadata based on the scheduling method and the data source information, including: obtaining monitoring information during the metadata collection process; wherein the monitoring information includes operation progress, operation status and operation results; uploading the monitoring information to the metadata service to adjust the metadata collection task or display the monitoring information according to the monitoring information.

[0041] The running status includes running and canceling the running, and the running result includes running successfully and running failed. The running progress can be understood as the collection progress, the running success can be understood as the collected metadata set being successfully stored in the database in the metadata service, and the running failure can be understood as the collected metadata set not being successfully stored in the database in the metadata service. In this embodiment, the monitoring information of the collection component in the process of collecting metadata can be obtained in real time, and the monitoring information can be uploaded to the metadata service so that the metadata service can display the monitoring information, so that the administrator can understand the running status, running results and running progress of each collection task, so as to make timely adjustments or optimizations.

[0042] This embodiment provides a unified task scheduling function to manage and coordinate different collection tasks, thereby ensuring that they run according to a predetermined schedule and time priority, and monitoring the task status and results in real time.

[0043] Optionally, the collection component collects metadata based on the scheduling method and the data source information, including: triggering the collection process of the collection component based on the scheduling method: connecting to the corresponding external source database based on the data source information, and obtaining metadata from the external source database; if the metadata is not empty, standardizing the metadata, and placing the standardized metadata in a blocking queue in a loop; wherein the standardization includes table entity definition standards, field entity definition standards, and table and field relationship definition standards; if the blocking queue is not empty, reading the standardized metadata from the blocking queue in batches and in a loop, and storing the standardized metadata in the database within the metadata service through the metadata service.

[0044] In this embodiment, the collection process of the collection component is triggered based on the scheduling method: the collection component may include a collection module, a queue module and a consumption module. The collection module connects to the corresponding external source database according to the data source information and obtains metadata from the external source database; if the metadata is not empty, the metadata is standardized, and the standardized metadata is placed in a blocking queue through the queue module in a cyclic manner; wherein the standardization includes table entity definition standards, field entity definition standards, and table and field relationship definition standards; if the blocking queue is not empty, the standardized metadata is read from the blocking queue in batches and cyclically through the consumption module, and the standardized metadata is stored in the database in the metadata service through the metadata service. Among them, the queue module is used to ensure that the collected metadata is not empty and to place the metadata in a blocking queue cyclically. The consumption module is used to call the metadata cyclically through the interface to provide it to the metadata service and write the collected metadata in batches. The consumption module can display the read metadata on the screen of the console.

[0045] In this embodiment, standardization can be understood as a kind of data cleaning, that is, a kind of format conversion.

[0046] For example, the table entity definition standard is as follows:

[0047] Case class TableEntity(entityId:String,nameCn:String.desc:String,raw:Long,columnNum:Intspace:Long,'type':String,ctime:Long,utime:Long,datasourceType:String=Conf.datasourceType, datasourceName:String=Conf.datasourceName,datasourceId: String =s"${Conf.platformId}.${Conf.datasourceId}",fields:Seq[ColumnEntity],platform_id;String=Conf.platformId,platform_name:String=Conf.platformName,owner_type:String="",owne r_id:String="",owner_name:String="",tag:String="",link:String="",glossary_id:String="glossary_name:String="",domain_id:String="",domain_name:string=""edit_desc:String="")

[0048] Among them, entityld: entity ID, nameCn: Chinese name of the table, desc: description, raw: number of rows, columnNum: number of columns, space: storage space, type: type, ctime: creation time, utime: update time, datasourceType: data source type, datasourceName: data source name, dataSourceld: data source ID, fields: fields, platform_id: platform ID, platform_name: platform name, owner_type: owner type, owner_id: owner ID, owner_name: owner name, tag: tag, link: link, glossary_id: term ID, glossary_name: term name, domain_id: business domain ID, domain_name: business domain name, edit_desc: edit description.

[0049] For example, the field entity definition standard is:

[0050] Class ColumnEntity(id:String,nameCn:String,desc:String,dataType:String,size:Int=-1,ctime:Long,utime:Long,platform_id:String=Conf.pl atformId, platform_name:String=Conf.platformName, owner_type:String="", owner_id:String="", owner_name:String="", tag:String="", li nk:String="", glossary_id:String="", glossary_name:String="", domain_id:String="", domain_name:String="", duplicate_rate:Int=-1,co nsist_rate:Int=-1, empty_rate:Int=-1, edit_desc:String="", biz_categories:String="", tag_id:String="", business_type_id:String="",)

[0051] Among them, id: primary key ID, nameCn: Chinese name of the field, desc: description, dataType: data type, size: field length, ctime: creation time, utime: update time, platform_id: platform ID, platform_name: platform name, owner_type: owner type, owner_id: owner ID, tag: tag, link: link, glossary_id: term ID, glossary_name: term name, domain_id: business domain ID, domain_name: business domain ID, duplicate_rate: duplication rate, consist_rate: consistency, empty_rate: empty value rate, edit_desc: edit description, biz_categories: business categories, tag_id: tag ID, business_type_id: business type ID.

[0052] For example, table-field relationship definition standard:

[0053] class TableColumnRelation(

[0054] id:String,from:String,to:String,relationName:String)

[0055] Among them, id: primary key, from: table ID, to: field ID, relationName: relationship name.

[0056] This embodiment ensures data consistency and version management by defining standards for the implementation of the graph ontology and the interaction with the underlying storage, and shields the specific implementation details of the database. By unifying the acquisition module, the specific implementation details of the database can be hidden, so that the upper-level applications are not affected by database consistency issues and version changes.

[0057] Optionally, connecting to a corresponding external source database based on the data source information and acquiring metadata from the external source database includes: if a connection exception occurs during the process of connecting to the corresponding external source database, handling the exception based on a first exception handling mechanism.

[0058] In this embodiment, if a connection exception occurs during the connection between the acquisition module and the external source database, the exception can be handled by the first exception handling mechanism, such as retrying the connection a set number of times.

[0059] Optionally, the collection component and the metadata service are connected by setting a transmission protocol. If the connection between the collection component and the metadata service is abnormal, the connection abnormality between the collection component and the metadata service is handled based on a second exception handling mechanism.

[0060] The transmission protocol may be set as Hypertext Transfer Protocol (HTTP). In this embodiment, the consumption module in the acquisition component is connected to the metadata service by setting the transmission protocol. If the connection between the consumption module and the metadata service is abnormal (such as timeout or disconnection), the connection abnormality between the consumption module and the metadata service is handled based on the second exception handling mechanism, such as attempting to retry the connection a set number of times.

[0061] In this embodiment, if there is an abnormal situation that cannot be handled, after collecting the cause of the failure and solving the problem, the collection can be continued from the location of the last metadata collection (cursor).

[0062] S150: The metadata service stores the collected metadata in a database within the metadata service.

[0063] In this embodiment, a unique identifier may be re-set for the collected metadata and stored in a database in the metadata service. The database in the metadata service may be a graph database.

[0064] Optionally, the metadata service stores the collected metadata in a database within the metadata service, including: obtaining platform information and data source information of the metadata; determining a unique identifier of the metadata based on the platform information and the data source information; and storing the corresponding metadata in a database within the metadata service based on the unique identifier.

[0065] Among them, the platform information can be used to identify the source of the metadata, and can also be used to generate a unique identifier for the metadata in the database within the metadata service based on the platform information. In this embodiment, since the acquisition component obtains the platform information through the token information, the metadata service can also receive the platform information accordingly. Exemplarily, the acquisition component can send the collected data tables and fields to the metadata service along with the platform information and the data source information, or send the collected data elements to the metadata service along with the platform information, or send the associated information of the collected data elements and field information to the metadata service. The metadata service determines the unique identifier of the metadata based on the platform information and the data source information; based on the unique identifier, the corresponding metadata is stored in the database within the metadata service, so that the collected metadata is unique in the database within the metadata service.

[0066] Optionally, the metadata entity includes business metadata, metadata tags, and technical metadata; in the metadata service, the modification of the metadata entity supports the modification of business metadata and metadata tags, but does not support the modification of technical metadata.

[0067] In this embodiment, the metadata entity can be modified in the database within the metadata service without making any modification to the metadata relationship. For the modification of metadata entities, the modification of business metadata and metadata tags is supported, but the modification of technical metadata is not supported. Business metadata can be understood as business classification at the business level, metadata tags can be understood as explanations of metadata, and can include multiple tags, such as important tags, non-important tags, etc. Technical metadata can be understood as specific metadata, such as table names and field names.

[0068] The technical solution of the disclosed embodiment is to determine the corresponding collection component according to the database type of the external source; the collection component calls the token information to obtain the data source information; wherein the data source information includes the connection address for connecting to the external source database; the metadata service sets the scheduling method of the metadata collection task; the collection component collects metadata based on the scheduling method and the data source information; the metadata service stores the collected metadata in the database within the metadata service. The disclosed embodiment can improve the efficiency and pertinence of metadata collection by determining the corresponding collection component according to the database type of the external source, and the collection component collects metadata based on the scheduling method and the data source information, while having good scalability and flexibility, and can meet different types of metadata collection needs. This will help organizations better understand their data assets, support decision-making analysis, solve the problem that business personnel cannot understand information technology (IT) data, and IT personnel do not understand the business meaning, support front-line personnel to quickly obtain data and use data with confidence, lower the threshold for data use, and improve the lean level of data management operations.

[0069] The present invention makes the collection process more targeted by limiting the collection scope and target; the overall efficiency of the collection process can be improved through format conversion and customized collection process; and a variety of different query and analysis scenarios can be supported by storing the collected metadata in Elasticsearch (ES) and graph databases, making it more scalable.

[0070] Figure 3 A schematic diagram of a metadata collection device structure provided by an embodiment of the present disclosure is shown in FIG. Figure 3 As shown, the device includes a determination module 310, an acquisition module 320, a setting module 330, a metadata collection module 340 and a storage module 350;

[0071] A determination module 310, configured to determine a corresponding acquisition component according to a database type of an external source;

[0072] The acquisition module 320 is used for the acquisition component to call the token information to obtain the data source information; wherein the data source information includes the connection address of the external source database;

[0073] A setting module 330 is used for the metadata service to set a scheduling method for metadata collection tasks;

[0074] The metadata collection module 340 is used for the collection component to collect metadata based on the scheduling mode and the data source information;

[0075] The storage module 350 is used for the metadata service to store the collected metadata in a database within the metadata service.

[0076] The technical solution of the disclosed embodiment is to determine the corresponding collection component according to the database type of the external source through the determination module; the collection component calls the token information through the acquisition module to obtain the data source information; wherein the data source information includes the connection address of the external source database; the scheduling mode of the metadata collection task is set through the setting module metadata service; the collection component collects metadata based on the scheduling mode and the data source information through the metadata collection module; and the metadata service stores the collected metadata in the database within the metadata service through the storage module. The disclosed embodiment can improve the efficiency and pertinence of metadata collection by determining the corresponding collection component according to the database type of the external source and collecting metadata based on the scheduling mode and the data source information.

[0077] The scheduling methods include time scheduling and time priority scheduling.

[0078] Optionally, the metadata collection module is specifically used to: obtain monitoring information during the metadata collection process; wherein the monitoring information includes operation progress, operation status and operation results; upload the monitoring information to the metadata service to adjust the metadata collection task or display the monitoring information according to the monitoring information.

[0079] Optionally, the metadata collection module is also used to: trigger the collection process of the collection component based on the scheduling method: connect to the corresponding external source database based on the data source information, and obtain metadata from the external source database; if the metadata is not empty, standardize the metadata, and place the standardized metadata in a blocking queue in a loop; wherein the standardization includes table entity definition standards, field entity definition standards, and table and field relationship definition standards; if the blocking queue is not empty, read the standardized metadata from the blocking queue in batches and in a loop, and store the standardized metadata in the database within the metadata service through the metadata service.

[0080] Optionally, the metadata collection module is further used to: if a connection exception occurs during the process of connecting to the corresponding external source database, handle the exception based on the first exception handling mechanism.

[0081] The acquisition component and the metadata service are connected by setting a transmission protocol. If the connection between the acquisition component and the metadata service is abnormal, the connection abnormality between the acquisition component and the metadata service is handled based on a second exception handling mechanism.

[0082] Optionally, the storage module is specifically used to: obtain platform information and data source information of the metadata; determine a unique identifier of the metadata based on the platform information and the data source information; and store the corresponding metadata in a database within the metadata service based on the unique identifier.

[0083] Among them, the metadata includes a variety of different metadata entities and a variety of different metadata relationships; metadata entities include business metadata, metadata tags and technical metadata; in the metadata service, the modification of metadata entities supports the modification of business metadata and metadata tags, but does not support the modification of technical metadata.

[0084] The metadata collection device provided in the embodiments of the present disclosure can execute the metadata collection method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.

[0085] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present disclosure.

[0086] Figure 4 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Figure 4 , which shows an electronic device (eg, Figure 4 The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 4 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0087] like Figure 4As shown, the electronic device 400 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage device 408 into a random access memory (RAM) 403. In the RAM 403, various programs and pictures required for the operation of the electronic device 400 are also stored. The processing device 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An edit / output (I / O) interface 405 is also connected to the bus 404.

[0088] Typically, the following devices may be connected to the I / O interface 405: an input device 406 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 407 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 408 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 409. The communication device 409 may allow the electronic device 400 to communicate with other devices wirelessly or by wire to exchange pictures. Although Figure 4 The electronic device 400 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0089] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 409, or installed from the storage device 408, or installed from the ROM 402. When the computer program is executed by the processing device 401, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0090] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0091] The electronic device provided by the embodiment of the present disclosure and the metadata collection method provided by the above embodiment belong to the same inventive concept. For technical details not fully described in this embodiment, reference can be made to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.

[0092] The embodiment of the present disclosure provides a computer storage medium on which a computer program is stored. When the program is executed by a processor, the metadata collection method provided by the above embodiment is implemented.

[0093] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a picture signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated picture signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0094] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital image communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0095] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0096] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: determines the corresponding collection component according to the database type of the external source; the collection component calls the token information to obtain the data source information; wherein the data source information includes the connection address for connecting to the external source database; the metadata service sets the scheduling method for the metadata collection task; the collection component collects metadata based on the scheduling method and the data source information; the metadata service stores the collected metadata in the database within the metadata service.

[0097] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0098] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0099] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a unit does not limit the unit itself in some cases. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses".

[0100] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0101] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0102] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0103] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0104] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. A method for collecting metadata, characterized in that: include: Determine the corresponding acquisition component according to the database type of the external source; The acquisition component calls the token information to obtain data source information; wherein the data source information includes a connection address for connecting to an external source database; The metadata service sets the scheduling method for metadata collection tasks; The collection component collects metadata based on the scheduling method and the data source information; The metadata service stores the collected metadata in a database within the metadata service; The collecting component collects metadata based on the scheduling mode and the data source information, including: The collection process of the collection component is triggered based on the scheduling method: Connecting to a corresponding external source database based on the data source information, and acquiring metadata from the external source database; If the metadata is not empty, the metadata is standardized, and the standardized metadata is placed in a blocking queue in a loop; wherein the metadata includes a variety of different metadata entities and a variety of different metadata relationships; metadata entities include business metadata, metadata tags, and technical metadata; wherein the standardization includes table entity definition standards, field entity definition standards, and table and field relationship definition standards; If the blocking queue is not empty, the standardized metadata is read from the blocking queue in batches and in a loop, and the standardized metadata is stored in a database within the metadata service through the metadata service; wherein the database is a graph database; in the metadata service, the modification of metadata entities supports the modification of business metadata and metadata tags, but does not support the modification of technical metadata.

2. The method according to claim 1, characterized in that in, The scheduling methods include time scheduling and time priority scheduling.

3. The method according to claim 1, characterized in that The collecting component collects metadata based on the scheduling mode and the data source information, including: Acquire monitoring information during the metadata collection process; wherein the monitoring information includes operation progress, operation status and operation results; The monitoring information is uploaded to the metadata service to adjust the metadata collection task or display the monitoring information according to the monitoring information.

4. The method according to claim 1, characterized in that: Connecting to a corresponding external source database based on the data source information and acquiring metadata from the external source database includes: If a connection exception occurs during the process of connecting to the corresponding external source database, the exception is handled based on the first exception handling mechanism.

5. The method according to claim 1, characterized in that in, The collection component and the metadata service are connected by setting a transmission protocol. If the connection between the collection component and the metadata service is abnormal, the connection abnormality between the collection component and the metadata service is processed based on a second exception handling mechanism.

6. The method according to claim 1, characterized in that The metadata service stores the collected metadata in a database within the metadata service, including: Obtaining platform information and data source information of the metadata; Determine a unique identifier of the metadata based on the platform information and the data source information; The corresponding metadata is stored in a database within the metadata service based on the unique identifier.

7. A metadata collection device, characterized in that: include: A determination module, used to determine a corresponding acquisition component according to a database type of an external source; An acquisition module, used for the acquisition component to call the token information to acquire data source information; wherein the data source information includes a connection address for connecting to an external source database; The setting module is used for metadata service to set the scheduling mode of metadata collection tasks; A metadata collection module, used for the collection component to collect metadata based on the scheduling mode and the data source information; A storage module, used for the metadata service to store the collected metadata in a database within the metadata service; The metadata collection module is also used to: trigger the collection process of the collection component based on the scheduling method: Connecting to a corresponding external source database based on the data source information, and acquiring metadata from the external source database; If the metadata is not empty, the metadata is standardized, and the standardized metadata is placed in a blocking queue in a loop; wherein the metadata includes a variety of different metadata entities and a variety of different metadata relationships; metadata entities include business metadata, metadata tags, and technical metadata; wherein the standardization includes table entity definition standards, field entity definition standards, and table and field relationship definition standards; If the blocking queue is not empty, the standardized metadata is read from the blocking queue in batches and in a loop, and the standardized metadata is stored in a database within the metadata service through the metadata service; wherein the database is a graph database; in the metadata service, the modification of metadata entities supports the modification of business metadata and metadata tags, but does not support the modification of technical metadata.

8. An electronic device, characterized in that: The electronic device comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the metadata collection method as described in any one of claims 1-6.