A large model-based data standardization method

By constructing a data standard knowledge base and using large models to generate regular expressions, combined with iterative cleaning, the problems of cumbersome and costly data standardization in existing technologies have been solved, achieving efficient and automated data standardization and improving the efficiency and accuracy of data processing.

CN119003583BActive Publication Date: 2026-11-20郑州埃文科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410933988.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-12
Publication Date
2026-11-20
Estimated Expiration
2044-07-12

AI Technical Summary

Technical Problem

Existing data standardization methods are cumbersome, costly, and have low automation for multi-source non-standard data, making it difficult to meet enterprises' needs for convenient and efficient data processing.

Method used

We construct a data standard knowledge base, use large models to standardize data, and achieve semi-automated data standardization through regular expression generation and iterative cleaning, combined with data augmentation and retrieval algorithms.

Benefits of technology

It improves the efficiency and accuracy of data standardization, reduces labor costs, enhances the understanding of large models and their ability to generalize to different fields, and improves transparency and interpretability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119003583B_ABST
    Figure CN119003583B_ABST
Patent Text Reader

Abstract

The application discloses a data standardization method based on a large model, relates to the technical field of data processing, and mainly uses technologies such as thinking chains, retrieval enhancement generation and single-sample learning to enhance the ability of the large model to process table data, decomposes complex data standardization operations into a series of simple and efficient steps, and thus realizes semi-automatic enterprise data standardization conversion. The application fully utilizes the planning, understanding and generation capabilities of the large model, reduces the labor cost, and significantly improves the data conversion efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and more specifically to a data standardization method based on large models. Background Technology

[0002] In the digital economy era, the rapid development of information technologies such as the internet and big data has led to an exponential growth in global data volume. However, with the integration of internet applications and enterprise businesses, most companies face challenges such as data silos, increased data management costs, and the inability to monetize data. How to activate the potential of data elements and fully utilize the value of data assets to improve corporate governance efficiency has become a crucial issue that enterprises must consider. Data standardization aims to convert heterogeneous data formats within a single column into a unified data format for better data processing and analysis. Data standardization is a vital aspect of data processing technology, key to improving data usability, and ensuring data consistency across business domains and information systems. It is essential for effective data mining, data analysis, and decision-making.

[0003] Traditional enterprise data standardization relies heavily on human-computer interaction, requiring data engineers to write specific scripts and formulate specific rules using programming languages ​​such as Python and SQL. Therefore, data standardization has become a nightmare for many data engineers, as they need to write corresponding transformation scripts for every specific case and every data type in the data; there is no one-size-fits-all solution. When faced with large-scale and diverse big data, this can lead to excessive costs and insufficient flexibility. In recent years, enterprises have begun to try various data platforms and ETL products, or to utilize machine learning technologies such as neural networks and rule matching to execute standardization processes. However, this process still requires a significant amount of human effort and suffers from insufficient security and transparency.

[0004] With the continuous advancement of artificial intelligence, the development of large-scale models has provided an excellent opportunity for rapid and efficient data standardization. Large-scale models refer to neural network models composed of billions or even trillions of parameters. These models are trained on massive amounts of unlabeled text data, capable of processing large-scale datasets and possessing very strong learning and generalization abilities. In recent years, with the increase in the scale of large-scale models, they have begun to possess the ability to plan and solve complex tasks. Leveraging rich adaptation technologies, large-scale models have achieved excellent understanding, generation, planning, and learning capabilities, and have been widely applied in fields such as natural language processing, information retrieval, recommender systems, multimodal perception, knowledge graph reasoning, and intelligent agents. These applications cover tasks such as machine translation, sentiment analysis, information extraction, video generation, data analysis, and content recommendation, and have been implemented in industries such as healthcare, education, finance, law, and scientific research. Faced with the massive scale of enterprise data and the complexity of data processing tasks, large-scale models are gradually being explored and applied in data processing-related tasks, demonstrating extraordinary potential. Users only need to provide the raw data and then express their needs through natural language to obtain the transformed standardized data, thereby significantly improving the efficiency and quality of data standardization.

