Method and device for supplementing data table information and electronic equipment

By constructing prompt words and using large model analysis to generate annotation information, the problem of missing table and column annotations in enterprise databases was solved, achieving efficient database annotation completion and improving data application efficiency.

CN121301338APending Publication Date: 2026-01-09YUNNAN BAIYAO GRP MEDICINE E-COMMERCE CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410917181.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-09
Publication Date
2026-01-09

Smart Images

  • Figure CN121301338A_ABST
    Figure CN121301338A_ABST
Patent Text Reader

Abstract

The invention relates to a method and device for supplementing data table information and electronic equipment, and the method comprises the steps: obtaining a to-be-supplemented data table, constructing a cue word according to table structure description information corresponding to the to-be-supplemented data table, analyzing the cue word through a large model, and receiving an analysis result returned by the large model, and supplementing corresponding information in the to-be-supplemented data table according to the analysis result. By means of the method, the large model cue word is constructed to interact with the large model, the large model return result is used for complementing missing table annotations or column annotations in the database, and batch and efficient database annotation information complementation is achieved. The analysis time of system business knowledge and a database table structure is greatly saved, and convenience is provided for business understanding and data application of data in the database.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, and in particular, to a method and device for supplementing data table information and an electronic device. BACKGROUND

[0002] A common problem encountered by databases in enterprises is that business systems are built based on information systems of external vendors, for example, business systems built based on Oracle EBS (E-Business Suite) support business processes such as enterprise production and supply. However, when developing new businesses based on external systems, the annotations of tables and columns in the database are often missing or semantically incomplete, which causes inconvenience for business understanding and data application of data in the database. Moreover, in general, the completion of annotation data requires familiarity with both system business knowledge and database table structure, which results in relatively few personnel who can complete the database annotations, and the annotation completion work will take a long time. SUMMARY

[0003] Therefore, the present application provides a method for supplementing data table information to solve the problems in the background.

[0004] According to an aspect of the present application, a method for supplementing data table information is provided, comprising:

[0005] obtaining a data table to be supplemented;

[0006] constructing a prompt word according to table structure description information corresponding to the data table to be supplemented;

[0007] analyzing the prompt word by using a large model, and receiving an analysis result returned by the large model;

[0008] supplementing corresponding information in the data table to be supplemented according to the analysis result.

[0009] As an optional embodiment of the present application, the obtaining of the data table to be supplemented comprises:

[0010] obtaining table structure description information of all tables in a database;

[0011] extracting data tables lacking annotation information in the database according to the table structure description information of all tables, to obtain the data table to be supplemented.

[0012] As an optional embodiment of the present application, the constructing of the prompt word according to the table structure description information corresponding to the data table to be supplemented comprises:

[0013] determining a data row with non-empty column data from the data table to be supplemented;

[0014] extracting a preset number of target data rows from the data rows with non-empty column data;

[0015] constructing a prompt word supplementing the annotation information according to the table structure description information corresponding to the data table to be supplemented and the target data rows.

[0016] As an optional embodiment of the present application, it further comprises:

[0017] The large model receives the prompt word, and respectively acquires the table structure description information corresponding to the data table to be supplemented and the preset number of target data rows according to the prompt word;

[0018] generating the annotation information according to the table structure description information and the preset number of target data rows;

[0019] performing result output processing on the annotation information to obtain an analysis result.

[0020] As an optional embodiment of the present application, the supplementing of corresponding information in the data table to be supplemented according to the analysis result comprises:

[0021] parsing the analysis result to obtain the annotation information;

[0022] annotating and supplementing in a corresponding position in the data table to be supplemented according to the annotation information.

[0023] As an optional embodiment of the present application, after determining the data rows with non-empty column data, before extracting the preset number of target data rows from the data rows with non-empty column data, it further comprises:

[0024] determining the number of target data rows to be extracted according to the ratio of the number of data rows with non-empty column data to the number of all data rows in the data table to be supplemented.

[0025] As an optional embodiment of the present application, the performing of result output processing on the annotation information to obtain an analysis result comprises:

[0026] generating a table corresponding to the data table to be supplemented according to the table structure description information;

[0027] filling the annotation information into the table and outputting the table.

[0028] As an optional embodiment of the present application, after the supplementing of corresponding information in the data table to be supplemented according to the analysis result, it further comprises:

[0029] storing the analysis result after parsing.

[0030] The application also provides a device for supplementing data table information, comprising:

[0031] An acquisition data table module is configured to acquire a data table to be supplemented;

[0032] A construction prompt word module is configured to construct a prompt word according to table structure description information corresponding to the data table to be supplemented;

