A metadata generation method, apparatus, device, and medium
Patent Information
- Application Number
- CN202610933942.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-25
- Publication Date
- 2026-10-30
AI Technical Summary
[0004]本发明提供一种元数据生成方法、装置、计算机设备及介质,以解决如何提高元数据的生成效率的问题
[0008]第四方面,提供了一种计算机可读存储介质,计算机可读存储介质存储有计算机程序,计算机程序被处理器执行时实现上述元数据生成方法的步骤。
Smart Images

Figure CN123011852A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology and can be applied to the fields of financial technology and healthcare. In particular, it relates to a method, apparatus, device and medium for generating metadata. Background Technology
[0002] Metadata for database tables and fields is fundamental to data understanding and use. It describes "what this table does" and "what this field means," directly impacting data discoverability, understandability, and usability. Currently, the insurance industry faces numerous challenges in data governance. Traditional methods for generating and labeling metadata typically rely on manual annotation and description of database table structures, field meanings, and data sources. For example, in fintech underwriting scenarios, underwriters must manually add business annotations to fields in "Policy Benefit Calculation Tables" and "Risk Coverage Calculation Tables" to differentiate the meanings of the same field names across different product lines (such as critical illness insurance and annuity insurance). In healthcare claims review scenarios, data administrators must manually annotate fields from thousands of hospitals nationwide, mapping hospital-defined "fee item codes" and "diagnosis descriptions" to insurance-standard treatment directories and disease codes. However, this approach is not only time-consuming and labor-intensive but also prone to inconsistencies or errors due to misunderstandings. The same field may be assigned contradictory meanings in different business lines or data sources, directly causing data lineage confusion and distorted downstream analysis results. Furthermore, with the rapid growth of insurance business data, the efficiency of manually maintaining metadata is insufficient to meet actual needs. Faced with tens of thousands of new table structures and field changes every day, the manual response speed is severely lagging, resulting in a large number of data assets being in an unlabeled and unusable gray state.
[0003] Therefore, improving the efficiency of metadata generation has become an urgent problem to be solved. Summary of the Invention
[0004] This invention provides a metadata generation method, apparatus, computer device, and medium to address the problem of how to improve the efficiency of metadata generation.
[0005] Firstly, a metadata generation method is provided, which is applied to a metadata generation platform, the metadata generation platform comprising a first intelligent agent, a second intelligent agent, and a third intelligent agent, including: When the first intelligent agent receives the user's metadata generation request, it extracts the target insurance data from the preset database according to the metadata generation request, and determines the target field to be generated for metadata from the target insurance data. Send a start command to the second intelligent agent and the third intelligent agent, and send the metadata generation request and the target insurance data to the second intelligent agent; In the second intelligent agent, based on the metadata generation request, entity type identification is performed on the target field in the target insurance data to determine the business entity type to which the target field belongs; and based on the target request data, data type identification is performed on the target field in the target insurance data to determine the data type to which the target field belongs. Based on the target field and the business entity type, and combined with the business templates in the preset knowledge base and the preset business template library, a target business template is generated; and based on the target field and the data type, and combined with the rule templates in the preset knowledge base and the preset rule template library, a target rule template is generated. The target service template and the target rule template are sent to the third intelligent agent, whereby the third intelligent agent generates target metadata corresponding to the target field based on the target service template and the target rule template. The target metadata is sent to the first intelligent agent, and the first intelligent agent sends the received target metadata to the user.
[0006] Secondly, a metadata generation device is provided, which is applied to a metadata generation platform, the metadata generation platform including a first intelligent agent, a second intelligent agent, and a third intelligent agent, including: The first receiving module is configured to, when the first intelligent agent receives a user's metadata generation request, extract target insurance data from a preset database according to the metadata generation request, and determine the target field to be generated from the target insurance data; The first sending module is used to send a start command to the second intelligent agent and the third intelligent agent, and to send the metadata generation request and the target insurance data to the second intelligent agent; The first identification module is used in the second intelligent agent to identify the entity type of the target field in the target insurance data according to the metadata generation request, and to determine the business entity type to which the target field belongs; and to identify the data type of the target field in the target insurance data according to the target request data, and to determine the data type to which the target field belongs. The first generation module is used to generate a target business template based on the target field, the business entity type, and business templates in a preset knowledge base and a preset business template library, and to generate a target rule template based on the target field, the data type, and rule templates in the preset knowledge base and a preset rule template library; The second generation module is used to send the target service template and the target rule template to the third intelligent agent, and in the third intelligent agent, generate target metadata corresponding to the target field according to the target service template and the target rule template; The second sending module is used to send the target metadata to the first intelligent agent, and the first intelligent agent sends the received target metadata to the user.
[0007] Thirdly, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described metadata generation method.
[0008] Fourthly, a computer-readable storage medium is provided, which stores a computer program that, when executed by a processor, implements the steps of the above-described metadata generation method.
[0009] The aforementioned metadata generation method, apparatus, device, and medium are applied in a metadata generation platform. When the first intelligent agent receives a user's metadata generation request, it extracts target insurance data from a preset database based on the request, determines the target field to be generated from the target insurance data, sends a start command to the second and third intelligent agents, and sends the metadata generation request and target insurance data to the second intelligent agent. In the second intelligent agent, based on the metadata generation request, it performs entity type identification on the target field in the target insurance data to determine the business entity type to which the target field belongs, and based on the target request data, it performs data type identification on the target field in the target insurance data to determine the data type to which the target field belongs. Based on the target field and business entity type, and combined with business templates in a preset knowledge base and preset business template library, it generates a target business template. Based on the target field and data type, and combined with rule templates in a preset knowledge base and preset rule template library, it generates a target rule template. The target business template and target rule template are sent to the third intelligent agent. In the third intelligent agent, based on the target business template and target rule template, it generates target metadata corresponding to the target field and sends the target metadata to the first intelligent agent. The first intelligent agent then sends the received target metadata to the user.
[0010] Specifically, by relying on the three-level intelligent agents of the metadata generation platform, the first intelligent agent realizes the unified reception of user needs, the orderly distribution of generation tasks, the pre-screening of raw data, and the unified delivery of metadata results. This simplifies the user operation entry point and coordinates the flow of data and tasks throughout the entire process. The second intelligent agent identifies field business entities and data types, matches the knowledge base to generate business and rule templates, and completes the pre-standardized modeling of metadata. This provides a standardized and complete contextual modeling basis for the metadata generation of the third intelligent agent. Through the third intelligent agent, the two types of templates are parsed and reasoned to output the target metadata. This automates the intelligent generation of metadata throughout the entire process and improves the efficiency of metadata generation. Attached Figure Description
[0011] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1 This is a schematic diagram of an application environment for a metadata generation method provided in Embodiment 1 of the present invention; Figure 2 This is a flowchart illustrating a metadata generation method provided in Embodiment 2 of the present invention; Figure 3 This is a flowchart illustrating a metadata generation method provided in Embodiment 3 of the present invention; Figure 4 This is a flowchart illustrating a metadata generation method provided in Embodiment 4 of the present invention; Figure 5 This is a schematic diagram of a metadata generation device provided in Embodiment 5 of the present invention; Figure 6 This is a schematic diagram of the structure of a computer device provided in Embodiment Six of the present invention. Detailed Implementation
[0013] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0014] The metadata generation method based on artificial intelligence provided in Embodiment 1 of this invention can be applied to, for example... Figure 1The server-side component in the application environment includes clients, which can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. The server-side component can be implemented using a standalone server or a server cluster consisting of multiple servers. The invention will now be described in detail through specific embodiments.
[0015] For example, suppose an insurance technology company has recently integrated a critical illness insurance product sold through a partner bank. The company needs to quickly integrate the product's core data tables, such as the underwriting rules, rate table, and health declaration, into its intelligent underwriting system to support business functions such as online underwriting, automatic underwriting, and risk pricing.
[0016] The user (data governance engineer) submits a metadata generation request through the metadata generation platform, specifying the data table to be processed as the insurance information table. Upon receiving the request, the first agent extracts the table's structure information from a preset database, identifying the target fields for metadata generation, including: customer name, ID number, insurance amount, payment period, and pre-existing medical history. It then issues start commands to the second and third agents. The second agent performs entity type identification on the ID number field, determining its business entity type to be customer information and its data type to be character. It retrieves the corresponding context information from the preset knowledge base and matches the corresponding initial business template and initial rule template from the preset business template and rule template libraries. The ID number and ID card number data are then processed. Sample values and context information are injected into the initial business template to obtain the target business template, and injected into the initial rule template to obtain the target rule template. The third intelligent agent receives the above target business template and target rule template, generates complete target metadata for the ID card number field, including business description and rule constraints, and processes the above target fields that need metadata generation in sequence. Finally, the platform outputs the target metadata of all fields to the user. The user does not need to manually write any field descriptions and can quickly complete the metadata annotation of all fields in the insurance information table, which improves the efficiency of metadata generation and effectively shortens the data preparation cycle from design to launch of new insurance products.
[0017] Please see Figure 2 The diagram shown is a flowchart of a metadata generation method provided in Embodiment 2 of the present invention. The metadata generation method is applied to... Figure 1 The metadata generation platform on the server side includes a first intelligent agent, a second intelligent agent, and a third intelligent agent, and includes the following steps: S21: When the first intelligent agent receives the user's metadata generation request, it extracts the target insurance data from the preset database according to the metadata generation request, and determines the target field to be generated from the target insurance data.
[0018] S22: Send a start command to the second and third intelligent agents, and send the metadata generation request and target insurance data to the second intelligent agent.
[0019] In this embodiment, the metadata generation platform can refer to a system based on a multi-agent collaborative architecture for automatically generating insurance data metadata. The first agent can refer to a scheduling interaction module responsible for receiving user requests, scheduling task execution, and returning results. The second agent can refer to a standardized modeling module responsible for identifying field business entities and data types, matching and generating business templates and rule templates. The third agent can refer to a generation module responsible for integrating business templates and rule templates and outputting complete metadata. The third agent can be a large language model agent. The metadata generation request can refer to a request submitted by the user to the metadata generation platform for metadata generation. The preset database can refer to insurance business source data to be annotated with metadata. The target insurance data can refer to the insurance business source data to be processed, which has a table structure extracted from the preset database according to the metadata generation request. The target field can refer to the database table field determined from the target insurance data that needs to be generated with metadata, such as the policy number, policyholder name, beneficiary information, etc. The start command can refer to the signal that the first agent triggers the downstream agent to start executing the task.
[0020] Specifically, when the first intelligent agent receives the user's metadata generation request, it parses the metadata generation request, determines the target of the request, extracts the target insurance data from the preset database, determines the target field to be generated in the metadata from the target insurance data, sends a start command to the second and third intelligent agents, and sends the metadata generation request and the target insurance data to the second intelligent agent.
[0021] S23: In the second intelligent agent, based on the metadata generation request, the entity type of the target field in the target insurance data is identified to determine the business entity type to which the target field belongs, and based on the target request data, the data type of the target field in the target insurance data is identified to determine the data type to which the target field belongs.
[0022] S24: Generate a target business template based on the target field and business entity type, combined with business templates in the preset knowledge base and preset business template library; and generate a target rule template based on the target field and data type, combined with rule templates in the preset knowledge base and preset rule template library.
[0023] In this embodiment, the business entity type can refer to the business concept classification corresponding to the target field in the insurance business scenario, such as customer information, policy information, claims information, etc. The data type can refer to the data format classification of the target field, such as date, character, enumeration, etc. The preset knowledge base is used to store business knowledge in the insurance field, such as the business relationships between insurance data and fields in the table structure, insurance data, historical metadata of fields, etc. The preset business template library is used to store predefined structured field description frameworks for different business entity types. For example, insurance terminology and business logic can be embedded in the business template to guide the third-party intelligent agent to generate industry-compliant data. The standardized metadata description and the preset rule template library are used to store predefined data quality verification rule frameworks for different data types, such as format rules, range rules, association rules, and business rules. The target business template can be a structured text template that describes the business meaning of the target field after matching and filling the specific information of the target field from the preset business template library based on the target field, its business entity type, and the preset knowledge base. The target rule template can be a structured rule template that verifies the data quality of the target field after matching and filling the specific information of the target field from the preset rule template library based on the target field, its data type, and the preset knowledge base.
[0024] Specifically, in the second intelligent agent, based on the metadata generation request, semantic parsing is performed on the target fields in the target insurance data to identify their respective business entity types and data types. Based on the target fields and business entity types, corresponding business context information is retrieved from a preset knowledge base. Based on the business entity types, corresponding business templates are matched from a preset business template library. The target fields and business context information are injected into the matched business templates to obtain the target business template. Based on the target fields and data types, corresponding rule context information is retrieved from the preset knowledge base. Based on the data types, corresponding rule templates are matched from a preset rule template library. The target fields and rule context information are injected into the matched rule templates to obtain the target rule template.
[0025] S25: Send the target business template and target rule template to the third intelligent agent. In the third intelligent agent, generate the target metadata corresponding to the target field based on the target business template and target rule template.
[0026] S26: Send the target metadata to the first intelligent agent, and the first intelligent agent sends the received target metadata to the user.
[0027] In this embodiment, target metadata can refer to structured descriptive information for target fields generated based on target business templates and target rule templates. This includes explanations of the business meaning of the fields and data quality constraint rules for the fields. For example, business-related metadata such as the semantic role (primary key, foreign key) and business meaning of the target fields, as well as rule metadata for the "date of birth" field, which is generated in the format "YYYY-MM-DD" and the age should be between "0-120 years old", and rule metadata for the "insurance amount" field, which is generated in the format "the value should be greater than 0 and the unit should be RMB".
[0028] Specifically, the target business template and the target rule template are sent to a third intelligent agent, which then parses and reasons about the target business template and the target rule template to generate target metadata corresponding to the target fields.
[0029] Optionally, the metadata generation method also includes: Based on the first intelligent agent, obtain the target metadata corresponding to all target fields in the target insurance data; Based on each target field and the corresponding target metadata, construct a metadata graph corresponding to the target insurance data; When a metadata query request for target insurance data is received, the matching metadata corresponding to the metadata query request is retrieved from the metadata graph based on the metadata query request.
[0030] Metadata graph can refer to a knowledge network organized in a graph structure to represent the relationships between fields and their metadata in target insurance data. Query request can refer to a query instruction submitted by a user to the metadata generation platform to retrieve metadata information of a specific field. Matching metadata can refer to metadata information obtained from the metadata graph that matches the query conditions in the metadata query request.
[0031] Specifically, the first intelligent agent can aggregate each field in the target insurance data and its corresponding target metadata, using fields as nodes, field metadata as node attributes, and the relationships between fields as edges, to construct a metadata graph corresponding to the target insurance data. When a metadata query request is received from a user, the first intelligent agent parses the query conditions and performs a search and matching in the metadata graph, returning the matching results as matching metadata to the user, thereby achieving rapid retrieval and visualization of metadata.
[0032] For example, users can ask questions to the platform using natural language, such as "What is the definition of the policy number field?", "Where does the data in the customer information table come from?", and "What are the validation rules for the insured amount field?". The first intelligent agent automatically performs semantic parsing on the natural language questions, extracts key field names and query intent, and then searches the metadata graph by field node as the target. It accurately locates and returns metadata information such as the business meaning description, quality validation rules, and relationships of the field. At the same time, the query results are visualized in the form of structured cards or relationship diagrams, allowing users to quickly understand the meaning of the data without needing database query language skills.
[0033] Optionally, after the first agent sends the received target metadata to the user, the process further includes: When the first intelligent agent receives feedback from the user regarding the target metadata, it updates the business templates in the preset business template library and the rule templates in the rule template library based on the feedback.
[0034] Feedback information can refer to user evaluations or suggestions for improvement regarding the generated target metadata.
[0035] For example, when a user corrects the target metadata, the first intelligent agent receives the correction results or suggestions from the user, automatically captures the correction differences, and updates the rule templates of the corresponding business templates in the preset business template library and rule template library through a comparative learning mechanism.
[0036] Optionally, when a new business scenario is detected (such as adding a "new energy vehicle insurance" data table), the second intelligent agent can automatically extract relevant business and rule information from the preset knowledge base, generate a new template branch, and automatically merge it into the preset business template library and rule template library.
[0037] Optionally, version management and canary release can be performed on templates in the preset business template library and rule template library. All templates are stored in a versioned manner, canary testing is supported, and the accuracy of metadata generated by different version templates is automatically compared to select the best for version iteration.
[0038] In this embodiment, by relying on the three-level intelligent agents of the metadata generation platform, the first intelligent agent realizes the unified reception of user requirements, the orderly distribution of generation tasks, the pre-screening of raw data, and the unified delivery of metadata results. This simplifies the user operation entry point and coordinates the entire process of data and task flow. The second intelligent agent identifies field business entities and data types, matches the knowledge base to generate business and rule templates, and completes the pre-standardized modeling of metadata. This provides a standardized and complete contextual modeling basis for the metadata generation of the third intelligent agent. The third intelligent agent performs parsing and reasoning on the two types of templates and outputs the target metadata. This automates the intelligent generation of metadata throughout the entire process and improves the efficiency of metadata generation.
[0039] like Figure 3 The diagram shown is a flowchart of a metadata generation method provided in Embodiment 3 of the present invention. Step S24 above, which generates a target business template based on the target field, business entity type, and business templates in a preset knowledge base and a preset business template library, may include the following steps: S31: Based on the business entity type, match the initial business template corresponding to the business entity type from the business templates in the preset business template library.
[0040] S32: Based on the target field and business entity type, retrieve the first context information from the preset knowledge base.
[0041] S33: Determine the field value corresponding to the target field from the target insurance data, and initialize the initial business template based on the target field, the field value corresponding to the target field, and the first context information to obtain the target business template.
[0042] In this embodiment, the initial business template may refer to a business template that has not yet been filled with specific information about the field, which is matched from a preset business template library according to the business entity type to which the target field belongs. The first context information may refer to the associated knowledge retrieved from a preset knowledge base according to the target field and its business entity type, which is used to assist in generating a description of the business meaning of the field.
[0043] That is, based on the business entity type, the corresponding initial business template is obtained by matching the business templates in the preset business templates; based on the target field and the business entity type, the first context information related to the target field and the business entity type is retrieved from the preset knowledge base; the field value corresponding to the target field is determined from the target insurance data; and the name of the target field, the field value corresponding to the target field, and the first context information are injected into the initial business template to obtain the target business template.
[0044] Optionally, based on the target field and data type, and in conjunction with rule templates from the preset knowledge base and preset rule template library, a target rule template is generated, including: Based on the data type, the initial rule template corresponding to the data type is obtained by matching the rule templates in the preset rule template library; Based on the target field and data type, retrieve the second context information from the preset knowledge base; Determine the field value corresponding to the target field from the target insurance data. Based on the target field, the field value corresponding to the target field, and the second context information, initialize the initial rule template to obtain the target rule template.
[0045] The initial rule template can refer to a rule template that has not yet been filled with specific information about the field, which is matched from a preset rule template library according to the data type of the target field. The second context information can refer to the associated knowledge retrieved from a preset knowledge base according to the target field and its data type, which is used to assist in generating the rule description of the field.
[0046] Based on the data type, the corresponding initial rule template is obtained by matching the rule templates in the preset rule template. Based on the target field and data type, the second context information related to the target field and data type is retrieved from the preset knowledge base. The field value corresponding to the target field is determined from the target insurance data. The name of the target field, the field value corresponding to the target field, and the second context information are injected into the initial rule template to obtain the target rule template.
[0047] In this embodiment, the basic standardization of metadata description is ensured by using an initial template, avoiding format chaos that may result from free generation. The introduction of prior knowledge such as historical metadata, business relationships, and industry standards from the knowledge base enables the generated description to fully combine the actual semantics of fields in specific business processes. At the same time, initialization based on actual field values ensures the consistency between the description and the actual data content. This achieves precise adaptation of the template from a general framework to personalized field descriptions, improving the accuracy, semantic consistency, and adaptability to insurance business scenarios of business metadata and rule metadata generation.
[0048] like Figure 4 The diagram shown is a flowchart of a metadata generation method provided in Embodiment 4 of the present invention. In step S25 above, the target metadata corresponding to the target field is generated in the third intelligent agent according to the target business template and the target rule template, which may include the following steps: S41: In the third intelligent agent, generate business metadata corresponding to the target field based on the target business template.
[0049] S42: Generate rule metadata corresponding to the target field based on the target rule template.
[0050] S43: Combine business metadata and rule metadata into target metadata.
[0051] In this embodiment, business metadata can refer to descriptive information generated based on the target business template, which describes the business meaning and business attributes of the target field. Rule metadata can refer to rule information generated based on the target rule template, which defines the data quality verification standards and constraints of the target field.
[0052] Specifically, the third intelligent agent encodes the target business template and the target rule template respectively to obtain the semantic vector representations corresponding to the target business template and the target rule template. Based on the semantic vector representations corresponding to the target business template, it infers the business metadata and the rule metadata. The business metadata and the rule metadata are then combined to form the target metadata.
[0053] Optionally, after generating the rule metadata corresponding to the target field based on the target rule template, the method further includes: Based on the specifications in the preset specification library, the rule metadata is subjected to quality inspection, and the inspection results are obtained. If the detection results meet the preset conditions, the business metadata and rule metadata will be combined to form target metadata information; If the detection result does not meet the preset conditions, the rule metadata is corrected according to the detection result to obtain the corrected rule metadata. Combine business metadata and corrected rule metadata to form target metadata.
[0054] The preset specification library can be used to store insurance industry data standards, regulatory compliance requirements, and data quality specifications, such as the data governance specifications of the State Financial Supervision and Administration Bureau and the data model standards of the insurance industry. It provides a benchmark for the quality inspection of rule metadata. The inspection result can refer to the verification conclusion obtained after comparing and verifying the rule metadata with the specifications in the preset specification library, which reflects whether the rule metadata meets the specification requirements. The preset conditions can refer to the standards that the rule metadata must meet to pass the quality inspection. For example, all verification items in the inspection result meet the corresponding specification requirements in the preset specification library and no conflict or violation alarm is triggered.
[0055] For example, insurance industry data standards (such as the data governance specifications of the State Financial Supervision and Administration Bureau) can be obtained from a preset specification library. The rule metadata can be automatically verified, and logical conflict detection can be performed on the rule metadata. If the detection result is that all verification items pass and there is no logical conflict, it is determined that the preset conditions are met, and the business metadata and rule metadata are combined to form target metadata. If the detection result is that there are verification items that fail or there is a logical conflict between rules, it is determined that the preset conditions are not met, and the rule metadata is corrected according to the detection result, eliminating conflict items or adjusting non-compliant rule configurations to obtain corrected rule metadata. Then, the business metadata and the corrected rule metadata are combined to form target metadata.
[0056] In this embodiment, a third intelligent agent performs semantic encoding and reasoning on the target business template and the target rule template respectively to generate structured business metadata and rule metadata, which improves the efficiency of metadata generation. Furthermore, the rule metadata is subjected to quality detection and automatic correction based on a preset specification library, and finally fused to form complete target metadata, thereby improving the reliability of metadata generation.
[0057] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0058] like Figure 5 As shown, this is a metadata generation device provided in Embodiment 5. The metadata generation device is applied to... Figure 1 The metadata generation platform on the server side includes a first intelligent agent, a second intelligent agent, and a third intelligent agent. This metadata generation device corresponds one-to-one with the metadata generation methods described in the above embodiments. The metadata generation device includes a first receiving module 51, a first sending module 52, a first identification module 53, a first generation module 54, a second generation module 55, and a second sending module 56. Detailed descriptions of each functional module are as follows: The first receiving module 51 is used to extract target insurance data from a preset database according to the metadata generation request when the first intelligent agent receives the user's metadata generation request, and determine the target field to be generated from the target insurance data. The first sending module 52 is used to send a start command to the second intelligent agent and the third intelligent agent, and send the metadata generation request and the target insurance data to the second intelligent agent; The first identification module 53 is used in the second intelligent agent to identify the entity type of the target field in the target insurance data according to the metadata generation request, and to determine the business entity type to which the target field belongs; and to identify the data type of the target field in the target insurance data according to the target request data, and to determine the data type to which the target field belongs. The first generation module 54 is used to generate a target business template based on the target field, the business entity type, and business templates in a preset knowledge base and a preset business template library, and to generate a target rule template based on the target field, the data type, and rule templates in the preset knowledge base and a preset rule template library; The second generation module 55 is used to send the target service template and the target rule template to the third intelligent agent, and in the third intelligent agent, generate target metadata corresponding to the target field according to the target service template and the target rule template; The second sending module 56 is used to send the target metadata to the first intelligent agent, and the first intelligent agent sends the received target metadata to the user.
[0059] Optionally, the first generation module 54 mentioned above includes: The first matching unit is used to match the initial business template corresponding to the business entity type from the business templates in the preset business template library according to the business entity type. The first retrieval unit is used to retrieve first context information from the preset knowledge base based on the target field and the business entity type; The first initialization unit is used to determine the field value corresponding to the target field from the target insurance data, and initialize the initial business template according to the target field, the field value corresponding to the target field and the first context information to obtain the target business template.
[0060] Optionally, the first generation module 54 mentioned above includes: The second matching unit is used to match the data type from the rule templates in the preset rule template library to obtain the initial rule template corresponding to the data type. The second retrieval unit is used to retrieve second context information from the preset knowledge base based on the target field and the data type; The second initialization unit is used to determine the field value corresponding to the target field from the target insurance data, and initialize the initial rule template according to the target field, the field value corresponding to the target field and the second context information to obtain the target rule template.
[0061] Optionally, the second generation module 55 mentioned above includes: The third generation unit is used in the third intelligent agent to generate business metadata corresponding to the target field according to the target business template; The fourth generation unit is used to generate rule metadata corresponding to the target field based on the target rule template; The first combining unit is used to combine the business metadata and the rule metadata to form the target metadata.
[0062] Optionally, the metadata generation apparatus further includes: The detection module is used to perform quality detection on the rule metadata according to the specifications in the preset specification library, and obtain the detection result; The first judgment module is used to form the target metadata information by combining the business metadata and the rule metadata if the detection result meets the preset conditions. The second judgment module is used to modify the rule metadata according to the detection result if the detection result does not meet the preset conditions, to obtain the modified rule metadata, and to form the target metadata by combining the business metadata and the modified rule metadata.
[0063] Optionally, the metadata generation apparatus further includes: The acquisition module is used to acquire target metadata corresponding to all target fields in the target insurance data based on the first intelligent agent; The construction module is used to construct the metadata graph corresponding to the target insurance data based on each target field and the target metadata of the corresponding target field; The query module is used to, upon receiving a metadata query request for the target insurance data, retrieve the matching metadata corresponding to the metadata query request from the metadata graph based on the metadata query request.
[0064] Optionally, the metadata generation apparatus further includes: The update module is used to update the business templates in the preset business template library and the rule templates in the rule template library according to the feedback information when the first intelligent agent receives feedback information from the user regarding the target metadata.
[0065] Specific limitations regarding the metadata generation device can be found in the limitations of the intelligent question-answering method described above, and will not be repeated here. Each module in the aforementioned metadata generation device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0066] Embodiment 6 of the present invention provides a computer device, which may be a server, and its internal structure diagram may be as follows. Figure 6 As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database stores metadata generation requests, and the network interface communicates with external terminals via a network connection. When executed by the processor, the computer program implements a metadata generation method.
[0067] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the metadata generation method described in the above embodiment, for example... Figure 2 As shown in S21-S26, or Figures 3 to 4 As shown, to avoid repetition, it will not be described again here. Alternatively, when the processor executes the computer program, it implements the functions of each module / unit in this embodiment of the metadata generation device, for example, Figure 5 The functions of the first receiving module 51, the first sending module 52, the first identification module 53, the first generating module 54, the second generating module 55, and the second sending module 56 shown are not described again here to avoid repetition.
[0068] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When executed by a processor, the computer program implements the metadata generation method described in the above embodiment, for example... Figure 2 As shown in S21-S26, or Figures 3 to 4 As shown, to avoid repetition, it will not be described again here. Alternatively, when the processor executes the computer program, it implements the functions of each module / unit in this embodiment of the metadata generation device, for example, Figure 5The functions of the first receiving module 51, the first sending module 52, the first identification module 53, the first generating module 54, the second generating module 55, and the second sending module 56 shown are not described again here to avoid repetition.
[0069] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0070] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0071] If any software tools or components not belonging to this company appear in the embodiments of this invention, they are merely illustrative examples and do not represent actual use. All user personal information involved in the embodiments of this invention is authorized (with knowledge and consent) by the relevant parties or fully authorized by all parties, and the executing entity may obtain it through various legal and compliant means. The collection, storage, use, processing, transmission, provision, and disclosure of the information, data, and signals involved all comply with the relevant laws and regulations of the relevant countries and regions, and do not violate public order and good morals.
[0072] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A method for generating metadata, characterized in that, The metadata generation method is applied to a metadata generation platform, which includes a first intelligent agent, a second intelligent agent, and a third intelligent agent, including: When the first intelligent agent receives the user's metadata generation request, it extracts the target insurance data from the preset database according to the metadata generation request, and determines the target field to be generated for metadata from the target insurance data. Send a start command to the second intelligent agent and the third intelligent agent, and send the metadata generation request and the target insurance data to the second intelligent agent; In the second intelligent agent, based on the metadata generation request, entity type identification is performed on the target field in the target insurance data to determine the business entity type to which the target field belongs; and based on the target request data, data type identification is performed on the target field in the target insurance data to determine the data type to which the target field belongs. Based on the target field and the business entity type, and combined with the business templates in the preset knowledge base and the preset business template library, a target business template is generated; and based on the target field and the data type, and combined with the rule templates in the preset knowledge base and the preset rule template library, a target rule template is generated. The target service template and the target rule template are sent to the third intelligent agent, whereby the third intelligent agent generates target metadata corresponding to the target field based on the target service template and the target rule template. The target metadata is sent to the first intelligent agent, and the first intelligent agent sends the received target metadata to the user.
2. The metadata generation method as described in claim 1, characterized in that, The step of generating a target business template based on the target field, the business entity type, and business templates in a preset knowledge base and a preset business template library includes: Based on the business entity type, an initial business template corresponding to the business entity type is obtained by matching the business templates in the preset business template library; Based on the target field and the business entity type, the first context information is retrieved from the preset knowledge base; The target insurance data is used to determine the field value corresponding to the target field. Based on the target field, the field value corresponding to the target field, and the first context information, the initial business template is initialized to obtain the target business template.
3. The metadata generation method as described in claim 1, characterized in that, The step of generating a target rule template based on the target field, the data type, and rule templates in the preset knowledge base and preset rule template library includes: Based on the data type, an initial rule template corresponding to the data type is obtained by matching the rule templates in the preset rule template library; Based on the target field and the data type, second context information is retrieved from the preset knowledge base; The target insurance data is used to determine the field value corresponding to the target field. Based on the target field, the field value corresponding to the target field, and the second context information, the initial rule template is initialized to obtain the target rule template.
4. The metadata generation method as described in claim 1, characterized in that, The third intelligent agent generates target metadata corresponding to the target field based on the target business template and the target rule template, including: In the third intelligent agent, business metadata corresponding to the target field is generated according to the target business template; Generate rule metadata corresponding to the target field based on the target rule template; The business metadata and the rule metadata are combined to form the target metadata.
5. The metadata generation method as described in claim 4, characterized in that, After generating the rule metadata corresponding to the target field based on the target rule template, the method further includes: The rule metadata is subjected to quality inspection according to the specifications in the preset specification library, and the inspection results are obtained; If the detection result meets the preset conditions, the business metadata and the rule metadata are combined to form the target metadata information; If the detection result does not meet the preset conditions, the rule metadata is corrected according to the detection result to obtain the corrected rule metadata, and the business metadata and the corrected rule metadata are combined to form the target metadata.
6. The metadata generation method as described in claim 1, characterized in that, The metadata generation method further includes: Based on the first intelligent agent, obtain the target metadata corresponding to all target fields in the target insurance data; Based on each target field and the target metadata corresponding to the target field, construct the metadata map corresponding to the target insurance data; Upon receiving a metadata query request for the target insurance data, the matching metadata corresponding to the metadata query request is retrieved from the metadata graph based on the metadata query request.
7. The metadata generation method as described in claim 1, characterized in that, After the first intelligent agent sends the received target metadata to the user, the process further includes: When the first intelligent agent receives feedback information from the user regarding the target metadata, it updates the business templates in the preset business template library and the rule templates in the rule template library based on the feedback information.
8. A metadata generation apparatus, characterized in that, The metadata generation device is applied to a metadata generation platform, which includes a first intelligent agent, a second intelligent agent, and a third intelligent agent, comprising: The first receiving module is configured to, when the first intelligent agent receives a user's metadata generation request, extract target insurance data from a preset database according to the metadata generation request, and determine the target field to be generated from the target insurance data; The first sending module is used to send a start command to the second intelligent agent and the third intelligent agent, and to send the metadata generation request and the target insurance data to the second intelligent agent; The first identification module is used in the second intelligent agent to identify the entity type of the target field in the target insurance data according to the metadata generation request, and to determine the business entity type to which the target field belongs; and to identify the data type of the target field in the target insurance data according to the target request data, and to determine the data type to which the target field belongs. The first generation module is used to generate a target business template based on the target field, the business entity type, and business templates in a preset knowledge base and a preset business template library, and to generate a target rule template based on the target field, the data type, and rule templates in the preset knowledge base and a preset rule template library; The second generation module is used to send the target service template and the target rule template to the third intelligent agent, and in the third intelligent agent, generate target metadata corresponding to the target field according to the target service template and the target rule template; The second sending module is used to send the target metadata to the first intelligent agent, and the first intelligent agent sends the received target metadata to the user.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the metadata generation method as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the metadata generation method as described in any one of claims 1 to 7.