[0005] In conclusion, in their operational practices, enterprises face a diverse range of non-standard data and require more convenient, lower-cost, and more automated data standardization methods. How to leverage large models to achieve better solutions has become an urgent issue to explore.

[0006] Therefore, it is necessary to propose a data standardization method based on large models to solve the above problems. Summary of the Invention

[0007] The purpose of this invention is to solve the problems of existing data standardization methods being cumbersome, costly, and lacking automation when dealing with multi-source non-standard data.

[0008] To achieve the above objectives, the present invention specifically adopts the following technical solution:

[0009] A data standardization method based on large models includes the following steps:

[0010] Step S1: Construct a data standard knowledge base. First, process the data standard documents by converting these unstructured PDF or Word documents into key-value pairs that are easier to search, and save them in CSV or JSON format to greatly improve the search efficiency and accuracy of large models.

[0011] Step S2: Retrieve data standards. The user interacts with the large model to obtain the names of the data columns to be standardized based on the raw data input by the user, and retrieves the relevant data standards in the data standard knowledge base.

[0012] Step S3: Generate a regular expression database. Use the relevant data standards obtained in step S2 as the context of the large model and provide a sample display for the large model. Encapsulate it into a unified prompt template and use the context learning capability of the large model to generate regular expressions that conform to the data rules. Finally, a regular expression database with the format "data column name: regular expression" is formed.

[0013] Step S4: Data Standardization. First, query the regular expression corresponding to the column name of the data to be standardized. Then, filter the database based on the expression. Next, randomly sample non-standard data to provide examples. Following the prompts in the thought process, put the non-standard data, regular expression, and examples into the large model. Guide the large model to analyze the error causes of the non-standard data and complete the writing and execution of the corresponding code. The code written in the large model will be saved into the memory unit to improve the memory capacity and contextual understanding ability of the large model.

[0014] Step S5: Iterative data standardization. An iterative data cleaning method is used. The data that has undergone one round of standardization transformation in step S4 is sent back to the beginning of step S4. Data that does not match the regular expression is re-screened and filtered. Then, based on the resampled non-standard data, a large model is used to analyze the problems of the non-standard data and generate code to perform data transformation operations until the proportion of non-standard data reaches the specified threshold.

[0015] Furthermore, step S1 specifically includes the following steps:

[0016] Step S11: Read the data standard document line by line, organize it according to the title, and organize it into a JSON or CSV standard file according to the key-value pair format of "rule name: rule content";

[0017] Step S12: Use a transform neural network or other model to generate embedding vectors corresponding to the key and value of the organized standard file, and store them to build a data standard knowledge base.

[0018] Furthermore, step S2 specifically includes the following steps:

[0019] Step S21: Access the input raw data to obtain the fields that need to be standardized and transformed, i.e., the data column names;

[0020] Step S22: Perform data augmentation on the data field, generate a set of semantically similar fields, embed these fields, and obtain their vector representation;

[0021] Step S23: Based on the vector representation, use a vector-based retrieval algorithm to search the data standard knowledge base and obtain the multiple data standards with the closest similarity.

[0022] Furthermore, step S3 specifically includes the following steps:

[0023] Step S31: Randomly select a data column of the original data, and manually formulate a regular expression based on the standard data agreed in its data standard knowledge base to create a task example;

[0024] Step S32: Construct a unified prompt word, which consists of a task description generated by a regular expression, a task example, and the data standard retrieved in step S2;

[0025] Step S33: Retrieve the column names of the original data one by one to generate the corresponding regular expressions, and finally form a regular expression database in the form of "data column name: regular expression".

[0026] Furthermore, step S4 specifically includes the following steps:

[0027] Step S41: Interact with the database and query the regular expression database according to the data column name to be standardized to obtain the regular expression of its standard data;

[0028] Step S42: Filter the data in this column according to the regular expression, and filter out the data rows that do not match the regular expression, thereby obtaining a smaller non-standard dataset.