[0033] An acquisition analysis result module is configured to analyze the prompt word by using a large model and receive an analysis result returned by the large model;

[0034] A supplement information module is configured to supplement corresponding information in the data table to be supplemented according to the analysis result.

[0035] The application also provides an electronic device, comprising:

[0036] A processor;

[0037] A memory for storing processor executable instructions;

[0038] When the processor is configured to execute the executable instructions, the method for supplementing data table information is realized.

[0039] The application has the following beneficial effects:

[0040] The application acquires a data table to be supplemented, constructs a prompt word according to table structure description information corresponding to the data table to be supplemented, analyzes the prompt word by using a large model, receives an analysis result returned by the large model, and supplements corresponding information in the data table to be supplemented according to the analysis result. The large model prompt word is constructed and interacted with the large model, and the large model return result is used to complete missing table annotations or column annotations in the database, so that batch efficient database annotation information completion is realized. The analysis time of system business knowledge and database table structure is greatly saved, and the business understanding and data application of data in the database are facilitated.

[0041] Other features and aspects of the application will become apparent from the following detailed description of exemplary embodiments with reference to the drawings. BRIEF DESCRIPTION OF DRAWINGS

[0042] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate exemplary embodiments, features, and aspects of the application and serve to explain the principles of the application.

[0043] Figure 1 A flowchart of a method for supplementing data table information according to an embodiment of the application is shown;

[0044] Figure 2 A block diagram of a device for supplementing data table information according to an embodiment of the application is shown. DETAILED DESCRIPTION

[0045] Various exemplary embodiments, features, and aspects of the present application will be described below in detail with reference to accompanying drawings. The same reference numbers in different drawings represent the same or similar elements. Although various aspects of embodiments are illustrated in the drawings, the drawings are not necessarily drawn to scale unless specifically indicated.

[0046] It should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "upper", "lower", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", "axial", "radial", "circumferential", and the like indicate relative or positional relationships based on the orientation or position shown in the drawings, and are used only for convenience of description or simplification of description, and therefore cannot be construed as indicating or implying that the devices or elements referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be construed as limiting the present application.

[0047] In addition, the terms "first", "second", "third", etc. are used only for descriptive purposes and should not be construed as indicating or implying relative importance or an indicated number of technical features. Therefore, the features defined as "first", "second", etc. can explicitly or implicitly include one or more of the features. In the description of the present application, the meaning of "a plurality of" is two or more, unless otherwise specifically limited.

[0048] The word "exemplary" is used herein to mean "serving as an example, instance, or illustration." Any implementation described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other implementations.

[0049] In addition, in order to better illustrate the present application, numerous specific details are given in the specific embodiments below. Those skilled in the art should understand that the present application can also be implemented without some specific details. In some examples, methods, means, elements and circuits well known to those skilled in the art are not described in detail, in order to highlight the main ideas of the present application.

[0050] A large model refers to a machine learning model with a large number of parameters and complex computational structure. These models are usually built by deep neural networks, with tens of billions or even hundreds of billions of parameters. The purpose of designing large models is to improve the expressive power and prediction performance of the model, and to handle more complex tasks and data. Large models have a wide range of applications in various fields, including natural language processing, computer vision, speech recognition, and recommendation systems. Large models learn complex patterns and features by training massive amounts of data, and have stronger generalization ability, which can make accurate predictions on unseen data.

[0051] Database System is a system composed of database and its management software. Database system is usually composed of software, database and data administrator. Its software mainly includes operating system, various host languages, utility programs and database management system. The database is uniformly managed by the database management system, and the insertion, modification and retrieval of data are all through the database management system. The data administrator is responsible for creating, monitoring and maintaining the entire database, so that the data can be effectively used by anyone authorized to use it. The database administrator is usually held by personnel with high business level and deep experience.

[0052] Embodiment 1

[0053] Figure 1 A flowchart of a method for supplementing data table information according to an embodiment of the present application is shown. As shown, when it is necessary to complete the missing annotation information in the database, batch efficient database annotation completion can be achieved. The flowchart includes: Figure 1

[0054] S100, obtaining a to-be-supplemented data table;

[0055] The to-be-supplemented data table is an imperfect data table that has been screened from all tables in the database and determined to need to supplement annotation information.

[0056] S200, constructing a prompt word according to the table structure description information corresponding to the to-be-supplemented data table;

[0057] Using the generalization learning ability of the large model, for each to-be-supplemented data table that needs to complete the annotation information, a prompt word suitable for the large model is constructed according to the table structure description information of the to-be-supplemented data table.

[0058] S300, analyzing the prompt word using the large model, and receiving the analysis result returned by the large model;

