Table processing method and device for intelligent question, medium and electronic equipment
Patent Information
- Application Number
- CN202611132637.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-28
- Publication Date
- 2026-08-28
AI Technical Summary
[0008] In the table template, the position of the headings can be fixed or variable. Feature modeling is performed on each heading in the first table obtained by filling in the form template, resulting in a refined feature representation of the first table. This feature representation characterizes the features of each heading in the template and the actual content filled in within the first table. Based on this, a machine learning model is constructed using the feature representations of multiple first tables. This model can then identify second tables belonging to the same category as the first tables. Thus, in intelligent data collection, tables belonging to the same category can be selected based on the identification results of the machine learning model, improving the accuracy of the data source upon which intelligent data collection relies, thereby enhancing the accuracy of intelligent data collection.
Smart Images

Figure CN122655731A_ABST
Abstract
Description
Technical Field
[0001] This content relates to the field of computer technology, specifically to a table processing method, apparatus, medium, and electronic device for intelligent queries. Background Technology
[0002] Intelligent data analysis is an AI (Artificial Intelligence) capability that uses natural language to retrieve data, generate charts, and provide insights. Intelligent data analysis relies on various data sources, with tables being one such source. It typically focuses on answering questions within the same type of table; therefore, identifying similar tables is a key technical challenge. Summary of the Invention
[0003] This content section is provided to briefly introduce the concepts, which will be described in detail in the examples section later. This content section is not intended to identify key or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.
[0004] Firstly, a table processing method for intelligent question counting is provided, including: Obtain the first form, wherein the first form is obtained based on filling in the corresponding form template; According to the form template, the first form is identified to determine the feature representation of the first form, wherein the feature representation is used to characterize the features of each title in the form template and the actual content filled in the title in the first form, the title belongs to a first type or a second type, the position of the title of the first type is fixed in the form template, and the position of the title of the second type is variable in the form template; A machine learning model is constructed based on the feature representations of multiple first tables, wherein the machine learning model is used to identify second tables that belong to the same category as the first tables, and the tables of the same category are used to support intelligent question counting.
[0005] Secondly, a table processing device for intelligent question answering is provided, comprising: The module is used to obtain a first table, wherein the first table is obtained by filling in the corresponding table template; The identification module is used to identify the first table according to the table template to determine the feature representation of the first table, wherein the feature representation is used to characterize the features of each title in the table template and the actual content filled in the title in the first table, the title belongs to a first type or a second type, the position of the title of the first type is fixed in the table template, and the position of the title of the second type is variable in the table template; A construction module is used to construct a machine learning model based on the feature representations of multiple first tables, wherein the machine learning model is used to identify second tables that belong to the same category as the first tables, and the tables of the same category are used to support intelligent question counting.
[0006] Thirdly, a computer-readable medium is provided having a computer program stored thereon, wherein, when executed by a processing device, the computer program causes the processing device to perform the steps of the method described in the first aspect.
[0007] Fourthly, an electronic device is provided, comprising: A storage device on which computer programs are stored; A processing device for executing the computer program in the storage device to implement the steps of the method described in the first aspect.
[0008] In the table template, the position of the headings can be fixed or variable. Feature modeling is performed on each heading in the first table obtained by filling in the form template, resulting in a refined feature representation of the first table. This feature representation characterizes the features of each heading in the template and the actual content filled in within the first table. Based on this, a machine learning model is constructed using the feature representations of multiple first tables. This model can then identify second tables belonging to the same category as the first tables. Thus, in intelligent data collection, tables belonging to the same category can be selected based on the identification results of the machine learning model, improving the accuracy of the data source upon which intelligent data collection relies, thereby enhancing the accuracy of intelligent data collection.
[0009] Other features and advantages of the technical solution will be described in detail in the following examples section. Attached Figure Description
[0010] The above and other features, advantages, and aspects of the technical solution will become more apparent when considered in conjunction with the accompanying drawings and the following examples. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale. In the drawings: Figure 1 This is a flowchart illustrating a table processing method for intelligent question answering based on certain scenarios; Figure 2 This is a schematic diagram of a table template shown under certain circumstances; Figure 3 This is a block diagram illustrating a table processing device for intelligent question answering, based on certain scenarios. Figure 4 This is a schematic diagram of the structure of an electronic device shown under certain circumstances. Detailed Implementation
[0011] The technical solution will now be described in more detail with reference to the accompanying drawings. Although certain scenarios are shown in the drawings, it should be understood that the technical solution can be implemented in various forms and should not be construed as limited to the scenarios described herein. Rather, these scenarios are provided to provide a more thorough and complete understanding of the technical solution. It should be understood that the accompanying drawings and the scenarios described are for illustrative purposes only and are not intended to limit the scope of protection of the technical solution.
[0012] It should be understood that the steps described in the method implementation may be performed in different orders and / or in parallel. Furthermore, the method implementation may include additional steps and / or omit the steps shown. The scope of the technical solution is not limited in this respect.
[0013] The term "comprising" and its variations as used herein can be open-ended, meaning "including but not limited to". The term "based on" can mean "at least partially based on". The term "one case" means "at least one case"; the term "another case" means "at least one additional case"; the term "some cases" means "at least some cases". Definitions of other terms will be given in the following description.
[0014] It should be noted that the concepts of "first" and "second" mentioned here are only used to distinguish different devices, modules or units, and are not used to limit the order of the functions performed by these devices, modules or units or their interdependencies.
[0015] It should be noted that the terms "one" and "more" used here are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0016] The names of messages or information exchanged between the multiple devices in the implementation are for illustrative purposes only and are not intended to limit the scope of these messages or information.
[0017] It is understandable that before using the technical solutions provided here, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in accordance with relevant laws and regulations, and their authorization should be obtained through appropriate means.
[0018] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose, based on the prompt message, whether to provide personal information to the software or hardware such as electronic devices, applications, servers, or storage media performing the operations described herein.
[0019] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0020] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of the technical solution. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the technical solution.
[0021] At the same time, it is understood that the data involved in the technical solution (including but not limited to the data itself, the acquisition or use of the data) should comply with the requirements of relevant laws, regulations and related provisions.
[0022] Figure 1 This is a flowchart illustrating a table processing method for intelligent question answering based on certain scenarios. (Refer to...) Figure 1 The table processing method for intelligent question counting includes steps S110, S120 and S130.
[0023] In step S110, a first form is obtained, which is based on filling in the corresponding form template.
[0024] The first form can be obtained by manually filling in a form template or by filling in an electronic form template using an electronic device.
[0025] In step S120, the first table is identified according to the table template to determine the feature representation of the first table. The feature representation is used to characterize the features of each title in the table template and the actual content filled in each title in the first table. The title belongs to a first type or a second type. The position of the title of the first type is fixed in the table template, and the position of the title of the second type is variable in the table template.
[0026] In the table template, both Type 1 and Type 2 headings can be specified within the template. For Type 1 headings, users typically only need to fill in the information at the location associated with the heading (e.g., the cell to the left of the heading cell or the cell below the heading cell). The content entered becomes the actual content of the heading, and the number of rows filled in is usually fixed. For Type 2 headings, the number of rows occupied by the heading's content is variable. Users fill in the information at the location associated with the heading (e.g., the cell to the left of the heading cell or the cell below the heading cell). The content entered becomes the actual content of the heading. Alternatively, users can change the position of Type 2 headings within the table. The area of change is determined by the table template itself. For an explanation of the position area, please refer to the following content.
[0027] Figure 2 This is a schematic diagram of a form template shown under certain circumstances. (Refer to...) Figure 2 Fixed headings A1, A2, B1, B2, B3, and E1 all belong to the first type of heading. When filling out the form, users are expected to use the positions associated with the fixed headings (e.g., ...). Figure 2 Fill in the information on the left side as shown, and you will get the information A1, A2, B1, B2, B3 and E1 corresponding to the fixed titles A1, A2, B1, B2, B3 and F1 respectively.
[0028] Continue to refer to Figure 2 Variable headings C1, C2, C3, C4, C5, C6, C7, C8, D1, and F1 all belong to the second type of heading. The position of variable heading C1 can be changed to any of the positions from variable heading C2 to C8, or the actual content of variable heading C1 can occupy 3 lines (e.g., ...). Figure 2 The fields for filling in (C11, C12, and C13) are shown below, or they can occupy 2 or 4 lines depending on the actual field requirements. The position of variable heading D1 can be changed to that of variable heading F1, and the actual content of variable heading D1 can occupy 3 lines (e.g., ...). Figure 2 The fields shown are D11, D12, and D13, or they can occupy 2 or 6 lines depending on the actual situation.
[0029] The features of each title in the form template and the actual content filled in for each title in the first form can be used to characterize at least one of the following: Whether each title in the form template and the actual content filled in for the title exist in the first form, and whether the title belongs to the first type or the second type; The positions of each title in the form template and the actual content filled in for each title in the first form, and the title belonging to the first type or the second type; The number of rows in the first table corresponding to the actual content of each title in the table template, wherein the title belongs to the second type of title.
[0030] In step S130, a machine learning model is constructed based on the feature representations of multiple first tables. This machine learning model is used to identify second tables that belong to the same category as the first tables. Tables of the same category are used to support intelligent question counting.
[0031] The process involves labeling the first table to construct sample pairs, which can be either positive or negative. Positive sample pairs represent two similar first tables, while negative sample pairs represent two dissimilar first tables. Based on the feature representations of each first table in the sample pairs, the machine learning model is trained with the training objective of predicting similarity close to 1 for positive sample pairs and close to 0 for negative sample pairs. During training, the parameters of the machine learning model are continuously adjusted to reduce the error between the predicted similarity and the label (which can be 0 or 1), thus achieving the aforementioned training objective.
[0032] After obtaining the trained machine learning model, the fourth table can first be identified to obtain its feature representation. This feature representation is then input into the trained machine learning model, which calculates the predicted similarity between the fourth table and each of the first tables. Based on the predicted similarity, it is determined whether the fourth table belongs to the same category as the first tables. A fourth table belonging to the same category as a first table can be understood as a second table belonging to the same category as the first table. The method for determining the feature representation of the fourth table is the same as that for the first tables, which can be found in the following section.
[0033] Using the above method, the position of the title in the table template can be fixed or variable. Feature modeling is performed on each title in the first table obtained by filling in the form template, resulting in a refined feature representation of the first table. This feature representation characterizes the features of each title in the form template and the actual content filled in within the first table. Based on this, a machine learning model is constructed using the feature representations of multiple first tables. This model can then identify second tables belonging to the same category as the first tables. Thus, in intelligent question answering, tables belonging to the same category can be selected based on the identification results of the machine learning model, improving the accuracy of the data source upon which intelligent question answering relies, thereby enhancing the accuracy of intelligent question answering.
[0034] In some cases, the feature representation of the aforementioned first table may include a first feature representation, which characterizes that each title in the table template appears in a first position and the actual filled-in content of the title appears in a second position. It is understood that the first feature representation simultaneously characterizes the existence of the title in the table template within the first table, its position within the first table, the existence of the actual filled-in content of the title within the first table, and the position where the actual filled-in content of the title exists. In this case, the step of identifying the first table based on the table template to determine the feature representation of the first table may include the following steps: for titles belonging to the first type in the table template, based on the position of the title in the table template and the position of the template filled-in content of the title in the table template, determine the first position where the title appears in the first table and the second position where the actual filled-in content of the title appears in the first table, thereby determining the first feature representation.
[0035] Based on the form template, the positions of the title and the template-filled content within the template can be determined. Using these two positions, it can be identified whether the title is in its corresponding position in the first form and whether the actual content corresponding to the title is in its corresponding position. Specifically, text-based matching can be used to determine whether the title appears in the first position of the first form and whether the actual content appears in the second position. The first position is the same as the title's position in the form template, and the second position is the same as the template-filled content's position in the form template.
[0036] As an example, the first feature representation can be represented using a numeric encoding, for example, the first feature representation can be represented by the number 1.
[0037] By using the above method, the feature representation of the first type of title in the first table template is determined, so as to realize the modeling of the features of the first type of title in the first table.
[0038] In some cases, the feature representation of the first form may include a second feature representation, which is used to characterize that the title in the form template appears in the third position of the first form and the actual content filled in for the title appears in the fourth position of the first form. The third position and the first position satisfy a first relative positional relationship. The second relative positional relationship is the same as the third relative positional relationship. The second relative positional relationship is used to describe the relative positional relationship between the third position and the fourth position. The third relative positional relationship is used to describe the relative positional relationship between the fifth position and the sixth position. The fifth position is used to describe the position of the title in the form template, and the sixth position is used to describe the position of the template content filled in for the title in the form template.
[0039] It is understood that the second feature represents the presence of the title in the form template in the first form, the position of the title in the first form, and the position of the actual content filled in the title in the first form and the actual position of the title. In this case, the step of identifying the first form according to the form template to determine the feature representation of the first form may include the following steps: determining the third position of the title in the first form and the fourth position of the actual content filled in the title in the first form based on the position of the title in the form template and the position of the template content filled in the title in the form template, thereby determining the second feature representation.
[0040] The third position can be a pre-marked position in the table template. The third position and the first position must satisfy a first relative positional relationship. For an explanation of the first position, please refer to the above content. The second position can be set according to the actual situation of the table template; that is, the first relative positional relationship can be set according to the actual situation. For example, the first relative positional relationship can be a preset number of cells apart horizontally. Continue to refer to... Figure 2 In the table template shown, the position of fixed heading B5 or fixed heading B6 can be considered the third position in the first table, and the positions of fixed heading B1, fixed heading B2, and fixed heading B3 can be considered the first position in the first table. Continue referring to... Figure 2 If the position of the fixed title B5 is considered the third position, the fourth position can be the position of the content to be filled in, B5.
[0041] Among them, the second and third relative positional relationships are the same, and they follow the previous ones. Figure 2In the example shown, taking fixed title B1 as an example, the content to be filled in B1 is the template content to be filled in, the position of fixed title B5 is the third position of fixed title B1 in the first table, and the content to be filled in B5 is the actual content to be filled in for fixed title B1. That is, the relative positional relationship between fixed title B1 and content to be filled in B1 can be regarded as the third relative positional relationship, and the relative positional relationship between fixed title B5 and content to be filled in B5 can be regarded as the second relative positional relationship.
[0042] Following the above example of using numeric encoding to represent the first feature representation, the second feature representation can also be represented using numeric encoding. For example, it can be encoded based on the number of third positions marked in the table template. For instance, when the number of third positions is N, 1 / N can be used to represent the second feature representation. Figure 2 In the example where N is 2, if it is determined that the title appears in the third position of the first table and the actual content corresponding to the title appears in the fourth position of the first table, then 1 / 2 can be used as the second feature.
[0043] When filling out forms using templates, errors may occur, and the information may be mistakenly entered into other rows. However, this is essentially just a difference in position; the actual content of the form remains the same. This means that the entry can be considered reasonable and does not disrupt the form's structure. Therefore, it can be considered a form of the same type. To accommodate such errors in actual form filling, we can determine whether the title appears in the third position of the first form and whether the actual content of the title appears in the fourth position of the first form. This improves the compatibility of feature modeling and provides a reliable data foundation for accurately identifying similar forms.
[0044] In some cases, the feature representation of the first table may include a third feature representation, which is used to characterize that the title in the table template does not appear in the first table. In this case, the step of identifying the first table according to the table template to determine the feature representation of the first table may include the following steps: determining that the title does not appear in the first table based on the position of the title in the table template, thereby determining the third feature representation.
[0045] If, based on the position of the title in the table template, it is determined that the title is neither in the first position nor in the third position, then it can be determined that the title does not appear in the first table. For explanations and descriptions of the first and third positions, please refer to the above content.
[0046] Following the example of using numerical encoding to represent the first feature, the third feature can also be represented using numerical encoding. For example, the value 0 can be used to represent the third feature.
[0047] The above method is used to model the case where the first type of title in the table template does not appear in the first table, so as to determine the feature representation of the first type of title in the table template in the first table, so as to further refine the modeling of the titles in the first table.
[0048] In some cases, the feature representation of the first form may include a third feature representation, which is used to characterize the actual content filled in the first form that does not appear in the title (i.e., the actual content filled in the title does not appear in the first form). In this case, the step of identifying the first form according to the form template to determine the feature representation of the first form may include the following steps: determining that the actual content filled in the title does not appear in the first form based on the position of the template content filled in the title in the form template, thereby determining the third feature representation, wherein the third feature representation is used to characterize that the actual content filled in the title does not appear in the first form.
[0049] If, based on the position of the template content in the title within the table template, it is determined that the template content is not in the corresponding position in the first table, then it can be concluded that the template content does not appear in the first table. Figure 2 The example shown uses a fixed heading B3 in the form template, and fixed heading B6 as an optional position (i.e., the third position) of fixed heading B3 in the actual filling. If no actual filling content appears in the same position as filling content B3 in the first table, and no actual filling content appears in the same position as filling content B6 in the first table, then it can be determined that the filling content of the template does not appear in the first table.
[0050] Following the example of using numerical encoding to represent the first feature, the third feature can also be represented using numerical encoding. For example, the value 0 can be used to represent the third feature.
[0051] The above method is used to model the situation where the first type of title in the table template does not appear in the first table or lacks actual content, so as to determine the characteristic representation of the first type of title in the table template in the first table, so as to further refine the modeling of the title in the first table.
[0052] In some cases, the feature representation of the first table may include a fourth feature representation. In this case, the step of identifying the first table according to the table template to determine the feature representation of the first table may include the following steps: for a title belonging to the second type in the table template, determine the position area of the title in the table template, wherein the position area is used to characterize the range of change of the title in the table when filling in the form; determine that the title appears in the position area of the title in the table template, thereby determining a fifth feature representation, wherein the fifth feature representation is used to characterize that the title appears in the first table; determine the number of rows occupied by the actual filled content of the title in the first table, thereby determining a sixth feature representation, wherein the sixth feature representation is used to characterize the number of rows occupied by the actual filled content of the title in the first table; determine the fourth feature representation based on the fifth feature representation and the sixth feature representation, wherein the fourth feature representation is used to characterize that the title exists in the first table and the number of rows occupied by the actual filled content of the title in the first table.
[0053] As can be seen from the above, for titles belonging to the second type, their position is variable, and the number of rows occupied by their content can also be variable. Therefore, when identifying whether a title exists in the first table, it can be determined whether the title is in the corresponding variable position area, which can be determined according to the table template. If the title appears in any of the title's positions within the position area, it is determined that the title appears in that position area; if the title does not appear in any of the title's positions within the position area, it is determined that the title does not appear in that position area.
[0054] Accept Figure 2 The example table template shown includes the positions of variable heading C1, variable heading C2, variable heading C3, variable heading C4, variable heading C5, variable heading C6, variable heading C7, and variable heading C8. Therefore, it can be determined whether variable heading C1 appears in the positions of variable heading C1, variable heading C2, variable heading C3, variable heading C4, variable heading C5, variable heading C6, variable heading C7, or variable heading C8, thereby determining whether variable heading C1 exists in the position area, and further determining whether variable heading C1 appears in the first table.
[0055] For example Figure 2The variable heading D1 shown has a position area in the table template that includes the position of variable heading D1 and the position of variable heading F1. Therefore, it can be determined whether variable heading D1 appears in the position of variable heading D1 or variable heading F1, thereby determining whether variable heading D1 exists in the position area, and further determining whether variable heading D1 appears in the first table.
[0056] It is understandable that when determining whether different headings for the same location area appear in the corresponding location area, the location area is dynamically changing. This dynamic change may refer to the shrinking of the location area. Since multiple headings cannot appear in the same position of the location area, when it is determined that a certain heading appears in a certain position of the location area, that position is deleted from the location area, thereby improving the efficiency of determining whether different headings in the same location area appear in the corresponding location area.
[0057] After determining the fifth characteristic of the title, the number of lines in the corresponding content can be further determined. As mentioned above, the number of lines in the content of a variable title can vary, depending on the complexity of the business. Different formats can result in different line counts. For example, for project codes (i.e., the title), each code can be listed in each cell, resulting in multiple lines, or all codes can be represented by abbreviations within the same cell, such as using 001-100. Similarly, for project results (i.e., the title), one way to write the content could be "Significant revenue growth after project implementation," while another could be "This project boosted overall revenue," thus describing project results from different perspectives.
[0058] Following the above example of using numerical encoding to represent the first feature representation, the fourth, fifth, and sixth feature representations can also be represented using numerical encoding. For example, if the title appears in the position area, the fifth feature representation can be represented by the value 1; if the title does not appear in the position area, the fifth feature representation can be represented by the value 0. The sixth feature representation is related to the number of rows, and when there are many rows, the sixth feature of the actual content filled in for all titles can be normalized. For example, first determine the maximum number of rows occupied by the content corresponding to all titles in the first table, and then determine the sixth feature representation of the corresponding title by the ratio of the number of rows occupied by the actual content of the title in the first table to the maximum number of rows. Then, if the fifth feature representation is not 0, treat the fifth feature representation as the integer part and the sixth feature representation as the decimal part, thus obtaining the fourth feature representation (the superposition of the integer and decimal parts). The fourth feature representation is used to characterize the existence of the title in the table template in the first table and the number of rows occupied by the content corresponding to that title in the first table.
[0059] It should be noted that when the fifth feature representation is 0, the fifth feature representation is the same as the fourth feature representation, and there is no need to determine the sixth feature representation. In this case, the fourth feature representation is used to indicate that the title in the table template does not exist in the first table.
[0060] By using the above method, the characteristic representation of the second type of title in the table template is determined in the first table, so as to realize the modeling of the dynamically changing content in the first table.
[0061] In some cases, the above-mentioned table processing method for intelligent question counting may also include the following steps: obtaining a second table, which is a table of the same type as the first table, determined by a machine learning model; performing content understanding on the filling content of each title in all the second tables using a large language model to obtain the filling pattern of each filling content in all the second tables; determining the knowledge of the second table based on the filling pattern of each filling content, and storing the knowledge.
[0062] Building upon the example of project results mentioned above, the filling pattern can refer to a dimension. This allows for the organization and storage of the actual content filled in for different dimensions, along with the structured knowledge for each dimension. Similarly, building upon the example of project coding mentioned above, the filling pattern can refer to an abbreviation method (typically used for continuous coding) or a listing method (typically used for non-continuous coding). In the abbreviation method, all information expressed by the abbreviation (e.g., all codes) is restored, and all restored codes and the filling pattern are organized and stored as structured knowledge.
[0063] By using the above method, the knowledge in the second form is organized and stored based on the filling patterns of each entry, thereby providing additional knowledge beyond the table when performing intelligent number counting, thus improving the completeness of the context in intelligent number counting and improving the accuracy of intelligent number counting.
[0064] In some cases, the above steps for obtaining the first form may include the following steps: obtaining a set of forms, which includes multiple third forms, which are obtained by filling in the corresponding form templates; performing a conformity check on each third form to obtain the test results of each third form; and obtaining the first form from the set of forms based on the test results of each third form, which is used to characterize the conforming third forms.
[0065] A pass / fail check is used to improve the quality of the first table used to model machine learning models. A pass / fail check can examine the third table from multiple dimensions, including, for example, at least one of a first pass / fail check and a second pass / fail check.
[0066] The first conformity check is used to check whether the third form has a form name. If the third form does not have a form name, it is determined to be unqualified; otherwise, if the third form has a form name, it is determined to be qualified. For example, continue to refer to... Figure 2 Each table template has a template name 201. Using keyword detection technology, if the template name 201 (i.e., the keyword) is not detected, the third table is considered unqualified. If the template name 201 is detected, the third table is considered qualified.
[0067] The second pass / fail check checks whether the table content can be located on the table page. If the content of the third table can be located on the table page, the third table is considered passable; otherwise, if the content of the third table cannot be located on the table page, the third table is considered failable. It should be noted that, generally, the range of the table page is unlimited. Therefore, it is necessary to locate the table content on the table page to identify the content within the located area, thereby achieving feature modeling. Furthermore, since the position of the table template on the table page is variable, for example, in… Figure 2 In the table, the table content can occupy columns B to L and rows 4 to 18 in table page 202. Generally speaking, the table content can refer to all the content in the first table except for the table template name. The table content can also occupy other positions. Therefore, it is not possible to locate the table according to the row and column numbers. Therefore, a solution is needed to locate the table content.
[0068] As an example, the second qualification check can be implemented by determining the positions of any three of the four fixed-position titles in the table template within the table template, and thus determining that the third table is qualified.
[0069] It should be noted that tables on a table page are generally rectangular, with top-left, bottom-left, top-right, and bottom-right corners. Therefore, by setting fixed positions for these four corners and using the headings assigned to those fixed positions, it can be determined whether the content of the third table can be located, thus determining whether the third table is qualified. For example, Figure 2 In the table, the table content is located by identifying fixed headings A1 (top left), A2 (top right), and E1 (bottom left).
[0070] By using the above method, the third form obtained by filling in the corresponding form template is subjected to qualification check, thereby improving the quality of the first form used to build the machine learning model, and thus providing a reliable sample for building a high-quality machine learning model.
[0071] In some cases, similar processing tools can be used to process similar tables. These tools can be knowledge extraction tools, thereby improving the completeness and efficiency of information extraction. For example, for accurately filled tables, when extracting information, the actual content of the title can be obtained by directly retrieving the corresponding position in the actual table according to the position given in the table template. For incorrectly filled tables, the actual content can be quickly obtained by retrieving information from nearby positions (positions that satisfy the first relative positional relationship) given in the table template.
[0072] After obtaining the information, the aforementioned large language model can be used to further realize the process of content understanding and knowledge storage.
[0073] In some cases, the table processing method for intelligent querying may further include the following steps: obtaining a fifth table, which is a table determined by the machine learning model that does not belong to the same category as the first table; using the fifth table as a new first table, constructing sample pairs based on the new first table, and updating the machine learning model based on the sample pairs, so that the updated machine learning model...
[0074] In this way, the updated machine learning model can identify similar tables in the fifth table in subsequent table recognition, thereby improving the generalization ability of the machine learning model.
[0075] Based on the same concept, a table processing device for intelligent question answering is provided. Figure 3 This is a block diagram illustrating a form processing device for intelligent question answering, based on certain scenarios. (Refer to...) Figure 3 The form processing device 300 for intelligent queries may include: The module 301 is used to obtain a first table, wherein the first table is obtained based on filling in the corresponding table template; The identification module 302 is used to identify the first table according to the table template to determine the feature representation of the first table, wherein the feature representation is used to characterize the features of each title in the table template and the actual content filled in the title in the first table, the title belongs to a first type or a second type, the position of the title of the first type is fixed in the table template, and the position of the title of the second type is variable in the table template; The construction module 303 is used to construct a machine learning model based on the feature representations of multiple first tables, wherein the machine learning model is used to identify second tables that belong to the same category as the first tables, and the tables of the same category are used to support intelligent question counting.
[0076] In some cases, the feature representation includes a first feature representation, and the recognition module 302 includes: The first identification submodule is used to determine the first feature representation by, based on the position of the title in the table template and the position of the template content filled in the title in the table template, the first position of the title in the first table and the second position of the actual content filled in the title in the first table for the title belonging to the first type in the table template. Wherein, the first feature indicates that the title appears in the first position and the actual filled content appears in the second position, the first position is the same as the position of the title in the form template, and the second position is the same as the position of the template filled content in the form template.
[0077] In some cases, the feature representation includes a second feature representation, and the recognition module 302 further includes: The second identification submodule is used to determine the third position of the title in the first table and the fourth position of the actual content of the title in the first table based on the position of the title in the table template and the position of the template content of the title in the table template, so as to determine the second feature representation; Wherein, the second feature indicates that the title appears in the third position and the actual filled content appears in the fourth position, the third position and the first position satisfy a first relative positional relationship, the second relative positional relationship is the same as the third relative positional relationship, the second relative positional relationship is used to describe the relative positional relationship between the third position and the fourth position, the third relative positional relationship is used to describe the relative positional relationship between the fifth position and the sixth position, the fifth position is used to describe the position of the title in the table template, and the sixth position is used to describe the position of the template filled content of the title in the table template.
[0078] In some cases, the feature representation includes a third feature representation, and the recognition module 302 further includes: The third identification submodule is used to determine that the title does not appear in the first table based on the position of the title in the table template, thereby determining the third feature representation, wherein the third feature representation is used to characterize that the title does not appear in the first table; The fourth identification submodule is used to determine, based on the position of the template content of the title in the form template, that the actual content of the title does not appear in the first form, thereby determining the third feature representation, wherein the third feature representation is used to characterize that the actual content of the title does not appear in the first form.
[0079] In some cases, the feature representation includes a fourth feature representation, and the recognition module 302 includes: The first determining module is used to determine the position area of the title in the table template for the title belonging to the second type in the table template, wherein the position area is used to characterize the range of change of the title in the table when filling in the form; The second determining module is used to determine that the title appears in the position area of the title in the table template, so as to determine the fifth feature representation, wherein the fifth feature representation is used to characterize that the title appears in the first table; The third determining module is used to determine the number of rows occupied by the actual content of the title in the first table, so as to determine the sixth feature representation, which is used to characterize the number of rows occupied by the actual content of the title in the first table; The fourth determining module is used to determine the fourth feature representation based on the fifth feature representation and the sixth feature representation, wherein the fourth feature representation is used to characterize the number of rows occupied by the title in the first table and the actual content of the title in the first table.
[0080] In some cases, the form processing device 300 for intelligent queries also includes: The acquisition module is used to acquire a second table, which is a table of the same type as the first table, determined by the machine learning model. The understanding module is used to understand the content of the entries for each title in the second table through a large language model, and to obtain the filling pattern of the content of each title in the second table. The determination module is used to determine the knowledge of the second form based on the filling pattern of each of the filled-in contents, and to store the knowledge.
[0081] In some cases, the obtaining module 301 is used to: obtain a set of tables, wherein the set of tables includes multiple third tables, which are obtained by filling in corresponding table templates; perform a qualification test on each of the third tables to obtain a test result for each of the third tables; and obtain a first table from the set of tables based on the test results of each of the third tables, wherein the first table is used to characterize qualified third tables.
[0082] Among them, regarding Figure 3 The implementation principles of each module in the table processing device 300 for intelligent questions can be referred to the above content, and the table processing device 300 for intelligent questions has the same technical effect as the table processing method for intelligent questions described above.
[0083] Based on the same concept, a computer-readable medium is provided that stores a computer program thereon, wherein when executed by a processing device, the computer program causes the processing device to perform the steps of the above-described method, and the computer-readable medium has the technical effects that can be achieved by implementing the above-described related methods, and the technical effects can be referred to the above content.
[0084] Based on the same concept, a computer program product is provided, including a computer program, wherein when executed by a processor, the computer program causes the processor to implement the steps of the above-described method, and the computer program product has the technical effects that can be achieved by implementing the above-described related methods, and the technical effects can be referred to the above content.
[0085] Based on the same concept, an electronic device is provided, comprising: A storage device on which computer programs are stored; A processing device is used to execute the computer program in the storage device to implement the steps of the above method, and the electronic device has the technical effects that can be achieved by implementing the above-mentioned related methods, and the technical effects can be referred to the above content.
[0086] The following is for reference. Figure 4 The diagram illustrates the structure of an electronic device 400 suitable for implementing the above-described technical solution. The terminal device may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Tablet Personal Computers), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs (Televisions), desktop computers, etc. Figure 4 The electronic devices shown are merely examples and should not be construed as limiting their functionality or scope of use.
[0087] like Figure 4 As shown, electronic device 400 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 401, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 402 or a program loaded from storage device 408 into random access memory (RAM) 403. The random access memory 403 also stores various programs and data required for the operation of electronic device 400. The processing unit 401, ROM 402, and RAM 403 are interconnected via bus 404. Input / output (I / O) interface 405 is also connected to bus 404.
[0088] Typically, the following devices can be connected to the input / output interface 405: input devices 406 including, for example, a touchscreen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 407 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 408 including, for example, magnetic tape, hard disk, etc.; and communication devices 409. Communication device 409 allows electronic device 400 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 4 An electronic device 400 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0089] In particular, depending on certain circumstances, the processes described in the above-referenced flowchart can be implemented as computer software programs. For example, a computer program product is provided, comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowchart. This computer program can be downloaded and installed from a network via communication device 409, or installed from storage device 408, or installed from read-only memory 402. When the computer program is executed by processing device 401, it performs the functions defined in the above-described methods.
[0090] It should be noted that the aforementioned computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM, or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In one case, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In another case, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. The transmitted data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (Radio Frequency), etc., or any suitable combination thereof.
[0091] In some implementations, electronic devices can communicate using any currently known or future-developed network protocol, such as HTTP (Hypertext Transfer Protocol), and can interconnect with digital data communications (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (LANs), wide area networks (WANs), the internet (e.g., the Internet), and peer-to-peer networks (e.g., ad-hoc peer-to-peer networks), as well as any currently known or future-developed networks.
[0092] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0093] The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: obtain a first form, wherein the first form is obtained based on filling in a corresponding form template; identify the first form according to the form template to determine a feature representation of the first form, wherein the feature representation is used to characterize the features of each title in the form template and the actual content filled in the title in the first form, wherein the title belongs to a first type or a second type, the position of the title of the first type is fixed in the form template, and the position of the title of the second type is variable in the form template; and construct a machine learning model based on the feature representations of multiple first forms, wherein the machine learning model is used to identify a second form of the same type as the first form, and the forms of the same type are used to support intelligent data collection.
[0094] Computer program code for performing the above operations can be written in one or more programming languages or a combination thereof. These programming languages include, but are not limited to, object-oriented programming languages, as well as conventional procedural programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can 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 can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0095] The flowcharts and block diagrams in the accompanying figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products under various scenarios. In this respect, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the figures. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0096] The modules mentioned above can be implemented in software or hardware. In some cases, the name of a module does not necessarily limit the module itself; for example, a module for obtaining information can also be described as "the module for obtaining the first table".
[0097] The functions described above can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field-Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application-Specific Standard Parts (ASSPs), Systems on Chips (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0098] In this context, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0099] The above description is merely illustrative and explains the technical principles employed. Those skilled in the art should understand that the scope of the technical solution is not limited to specific combinations of the above-described technical features, but also includes other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features provided herein that have similar functions.
[0100] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. Multitasking and parallel processing may be advantageous in certain environments. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limitations on the scope of the technical solution. Certain features described in the context of a single example can also be implemented in combination in a single example. Conversely, various features described in the context of a single example can also be implemented individually or in any suitable sub-combination in multiple examples.
[0101] Although the technical solution has been described using language specific to structural features and / or methodological logic, 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. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims. Regarding the aforementioned apparatus, the specific manner in which each module performs its operation has already been described in detail in the section concerning the method, and will not be elaborated upon here.
Claims
1. A table processing method for intelligent question answering, comprising: Obtain the first form, wherein the first form is obtained based on filling in the corresponding form template; According to the form template, the first form is identified to determine the feature representation of the first form, wherein the feature representation is used to characterize the features of each title in the form template and the actual content filled in the title in the first form, the title belongs to a first type or a second type, the position of the title of the first type is fixed in the form template, and the position of the title of the second type is variable in the form template; A machine learning model is constructed based on the feature representations of multiple first tables, wherein the machine learning model is used to identify second tables that belong to the same category as the first tables, and the tables of the same category are used to support intelligent question counting.
2. The method according to claim 1, wherein the feature representation includes a first feature representation, and the step of identifying the first table according to the table template to determine the feature representation of the first table includes: For a title belonging to the first type in the table template, based on the position of the title in the table template and the position of the template content filled in the title in the table template, determine the first position in the first table where the title appears and the second position in the first table where the actual content filled in the title appears, so as to determine the first feature representation; The first feature indicates that the title appears in the first position and the actual content is filled in at the second position. The first position is the same as the position of the title in the form template, and the second position is the same as the position of the template content in the form template.
3. The method according to claim 2, wherein the feature representation includes a second feature representation, and the step of identifying the first table according to the table template to determine the feature representation of the first table further includes: Based on the position of the title in the table template and the position of the template content of the title in the table template, the third position of the title in the first table and the fourth position of the actual content of the title in the first table are determined to determine the second feature representation; Wherein, the second feature indicates that the title appears in the third position and the actual filled content appears in the fourth position, the third position and the first position satisfy a first relative positional relationship, the second relative positional relationship is the same as the third relative positional relationship, the second relative positional relationship is used to describe the relative positional relationship between the third position and the fourth position, the third relative positional relationship is used to describe the relative positional relationship between the fifth position and the sixth position, the fifth position is used to describe the position of the title in the table template, and the sixth position is used to describe the position of the template filled content of the title in the table template.
4. The method according to claim 2 or 3, wherein the feature representation includes a third feature representation, and the step of identifying the first table according to the table template to determine the feature representation of the first table further includes: Based on the position of the title in the table template, it is determined that the title does not appear in the first table, thereby determining the third feature representation, wherein the third feature representation is used to characterize that the title does not appear in the first table; or... Based on the position of the template content of the title in the form template, it is determined that the actual content of the title does not appear in the first form, thereby determining the third feature representation, wherein the third feature representation is used to characterize that the actual content of the title does not appear in the first form.
5. The method according to claim 1, wherein the feature representation includes a fourth feature representation, and the step of identifying the first table according to the table template to determine the feature representation of the first table includes: For the headings belonging to the second type in the table template, determine the position area of the headings in the table template, wherein the position area is used to characterize the range of changes of the headings in the table during the filling process; Based on the position area of the title in the table template, it is determined that the title appears in the position area, thereby determining a fifth feature representation, wherein the fifth feature representation is used to characterize that the title appears in the first table; The number of rows occupied by the actual content of the title in the first table is determined to determine the sixth feature representation, which is used to characterize the number of rows occupied by the actual content of the title in the first table; Based on the fifth feature representation and the sixth feature representation, the fourth feature representation is determined, wherein the fourth feature representation is used to characterize the number of rows occupied by the title in the first table and the actual content of the title in the first table.
6. The method according to claim 1, further comprising: Obtain a second table, which is a table of the same type as the first table, determined by the machine learning model; By using a large language model to understand the content of the entries for each title in the second table, the filling patterns for the entries for each title in the second table are obtained. Based on the filling pattern of each of the stated contents, the knowledge in the second form is determined and the knowledge is stored.
7. The method according to claim 1, wherein obtaining the first table comprises: Obtain a set of tables, wherein the set of tables includes multiple third tables, which are obtained by filling in the corresponding table templates; Each of the third forms is subjected to a conformity test to obtain the test results of each of the third forms; Based on the detection results of each of the third tables, a first table is obtained from the set of tables, wherein the first table is used to characterize qualified third tables.
8. A table processing device for intelligent question answering, comprising: The module is used to obtain a first table, wherein the first table is obtained by filling in the corresponding table template; The identification module is used to identify the first table according to the table template to determine the feature representation of the first table, wherein the feature representation is used to characterize the features of each title in the table template and the actual content filled in the title in the first table, the title belongs to a first type or a second type, the position of the title of the first type is fixed in the table template, and the position of the title of the second type is variable in the table template; A construction module is used to construct a machine learning model based on the feature representations of multiple first tables, wherein the machine learning model is used to identify second tables that belong to the same category as the first tables, and the tables of the same category are used to support intelligent question counting.
9. A computer-readable medium having a computer program stored thereon, wherein, When executed by a processing device, the computer program causes the processing device to perform the steps of the method according to any one of claims 1-7.
10. An electronic device, comprising: A storage device on which computer programs are stored; A processing device for executing the computer program in the storage device to implement the steps of the method according to any one of claims 1-7.