[0029] Step S43: Sample non-standard data, randomly select multiple samples, and generate standardized code examples using manual annotation;

[0030] Step S44: Construct a prompt template that conforms to the thinking chain paradigm. The prompt template consists of a system task description, a user input description, a user input example, and a code generation example. The reasoning steps of the example guide the large model to analyze the error causes of non-standard data step by step, and realize the writing and execution of code accordingly.

[0031] Step S45: Save the code written for the large model into the memory unit to improve the large model's memory capacity and contextual understanding ability.

[0032] Furthermore, step S5 specifically includes the following steps:

[0033] Step S51: For the data that has undergone the previous round of standardization transformation, perform a new round of screening and filtering based on regular expressions to obtain a non-standard dataset with gradually reduced data size;

[0034] Step S52: Resample the non-standard dataset and automatically fill the sample into the prompt template;

[0035] Step S53: Based on the prompt template, use the large model to identify, analyze, and process problems one by one in the new non-standard dataset, generate data standardization code, and perform data transformation operations until the proportion of non-standard data in the original data reaches the specified threshold.

[0036] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0037] 1. This invention achieves semi-automatic data standardization based on a large model, reducing the manpower cost of manually screening data and writing code, and providing a more convenient, efficient and faster data standardization solution.

[0038] 2. By combining external data standards, this invention enhances the deep understanding of data standards by large models and can introduce domain knowledge during the reasoning process. This not only improves the accuracy of data standardization but also has the ability to generalize to different domains and business scenarios.

[0039] 3. This invention introduces thinking chain and retrieval enhancement generation technology to decompose the data standardization task into several simple and efficient sub-tasks. Combined with the data standard knowledge base, it provides the problem analysis process and reasoning results for non-standard data, thereby enhancing the transparency and interpretability of data standardization.

[0040] 4. This invention preprocesses standard data documents, improving the retrieval capabilities of large models. Furthermore, it supports various structured query tools and data filters for retrieval and filtering of non-standard data, not limited to the listed tool options, and possesses sufficient scalability and flexibility. Attached Figure Description

[0041] Figure 1 This is a flowchart of the data standardization method based on a large model in this invention;

[0042] Figure 2 This is a framework diagram of the data standardization method based on a large model in this invention. Detailed Implementation

[0043] 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 embodiments of the present invention, and not all embodiments. 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.

[0044] Example

[0045] like Figure 1 and Figure 2As shown, this invention first converts unstructured data standard documents from external data sources into easily searchable structured files, thereby improving the efficiency and accuracy of large-scale model retrieval. By retrieving data standards, the large-scale model can acquire domain knowledge, enhancing its ability to handle private domain data. Furthermore, based on the retrieved relevant data standards or rules, the large-scale model generates regular expressions for the corresponding standardized data to quickly locate and filter data content that does not conform to the standards. Subsequently, the filtered dataset is randomly sampled, and a small number of samples are generated by manually writing code to improve the large-scale model's understanding of the task and standardize the input and output formats. The large-scale model will then generate and execute the data standardization conversion code. Finally, non-standard data rows are filtered again to verify whether they have reached a specified threshold. Iterative data cleaning is performed on data that does not meet the expected results until the non-standard data reaches the specified threshold.

[0046] Based on the above implementation process and Figure 1 The specific implementation steps of this embodiment will be described in detail below, based on the content shown.

[0047] A data standardization method based on large models includes the following steps:

[0048] Step S1: Construct a data standard knowledge base. First, process the data standard documents by converting these unstructured PDF or Word documents into more easily searchable key-value pairs and saving them in more readable CSV or JSON formats. This significantly improves the retrieval efficiency and accuracy of large models. This method is called self-querying, which allows the retrieval engine to not only compare the semantic similarity between the user's input query and the stored document content, but also to extract and execute filters from the user's query on the stored document metadata.