[0059] The constructed prompt word is input into the large model to ask the large model, and the large model will analyze the prompt word according to its own data processing method after receiving the prompt word, and perform corresponding data processing according to the content of the prompt word, and finally output the analysis result.

[0060] S400, supplementing corresponding information in the to-be-supplemented data table according to the analysis result.

[0061] The main premise of constructing the prompt word is the to-be-supplemented data table that needs to complete the annotation information, so the prompt word input to the large model includes the result that can be used to supplement the annotation information in the analysis result returned by the large model. The analysis result is analyzed and matched with the position in the to-be-supplemented data table that needs to supplement the annotation information, and the annotation information is filled in the corresponding position, wherein the annotation information that needs to be supplemented includes table annotation information and column annotation information.​

[0062] As an optional embodiment of the present application, the to-be-supplemented data table is obtained, and the obtaining of the to-be-supplemented data table comprises: obtaining table structure description information of all tables in the database; and extracting data tables lacking annotation information in the database according to the table structure description information of all the tables to obtain the to-be-supplemented data table.

[0063] Specifically, the table structure description information of all the tables in the database is obtained, and the table structure description information comprises a table name, a column name, a table creation statement, table annotation and column annotation. The incomplete data table can be screened out by the table structure description information. For example, whether the table annotation information and the column annotation information are complete in the table corresponding to the table creation statement. If not, it is an incomplete data table, and the table annotation information or the column annotation information needs to be supplemented. The incomplete data table is the to-be-supplemented data table.

[0064] As an optional embodiment of the present application, the prompt word is constructed according to the table structure description information corresponding to the to-be-supplemented data table, comprising: determining a data row with non-empty column data from the to-be-supplemented data table; extracting a preset number of target data rows from the data row with non-empty column data; and constructing a prompt word for supplementing annotation information according to the table structure description information corresponding to the to-be-supplemented data table and the target data row.

[0065] After the to-be-supplemented data table is screened out, the prompt word needs to be constructed. Specifically, the data rows of the to-be-supplemented data table are read, N is an optional integer, and the data rows of the to-be-supplemented data table are rows with non-empty valid data in each column. The natural number can be selected from 1. The N can be selected to be smaller when the data in the table is complete. The dynamic selection of N can ensure that the result returned by the large model is accurate when N data rows are used to construct the prompt word for a plurality of to-be-supplemented data tables. Avoiding extracting a fixed number of data rows for each to-be-supplemented data table to construct the prompt word input to the large model, and obtaining an analysis result that does not fit the to-be-supplemented data table.

[0066] After reading N data rows of the to-be-supplemented data table, the table structure description corresponding to the to-be-supplemented data table is used to construct the prompt word. Specifically, the system name, the table name, the column name and the data row are used to construct the following prompt word:

[0067] “You are an A system database expert, please add annotations to the table B of the A system and each field in the table, and output the result in table form”. Wherein A represents the system name; B represents the data table name. It should be noted that when N data rows are not specified, all data rows of table B are used to construct the prompt word.

[0068] "You are a database expert of system A, and you know that the table creation statement for table B is C. Please add comments to table B and each field in table B of system A, and output the results in table form." Among them, A represents the system name; B represents the data table name; C represents the table creation SQL statement of table B.

[0069] "You are a database expert of system A, and the row data sample in table B is D. Please add comments to table B and each field in table B of system A, and output the results in table form." Among them, A represents the system name; B represents the data table name; D represents N rows of data in table B, and each row of data is enclosed in parentheses, and the data in the same row is separated by a comma.

[0070] "You are a database expert of system A, and you know that the table creation statement for table B is C, and the row data sample in table B is D. Please add comments to table B and each field in table B of system A, and output the results in table form." Among them, A represents the system name; B represents the data table name; C represents the table creation SQL statement of table B, and D represents N rows of data in table B, and each row of data is enclosed in parentheses, and the data in the same row is separated by a comma.

[0071] As an optional embodiment of the present application, the large model receives a prompt word, and respectively acquires table structure description information and a preset number of target data rows corresponding to the to-be-supplemented data table according to the prompt word; generates annotation information according to the table structure description information and the preset number of target data rows; performs result output processing on the annotation information to obtain an analysis result.

[0072] After the large model receives the prompt word, the prompt word is constructed from the table structure description information and the data row, so the large model can acquire the table structure description information and the data row sample, and generate the required annotation information according to the generalization learning ability thereof.

[0073] As an optional embodiment of the present application, according to the analysis result, the corresponding information in the to-be-supplemented data table is supplemented, including: analyzing the analysis result to obtain annotation information; according to the annotation information, supplementing the annotation in the corresponding position of the to-be-supplemented data table.

