An Excel data autofill method
By constructing frequent field sets and recursive processing, the problems of low field matching efficiency and conflicts in Excel data filling from multiple data sources are solved, achieving efficient and accurate data filling.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-25
- Publication Date
- 2026-04-03
AI Technical Summary
Existing technologies suffer from low field matching efficiency, poor accuracy, and field conflicts when filling Excel data from multiple data sources, making them unsuitable for batch processing needs involving multiple data sources.
By extracting fields from the data stream, utilizing the field association type, time format, and source location, a frequent field set is constructed, and global mapping and recursive processing are performed to establish a field matching process graph and deduce the path to achieve data filling.
It improves the stability and efficiency of data processing across multiple data sources, avoids field conflicts and semantic mismatches of missing fields, and ensures accurate data filling in Excel spreadsheets.
Smart Images

Figure CN121413580B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, specifically a method for automatically filling Excel data. Background Technology
[0002] In the field of data processing, Excel, as a widely used spreadsheet tool, is experiencing a growing demand for data processing. Traditional processing methods mainly rely on programming to read and process Excel data. However, programming is limited to the customization of static pages. Once the design is completed, it is difficult to adjust and process data from multiple sources based on the currently entered data format, resulting in problems such as low efficiency, error-proneness, and complex configuration.
[0003] For example, Chinese Patent Publication No. CN116756125A discloses a method, apparatus, electronic device, and computer-readable medium for generating description information. One specific implementation of this method includes: determining a set of field association information for a target field; determining, based on the set of field association information, whether a set of candidate field description information exists; in response to the existence of a set of candidate field description information, performing information standardization processing on each candidate field description information in the candidate field description information set to generate standardized field description information, thus obtaining a set of standardized field description information; and generating field description information corresponding to the target field based on the target field, the set of field association information, the set of standardized field description information, and a pre-trained description information generation model.
[0004] For example, Chinese Patent Publication No. CN119621040A discloses a method and apparatus for configuring form pages based on workflow nodes. By creating a workflow database table corresponding to the current workflow, when a user opens the configuration page of any process node in the current workflow, a list of recommended forms corresponding to that process node is determined and displayed based on the business operation of that process node. Based on the recommended form selected by the user from the list, a form data table and a form attribute data table corresponding to the recommended form are constructed, a form ID for the recommended form is created, and the recommended form is displayed. The form attribute data table stores the field description information of the fields contained in the recommended form and the form ID of the recommended form. Based on the user's editing operations on the fields in the recommended form, the form attribute data table is updated, and the matching form ID corresponding to that process node in the workflow database table is updated based on the form ID of the recommended form.
[0005] Existing technologies determine field matching in forms and other formats by using synonymous descriptions of fields, and recommend appropriate processing for the current form list based on the field types at each process node under business operations. However, these processes neglect field matching issues when inputting from multiple data sources, as well as path conflicts under field matching, resulting in low efficiency and poor accuracy in batch processing for multi-source data. Summary of the Invention
[0006] To solve the above technical problems, the technical solution adopted by the present invention is: an Excel data autofill method, including: S1, data capture from the fill data stream, field segmentation based on the end identifier of each captured field for each fill command of the fill data stream, and detection of the fill association type corresponding to each field.
[0007] S2 uses the fill association type, time format and source location of each field to import the quantity threshold for each crawl. It combines the fields crawled each time into a description field according to the minimum matching rule, and sets the frequent field set corresponding to the current description field according to the co-occurrence frequency of the description field in historical data with the maximum coverage.
[0008] S3. Perform global mapping on each description field in the frequent field set in turn, and construct a candidate set based on the feature value of each description field belonging to the historical frequent field set.
[0009] S4 treats each field in the candidate set as an initial node and the dependencies between fields as relay nodes. Based on the relay nodes, each initial node is recursively processed, and multiple recursive nodes are divided. The initial nodes, relay nodes, and recursive nodes are used to construct a field matching process graph.
[0010] S5, perform path derivation on the field matching process graph, and determine the fill items to be output to the table template according to the connection relationship of each node path during derivation.
[0011] The beneficial effects of this invention are as follows: First, this invention identifies field types through table template headers, establishes a mapping relationship between fields and templates, and uses format matching and recursive concatenation to process format fields such as nested structures that cannot be directly converted, preventing field conflicts when inputting from multiple data sources and data compatibility issues for each input field under multiple sources; then, based on the filling association type, it counts the number of fields that are completely matched, partially matched, and not matched, and after reaching a threshold, it generates frequent field sets through similarity comparison and minimum support filtering, and completes the intersection update under multiple source locations; this solves the problems of redundancy and poor adaptability of frequent field sets, and improves the processing efficiency of field filling.
[0012] Second, this invention distinguishes between successful and unsuccessful matching fields by associating mapping history, infers and fills missing fields according to contextual dependencies and default values, processes each field as a candidate set, avoids mismatch between missing fields and current semantics, and provides a data foundation for subsequent selection of priority input items.
[0013] Third, this invention combines descriptive fields in the form of nodes, recursively expands them into relay nodes and recursive nodes, and displays the field input process in the form of path deduction, showing the field combination forms under the same initial node path and different initial node paths. According to the connection relationship between fields, the priority input fill items are adjusted to realize the data processing process under multiple data sources, thereby improving the stability and filling efficiency of data processing. Attached Figure Description
[0014] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0015] Figure 1 This is a flowchart illustrating an Excel data autofill method.
[0016] Figure 2 This is a flowchart illustrating step S1 of an Excel data autofill method.
[0017] Figure 3 This is a flowchart illustrating step S2 of an Excel data autofill method.
[0018] Figure 4 This is a flowchart illustrating step S3 of an Excel data autofill method.
[0019] Figure 5 This is a flowchart illustrating step S5 of an Excel data autofill method. Detailed Implementation
[0020] The embodiments of the present invention are described in detail below. The embodiments described below are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention. Where specific techniques or conditions are not specified in the embodiments, they shall be performed in accordance with the techniques or conditions described in the literature in the art or in accordance with the product manual.
[0021] See Figure 1 An Excel data autofill method includes: S1, fetching data from a fill data stream, dividing the fields according to the end identifier of each fetched field for each fill instruction of the fill data stream, and detecting the fill association type corresponding to each field.
[0022] S2 uses the fill association type, time format and source location of each field to import the quantity threshold for each crawl. It combines the fields crawled each time into a description field according to the minimum matching rule, and sets the frequent field set corresponding to the current description field according to the co-occurrence frequency of the description field in historical data with the maximum coverage.
[0023] S3. Perform global mapping on each description field in the frequent field set in turn, and construct a candidate set based on the feature value of each description field belonging to the historical frequent field set.
[0024] S4 treats each field in the candidate set as an initial node and the dependencies between fields as relay nodes. Based on the relay nodes, each initial node is recursively processed, and multiple recursive nodes are divided. The initial nodes, relay nodes, and recursive nodes are used to construct a field matching process graph.
[0025] S5, perform path derivation on the field matching process graph, and determine the fill items to be output to the table template according to the connection relationship of each node path during derivation.
[0026] The current data stream is populated from multiple sources, such as API responses, database query results, user input streams, or file reads. Each data stream consists of a series of population instructions, each corresponding to a data record or a set of fields.
[0027] Fill instructions typically include an end marker, such as a special character, sequence number, or specific keyword. This end marker generally indicates the completion of the fill instruction. Subsequent field segmentation is based on the relevant data under each fill instruction. Individual field identification can be achieved using regular expressions, identifying the corresponding table header based on explicit data types such as name, age, and address. Then, using delimiters like \t, $, \s*, and |, the fields under each fill data stream are extracted. Each field is parsed into key-value pairs or structured data, where the key is the table header (e.g., name, age) and the value is the field content.
[0028] The retrieved fields include multiple sets of tabular data such as text, integers, floating-point numbers, amounts, dates, drop-down options, cascading code tables, and images. Each field will also be labeled with style, sample values, field descriptions, source code tables, and parent fields, indicating the relationships between fields. This information is used to determine whether the currently entered data can be populated into the Excel spreadsheet.
[0029] The fill association type for each field indicates the position of the corresponding field in the current Excel data table that needs to be filled, as well as the relationship template that the filled field can be converted to, in order to determine the table that each field can be embedded in.
[0030] Fill association types primarily represent location information and dependencies. Location information points to the specific location of the mapped field; for example, the field "Name" maps to column A, row 2 and up in the template. Dependencies refer to the conditions that need to be met when filling text, including whether the text needs format conversion and whether the text depends on other text inputs. This information can be directly extracted from the text within the table template: for example, a cascading code table field needs to be filled with its parent field first, and a date field may need to be converted from a string to an Excel date sequence value. Fill association types emphasize the contextual relationships between multiple data points, associating fields with the table during filling, determining whether the captured fields can be filled into an Excel table, and how to fill them.
[0031] like Figure 2 As shown, the implementation of step S1 includes: S11, based on the table template corresponding to each fill instruction, the field type is identified according to the table template header, and the table template is matched with the captured fields to determine the mapping relationship between each field and the table template; when performing format matching, the current field is compared with the text in the table to determine which position of the column header row the data under the current field belongs to, for example, matching the required format of the month with the current field to determine the text information required in the table.
[0032] S12, based on the mapping relationship between each field and the table template, concatenate each field with the table template, and obtain the output fill association type according to the position information after concatenation and the dependency relationship between each field.
[0033] During the concatenation process, each field is filled into the template according to the mapping relationship. After confirming the compatibility of its format and structure with the table template, the process checks whether there are dependencies between the fields currently inserted into the table template, such as the hierarchical relationship between two fields in the table, and whether each field needs to be filled after other fields are filled. The conditions for filling the corresponding cells are found to prevent incorrect field filling. For example, other fields can only be filled when the order status is "shipped". If some amount fields require floating-point numbers, it is necessary to record whether the current input field is a floating-point number, so that these contents that require specific filling are regarded as the current output filling association type.
[0034] Specifically, the implementation method of step S12 for splicing also includes: extracting the additional information of each field, checking whether the current field and the table template are in the same format based on the dependency relationship between the additional information, and if it is a convertible format, then splicing the current field.
[0035] If the format is not convertible, determine if the current table template is a nested structure. If the table template is a nested structure, iterate through all its child positions. When a child position is convertible with the current field, recursively concatenate the current field and output the concatenated fields.
[0036] The additional information described above further describes the metadata of the field, such as the original data information such as data type, format, length, and constraints. Then, it checks whether the format of the current field is consistent with the format of the corresponding field in the table template. If the formats are consistent or can be converted to be consistent through type conversion, it means that the current field can be embedded in the table. If they are inconsistent, proceed to the next step of processing.
[0037] The process determines whether the current table template is a nested structure, i.e., a table containing sub-tables, repeating groups, or hierarchical fields. If it is a nested structure, it iterates through each sub-position in the nested structure, such as sub-fields or array elements. When a sub-position in the table template is convertible to the current field, it concatenates the current field until all currently fetched fields have been concatenated to obtain the data that can be filled into the table. This process is used to handle the insertion and filling of regular text fields. Afterwards, it is also necessary to determine the frequent itemsets in the fields and handle missing fields and field conflicts to prevent data conflicts after data is inserted from multiple data sources.
[0038] If there are still fields that cannot be matched with the data in the table template, such as if the table template is not a nested structure and the retrieved fields cannot be directly matched in the table template, the input data may be in the form of new text data, or parts of other input sources that are inconsistent with the format of the current table template. In this case, the candidate set under dynamic expansion will be processed centrally, and the corresponding text will be input into the subsequent processing steps as a non-matching field.
[0039] In one embodiment of the present invention, in step S2, the quantity threshold for each data capture is imported, and the captured fields are regarded as a description field by the minimum matching rule, and the label of the description field is regarded as a field group; the field list processed in step S1 is received, and these field lists are classified according to field name, data type, description of complete match under the fill association type, partial match after format conversion, and non-matching fields that cannot be matched to the table template. These fields are combined with the source location and time format of each field before it is entered into the current Excel as annotation information.
[0040] Then, each field is combined one by one, and the minimum support of the combination is checked to obtain the corresponding frequent field set. Support represents the ratio of the itemset after field combination to all data sets filled into Excel. Minimum support emphasizes the frequency of field combination in the global context. With minimum support, more low-frequency but potentially meaningful field combinations can be obtained as much as possible, which is more inclined to discover potential relationships between fields.
[0041] like Figure 3 As shown, the implementation of step S2 includes: S21, receiving multiple fields under the fill association type, obtaining the number of fields of each fill association type according to the fields described under the fill association type as complete match, partial match after format conversion, and non-match fields that cannot be matched to the table template, and using the number of fields of each fill association type at each crawl as the current crawl quantity threshold.
[0042] S22, using the quantity threshold as the data index, compare the fields under different quantity threshold indices, and use the combination of fields whose similarity between each field meets the similarity threshold as the description field.
[0043] S23, count the co-occurrence frequency of the descriptive field in historical data, filter the descriptive fields by minimum support, and output the multiple descriptive fields that meet the minimum support as a frequent field set.
[0044] When implementing the above steps, a partial matching field combination can be understood as the captured fields including "date" (format YYYY-MM-DD) and "time" (format HH:MM:SS), but the Excel template requires a field "order date and time" (format YYYY-MM-DD HH:MM:SS). This indicates that the current field group is a partial match with the corresponding required field and does not belong to the text type that can be directly filled in. It needs to be formatted and then entered.
[0045] A mismatched field can be considered as an Excel template not having a directly corresponding field. For example, in a regular product categorization table, some products are promotional products. These products will have a promotional code set for easy subsequent inventory processing. However, this field is generally not set in the product categorization summary table. In this case, the promotional code does not directly match the product summary table. The promotional code will be stored in the corresponding promotional product summary table instead of being directly filled into the currently matched table template.
[0046] It should be noted that when using minimum support to filter description fields, the average of the minimum support during three consecutive processing of the field is used. In this case, the combination of fields with support greater than the average value is selected as the description field set for the current processing, relative to the continuous data processing scenario.
[0047] The calculation content represented by co-occurrence frequency is consistent with that of support calculation. Minimum support is processed based on a portion of co-occurrence frequency. For example, based on the description field formed by combining multiple fields under the three currently captured fill association types, the support of the description field is calculated, and the description fields are sorted from largest to smallest support. The support at 75% of the sorted data is used as the minimum support to determine whether the current description field can include as much of the field data as possible. If the minimum support is still greater than the average support of all description fields, the average support is used as the minimum support; otherwise, the minimum support is used directly. At this point, the focus is on adjusting the support after averaging the overall field support to prevent insufficient combinations of fields when forming frequent itemsets, which would prevent a comprehensive view of the data content in the table template.
[0048] Regarding the aforementioned field combinations that meet the similarity threshold, this approach emphasizes partial matches and fields that cannot be directly matched. For these parts, strongly correlated data needs to be found to indicate the specific location of the fields in the Excel spreadsheet. In this case, a dynamic threshold is used, based on the current data's threshold. For example, an adjustment factor is set: 1.1 when the number of fields is less than or equal to 50, and 0.9 when the number of fields is greater than 50. This adjustment factor is then multiplied by the average similarity of the field combinations under historical data. Data exceeding this threshold is considered to meet the current similarity threshold, preventing the filtering out of a large number of valid combinations and addressing the current solution's poor adaptability to dynamic scenarios. Furthermore, based on the field matching selection under different fill association types, the system can adaptively learn new or rare fields.
[0049] Preferably, the implementation of the frequent field set in step S2 further includes: controlling the source position of the current fill data stream under the fill instruction, and updating the quantity threshold for multiple source positions.
[0050] When the quantity thresholds are the same across multiple source locations, reset the end flag for each crawl, and use the quantity thresholds of the crawled fields belonging to the fill association type to determine the intersection of the frequent field sets across multiple source locations for each crawl, and update the current frequent field sets with the intersection portion.
[0051] The quantity thresholds described here still represent the number of exact matches, partial matches, and non-matches under each fill association. Currently, if the corresponding quantity values from multiple sources are the same, the process ends with a reset. To ensure that all sources simultaneously input data into the current table with consistent quantities, data from multiple sources is received after verifying data consistency. The consistent portions from multiple data sources are used as the common frequent field set at this point. After the reset end marker, each source continues processing from the record fetching position to avoid duplication or omission.
[0052] It should be noted that when updating the frequent field set, if the currently received data only contains exactly matching fields, then the exactly matching fields can be entered directly. However, if there are partially matching and non-matching fields, then the current frequent field set needs to be updated to determine the amount of data to be filled into the Excel spreadsheet template from multiple data sources.
[0053] In one embodiment of the present invention, the processing in step S3 is biased towards the number of matching times between the current frequent field set and the historical frequent field set. The current description field is associated with isomorphic fields in the historical frequent field set and a global field mapping table is formed. Then, a feature value vector is constructed for each description field.
[0054] Features extracted from historical frequent field sets include the frequency of occurrence of description fields, successfully matched records, and failed matched records. The mapping position of the current description field under successful matching and the reason for failure under failed matching are comprehensively identified to determine the candidate set that needs to be used as the basis for filling.
[0055] like Figure 4 As shown, the implementation of step S3 includes: S31, associating and mapping the matching records of the current frequent field set with the historical frequent field set, and determining the matching success records and matching failure records of each description field after mapping.
[0056] S32, for the description field corresponding to the successfully matched record, enter the description field into the candidate set according to the mapping position under the successful match of the current description field. At this time, the data to be directly filled is determined by mapping the current field to the position of the template.
[0057] S33, for the description field corresponding to the failed matching record, update the data using the semantic identifier of the currently matched description field. When the semantic identifier belongs to the corresponding historical frequent field set, input the semantic identifier of the current description field into the candidate set.
[0058] When the semantic identifier does not belong to the corresponding historical frequent field set, it means that the current description text is not directly related to the corresponding historical frequent field set. For example, the historical frequent field set stores a table template about order information, which includes combinations of fields such as product ID, order number, order status, inbound time, and outbound time. In this case, the semantic identifier of the description field is a promotional code, which cannot be directly matched. However, the promotional code is a form of product ID. In this case, the semantic identifiers corresponding to the product ID and the promotional code will be updated to the candidate set. If the promotional code does not exist in any of the corresponding table templates, the promotional code will be updated as an additional data item in the corresponding Excel spreadsheet according to the template corresponding to the semantic identifier to assist in subsequent data management.
[0059] The implementation method in step S31 also includes: determining whether the current description field is missing information; if it is missing, determining the associated field of the current description field by mapping the header information and beginning and end information of the table template to the current description field; if the associated field has a contextual dependency with the current description field, then using the default value corresponding to the associated field as the data information of the current description field to perform associated mapping of the current description field.
[0060] If there is no contextual dependency between the associated field and the current description field, then the current description field is updated with the description field of the associated field in the scenario with the highest confidence.
[0061] This step determines the reason for the failure of the current description field in the matching process. It uses data inference to obtain the relevant text of the current data and maps the corresponding text to ensure the utilization rate of data from multiple data sources.
[0062] The header and start / end information described above are used to explain the information described in the first row of the table template. The start / end information describes the data described in the table at the beginning and end. Context dependency can query a predefined context dependency rule base. For example, if the field "city" depends on the field "province", and if a context dependency exists and the described field is text like "city" and is missing, the value will be taken from multiple values related to "city" found under the context dependency. If there is only one city, then that city is the default value; if there are multiple cities, then the city with the highest frequency will be selected as the default value.
[0063] In the case where there is no contextual dependency, the associated fields are searched and the dependency is determined, and the current description field is updated using the maximum confidence score.
[0064] For example, if the discount rate field is missing in the current record, and it is found that the customer level field in the same record is a related field to the discount rate field, and the customer level has specific values for the discount rate, and the customer level is divided into various level terms such as gold member, silver member, etc., then the discount rate has the highest confidence value when describing gold member. Therefore, the discount rate corresponding to gold member is used as the fill value of the current description field to complete the missing value, so as to facilitate the completeness of the corresponding data when filling in subsequent data.
[0065] The confidence level described above is the ratio of an itemset consisting of a field and other fields to all itemsets containing that field and other fields.
[0066] In one embodiment of the present invention, step S4 is implemented by: taking each description field in the candidate set as the initial node, and obtaining the relay node corresponding to the initial node according to the mapping relationship of each description field in the candidate set. The relay node represents a node that has a strong dependency relationship with the initial node.
[0067] Traverse all description fields in the candidate set, recursively expand the relay nodes according to the number of fields in the description fields, generate a recursive node each time the recursion is performed, and connect the initial node, relay node and recursive node in sequence to form a multi-level field matching process graph.
[0068] For example, there are multiple initial nodes under different description fields, such as an initial node containing order ID and order date, an initial node containing customer ID, customer name and customer address, and an initial node containing total price, discount amount and final amount. In this case, the node related to order information strongly depends on the initial node containing order ID and order date, the node related to customer information strongly depends on the initial node containing customer ID, customer name and customer address, and the node related to order amount strongly depends on the initial node containing total price, discount amount and final amount. Multiple relay nodes can be obtained in sequence here.
[0069] For example, if the relay node corresponding to the order ID and order date is the order quantity, then when recursively expanding to obtain recursive nodes, we find the description fields that at least contain the order ID, order date, and order quantity from the candidate set. These fields containing the description content of the current initial node and relay nodes are regarded as the recursive nodes of the current initial node. Then, we recursively expand and find the next recursive node that contains the order ID, order date, and order quantity. This process continues until all data sent by all data sources in the current candidate set has been connected.
[0070] In one embodiment of the present invention, such as Figure 5 As shown, the implementation of step S5 includes: S51, obtaining the node path under the same initial node and the node path under different initial nodes based on the connection relationship of each node in the field matching process diagram; at this time, the node path will form multiple node paths for the same initial node according to the number of relay nodes.
[0071] S52, if the final output fields of the node paths under the same initial node are the same, then the mode of all field values in the node paths under the same initial node is taken as the filler. Here, the mode of all field values is used as the filler to reduce the impact of random errors. After subsequent processing, the corresponding mode is gradually found to complete the data filling one by one. At this time, the filler of the input data represents the first part of the input data, to prevent data conflicts caused by data conflicts in multivariate data, and to avoid the abnormal situation of multiple values under a single timestamp when inputting data one by one; to avoid the delay of data update and processing when filling data with simple rules.
[0072] S53. If the final output fields of the node paths under the same initial node are different, they are sorted according to their confidence scores, and the node path with the highest confidence score is selected as the filler item. At this time, the confidence level of each node under the node path is described by statistically analyzing its confidence level. The path with the highest confidence score is selected first to ensure the accuracy of the data input.
[0073] S54 determines whether node paths under different initial nodes form a circular dependency. If a circular dependency is formed, the most recent valid value of the node path under different initial nodes is used as the filler value for output. This indicates that two node paths are mutually dependent, and the latest data is used for input to prevent infinite loops caused by circular dependency. Also, the valid value represents non-empty data, indicating valid data entered into the Excel spreadsheet template in the correct format.
[0074] S55. If no circular dependency is formed, the path of the node with the highest priority is used as the filler item and output according to the priority of each initial node.
[0075] Then, the above process is repeated until all data in the candidate set is entered into the Excel spreadsheet template to complete the analysis and filling of the Excel data.
[0076] It should be noted that the priority of each initial node is based on the priority of the content described by each initial node at the business level. For example, core business fields > auxiliary fields. These priority values can be extracted based on the priority preset for each field in the database.
[0077] The processing of relay nodes also includes: determining whether the current relay node belongs to either a horizontal relay node or a vertical relay node. Horizontal relay nodes recursively process data in the form of order ID, order date, and order quantity → order ID, order date, order quantity, and order batch. Vertical relay nodes update the input content in the form of different timestamps, such as order ID, order date, and order quantity → order ID, order date, and order quantity after n hours. At this time, the vertical relay node needs to determine the consistency of the input data across multiple time periods and the inconsistent update data, and update the data accordingly to complete the continuous recursion of the data.
[0078] When belonging to a horizontal relay node, the output filler items are processed according to the method of handling node paths under the same initial node and node paths under different initial nodes.
[0079] When assigning data to a vertical relay node, the update values of the initial node during recursion are compared between two consecutive inputs. The update values of the initial node during recursion are used as the output filler values to populate the Excel spreadsheet. After processing the filler values under normal circumstances, these update data from multiple time periods are prioritized as the input filler values to highlight the effectiveness of data usage.
[0080] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention, which are still covered within the protection scope of the present invention.
Claims
1. A method for automatically filling Excel data, characterized in that, include: S1, data is captured from the data stream. For each data stream, the field is split by the end identifier of each captured field, and the corresponding data stream is detected. S2, using the fill association type, time format and source location of each field, import the quantity threshold for each crawl, combine the fields crawled each time into a description field with the minimum matching rule, and set the frequent field set corresponding to the current description field with the maximum coverage based on the co-occurrence frequency of the description field in historical data; S3, perform global mapping on each description field in the frequent field set in turn, and construct a candidate set based on the feature value of each description field belonging to the historical frequent field set; S4. Treat each field in the candidate set as an initial node, the dependency relationship between fields as a relay node, recursively process each initial node according to the relay node, divide into multiple recursive nodes, and use the initial node, relay node and recursive node to construct the field matching process graph. S5, perform path deduction on the field matching process graph, and determine the fill items to be output to the table template according to the connection relationship of each node path during deduction; Step S5 can be implemented in the following ways: S51, based on the connection relationship of each node in the field matching process diagram, obtain the node path under the same initial node and the node path under different initial nodes; S52, if the final output fields of the node paths under the same initial node are the same, then take the mode of all field values in the node paths under the same initial node as the filler item. S53. If the final output fields of the node paths under the same initial node are different, sort them according to the confidence of the node paths under the same initial node, and select the node path with the highest confidence value as the fill item. S54, determine whether the node paths under different initial nodes form a circular dependency. If a circular dependency is formed, output the most recent valid value of the node paths under different initial nodes as the filler item. S55. If no circular dependency is formed, the path of the node with the highest priority is used as the filler item and output according to the priority of each initial node.
2. The method for automatically filling Excel data according to claim 1, characterized in that, The implementation methods for step S1 include: S11. Based on the table template corresponding to each fill instruction, identify the field type according to the table template header, match the format of the table template with the captured fields, and determine the mapping relationship between each field and the table template. S12, based on the mapping relationship between each field and the table template, concatenate each field with the table template, and obtain the output fill association type according to the position information after concatenation and the dependency relationship between each field.
3. The method for automatically filling Excel data according to claim 2, characterized in that, The implementation methods for step S12, which involves splicing, also include: Extract additional information from each field, and check whether the current field and the table template are in the same format based on the dependencies between the additional information. If they are convertible formats, then concatenate the current field. If the format is not convertible, determine if the current table template is a nested structure. If the table template is a nested structure, iterate through all its child positions. When a child position is convertible with the current field, recursively concatenate the current field and output the concatenated fields.
4. The method for automatically filling Excel data according to claim 1, characterized in that, Step S2 can be implemented in the following ways: S21, receive multiple fields under the fill association type, and obtain the number of fields for each fill association type according to the fields described under the fill association type as complete match, partial match after format conversion, and non-match fields that cannot be matched to the table template. Use the number of fields for each fill association type at each crawl as the current crawl quantity threshold. S22, using the quantity threshold as the data index, comparing fields under different quantity threshold indices, and using the combination of fields whose similarity between each field meets the similarity threshold as the description field; S23, count the co-occurrence frequency of the descriptive field in historical data, filter the descriptive fields by minimum support, and output the multiple descriptive fields that meet the minimum support as a frequent field set.
5. The method for automatically filling Excel data according to claim 1, characterized in that, The implementation methods for the frequent field set in step S2 also include: Control the source location of the current fill data stream under the fill command, and update the quantity threshold for multiple source locations; When the quantity thresholds are the same across multiple source locations, reset the end flag for each crawl, and use the quantity thresholds of the crawled fields belonging to the fill association type to determine the intersection of the frequent field sets across multiple source locations for each crawl, and update the current frequent field sets with the intersection portion.
6. The method for automatically filling Excel data according to claim 1, characterized in that, Step S3 can be implemented in the following ways: S31, associate and map the matching records of the current frequent field set with the historical frequent field set, and determine the matching success records and matching failure records of each description field after mapping; S32, for the description field corresponding to the successfully matched record, enter the description field into the candidate set according to the mapping position under the successful match of the current description field; S33, for the description field corresponding to the failed matching record, update the data using the semantic identifier of the currently matched description field. When the semantic identifier belongs to the corresponding historical frequent field set, input the semantic identifier of the current description field into the candidate set.
7. The method for automatically filling Excel data according to claim 6, characterized in that, The implementation methods in step S31 also include: Determine if the current description field is missing information. If it is missing, use the header and end information of the table template mapped to the current description field to determine the associated field of the current description field. If the associated field has a contextual dependency with the current description field, use the default value of the associated field as the data information of the current description field to perform the associated mapping. If there is no contextual dependency between the associated field and the current description field, then the current description field is updated with the description field of the associated field in the scenario with the highest confidence.
8. The method for automatically filling Excel data according to claim 1, characterized in that, Step S4 can be implemented in the following ways: Traverse all description fields in the candidate set, recursively expand the relay nodes according to the number of fields in the description fields, generate a recursive node each time the recursion is performed, and connect the initial node, relay node and recursive node in sequence to form a multi-level field matching process graph.
9. The method for automatically filling Excel data according to claim 1, characterized in that, The processing of relay nodes also includes: Determine whether the current relay node belongs to either a horizontal relay node or a vertical relay node; When belonging to a horizontal relay node, output filler items according to the processing method of node paths under the same initial node and node paths under different initial nodes; When assigning a node to a vertical relay node, compare the update value of the initial node during recursion for two consecutive inputs, and use the update value of the initial node during recursion as the filler value for the output.
Citation Information
Patent Citations
Description information generation method and device, electronic equipment and computer readable medium
CN116756125A
Form page configuration method and device based on workflow nodes
CN119621040A
Form filling system and method, electronic equipment and storage medium
CN117113947A
Automatic Excel template data backfilling method based on LLM semantic comprehension technology
CN119537411A