[0049] The data standard mentioned in step S1 refers to the rules that need to be followed when performing data standardization conversion operations, such as industry data standard guidance documents or unified data specifications formulated by enterprises according to business needs. This standard defines and interprets data, based on the attributes of data entities. Each attribute's standard includes multiple parts such as business specifications, management specifications, technical specifications, and value ranges. These set data format rules for different data types to ensure that data values ​​correspond to a set of strictly legal values ​​or meet unified format constraints. For example, in an employee information collection form, the data standard stipulates that gender is represented by 'F' for female and 'M' for male, and phone numbers are stipulated to be in the form of "123-4567-8900". However, the actual collected data may have various incorrect formats, such as phone numbers lacking '-', starting with +86, or (+86), and so on.

[0050] In step S1, the present invention processes data standard documents to construct a data standard knowledge base. These data standard documents are typically industry data standard guidance documents or unified data specifications developed by enterprises based on business needs. These documents establish a unified standard format and provide standardized definitions and interpretations of enterprise data to ensure that different data with the same attribute correspond to a set of strictly legal values ​​or satisfy consistency constraints. This process can be further divided into two steps:

[0051] Step S11: Perform simple preprocessing on the standard data document, such as removing irrelevant content and redundant line breaks. Then extract the data by title, organize it into key-value pairs of "rule name: rule content", and save it as a standard file such as JSON or CSV. When encountering multi-level headings, encode them together as rule names using the format "first-level heading: second-level heading: ...".

[0052] Step S12: Use a transform neural network or other model to generate embedding vectors corresponding to the key and value of the prepared standard file, construct a vector database, and store it to build a data standard knowledge base. This invention refers to the vector database as a data standard knowledge base. These embedding vectors encode all the text content in the file, thereby capturing the semantic information of the document so that subsequent retrieval machines can perform searches based on semantic similarity.

[0053] The vector database mentioned in step S12 is the core of the retrieval process. It creates text as vector representations, and the quality of these vectors greatly affects the retrieval results. Since text embedding is a crucial foundation of representation learning, many open-source models and products are currently available, such as BERT and BAAI. Larger models on the market, such as OpenAI and Gemini, also provide readily available vector models.

[0054] Step S2: Retrieve data standards. The user interacts with the large model to obtain the names of the data columns to be standardized based on the raw data input by the user, and retrieves the relevant data standards in the data standard knowledge base.

[0055] In step S2, the present invention retrieves data standards from the data standard knowledge base based on the data column names of the original data. This process can be further divided into the following steps:

[0056] Step S21: Access the input raw data and obtain the fields that need to be standardized and transformed through simple traversal operations, i.e., the data column names, such as name, gender, and phone number in the employee information table.

[0057] Step S22: Perform data augmentation on the data field to generate a set of semantically similar fields. For example, the column name "name" can be expanded to {name, name, username, etc.}. Embed these fields and obtain their vector representations. The benefit of data augmentation is to improve the matching efficiency in the vector space, because the data standard does not necessarily correspond one-to-one with the data, thereby ensuring the search results.

[0058] Step S23: Based on the vector representation, use a vector-based retrieval algorithm (dense retrieval) to search the data standard knowledge base and obtain the multiple data standards with the closest similarity.

[0059] The dense retrieval principle described in step S23 differs from traditional keyword-based search. Keyword-based search typically uses a representation called sparse embeddings, emphasizing the importance of the frequency of a keyword in a single document relative to its frequency across all documents. Vector-based retrieval, also known as dense retrieval, uses text vector embeddings to calculate the closest similarity (e.g., cosine distance) between data objects, and the returned search results are sorted according to their similarity to the search query.

[0060] Step S3: Generate a regular expression database. Use the relevant data standards obtained in Step S2 as the context of the large model, and provide an example for the large model. Encapsulate it into a unified prompt template, and use the context learning capability of the large model to generate regular expressions that conform to the data rules. Finally, a regular expression database with the format "data column name: regular expression" is formed.