[0074] The analysis result returned by the large model may not be able to directly obtain the annotation information, and the analysis result needs to be analyzed. After the analysis is completed, the table annotation information or column annotation information corresponding to the to-be-supplemented data table can be obtained. In the case where the number of to-be-supplemented data tables is large, the number of table annotation information or column annotation information obtained by analyzing the analysis result is also large. At this time, the batch filling method can be used to fill the table annotation information or column annotation information into the corresponding fields of the to-be-supplemented data table. It should be noted that the large model can use ChatGPT, Wenxin Yiyang, Xunfei Xinghuo, etc., which are not limited here.

[0075] As an optional embodiment of the present application, after determining the data rows with non-empty column data, and before extracting the preset number of target data rows from the data rows with non-empty column data, the method further comprises: determining the number of target data rows to be extracted according to the ratio of the number of data rows with non-empty column data to the total number of data rows in the data table to be supplemented.

[0076] Specifically, reading N data rows with relatively complete data from the data table to be supplemented means that for each data table to be supplemented, for example, existing data tables A and B, N data rows with relatively complete data are selected from A and B respectively. The specific value of N in A and the specific value of N in B are not necessarily equal. For example, A has 10 data rows, 8 of which have relatively complete data, so 3 data rows are read from A to construct the prompt word. B has 10 data rows, 4 of which have relatively complete data. The proportion of 10 data rows is small, so it is better to read 4 data rows from B to construct the prompt word to ensure the accuracy of the analysis result returned by the large model.

[0077] As an optional embodiment of the present application, the annotation information is processed to obtain the analysis result, comprising: generating a table corresponding to the data table to be supplemented according to the table structure description information; filling the annotation information into the table and outputting the table.

[0078] When the large model generates corresponding annotation information according to the prompt word, it also generates a table identical to the data table to be supplemented according to the table structure description information in the prompt word and the data rows, and fills the annotation information into the table one by one according to the position of the data table to be supplemented. After filling, the table is output as the analysis result. After outputting the result in the form of a table, the analysis result is parsed, and the data table to be supplemented is supplemented using the automatic batch filling command. The table and the data table to be supplemented are one-to-one corresponding, and can be directly batch filled.

[0079] As an optional embodiment of the present application, after supplementing the corresponding information in the data table to be supplemented according to the analysis result, the method further comprises: after parsing the analysis result, storing the analysis result.

[0080] After parsing the analysis result returned by the large model, the table annotation information or column annotation information corresponding to the data table to be supplemented is obtained. After automatically filling the above annotation information into the corresponding position, the above annotation information can be saved to other storage positions, which can be used for subsequent direct calling or supplementing the table annotation information or column annotation information in the table structure description information.

[0081] Through the method, the large model prompt word is constructed to interact with the large model, and the large model returns the result to complete the missing table annotation or column annotation in the database, realizing batch efficient database annotation information completion. The analysis time of system business knowledge and database table structure is greatly saved, and convenience is provided for business understanding and data application of data in the database.

[0082] Embodiment 2

[0083] Based on the same principle as the foregoing method, an apparatus for supplementing data table information is also proposed, see Figure 2 The apparatus 100 for supplementing data table information according to the embodiment of the disclosure comprises:

[0084] The data table acquisition module 110 is configured to acquire a data table to be supplemented;

[0085] The prompt word construction module 120 is configured to construct a prompt word according to the table structure description information corresponding to the data table to be supplemented;

[0086] The analysis result acquisition module 130 is configured to analyze the prompt word by using a large model, and receive an analysis result returned by the large model;

[0087] The information supplementing module 140 is configured to supplement corresponding information in the data table to be supplemented according to the analysis result

[0088] Obviously, those skilled in the art should understand that all or part of the processes in the above-mentioned embodiment methods can be completed by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the above-mentioned embodiment of each control method. The above-mentioned modules or steps of the present application can be realized by a general computing device, which can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices. Alternatively, they can be realized by program codes executable by a computing device, so that they can be stored in a storage device and executed by a computing device, or they can be respectively manufactured into each integrated circuit module, or a plurality of modules or steps among them can be manufactured into a single integrated circuit module to realize. Thus, the present application is not limited to any specific combination of hardware and software.

[0089] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The program can be stored in a computer readable storage medium, and when the program is executed, the processes of the above-mentioned embodiment methods can be included. The storage medium can be a magnetic disc, an optical disc, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk drive (HDD) or a solid state drive (SSD), etc. The storage medium can also include a combination of the above-mentioned types of memories.

[0090] Embodiment 3

