Method, device, electronic device and computer program product for data table screening
By combining text matching and language models in the data analysis platform, the problem of difficulty in quickly and accurately screening data tables in the existing technology is solved, and more efficient and accurate data screening is achieved, and user experience is improved.
Patent Information
- Application Number
- CN202411657732.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-11-19
AI Technical Summary
It is difficult for the prior art to quickly and accurately filter out data tables that meet user expectations in data analysis platforms, especially when the semantics of user input are complex or unclear, the results of text matching are often inaccurate.
Combining the methods of text matching and language model, we obtain the user's natural language input, perform text matching through metadata tables, generate filter codes, and use the language model to verify the accuracy of the filter results to ensure that the results meet the user's filtering conditions.
It realizes the processing of data more efficiently and accurately under complex screening conditions, meets complex business needs, ensures rapid response speed, and improves user experience.
Smart Images

Figure CN119149549B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and more particularly to a method, device, electronic device and computer program product for data table screening. Background Art
[0002] As the amount of enterprise data grows rapidly, data analysis platforms (e.g., business intelligence platforms) are becoming increasingly important in enterprise decision-making. These platforms can provide in-depth insights and predictions by integrating and analyzing massive amounts of data, helping enterprises better understand market trends, optimize operational processes, and improve competitiveness. Therefore, the importance of data analysis platforms is becoming increasingly prominent.
[0003] In data analysis platforms, there are usually a large number of data tables, and it is particularly important to be able to quickly filter out the target data tables. Efficient filtering functions can not only help users find data tables related to analysis tasks in a short time, but also significantly improve the overall efficiency of data processing and analysis, thereby accelerating the decision-making process and improving business value. Summary of the invention
[0004] Embodiments of the present disclosure provide a method, an apparatus, an electronic device, and a computer program product for screening a data table.
[0005] According to a first aspect of the present disclosure, a method for data table screening is provided. The method includes obtaining user input from a user, and the user input indicates the screening conditions for screening data tables from a data platform in the form of natural language. The method also includes determining a first screening result by text matching the user input and a metadata table storing table information of a full amount of data tables of the data platform. The method also includes generating a screening code for screening data tables from the metadata table using a language model based on the user input and the metadata table. The method also includes determining whether the first screening result meets the user's screening conditions using a language model based on the user input, the first screening result, and the user's historical screening records. In addition, the method also includes, in response to determining that the first screening result meets the screening conditions, determining the first screening result as a target screening result for the user input; or, in response to determining that the first screening result does not meet the screening conditions, determining a second screening result from the metadata table as a target screening result for the user input by executing the screening code.
[0006] According to a second aspect of the present disclosure, a device for data table screening is provided. The device includes a user input acquisition module, configured to acquire user input from a user, and the user input indicates the screening condition for screening the data table from the data platform in the form of natural language. The device also includes a screening result determination module, configured to determine a first screening result by text matching the user input and the metadata table storing the table information of the full amount of data tables of the data platform. The device also includes a screening code generation module, configured to generate a screening code for screening the data table from the metadata table based on the user input and the metadata table using a language model. The device also includes a screening result verification module, configured to determine whether the first screening result meets the user's screening condition based on the user input, the first screening result and the user's historical screening record using a language model. In addition, the device also includes a target result determination module, configured to determine the first screening result as a target screening result for the user input in response to determining that the first screening result meets the screening condition; or, in response to determining that the first screening result does not meet the screening condition, determine the second screening result from the metadata table as the target screening result for the user input by executing the screening code.
[0007] According to a third aspect of the present disclosure, an electronic device is provided, comprising a processor and a memory coupled to the processor, wherein the memory has instructions stored therein, and when the instructions are executed by the processor, the electronic device executes the method according to the first aspect.
[0008] In a fourth aspect of the present disclosure, a computer program product is provided. The computer program product is tangibly stored on a non-transitory computer readable medium and comprises computer executable instructions, which when executed cause a computer to perform the steps of the method of the first aspect of the present disclosure.
[0009] The purpose of this Summary is to introduce a selection of concepts in a simplified form that are further described in the Detailed Description below. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to limit the scope of the claimed subject matter. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:
[0011] Figure 1 A schematic diagram showing an example environment in which devices and / or methods according to embodiments of the present disclosure may be implemented;
[0012] Figure 2A flowchart of a method 200 for data table screening according to an embodiment of the present disclosure is shown;
[0013] Figure 3 A schematic diagram showing a process of searching a data table using multiple links combined with a language model according to an embodiment of the present disclosure;
[0014] Figure 4 A schematic diagram showing a process of analyzing screening results according to an embodiment of the present disclosure;
[0015] Figure 5 A block diagram showing an apparatus for data table screening according to some embodiments of the present disclosure; and
[0016] Figure 6 A block diagram of an electronic device according to an embodiment of the present disclosure is shown.
[0017] Throughout the drawings, the same or similar reference numbers denote the same or similar elements. DETAILED DESCRIPTION
[0018] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the type, scope of use, usage scenarios, etc. of the personal information (such as voice) involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0019] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0020] In the description of the embodiments of the present disclosure, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The terms "first", "second", etc. may refer to different or the same objects, unless explicitly stated. Other explicit and implicit definitions may also be included below.
[0021] As mentioned above, in a data analysis platform with a large number of data tables, it is extremely important to be able to quickly and accurately filter out the required data tables. In related technical solutions, data tables are usually filtered by text matching of user input. However, when the semantics of user input is complex and unclear, the results of text matching are often inaccurate or fail to meet user expectations.
[0022] To this end, an embodiment of the present disclosure proposes a data table screening solution that combines text matching and a language model. Specifically, first, a user input from a user is obtained, and the user input is provided in a natural language form, indicating the screening conditions for screening the data table. Based on the user input and the metadata table in the data platform, text matching is performed to determine a first screening result. Based on the user input and the metadata table, a screening code for screening the data table is generated using a language model. Based on the user input, the first screening result, and the user's historical screening records, a language model is used to determine whether the first screening result meets the user's screening conditions. If it meets the user's requirements, the first screening result is returned to the user as a screening result. If it does not meet, the second screening result is determined from the metadata table by executing the screening code, and it is returned to the user as the final screening result.
[0023] Therefore, according to the embodiments of the present disclosure, text matching can quickly filter out the first screening results related to the user input, and preliminarily meet the user's screening needs. By performing semantic analysis on the first screening result through the language model, the user's screening intention can be understood more accurately to ensure that the result meets the user's expectations. In addition, the screening code generated by the execution language model further improves the accuracy of the screening, especially under complex screening conditions, and can process data more efficiently and accurately. Therefore, the solution provided by the embodiments of the present disclosure not only meets complex business needs, but also ensures a fast response speed, thereby improving the user experience.
[0024] Figure 1 Schematic diagram of an example environment in which the device and / or method according to an embodiment of the present disclosure may be implemented. Figure 1 As shown, the example environment 100 may include a computing device 110, which may be a user terminal, a mobile device, a computer, etc., or a computing system, a single server, a distributed server, or a cloud-based server. The computing device 110 may receive user input 120 from a user. In some embodiments, the user input may indicate the filtering conditions for filtering data tables from the data platform in a natural language form. For example, the user input 120 may be "the project data table in the 2023 project management database". The computing device 110 may also include a metadata table 130, which may be a data table storing table information of all data tables on the data platform. For example, each row in the metadata table 130 represents a data table in the data platform, and the fields of the metadata table 130 correspond to the table information of the data table, such as the table name of the data table, the creation time, and the like.
[0025] By performing text matching 140 on the user input 120 and the metadata table 130, a first screening result 150 may be determined. For example, multiple keywords of the user input 120 may be extracted, and these keywords may be text matched with multiple fields of each data of the metadata table 130 to determine the first screening result 150. The computing device 110 may generate a screening code 170 for screening a data table from the metadata table 130 using a language model 160 based on the user input 120 and the metadata table 130. For example, the user input 120, the table structure information of the metadata table 130, and the code generation instruction may be used as prompt words to generate the screening code 170 using the language model 160. In some embodiments, the screening code 170 may be a Python code written using the pandas library.
[0026] The computing device 110 can use the language model 160 to determine whether the first filtering result 150 meets the user's filtering conditions based on the user input 120, the first filtering result 150, and the user's historical filtering records. For example, the language model 160 can analyze the user's past filtering behavior and preferences, combined with the current user input 120, to evaluate whether the first filtering result 150 meets the user's expectations. If it is determined that the first filtering result 150 meets the filtering conditions, the computing device 110 can return the first filtering result 150 to the user as the target filtering result 190. In addition, if it is determined that the first filtering result 150 does not meet the filtering conditions, the computing device 110 can execute the filtering code 170 to determine the second filtering result 180 from the metadata table 130 as the target filtering result 190 to return to the user.
[0027] Therefore, according to the embodiments of the present disclosure, text matching can quickly filter out the first screening results related to the user input, and preliminarily meet the user's screening needs. By performing semantic analysis on the first screening result through the language model, the user's screening intention can be understood more accurately to ensure that the result meets the user's expectations. In addition, the screening code generated by the execution language model further improves the accuracy of the screening, especially under complex screening conditions, and can process data more efficiently and accurately. Therefore, the solution provided by the embodiments of the present disclosure not only meets complex business needs, but also ensures a fast response speed, thereby improving the user experience.
[0028] It should be understood that the architecture and functions in the example environment 100 are described for exemplary purposes only and do not imply any limitation on the scope of the present disclosure. Embodiments of the present disclosure may also be applied to other environments with different structures and / or functions.
[0029] The following will combine Figures 2 to 6The process according to the embodiment of the present disclosure is described in detail. For ease of understanding, the specific data mentioned in the following description are exemplary and are not intended to limit the scope of protection of the present disclosure. It is understood that the embodiments described below may also include additional actions not shown and / or the actions shown may be omitted, and the scope of the present disclosure is not limited in this respect.
[0030] Figure 2 A flowchart of a method 200 for filtering a data table according to an embodiment of the present disclosure is shown. The method may be executed by a computing device, which may be a user terminal, a mobile device, a computer, etc., or may be a computing system, a single server, a distributed server, or a cloud-based server. At block 202, a user input may be obtained from a user, and the user input indicates a filtering condition for filtering a data table from a data platform in a natural language form. For example, referring to Figure 1 , the computing device 110 may obtain a user input 120 from a user, the user input 120 indicating a filter condition for filtering a data table from the data platform in a natural language form. At block 204, a first filter result may be determined by performing text matching between the user input and a metadata table storing table information of a full set of data tables of the data platform. For example, referring to Figure 1 The computing device 110 may determine a first screening result 150 by performing text matching 140 on the user input 120 and the metadata table 130 storing the table information of the full data table of the data platform.
[0031] At block 206, a filtering code for filtering the data table from the metadata table may be generated using a language model based on the user input and the metadata table. Figure 1 , the computing device 110 may generate a filtering code 170 for filtering the data table from the metadata table 130 using the language model 160 based on the user input 120 and the metadata table 130. At block 208, the language model may be used to determine whether the first filtering result meets the user's filtering condition based on the user input, the first filtering result, and the user's historical filtering record. For example, referring to Figure 1 The computing device 110 may use the language model 160 to determine whether the first filtering result 150 meets the user's filtering conditions based on the user input 120 , the first filtering result 150 , and the user's historical filtering records.
[0032] At block 210, in response to determining that the first filtering result meets the filtering condition, the first filtering result may be determined as a target filtering result for the user input. Figure 1In response to determining that the first filter result 150 meets the filter condition, the computing device 110 may determine the first filter result 150 as the target filter result 190 for the user input 120. At block 212, in response to determining that the first filter result does not meet the filter condition, a second filter result may be determined from the metadata table as the target filter result for the user input by executing the filter code. For example, referring to Figure 1 In response to determining that the first filtering result 150 does not meet the filtering condition, the computing device 110 may determine the second filtering result 180 as the target filtering result 190 for the user input 120 from the metadata table 130 by executing the filtering code 170 .
[0033] Therefore, according to the method 200 of the embodiment of the present disclosure, text matching can quickly filter out the first screening result related to the user input, and preliminarily meet the user's screening needs. By performing semantic analysis on the first screening result through the language model, the user's screening intention can be understood more accurately to ensure that the result meets the user's expectations. In addition, the screening code generated by executing the language model further improves the accuracy of the screening, especially under complex screening conditions, and can process data more efficiently and accurately. Therefore, the method 200 according to the embodiment of the present disclosure not only meets complex business needs, but also ensures a fast response speed, thereby improving the user experience.
[0034] Figure 3 A schematic diagram of a multi-link search data table process 300 in combination with a language model according to an embodiment of the present disclosure is shown. The user input is enhanced for analysis in combination with the language model, and the data table is screened by direct text matching (fast link) and matching based on the language model (complex link). Figure 3 As shown, at box 304, text matching can be performed on the user input 302 and a first screening result 306 can be determined. In some embodiments, the user input is segmented to generate multiple keywords associated with the user input, and the first screening result is determined by keyword matching these keywords with the table information of each data table in the metadata table, and the table information at least includes the table name, creation time, creator, and database of the data table. For example, the metadata table can be a data table for storing table information of all data tables on the data platform. Specifically, each row in the metadata table represents a data table, records the table information of the data table, and can store the table information in the form of fields.
[0035] In some embodiments, the metadata table may include the following fields: table name (e.g., a unique name that identifies a data table), creation time (e.g., the time when the data table is created), creator (e.g., a user or department that creates or manages the data table), and database to which the data table belongs (e.g., the name of the database where the data table is located). In addition, in some embodiments, the metadata table may also include other fields related to the data table. For example, data table description, number of fields, last modification time, and data table size, etc. For example, the user input 302 may be "project data table in the 2023 project management database", and the user input may be segmented to generate keywords such as "2023", "project management", "database", and "project data table". Then, these keywords may be matched with the fields in the metadata table to determine the first screening result 306, which may be one or more data tables with a high degree of text matching with the user input 302. The main advantage of text matching is that it has a fast processing speed and can return results in a short time, which is suitable for users' needs for screening efficiency while taking into account the accuracy of screening.
[0036] At box 310, user intent recognition can be performed. In some embodiments, the second prompt content can be determined based on the user input, the first screening result, and the user's historical screening record. The historical screening record includes the user's historical user input and the corresponding screening time, screening result, and result source. The result source indicates that the screening result comes from the first screening result or the second screening result. For example, a historical screening record can be "User input: find the table created in the even month; screening time: 2024-08-27 11:00:00, screening result: empty; result source: from the quick link (i.e., the first screening result)". For example, the user input 302, the first screening result 306, and the user's historical screening record 308 can be combined as a combined prompt word (i.e., the second prompt word), and the combined prompt word and the corresponding directive prompt word (e.g., "Please check whether the first screening result meets the current user input requirements") are input into the language model for intent recognition. The purpose of intent recognition is to determine whether the results of the current direct text search can already meet user needs. If the first filtering result 306 meets the user's intention, the first filtering result 306 is returned to the user as the target filtering result 312, thereby accelerating the speed at which the user obtains the results.
[0037] When the user input 302 is obtained, at box 306, a filtering code can be generated. At box 316, a prompt word can be generated. In some embodiments, based on the user input and the table structure information of the metadata table, the first prompt content is determined, and the first prompt content also indicates the code type and code format of the filtering code. The first prompt content is a prompt word for indicating that the language model generates a filtering code according to the user input. For example, assuming that the user input 302 is "filter the project data table created in 2023", the table structure information of the metadata table can be a field of the metadata table (for example, the table name, creation time, etc. as described above). In addition, the code type can also be indicated in the first prompt content as Python code, and the code format is a standard data filtering operation that depends on the pandas library. At box 318, the language model can be used to perform text to code (i.e., Text2Code) to generate the filtering code. In some embodiments, based on the first prompt content, a filtering code corresponding to the code type can be generated using a language model.
[0038] At box 320, code detection can be performed. In some embodiments, it can be determined whether the filtering code conforms to the code format based on the code format indicated by the first prompt content through regular matching. For example, after the filtering code is generated, regular matching can be used to verify whether the code conforms to the specified format requirements. Regular matching can detect whether the code only calls pandas's standard library functions, and ensure that the filtering code does not contain the execution of system commands or other potentially unsafe operations. In some embodiments, the data columns in the filtering code can be filtered based on the table structure information of the metadata table. For example, if the table structure information of the metadata table does not include the "visit quantity" field, and the filtering code includes this data column, the data column can be filtered from the filtering code, which can avoid invalid code execution.
[0039] In certain embodiments, the process of generating screening code 314 and the process of executing text matching 304 can be performed asynchronously, and the generated screening code is stored in a cache. For example, asynchronous execution can improve overall processing efficiency, so that the generation of screening code and the text matching task can be performed simultaneously, thereby shortening the user waiting time. In addition, the use of cache helps to quickly call the generated screening code in subsequent steps, further optimizing system performance.
[0040] As previously described, at box 310, user intent recognition may be performed. If the first filter result 306 does not meet the user intent, proceed to box 322. At box 322, a filter code may be executed to determine a second filter result 324. For example, the filter code may be retrieved from a cache and executed to determine the second filter result 324. The filter code may be a Python code written using the pandas library. By executing the code, the system may filter out the second filter result 324 from the metadata table and return it to the user as the final target filter result 312.
[0041] As mentioned above, the filtering code generated by the language model can be stored in the cache. Therefore, when the user intention recognition is misjudged (for example, the user is not satisfied with the first filtering result), the user can be allowed to actively trigger the execution of the filtering code to obtain the second filtering result through the corresponding interface provided in the user interface. This method ensures that when the user's filtering result does not meet expectations, the user can re-execute the filtering code through simple operations and quickly obtain the results that meet the requirements.
[0042] Figure 4 FIG. 4 is a schematic diagram showing a process 400 for analyzing screening results according to an embodiment of the present disclosure. Figure 4 As shown, at block 404, the target screening result 402 (ie, Figure 3 Whether the target screening result 312 in the target screening result 402 is an empty result. For example, when the target screening result 402 is an empty result, it means that there is no data table in the data platform that matches the user input. If the target screening result 402 is empty, proceed to box 406. At box 406, an empty result analysis can be performed, and an analysis result 414 is generated. In some embodiments, the third prompt content can be determined based on the user input, the table structure of the metadata table, and the historical screening record. For example, the user input 408, the table structure information of the metadata table 412 and the historical screening record 410 can be combined to generate the third prompt content. In addition, the third prompt content also includes directive prompt words, such as "Please analyze the rationality of the condition combination of the screening conditions used by the current user input". It should be understood that the directive prompt words here are only used as examples, and the embodiments of the present disclosure do not limit the specific content of the directive prompt words.
[0043] In some embodiments, the analysis results for the user input can be generated using a language model based on the third prompt content. For example, the analysis result 414 can point out the defects in the screening conditions input by the user and provide corresponding modification suggestions. In some embodiments, the search can also be performed twice in the background, ignoring certain restrictions of the platform on the user (for example, permission restrictions, etc.) to determine whether the corresponding content exists. Subsequently, the user can be reminded to modify the current input or apply for permission to be released to assist the user in completing the data table screening.
[0044] When the target screening result is not empty, proceed to box 416. At box 416, input recommendation generation can be performed, and input recommendation 418 is generated. In some embodiments, the fourth prompt content can be determined based on the target screening result and the historical screening record. For example, the target screening result 402 can be combined with the historical screening record 410 as the fourth prompt content. In some embodiments, based on the fourth prompt content, the language model can be used to generate input recommendations for the user, and the input recommendation indicates additional screening conditions for further screening based on the target screening result. For example, assuming that the user obtains the project data table created in 2023 as the target screening result in the preliminary screening, an input recommendation can be generated based on the result. The input recommendation can be combined with the user's historical screening record and the target screening result to propose additional screening conditions to further refine the screening. For example, if the user's previous screening record shows that they usually also filter "project status", the language model can recommend that the user add "project status" as an additional screening condition in the current screening, thereby further filtering out the "in progress" project. In this way, the language model can simulate the complete search link of the current user and reduce the user's subsequent manual input cost. In addition, since the generated recommendation input is a semantically complete text, if the user directly adopts the recommendation input, the recommendation input can be stored in the historical screening record, thereby improving the quality of subsequent search recommendations.
[0045] Figure 5 FIG. 5 is a block diagram of an apparatus 500 for screening a data table according to some embodiments of the present disclosure. Figure 5 As shown, the device 500 includes a user input acquisition module 502, which is configured to obtain user input from a user, and the user input indicates the filtering condition for filtering the data table from the data platform in the form of natural language. The device 500 also includes a screening result determination module 504, which is configured to determine the first screening result by text matching the user input and the metadata table storing the table information of the full amount of data tables of the data platform. The device 500 also includes a screening code generation module 506, which is configured to generate a screening code for filtering the data table from the metadata table based on the user input and the metadata table using a language model. The device 500 also includes a screening result verification module 508, which is configured to determine whether the first screening result meets the user's screening condition based on the user input, the first screening result and the user's historical screening record using a language model. In addition, the device 500 also includes a target result determination module 510, which is configured to determine the first screening result as the target screening result for the user input in response to determining that the first screening result meets the screening condition; or, in response to determining that the first screening result does not meet the screening condition, determine the second screening result from the metadata table as the target screening result for the user input by executing the screening code.
[0046] Figure 6 A block diagram of an electronic device 600 is shown in accordance with certain embodiments of the present disclosure. Figure 6 1 shows a block diagram of an electronic device 600 according to some embodiments of the present disclosure, and the device 600 may be a device or apparatus described in an embodiment of the present disclosure. Figure 6 As shown, the device 600 includes a central processing unit (CPU) and / or a graphics processing unit (GPU) 601, which can perform various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) 602 or loaded from a storage unit 608 to a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 can also be stored. The CPU / GPU 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604. Although not shown in FIG. Figure 6 As shown in FIG. 6 , device 600 may also include a co-processor.
[0047] A number of components in the device 600 are connected to the I / O interface 605, including: an input unit 606, such as a keyboard, a mouse, etc.; an output unit 607, such as various types of displays, speakers, etc.; a storage unit 608, such as a disk, an optical disk, etc.; and a communication unit 609, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0048] The various methods or processes described above may be performed by the CPU / GPU 601. For example, in some embodiments, the methods may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 608. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 600 via the ROM 602 and / or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the CPU / GPU 601, one or more steps or actions in the methods or processes described above may be performed.
[0049] In some embodiments, the methods and processes described above may be implemented as a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present disclosure.
[0050] Computer readable storage medium can be a tangible device that can hold and store instructions used by an instruction execution device. Computer readable storage medium can be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (non-exhaustive list) of computer readable storage medium include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, for example, a punch card or a convex structure in a groove on which instructions are stored, and any suitable combination thereof. The computer readable storage medium used here is not interpreted as a transient signal itself, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagated by a waveguide or other transmission medium (for example, a light pulse by an optical fiber cable), or an electrical signal transmitted by a wire.
[0051] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0052] The computer program instructions for performing the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, and conventional procedural programming languages. Computer-readable program instructions may be executed entirely on a user's computer, partially on a user's computer, as a separate software package, partially on a user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby implementing various aspects of the present disclosure.
[0053] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0054] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0055] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the equipment, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each frame in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the frame can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous frames can actually be executed substantially in parallel, and they can also be executed in the opposite order sometimes, depending on the functions involved. It should also be noted that each frame in the block diagram and / or flow chart, and the combination of frames in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0056] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The choice of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
[0057] Some example implementations of the present disclosure are listed below.
[0058] Example 1. A method for filtering a data table, comprising:
[0059] Obtaining a user input from a user, wherein the user input indicates, in a natural language form, a screening condition for screening a data table from a data platform;
[0060] Determine a first screening result by performing text matching on the user input and the metadata table storing the table information of the full data table of the data platform;
[0061] Based on the user input and the metadata table, using a language model, generate a screening code for screening a data table from the metadata table;
[0062] Based on the user input, the first screening result and the user's historical screening record, using the language model to determine whether the first screening result meets the user's screening condition; and
[0063] In response to determining that the first screening result meets the screening condition, determining the first screening result as a target screening result for the user input; or
[0064] In response to determining that the first filtering result does not meet the filtering condition, a second filtering result is determined from the metadata table as the target filtering result for the user input by executing the filtering code.
[0065] Example 2. The method according to Example 1, wherein determining the first screening result comprises:
[0066] Generating a plurality of keywords associated with the user input by segmenting the user input; and
[0067] The first screening result is determined by keyword matching the multiple keywords with table information of each data table in the metadata table, where the table information at least includes a table name, creation time, creator, and database of the data table.
[0068] Example 3. The method of any one of Examples 1-2, wherein the generating of the filter code and the text matching are performed asynchronously, and the filter code is stored in a cache, and determining the second filter result comprises:
[0069] Retrieving the filter code from the cache; and
[0070] The second screening result is determined by executing the screening code.
[0071] Example 4. The method according to any one of Examples 1-3, wherein generating the screening code using the language model comprises:
[0072] Determine a first prompt content based on the user input and the table structure information of the metadata table, wherein the first prompt content further indicates a code type and a code format of the screening code;
[0073] Based on the first prompt content, the screening code corresponding to the code type is generated using the language model.
[0074] Example 5. The method according to any one of Examples 1-4, further comprising:
[0075] Based on the code format indicated by the first prompt content, determining whether the screening code conforms to the code format through regular matching; and
[0076] In response to the screening code being in accordance with the code format, the data columns in the screening code are filtered based on the table structure information of the metadata table.
[0077] Example 6. According to any one of Examples 1-5, the method of determining whether the first screening result meets the screening condition by using the language model comprises:
[0078] Determining second prompt content based on the user input, the first screening result and the historical screening record of the user, the historical screening record including the user's historical input and the corresponding screening time, screening result and result source, the result source indicating that the screening result comes from the first screening result or the second screening result; and
[0079] Based on the second prompt content, the language model is used to determine whether the first screening result meets the screening condition.
[0080] Example 7. The method according to any one of Examples 1-6, further comprising:
[0081] In response to determining that the target screening result is empty, determining third prompt content based on the user input, the table structure information of the metadata table, and the historical screening record; and
[0082] Based on the third prompt content, the language model is used to generate an analysis result for the user input.
[0083] Example 8. The method according to any one of Examples 1-7, further comprising:
[0084] In response to determining that the target screening result is not empty, determining fourth prompt content based on the target screening result and the historical screening record; and
[0085] Based on the fourth prompt content, the language model is used to generate an input recommendation for the user, where the input recommendation is used as an additional screening condition for further screening based on the target screening result.
[0086] Example 9. A device for screening a data table, comprising:
[0087] A user input acquisition module is configured to acquire a user input from a user, wherein the user input indicates a screening condition for screening a data table from a data platform in a natural language form;
[0088] A screening result determination module is configured to determine a first screening result by performing text matching on the user input and a metadata table storing table information of a full data table of the data platform;
[0089] a screening code generating module, configured to generate a screening code for screening a data table from the metadata table by using a language model based on the user input and the metadata table;
[0090] a screening result verification module configured to determine whether the first screening result meets the screening condition of the user by using the language model based on the user input, the first screening result and the historical screening record of the user; and
[0091] The target result determination module is configured to, in response to determining that the first filtering result meets the filtering condition, determine the first filtering result as the target filtering result for the user input; or, in response to determining that the first filtering result does not meet the filtering condition, determine the second filtering result from the metadata table as the target filtering result for the user input by executing the filtering code.
[0092] Example 10. The apparatus according to Example 9, wherein the screening result determination module comprises:
[0093] A keyword generation module, configured to generate a plurality of keywords associated with the user input by segmenting the user input; and
[0094] The second determination module of the screening result is configured to determine the first screening result by matching the multiple keywords with the table information of each data table in the metadata table, wherein the table information at least includes the table name, creation time, creator, and database to which the data table belongs.
[0095] Example 11. The apparatus according to any one of Examples 9-10, wherein the generation of the screening code and the text matching are performed asynchronously, and the screening code is stored in a cache, and the target result determination module includes:
[0096] a screening code acquisition module, configured to acquire the screening code from the cache; and
[0097] The second result determination module is configured to determine the second screening result by executing the screening code.
[0098] Example 12. The apparatus according to any one of Examples 9-11, wherein the screening code generation module comprises:
[0099] A first prompt determination module is configured to determine first prompt content based on the user input and the table structure information of the metadata table, wherein the first prompt content further indicates a code type and a code format of the screening code;
[0100] The second screening code determination module is configured to generate the screening code corresponding to the code type based on the first prompt content and using the language model.
[0101] Example 13. The apparatus according to any one of Examples 9-12, further comprising:
[0102] a code format verification module, configured to determine whether the screening code conforms to the code format through regular matching based on the code format indicated by the first prompt content; and
[0103] The data column filtering module is configured to filter the data columns in the filtering code based on the table structure information of the metadata table in response to the filtering code conforming to the code format.
[0104] Example 14. The apparatus according to any one of Examples 9-13, wherein the screening result verification module comprises:
[0105] A second prompt determination module is configured to determine a second prompt content based on the user input, the first screening result and the historical screening record of the user, the historical screening record including the user's historical input and the corresponding screening time, screening result and result source, the result source indicating that the screening result comes from the first screening result or the second screening result; and
[0106] The second screening result verification module is configured to determine whether the first screening result meets the screening condition based on the second prompt content and using the language model.
[0107] Example 15. The apparatus of any one of Examples 9-14, further comprising:
[0108] A third prompt determination module is configured to, in response to determining that the target screening result is empty, determine third prompt content based on the user input, the table structure information of the metadata table, and the historical screening record; and
[0109] The analysis result generating module is configured to generate an analysis result for the user input based on the third prompt content and using the language model.
[0110] Example 16. The apparatus according to any one of Examples 9-15, further comprising:
[0111] a fourth prompt determination module, configured to, in response to determining that the target screening result is not empty, determine fourth prompt content based on the target screening result and the historical screening record; and
[0112] The input recommendation generating module is configured to generate input recommendations for the user based on the fourth prompt content and using the language model, wherein the input recommendations are additional screening conditions for further screening based on the target screening results.
[0113] Example 17. An electronic device comprising:
[0114] Processor; and
[0115] A memory coupled to the processor, the memory having instructions stored therein, wherein when the instructions are executed by the processor, the electronic device performs actions, the actions comprising:
[0116] Obtaining a user input from a user, wherein the user input indicates, in a natural language form, a screening condition for screening a data table from a data platform;
[0117] Determine a first screening result by performing text matching on the user input and the metadata table storing the table information of the full data table of the data platform;
[0118] Based on the user input and the metadata table, using a language model, generate a screening code for screening a data table from the metadata table;
[0119] Based on the user input, the first screening result and the user's historical screening record, using the language model to determine whether the first screening result meets the user's screening condition; and
[0120] In response to determining that the first screening result meets the screening condition, determining the first screening result as a target screening result for the user input; or
[0121] In response to determining that the first filtering result does not meet the filtering condition, a second filtering result is determined from the metadata table as the target filtering result for the user input by executing the filtering code.
[0122] Example 18. The electronic device of Example 17, wherein determining the first screening result comprises:
[0123] Generating a plurality of keywords associated with the user input by segmenting the user input; and
[0124] The first screening result is determined by keyword matching the multiple keywords with table information of each data table in the metadata table, where the table information at least includes a table name, creation time, creator, and database of the data table.
[0125] Example 19. An electronic device according to any of Examples 17-18, wherein the generating of the filter code and the text matching are performed asynchronously, and the filter code is stored in a cache, and determining the second filter result comprises:
[0126] Retrieving the filter code from the cache; and
[0127] The second screening result is determined by executing the screening code.
[0128] Example 20. The electronic device of any one of Examples 17-19, wherein generating the screening code using the language model comprises:
[0129] Determining first prompt content based on the user input and the table structure information of the metadata table, wherein the first prompt content further indicates a code type and a code format of the screening code; and
[0130] Based on the first prompt content, the screening code corresponding to the code type is generated using the language model.
[0131] Example 21. The electronic device according to any one of Examples 17-20, wherein the actions further include:
[0132] Based on the code format indicated by the first prompt content, determining whether the screening code conforms to the code format through regular matching; and
[0133] In response to the screening code being in accordance with the code format, the data columns in the screening code are filtered based on the table structure information of the metadata table.
[0134] Example 22. The electronic device according to any one of Examples 17-21, wherein determining whether the first screening result meets the screening condition by using the language model comprises:
[0135] Determining second prompt content based on the user input, the first screening result and the historical screening record of the user, the historical screening record including the user's historical input and the corresponding screening time, screening result and result source, the result source indicating that the screening result comes from the first screening result or the second screening result; and
[0136] Based on the second prompt content, the language model is used to determine whether the first screening result meets the screening condition.
[0137] Example 23. The electronic device according to any one of Examples 17-22, wherein the actions further include:
[0138] In response to determining that the target screening result is empty, determining third prompt content based on the user input, the table structure information of the metadata table, and the historical screening record; and
[0139] Based on the third prompt content, the language model is used to generate an analysis result for the user input.
[0140] Example 24. The electronic device according to any one of Examples 17-19, wherein the actions further include:
[0141] In response to determining that the target screening result is not empty, determining fourth prompt content based on the target screening result and the historical screening record; and
[0142] Based on the fourth prompt content, the language model is used to generate an input recommendation for the user, where the input recommendation is used as an additional screening condition for further screening based on the target screening result.
[0143] Example 25. A computer-readable storage medium having one or more computer instructions stored thereon, wherein the one or more computer instructions are executed by a processor to implement the method according to any one of Examples 1 to 8.
[0144] Example 26. A computer program product tangibly stored on a computer-readable medium and comprising computer-executable instructions that, when executed by a device, cause the device to perform the method according to any one of Examples 1 to 8.
[0145] Although the disclosure has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Instead, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. A method for screening a data table, comprising: Obtaining a user input from a user, wherein the user input indicates, in a natural language form, a screening condition for screening a data table from a data platform; Determine a first screening result by performing text matching on the user input and the metadata table storing the table information of the full data table of the data platform; Based on the user input and the metadata table, using a language model, generate a screening code for screening a data table from the metadata table; Based on the user input, the first screening result and the historical screening record of the user, using the language model to determine whether the first screening result meets the screening condition of the user; as well as In response to determining that the first screening result meets the screening condition, determining the first screening result as a target screening result for the user input; or In response to determining that the first filtering result does not meet the filtering condition, a second filtering result is determined from the metadata table as the target filtering result for the user input by executing the filtering code.
2. The method of claim 1, wherein determining the first screening result comprises: Generating a plurality of keywords associated with the user input by segmenting the user input; as well as The first screening result is determined by keyword matching the multiple keywords with table information of each data table in the metadata table, where the table information at least includes a table name, creation time, creator, and database of the data table.
3. The method of claim 1, wherein the generating of the filter code and the text matching are performed asynchronously, and the filter code is stored in a cache, and determining the second filter result comprises: Retrieving the screening code from the cache; as well as The second screening result is determined by executing the screening code.
4. The method according to claim 1, wherein generating the screening code using the language model comprises: Determine a first prompt content based on the user input and the table structure information of the metadata table, wherein the first prompt content further indicates a code type and a code format of the screening code; as well as Based on the first prompt content, the screening code corresponding to the code type is generated using the language model.
5. The method according to claim 4, further comprising: Based on the code format indicated by the first prompt content, determining whether the screening code conforms to the code format through regular matching; as well as In response to the screening code being in accordance with the code format, the data columns in the screening code are filtered based on the table structure information of the metadata table.
6. The method according to claim 1, wherein using the language model to determine whether the first screening result meets the screening condition comprises: Determine a second prompt content based on the user input, the first screening result and the historical screening record of the user, wherein the historical screening record includes the user's historical input and the corresponding screening time, screening result and result source, wherein the result source indicates that the screening result comes from the first screening result or the second screening result; as well as Based on the second prompt content, the language model is used to determine whether the first screening result meets the screening condition.
7. The method according to claim 1, further comprising: In response to determining that the target screening result is empty, determining third prompt content based on the user input, the table structure information of the metadata table, and the historical screening record; as well as Based on the third prompt content, the language model is used to generate an analysis result for the user input.
8. The method according to claim 7, further comprising: In response to determining that the target screening result is not empty, determining fourth prompt content based on the target screening result and the historical screening record; as well as Based on the fourth prompt content, the language model is used to generate an input recommendation for the user, where the input recommendation is used as an additional screening condition for further screening based on the target screening result.
9. A device for screening a data table, comprising: A user input acquisition module is configured to acquire a user input from a user, wherein the user input indicates a screening condition for screening a data table from a data platform in a natural language form; A screening result determination module is configured to determine a first screening result by performing text matching on the user input and a metadata table storing table information of a full data table of the data platform; a screening code generating module, configured to generate a screening code for screening a data table from the metadata table by using a language model based on the user input and the metadata table; a screening result verification module, configured to determine whether the first screening result meets the screening condition of the user by using the language model based on the user input, the first screening result and the historical screening record of the user; as well as a target result determination module, configured to, in response to determining that the first screening result meets the screening condition, determine the first screening result as a target screening result for the user input; Alternatively, in response to determining that the first filtering result does not meet the filtering condition, a second filtering result is determined from the metadata table as the target filtering result for the user input by executing the filtering code.
10. An electronic device comprising: processor; as well as A memory coupled to the processor, the memory having instructions stored therein, wherein when the instructions are executed by the processor, the electronic device executes the method according to any one of claims 1 to 8.
11. A computer program product tangibly stored on a non-transitory computer readable medium and comprising computer executable instructions for performing the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Data query method and device based on natural language text and computer equipment
CN113868389A
Data query method and device based on natural language
CN115840760A