[0061] Step S3 uses Retrieval Enhancement Generation (RAG) technology to generate regular expressions for standard data that conform to the rules. Its detailed steps are as follows:

[0062] Step S31: Randomly select a data column of the original data, manually formulate a regular expression based on the standard data agreed in its data standard knowledge base, and thus create a task example.

[0063] Step S32: Construct a unified prompt word, which consists of a task description generated by a regular expression, a task example, and the data standard retrieved in step S2;

[0064] Step S33: Retrieve the column names of the original data one by one to generate the corresponding regular expressions, and finally form a regular expression database in the form of "data column name: regular expression".

[0065] Step S4: Data Standardization. First, query the regular expression corresponding to the column name of the data to be standardized. Then, filter the database based on the expression. Next, randomly sample non-standard data to provide examples. Following the prompts in the thought process, put the non-standard data, regular expression, and examples into the large model. Guide the large model to analyze the error causes of the non-standard data and complete the writing and execution of the corresponding code. The code written in the large model will be saved into the memory unit to improve the large model's memory capacity and contextual understanding ability.

[0066] Step S4 is the main process of semi-automatic data standardization based on the large model, and its sub-steps are as follows:

[0067] Step S41: Interact with the database and query the regular expression database according to the data column name to be standardized to obtain the regular expression of its standard data;

[0068] Step S42: Filter the data in this column according to the regular expression, and filter out the data rows that do not match the regular expression, thereby obtaining a smaller non-standard dataset.

[0069] Step S43: Sample non-standard data, randomly select multiple samples, and generate standardized code examples using manual annotation;

[0070] Step S44: Construct a prompt template conforming to the thought chain paradigm. This prompt template consists of a system task description, a user input description, user input examples, and code generation examples. The reasoning steps of the examples guide the large model to gradually analyze the error causes of non-standard data, and based on this, implement code writing and execution. This invention has conducted various verifications on the designed prompt words, evaluated their effectiveness through actual testing, and adjusted and improved the prompt words based on the evaluation results to improve the model's performance and accuracy.

[0071] Step S45: Save the code written for the large model into the memory unit to improve the large model's memory capacity and contextual understanding ability.

[0072] Step S5: Iterative data standardization. An iterative data cleaning method is used. The data that has undergone one round of standardization transformation in step S4 is sent back to the beginning of step S4. Data that does not match the regular expression is re-screened and filtered. Then, based on the resampled non-standard data, a large model is used to analyze the problems of the non-standard data and generate code to perform data transformation operations until the proportion of non-standard data reaches the specified threshold.

[0073] After step S4, most of the non-standard data can be located and cleaned. To further consolidate the quality of data standardization, step S5 adopts an iterative strategy, and its sub-steps are as follows:

[0074] Re-filter and sift through rows of data that do not match the regular expression, and continue until the proportion of non-standard data reaches a specified threshold.

[0075] Step S51: For the data that has undergone the previous round of standardization transformation, perform a new round of screening and filtering based on regular expressions to obtain a non-standard dataset with gradually reduced data size;

[0076] Step S52: Resample the non-standard dataset and automatically fill the sample into the prompt template;

[0077] Step S53: Based on the prompt template, use the large model to identify, analyze, and process problems one by one in the new non-standard dataset, generate data standardization code, and perform data transformation operations until the proportion of non-standard data in the original data reaches the specified threshold.

[0078] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. The scope of patent protection of the present invention shall be determined by the claims. Similarly, any equivalent structural changes made based on the description and drawings of the present invention shall also be included within the scope of protection of the present invention.

Claims