[0091] Further, an electronic device is provided, comprising:

[0092] a processor;

[0093] a memory for storing processor-executable instructions;

[0094] The processor is configured to implement the method for supplementing data table information of embodiment 1 when executing the executable instructions.

[0095] The electronic device of the embodiments of the present disclosure includes a processor and a memory for storing processor-executable instructions. The processor is configured to implement the method for supplementing data table information of any of the preceding embodiments when executing the executable instructions.

[0096] It should be noted that the number of processors can be one or more. Meanwhile, the electronic device of the embodiments of the present disclosure can also include an input device and an output device. The processor, the memory, the input device and the output device can be connected through a bus, or can be connected through other means, which is not limited here.

[0097] The memory as a computer readable storage medium for supplementing data table information can be used to store software programs, computer executable programs and various modules, such as programs or modules corresponding to the method for supplementing data table information of the embodiments of the present disclosure. The processor executes the software programs or modules stored in the memory, thereby performing various functions of the electronic device and data processing.

[0098] The input device can be used to receive input numbers or signals. The signals can be key signals related to the user settings and function control of the device / terminal / server. The output device can include a display device such as a display screen.

[0099] Having described various embodiments of the application, it is to be understood that the above description is meant not to limit and not to encompass all of the possible embodiments. Many modifications and variations of this application can be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. It is intended that the scope of the application be defined by the scope of the patent and by the claims as allowed by the patent office, which can include adaptations based on the description, equivalents, and / or substitutions of elements individually or collectively to the entire disclosure.

Claims

1. A method of supplementing data table information, characterized by, The method comprises the following steps: obtaining a data table to be supplemented; constructing a prompt word according to the table structure description information corresponding to the data table to be supplemented; analyzing the prompt word by using a large model, and receiving the analysis result returned by the large model; supplementing corresponding information in the data table to be supplemented according to the analysis result.

2. The method of supplementing data table information according to claim 1, characterized in that, The step of obtaining the data table to be supplemented comprises the following steps: obtaining table structure description information of all tables in a database; extracting data tables lacking annotation information in the database according to the table structure description information of all tables, to obtain the data table to be supplemented.

3. The method of supplementing data table information according to claim 2, wherein, The step of constructing the prompt word according to the table structure description information corresponding to the data table to be supplemented comprises the following steps: determining data rows with non-empty column data from the data table to be supplemented; extracting a preset number of target data rows from the data rows with non-empty column data; constructing a prompt word for supplementing the annotation information according to the table structure description information corresponding to the data table to be supplemented and the target data rows.

4. The method of supplementing data table information according to claim 3, wherein, Further comprising: the large model receives the prompt word, and respectively obtains the table structure description information corresponding to the data table to be supplemented and the preset number of target data rows according to the prompt word; generating the annotation information according to the table structure description information and the preset number of target data rows; performing result output processing on the annotation information to obtain the analysis result.

5. The method of supplementing data table information according to claim 4, wherein, The step of supplementing corresponding information in the data table to be supplemented according to the analysis result comprises the following steps: parsing the analysis result to obtain the annotation information; annotating and supplementing in the corresponding position of the data table to be supplemented according to the annotation information.

6. The method of supplementing data table information according to claim 3, wherein, After determining the data rows with non-empty column data, and before extracting the preset number of target data rows from the data rows with non-empty column data, the method further comprises the following step: determining the number of target data rows to be extracted according to the ratio of the number of data rows with non-empty column data to the number of all data rows in the data table to be supplemented.

7. The method of supplementing data table information according to claim 4, wherein, The step of performing result output processing on the annotation information to obtain the analysis result comprises the following steps: generating a table corresponding to the data table to be supplemented according to the table structure description information; filling the annotation information into the table, and outputting the table.

8. The method of supplementing data table information according to any one of claims 1 to 7, characterized in that, After supplementing corresponding information in the data table to be supplemented according to the analysis result, the method further comprises the following step: storing the analysis result after parsing.

9. An apparatus for supplementing data table information, characterized by The method comprises the following steps: an obtaining data table module is configured to obtain a data table to be supplemented; a constructing prompt word module is configured to construct a prompt word according to the table structure description information corresponding to the data table to be supplemented; an obtaining analysis result module is configured to analyze the prompt word by using a large model, and receive the analysis result returned by the large model; a supplementing information module is configured to supplement corresponding information in the data table to be supplemented according to the analysis result.

10. An electronic device, comprising: The method comprises the following steps: a processor; a memory for storing processor executable instructions; wherein the processor is configured to execute the executable instructions to implement the method for supplementing information of a data table according to any one of claims 1-8.