1. A data standardization method based on a large model, characterized in that, Includes the following steps: Step S1: Construct a data standard knowledge base. First, process the data standard documents by converting these unstructured PDF or Word documents into key-value pairs that are easier to search. Step S2: Retrieve data standards. The user interacts with the large model to obtain the names of the data columns to be standardized based on the raw data input by the user, and retrieves the relevant data standards in the data standard knowledge base. Step S3: Generate a regular expression database. Use the relevant data standards obtained in step S2 as the context of the large model and provide a sample display for the large model. Encapsulate it into a unified prompt template and use the context learning capability of the large model to generate regular expressions that conform to the data rules. Finally, a regular expression database in the format of "data column name: regular expression" is formed. Step S4: Data Standardization. First, query the regular expression corresponding to the column name of the data to be standardized. Then, filter the database based on the expression. Next, randomly sample non-standard data to provide examples. Following the prompts in the thought process, put the non-standard data, regular expression, and examples into the large model. Guide the large model to analyze the error causes of the non-standard data and complete the writing and execution of the corresponding code. The code written in the large model will be saved into the memory unit. Step S5: Iterative data standardization. An iterative data cleaning method is used. The data that has undergone one round of standardization transformation in step S4 is sent back to the beginning of step S4. Data that does not match the regular expression is re-screened and filtered. Then, based on the resampled non-standard data, a large model is used to analyze the problems of the non-standard data and generate code to perform data transformation operations until the proportion of non-standard data reaches the specified threshold.

2. The data standardization method based on a large model according to claim 1, characterized in that: Step S1 specifically includes the following steps: Step S11: Read the data standard document line by line, organize it according to the title, and organize it into a JSON or CSV standard file according to the key-value pair format of "rule name: rule content"; Step S12: Use a transform neural network to generate embedding vectors corresponding to the key and value of the organized standard file, and store them to build a data standard knowledge base.

3. The data standardization method based on a large model according to claim 1, characterized in that: Step S2 specifically includes the following steps: Step S21: Access the input raw data to obtain the fields that need to be standardized and transformed, i.e., the data column names; Step S22: Perform data augmentation on the data field, generate a set of semantically similar fields, embed these fields, and obtain their vector representation; Step S23: Based on the vector representation, use a vector-based retrieval algorithm to search the data standard knowledge base and obtain the multiple data standards with the closest similarity.

4. The data standardization method based on a large model according to claim 1, characterized in that: Step S3 specifically includes the following steps: Step S31: Randomly select a data column of the original data, and manually formulate a regular expression based on the standard data agreed in its data standard knowledge base to create a task example; Step S32: Construct a unified prompt word, which consists of a task description generated by a regular expression, a task example, and the data standard retrieved in step S2; Step S33: Retrieve the column names of the original data one by one to generate the corresponding regular expressions, and finally form a regular expression database in the form of "data column name: regular expression".

5. The data standardization method based on a large model according to claim 1, characterized in that: Step S4 specifically includes the following steps: Step S41: Interact with the database and query the regular expression database according to the data column name to be standardized to obtain the regular expression of its standard data; Step S42: Filter the data in this column according to the regular expression, and filter out the data rows that do not match the regular expression, thereby obtaining a smaller non-standard dataset. Step S43: Sample non-standard data, randomly select multiple samples, and generate standardized code examples using manual annotation; Step S44: Construct a prompt template that conforms to the thinking chain paradigm. The prompt template consists of a system task description, a user input description, a user input example, and a code generation example. The reasoning steps of the example guide the large model to analyze the error causes of non-standard data step by step, and realize the writing and execution of code accordingly. Step S45: Save the code written for the large model into the memory unit to improve the large model's memory capacity and contextual understanding ability.

6. The data standardization method based on a large model according to claim 1, characterized in that: Step S5 specifically includes the following steps: Step S51: For the data that has undergone the previous round of standardization transformation, perform a new round of screening and filtering based on regular expressions to obtain a non-standard dataset with gradually reduced data size; Step S52: Resample the non-standard dataset and automatically fill the sample into the prompt template; Step S53: Based on the prompt template, use the large model to identify, analyze, and process problems one by one in the new non-standard dataset, generate data standardization code, and perform data transformation operations until the proportion of non-standard data in the original data reaches the specified threshold.

Citation Information

Patent Citations

  • Data large screen generation method and system based on AI large language model

    CN117493427A

  • Standard digital processing method and system based on large language model

    CN118227802A