Method and device for processing multi-version spreadsheet import

Through the internal and external data structure and weighting algorithm method, conflicts and data continuity problems during the import of multi-version Excel spreadsheets are solved, automatic parameter correspondence and data continuity are achieved, and system ease of use and user stickiness are improved.

CN120235128AInactive Publication Date: 2025-07-01INSPUR GENERSOFT CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510702888.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-29
Publication Date
2025-07-01
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

When handling the import of multi-version Excel spreadsheets, the existing technology is difficult to effectively resolve conflicts and data continuity problems between each version, resulting in increased difficulty in manual adjustment and data not being continued.

Method used

The two-layer data structures of the inside and outside are adopted to convert table sample information into structured data, and filter through weighting algorithms and semantic information to achieve accurate matching and automatic correspondence of multi-version parameters.

Benefits of technology

The data continuity between multi-version spreadsheet parameters is realized, reducing the workload of users' manual identification and conflict resolution, and improving the ease of use and user stickiness of the reporting system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120235128A_ABST
    Figure CN120235128A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of information big data, in particular to a method and device for processing multi-version spreadsheet import. The method for processing multi-version spreadsheet import comprises the steps that a sheet sample of a to-be-processed spreadsheet is analyzed into a report outer layer data structure and a report inner layer data structure so as to correspond to network version report parameters; based on the report outer layer data structure of the to-be-processed spreadsheet, calculating a first similarity score between the report name of the to-be-processed spreadsheet and each network edition report name, and selecting all network edition reports corresponding to the first similarity scores greater than a first set threshold value; according to the report outer layer data structure, matching the to-be-processed spreadsheet with all the screened network edition reports, and selecting the successfully matched network edition reports as candidate matching tables; and performing report inner-layer data structure similarity matching to obtain a final corresponding table. The multi-period data continuity is ensured, and the manual intervention workload is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of information big data, and in particular, to a method and device for processing the import of multi-version spreadsheets. Background Art

[0002] The statements in this part only provide background technical information related to the present invention and do not necessarily constitute prior art.

[0003] Under the business intelligence module of the GS Cloud product, the migration, maintenance, etc. of report form sample parameter information are involved monthly or annually. Generally, when users maintain the form samples monthly or annually, they will export them into different versions of Excel spreadsheets, which contain various parameter information such as task information, the form samples of each table in the task, the association relationship between the task and the report, and report data items. The web version of the report needs to receive the parameter information of these spreadsheets monthly or annually and complete operations such as filling, submitting, and merging the report data on this basis. In this process, due to business changes, the content of each version of Excel may change, specifically manifested as: 1. There are changes in the business meaning of the task: The task name (Excel file name) changes, several tables need to be added or deleted in the task (several sheet pages are added or deleted in Excel), etc.

[0004] 2. There are changes in the business meaning of each table: The report number and name (sheet page name in Excel) will be adjusted according to the business meaning, and the form samples and data items of each table will also be increased or deleted synchronously (a certain cell in a certain sheet page of Excel is added, deleted, or modified), etc.; This means that when receiving different versions of Excel spreadsheets monthly or annually, it may be inconsistent with the current web version of the report and there are conflicts. In the past, when receiving, only the corresponding relationship of multi-version tables was identified and matched according to the report number, which would cause the problem of table confusion. For example, the Z01 table in 2024 and the Z01 table in 2025 actually have different business meanings and are completely different two tables. If forced to receive according to the number, it will cause the problem of non-continuous data in multiple periods. Although it can be adjusted and modified in the web version system after receiving, as the business logic becomes more and more complex, the number of reports included in the task becomes more and more, the conflicts and inconsistencies in each version of Excel in each period become more and more, the situation of table confusion becomes more and more frequent, and the difficulty of manual adjustment also becomes greater and greater. Summary of the Invention

[0005] To solve the technical problems existing in the above background art, the present invention provides a method and device for processing the import of multi-version spreadsheets. The present invention designs a two-layer data structure, converts the form sample information into structured data in terms of business meaning, and smoothly imports the parameters of multi-version spreadsheets based on this data structure. First, based on the outer layer structure, similar candidate reports are roughly matched according to the report name, and then based on the inner layer structure, combined with form sample information such as data items, through a weighted algorithm for matching and semantic information filtering, similar reports are accurately matched to automatically and smoothly complete parameter correspondence and parameter information upgrade and conversion, ensuring data continuity between multi-version parameters, minimizing the workload of users' manual identification and conflict resolution to the greatest extent, improving the usability of the report system, and enhancing user stickiness.

[0006] To achieve the above object, the present invention adopts the following technical solutions: The first aspect of the present invention provides a method for processing the import of multi-version spreadsheets.

[0007] A method for processing the import of multi-version spreadsheets includes: Parsing the form sample of the spreadsheet to be processed into a report outer layer data structure and a report inner layer data structure to correspond to the parameters of the online version report; Based on the report outer layer data structure of the spreadsheet to be processed, calculating the first similarity score between the report name of the spreadsheet to be processed and each online version report name, and selecting all online version reports corresponding to the first similarity score greater than the first set threshold; according to the report outer layer data structure, matching the spreadsheet to be processed with all the selected online version reports, and selecting the successfully matched online version report as the candidate matching table; For each pair of data items of the spreadsheet to be processed and the candidate matching table, combining the report inner layer data structure, calculating the second similarity score of all data items, and constructing a similarity matrix; reducing the dimension of the similarity matrix to obtain a numerical score. If the numerical score is greater than the second set threshold, then the candidate matching table is the final corresponding table, and the spreadsheet to be processed is imported into the final corresponding table.

[0008] Further, the outer layer data structure includes: report number, report name, amount type, report period type, and data item attributes.

[0009] Further, the inner layer data structure includes: data item name, data item number, data item data type, data item data precision, and whether the data item changes.

[0010] Further, calculate the similarity between the report name of the spreadsheet to be processed and each online report name based on the outer-layer data structure of the report of the spreadsheet to be processed; the method includes: calculating the edit distance between the report name of the spreadsheet to be processed and each online report name, and converting the edit distance into a first similarity score through normalization processing; Among them, the edit distance is represented by the following formula:

[0011] In the formula, represents the edit distance function from string a to b, where i and j are the subscripts of strings a and b respectively, , , and a.length and b.length are the lengths of strings a and b. 、 、 respectively represent the operations of addition, deletion, and replacement. When any of the above operations needs to be performed when adjusting from a to b, the edit distance is incremented by 1. Specifically, when either i or j is 0, is . Finally, when , is the final edit distance between the two strings.

[0012] Further, match the spreadsheet to be processed with all the screened online reports according to the outer-layer data structure of the report; the method includes: matching the amount type, report period type, and data item attributes in the spreadsheet to be processed with the corresponding data in all online reports.

[0013] Further, for each pair of data items of the spreadsheet to be processed and the candidate matching table, calculate the second similarity score of all data items and construct a similarity matrix in combination with the inner-layer data structure of the report; the method includes: for each pair of data items of the spreadsheet to be processed and the candidate matching table, match the data item name, data item number, data item data type, data item data precision, and whether the data item has changed for each pair of data items. If the match is successful, calculate the similarity of the successfully matched data items to obtain the second similarity score.

[0014] The second aspect of the present invention provides a device for processing the import of multi-version spreadsheets.

[0015] A device for processing the import of multi-version spreadsheets includes: A parsing module, which is configured to: parse the format of the spreadsheet to be processed into an outer-layer data structure and an inner-layer data structure of the report to correspond to the online report parameters; An outer layer matching module, which is configured to: calculate a first similarity score between the report name of the spreadsheet to be processed and each web version report name based on the report outer layer data structure of the spreadsheet to be processed, and select all web version reports corresponding to the first similarity score greater than the first set threshold; according to the report outer layer data structure, match the spreadsheet to be processed with all the selected web version reports, and select the successfully matched web version reports as candidate matching tables; An inner layer matching module, which is configured to: for each pair of data items of the spreadsheet to be processed and the candidate matching tables, calculate a second similarity score for all data items in combination with the report inner layer data structure, and construct a similarity matrix; reduce the dimension of the similarity matrix to obtain a numerical score, and if the numerical score is greater than the second set threshold, then the candidate matching table is the final corresponding table, and the spreadsheet to be processed is imported into the final corresponding table.

[0016] The third aspect of the present invention provides a computer device, which includes: A processor, adapted to execute a computer program; A computer-readable storage medium, in which a computer program is stored. When the computer program is executed by the processor, the steps in the method for processing the import of multi-version spreadsheets described in the first aspect above are implemented.

[0017] The fourth aspect of the present invention provides a computer-readable storage medium, which stores a computer program, and the computer program is adapted to be loaded and executed by a processor to implement the steps in the method for processing the import of multi-version spreadsheets described in the first aspect above.

[0018] The fifth aspect of the present invention provides a computer program product or a computer program.

[0019] The present invention provides a computer program product or a computer program, which includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the steps in the method for processing the import of multi-version spreadsheets described in the first aspect above.

[0020] Compared with the prior art, the beneficial effects of the present invention are: The present invention provides a method and device for processing the import of multi-version spreadsheets, achieving seamless upgrade through a triple matching mechanism: First, a structured parameter database is established to convert Excel discrete data into computable objects; then, a hierarchical matching strategy is adopted, first performing a coarse-grained screening with report metadata, and then performing precise matching by fusing form sample features through a weighted algorithm; finally, semantic filtering is combined to ensure the consistency of business logic, realizing the complete data continuity between multi-version spreadsheet parameters. This technical system effectively solves the problem of cross-sheet caused by traditional number matching, ensures the data continuity of multiple periods, reduces the workload of manual intervention, and significantly enhances the system robustness and user stickiness.

[0021] From the perspective of users' seamless operation and one-key smooth processing of conflict imports, the present invention proposes an automatic receiving device for multi-version spreadsheet parameters based on text similarity, which smoothly processes various conflicts, automatically completes the upgrade and conversion of parameter information, ensures the data continuity of multiple periods, reduces the operation difficulty of users to the greatest extent, reduces the workload of manual adjustment, improves the usability of the report system, and enhances users' trust in the data migration of the report system. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The accompanying drawings forming a part of this specification are used to provide a further understanding of the present invention. The illustrative embodiments and descriptions thereof of the present invention are used to explain the present invention and do not constitute an improper limitation to the present invention.

[0023] Figure 1 is a flowchart of the method for processing the import of multi-version spreadsheets shown in an embodiment of the present invention; Figure 2 is a detailed flowchart of the method for processing the import of multi-version spreadsheets shown in an embodiment of the present invention; Figure 3 is a structural diagram of the device for processing the import of multi-version spreadsheets shown in an embodiment of the present invention; Figure 4 is a structural diagram of the computer device shown in an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0024] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0025] It should be noted that the following detailed descriptions are all illustrative and are intended to provide a further description of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which the present invention belongs.

[0026] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, they specify the presence of features, steps, operations, devices, components, and / or combinations thereof.

[0027] To facilitate the understanding of the technical solution of the present invention, some technical terms related to the present invention will be introduced below.

[0028] As introduced in the background art, the report module of the enterprise-level financial management system GS Cloud faces the technical challenge of migrating multi-version spreadsheet parameters. Currently, users perform periodic parameter maintenance by exporting multi-version Excel files (containing parameters such as task configurations, table sample structures, and data items). However, in actual business scenarios, there are two types of core change requirements: 1) task dimension changes (adjustment of task names / file naming rules, increase or decrease in the number of reports); 2) report level changes (iteration of number / naming rules, adjustment of data item structures). This results in multi-dimensional differences in parameter packages between multi-versions in each period. The existing system only relies on report numbers for version matching, which will cause serious data discontinuity problems. A typical case is that cross-year reports (such as the Z01 table in 2024 and 2025) have the same number but different business essences, and forced matching will destroy data continuity. As the business complexity grows exponentially, manual adjustment is difficult to cope with the version conflicts of a large number of reports.

[0029] Therefore, the present invention provides a method and device for processing the import of multi-version spreadsheets. The present invention will be described in detail below with reference to several embodiments in conjunction with the accompanying drawings: Figure 1 is a flowchart of the method for processing the import of multi-version spreadsheets shown in the embodiments of the present invention. Refer to Figure 1 , the method includes: Parse the table sample of the spreadsheet to be processed into an outer report data structure and an inner report data structure to correspond to the network version report parameters; Based on the outer report data structure of the spreadsheet to be processed, calculate the first similarity score between the report name of the spreadsheet to be processed and each network version report name, and select all network version reports corresponding to the first similarity score greater than the first set threshold; according to the outer report data structure, match the spreadsheet to be processed with all the selected network version reports, and select the successfully matched network version reports as candidate matching tables; For each pair of data items in the spreadsheet to be processed and the candidate matching table, in combination with the inner-layer data structure of the report, calculate the second similarity score of all data items, and construct a similarity matrix; reduce the dimension of the similarity matrix to obtain a numerical score. If the numerical score is greater than the second set threshold, then the candidate matching table is the final corresponding table, and import the spreadsheet to be processed into the final corresponding table.

[0030] Based on the basic information contained in the spreadsheet, the present invention designs a two-layer data structure, including the basic information of the outer-layer report and the information of the inner-layer report data items, and transforms the inconsistency of multi-version parameters into structured data; based on the data structure, a method for automatically corresponding multi-version parameters is designed. First, combine the text similarity algorithm to judge the consistency of the outer-layer data structure, automatically identify several groups of candidate similar reports, and then use the weighted algorithm and semantic information for screening and filtering to accurately match the candidate reports from the inner-layer data structure to complete the final corresponding of the parameters, so as to ensure the continuity of multi-version and multi-period data.

[0031] Figure 2 is the detailed flowchart of the method for processing the import of multi-version spreadsheets shown in the embodiments of the present invention; refer to Figure 2 , the method includes: Step (1): Parse the spreadsheet and construct a two-layer data structure Before importing the spreadsheet, it is first necessary to parse the spreadsheet sample exported by the user monthly or annually into report parameters to correspond to the report parameters of the online version. The spreadsheet sample is an excel file, as Figure 2 shown. The spreadsheet sample follows the following rules: (1) The file name is the corresponding task number_task name_annual period; (2) The file contains several sheet pages, and each sheet page represents a report included in the task. The sheet name is the report number_report name_annual period; (3) The content of each sheet page is the sample of the report and the attributes of each report. The sample and the attributes are separated by . Before is the sample, and each cell of each sheet page corresponds to the cell of the report. If the content in the cell is wrapped by English brackets, it is considered that this position is a data item, otherwise it is item information; (4) After , the sample of the report ends, and it is the attribute information of the report and each data item, including the report amount unit, whether it is variable, the cycle type, the data type of the data item, the data precision, whether it is variable, etc.

[0032] (5) The background color of the rows and columns in the sample is default white. If the background color of a certain row / column is yellow, then this row / column is considered a variable row / column; Parse the Excel file according to the above rules and convert it into a report parameter data structure recognizable by the online version. The structure is as follows: The outer data structure of the report is shown in Table 1, and the inner data structure of the report is shown in Table 2.

[0033] Table 1 Outer Data Structure of the Report

[0034] Table 2 Inner Data Structure of the Report

[0035] The outer data structure of the report ReportInfo includes the report number, report name, amount type (yuan, thousand yuan, ten thousand yuan, hundred million yuan), report period type (monthly report, quarterly report, annual report), whether it is variable, and the attributes of each data item. The inner data structure DaifInfo includes the data item name, data item number, data item data type, data item data precision, whether the data item is variable, etc.

[0036] For the report business, the names of the report and data items are strongly related to their business meanings. In different versions of the parameters, if the names of two tables are exactly the same or extremely similar, it means that the business meanings of these two tables in different versions of the parameters are the same, then it can be roughly considered that these two tables correspond to each other. However, due to the complexity of the report business, a table has several important attributes and several data items. Therefore, it is not accurate enough to judge whether they correspond only by the similarity of the report names. Important attributes such as whether the report is variable, the report amount unit, and the report period type need to be added. At the same time, each data item in the report also affects the business meaning of this table. Therefore, the attributes such as the name of the data item in the table, whether the data item is variable, the data type, and the data precision are also important indicators for judging whether the tables correspond. Based on this logic, the conflict problem is transformed into calculating the text similarity, and the corresponding relationship between different versions of the parameters is found through the similarity, so as to ensure that after the multi-version spreadsheet parameter upgrade and conversion, the business meanings of each table and the data items in the table are continuous, and smooth upgrade and conversion are realized.

[0037] An example of a spreadsheet form is shown in Table 3: Table 3 FYMXB_Expense Detail Table_202412

[0038] According to Table 3, the report number and name are FYMXB and Expense Details Table respectively. The first is before the sample part, and there are both fixed area (except the rest of the sixth row) and variable area (sixth row) in the table. There are several data items in the fixed area, such as [B01_Sales Expense Last Year], [C01_Sales Expense This Year Budget], etc. There are also several data items in the variable area, such as [A05_Other Expense Names], etc. After are the report and data item attributes. As can be seen from the table, this report is a monthly report, there is a variable area, and the amount unit is yuan. For data items, taking B01 and A05 as examples, data item B01 is of amount type, data precision, that is, the number of decimal places is 5, and the position is not a variable area, that is, a fixed area; data item A05 is of character type, with a maximum character length of 200, and the position is a variable area.

[0039] Step (2): Smoothly import multi-version parameters based on data structure In order to smoothly import multi-version parameters and ensure the continuity of multi-period and multi-version data, it is necessary to ensure that the business meaning of reports with the same number in different versions is the same. Generally, the name of a report is strongly related to its business, so the problem of multi-version parameter import can be transformed into a text similarity matching problem of the report name.

[0040] Since the data structure is divided into two layers, the matching problem is naturally transformed into two steps. First, the outer data structure is combined to calculate the similarity of the report names and the matching of the report attributes to complete the preliminary matching and obtain the candidate matching report. Then, the inner data structure is combined to calculate the weighted similarity of the names of each data item in the candidate matching report and the matching of the attributes of each data item to complete the precise matching and obtain the final corresponding report.

[0041] Step (2-1): Preliminary matching based on the outer data structure For a table A in the spreadsheet, the initial matching steps are as follows: Step (2-1-1): Calculate the name similarity score First, find the name of table A from the outer data structure ReportInfo Then traverse the report B under the corresponding task of the network version and obtain the name of table B , use the edit distance to calculate the text similarity of the two table names. The edit distance of the two names It is defined as the number of steps required to adjust from a to b. The adjustment methods include replacement, addition, and deletion. Its formula is shown in formula (1).

[0042] (1) in, Represents the edit distance function from string a to b, i and j are the subscripts of string a and b respectively. , , where a.length and b.length are the lengths of strings a and b respectively. 、 、 represent addition, deletion, and replacement operations respectively. When any of the above operations needs to be performed to adjust from a to b, the edit distance is incremented by 1. Specifically, when either i or j is 0, is . Finally, when , is the final edit distance between the two strings. Then, through normalization, the edit distance is converted into a similarity score between 0 and 1 to obtain the final similarity between the two strings . The normalization process is shown in formula (2). (2) Based on formulas (1) and (2), the name similarity between Table A and Table B is calculated. The pseudocode and specific operations for calculating the name similarity are shown in Table 4.

[0043] Table 4 Pseudocode for Specific Operations of Calculating Report Name Similarity

[0044] Step (2-1-2): Similarity Score and Attribute Verification If the name similarity score is relatively high, exceeding the preset threshold , it is considered that the names match, and the two tables are relatively close in business meaning. Generally, it is 0.85. The reason for not using 1.00 is that there may be minor adjustments in the table names of different versions, such as "Asset Statistics in 2024" and "Asset Statistics in 2025". Subsequently, it is determined whether the currency units and cycle types of the two tables A and B match. If both match, it is considered that there is a high possibility that Table A and Table B are the same table under different versions, and B is the candidate matching table for A.

[0045] The following is the pseudocode for preliminary matching, and the specific operations are shown in Table 5: Table 5 Pseudocode for Specific Operations

[0046] Step (2-2): Exact Corresponding Matching Based on Inner Data Structure Since there may be several reports with the same name in the spreadsheet, it is not accurate enough to match them only according to the report name and attributes. For example, in the spreadsheet, there are Z01_Balance Sheet 1 and Z02_Balance Sheet 2 with the same attributes, and only Z01_Balance Sheet exists in the web version report system. Obviously, if only based on the report name and attributes, the Z01 table in the web version report may be matched with the Z02 table in the spreadsheet, but it should actually be matched with the Z01 table, resulting in a matching error. At this time, it is necessary to combine the inner data structure , and perform a detailed match of the name and attributes of each data item in the report to obtain the final accurate report correspondence result.

[0047] The steps of the exact match are as follows: Step (2-2-1): Construct a data item similarity matrix First, for a pair of data items in Table A and the corresponding candidate matching Table B, obtain their inner data structure pairs ; With the help of formulas (1) and (2), calculate the similarity matching scores of the names of each pair of data items, and at the same time verify the attribute information such as the data type, data precision, and whether it is in the variable area of each pair of data items. If the attribute information is different, then this pair of data items must not be the same, so the similarity matching is set to 0; if the attribute information is the same, then the similarity score of this pair of data items is the name similarity score. Traverse all pairs of data items, calculate the similarity scores, and form a similarity matrix, as shown in formula (3).

[0048] (3) Among them, A and B are two reports, is the similarity matrix of Table A and B, which can be simplified as . n and m are the numbers of data items in Table A and Table B respectively, , . The value in the similarity matrix , as shown in formula (4): (4) Among them, as shown in formula (2), are the names of data items A1 and B1 respectively, is the edit distance between the two, as shown in formula (1). represents the matching comparison of the attribute information such as the data type and data precision of the data items. If the data types and precisions of data items A1 and B1 are the same, and they are both in the fixed area of the table or both in the variable area of the table, then it is considered that the attribute information of the two data items is consistent, is .

[0049] Step (2-2-2): Reducing the similarity matrix to the final score Similar to the standardization step of the preliminary matching, after obtaining the similarity matrix, it is necessary to reduce its dimension to a numerical score ranging from 0 to 1 , and the specific formula is shown in (5).

[0050] (5) Where m and n are the numbers of data items in Table A and Table B respectively, is the Frobenius norm, which is defined as the square root of the sum of the squares of the absolute values of the elements in the matrix. When the data items in Table A and Table B are closer, each row is closer to the unit vector, then is closer to , and thus is closer to 1.

[0051] Step (2-2-3): Verifying the final score If is relatively high and exceeds the preset threshold , it is considered that the data items of the two tables are matched, that is, Table A and Table B are corresponding. Generally, it is 0.85. The reason for not using 1.00 is that there may be fine-tuning in the data item names of different versions.

[0052] Finally, through the steps of spreadsheet parsing, preliminary matching, and exact matching, the corresponding relationship between each table in the spreadsheet sample and each table in the web version report is found to complete one-key smooth import, ensure data continuity, and reduce the workload of manual adjustment after user import.

[0053] Starting from the perspective of one-key smooth import for users, the present invention can automatically smooth out various conflicts existing between the parameter information of multi-version Excel spreadsheets and the web version environment, and complete the upgrade and conversion of parameter information.

[0054] The above has Figure 1 introduced in detail the method for processing the import of multi-version spreadsheets provided by the embodiments of the present invention. Next, the device for processing the import of multi-version spreadsheets provided by the embodiments of the present invention will be introduced in conjunction with the accompanying drawings.

[0055] Figure 3 is a schematic structural diagram of the device for processing the import of multi-version spreadsheets shown in the embodiments of the present invention. Referring to Figure 3 , the device of the present invention includes:[[]] A parsing module, which is configured to parse the sample of the spreadsheet to be processed into an outer-layer data structure and an inner-layer data structure of the report to correspond to the web version report parameters; An outer layer matching module, which is configured to: calculate a first similarity score between the report name of the spreadsheet to be processed and each web version report name based on the report outer layer data structure of the spreadsheet to be processed, and select all web version reports corresponding to the first similarity score greater than the first set threshold; according to the report outer layer data structure, match the spreadsheet to be processed with all the selected web version reports, and select the successfully matched web version reports as candidate matching tables; An inner layer matching module, which is configured to: for each pair of data items of the spreadsheet to be processed and the candidate matching table, calculate a second similarity score for all data items in combination with the report inner layer data structure, and construct a similarity matrix; perform dimensionality reduction on the similarity matrix to obtain a numerical score. If the numerical score is greater than the second set threshold, then the candidate matching table is the final corresponding table, and the spreadsheet to be processed is imported into the final corresponding table.

[0056] In some embodiments, the outer layer data structure includes: report number, report name, amount type, report period type, and data item attributes.

[0057] In some embodiments, the inner layer data structure includes: data item name, data item number, data item data type, data item data precision, and whether the data item changes.

[0058] In some embodiments, the outer layer matching module is specifically configured to: calculate the edit distance between the report name of the spreadsheet to be processed and each web version report name, and convert the edit distance into a first similarity score through normalization processing; Among them, the edit distance is represented by the following formula:

[0059] In the formula, represents the edit distance function from string a to b, where i and j are the subscripts of strings a and b respectively, , , a.length and b.length are the lengths of strings a and b. 、 、 respectively represent the operations of addition, deletion, and substitution. When any of the above operations needs to be performed to adjust from a to b, the edit distance is incremented by 1. Specifically, when one of i or j is 0, is . Finally, when , is the final edit distance between the two strings.

[0060] In some embodiments, the outer layer matching module is further specifically configured to: match the amount type, report period type, and data item attributes in the spreadsheet to be processed with the corresponding data in all online reports.

[0061] In some embodiments, the inner layer matching module is specifically configured to: for each pair of data items in the spreadsheet to be processed and the candidate matching table, match the data item name, data item number, data item data type, data item data precision, and whether the data item changes for each pair of data items. If the match is successful, calculate the similarity of the successfully matched data items to obtain a second similarity score.

[0062] The apparatus for processing the import of multi-version spreadsheets according to the embodiments of the present invention may correspond to executing the methods described in the embodiments of the present invention. The above and other operations and / or functions of each module of the apparatus for processing the import of multi-version spreadsheets are respectively for implementing Figure 1 the corresponding processes of the respective methods in, and for the sake of brevity, will not be described in detail here.

[0063] See Figure 4 the structural diagram of the computer device shown in. The computer device includes a processor, a communication interface, and a computer-readable storage medium. Among them, the processor, the communication interface, and the computer-readable storage medium can be connected through a bus or other means. Among them, the communication interface is used to receive and send data. The computer-readable storage medium can be stored in the memory of the computer device. The computer-readable storage medium is used to store a computer program, and the computer program includes program instructions. The processor is used to execute the program instructions stored in the computer-readable storage medium. The processor (or CPU (Central Processing Unit, central processing unit)) is the computing core and control core of the computer device, and is adapted to implement one or more instructions. Specifically, it is adapted to load and execute one or more instructions to implement the corresponding steps in the method embodiments for processing the import of multi-version spreadsheets.

[0064] This embodiment provides a computer-readable storage medium (Memory). The computer-readable storage medium is a memory device in the computer device and is used to store programs and data. It can be understood that the computer-readable storage medium here can include both the built-in storage medium in the computer device and, of course, the extended storage medium supported by the computer device. The computer-readable storage medium provides a storage space, and this storage space stores the processing system of the computer device. Also, one or more instructions suitable for being loaded and executed by a processor are stored in this storage space, and these instructions can be one or more computer programs (including program codes). It should be noted that the computer-readable storage medium here can be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory; optionally, it can also be at least one computer-readable storage medium located far from the aforementioned processor.

[0065] In one embodiment, one or more instructions are stored in the computer-readable storage medium; the one or more instructions stored in the computer-readable storage medium are loaded and executed by a processor to implement the corresponding steps in the method embodiment for processing the import of multi-version spreadsheets as described above.

[0066] This embodiment provides a computer program product or a computer program. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the corresponding steps in the method embodiment for processing the import of multi-version spreadsheets as described above.

[0067] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can be in the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can be in the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories and optical memories, etc.) containing computer-usable program codes.

[0068] The present invention is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram can be implemented by computer program instructions, and the combination of the processes and / or blocks in the flowchart and / or block diagram can also be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the specified functions in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.

[0069] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a particular manner, such that the instructions stored in the computer-readable memory produce a manufacture including an instruction device that implements the functions specified in one or more of the processes Figure 1 or boxes. Figure 1 The functions specified in one or more of the boxes.

[0070] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operational steps are performed on the computer or other programmable device to produce a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more of the processes Figure 1 or boxes. Figure 1 The functions specified in one or more of the boxes.

[0071] Those of ordinary skill in the art will appreciate that all or part of the processes of implementing the above-described example methods can be accomplished by instructing relevant hardware through a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above-described example methods. Among them, the storage medium can be a magnetic disk, an optical disc, a read-only memory (ROM), or a random access memory (RAM), etc.

[0072] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention can have various changes and modifications. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. A method for processing the import of multi-version spreadsheets, characterized in that, including: Parsing the form sample of the spreadsheet to be processed into an outer report data structure and an inner report data structure to correspond to the online report parameters; Based on the outer report data structure of the spreadsheet to be processed, calculating the first similarity score between the report name of the spreadsheet to be processed and each online report name, and selecting all online reports corresponding to the first similarity score greater than the first set threshold; According to the outer report data structure, matching the spreadsheet to be processed with all the selected online reports, and selecting the successfully matched online report as the candidate matching table; For each pair of data items of the spreadsheet to be processed and the candidate matching table, combining the inner report data structure, calculating the second similarity score of all data items, and constructing a similarity matrix; Reducing the dimension of the similarity matrix to obtain a numerical score. If the numerical score is greater than the second set threshold, then the candidate matching table is the final corresponding table, and the spreadsheet to be processed is imported into the final corresponding table.

2. The method for processing the import of multi-version spreadsheets according to claim 1, wherein The outer data structure includes: report number, report name, amount type, report period type, and data item attributes.

3. The method for processing the import of multi-version spreadsheets according to claim 1, wherein The inner data structure includes: data item name, data item number, data item data type, data item data precision, and whether the data item changes.

4. The method for processing the import of multi-version spreadsheets according to claim 1, wherein Calculating the similarity between the report name of the spreadsheet to be processed and each online report name based on the outer report data structure of the spreadsheet to be processed; The method includes: calculating the edit distance between the report name of the spreadsheet to be processed and each online report name, and converting the edit distance into a first similarity score through normalization processing; wherein, the edit distance is represented by the following formula: In the formula, represents the edit distance function from string a to b. i and j are the subscripts of strings a and b respectively. , , a.length and b.length are the lengths of strings a and b; 、 、 represent addition, deletion, and substitution operations respectively. When any of the above operations needs to be performed when adjusting from a to b, the edit distance is incremented by 1. When either i or j is 0, is ; finally, when , is the final edit distance between the two strings.

5. The method for processing the import of multi-version spreadsheets according to claim 1, characterized in that, Matching the spreadsheet to be processed with all the selected online reports according to the outer report data structure; The method includes: matching the amount type, report period type, and data item attributes in the spreadsheet to be processed with the corresponding data in all online reports.

6. The method for processing the import of multi-version spreadsheets according to claim 1, wherein For each pair of data items of the spreadsheet to be processed and the candidate matching table, combining the inner report data structure, calculating the second similarity score of all data items, and constructing a similarity matrix; The method includes: for each pair of data items of the spreadsheet to be processed and the candidate matching table, matching the data item name, data item number, data item data type, data item data precision, and whether the data item changes of each pair of data items. If the match is successful, then calculate the similarity of the successfully matched data items to obtain the second similarity score.

7. A device for processing the import of multi-version spreadsheets, characterized in that, including: A parsing module configured to: parse the form sample of the spreadsheet to be processed into an outer report data structure and an inner report data structure to correspond to the online report parameters; An outer matching module configured to: based on the outer report data structure of the spreadsheet to be processed, calculate the first similarity score between the report name of the spreadsheet to be processed and each online report name, and select all online reports corresponding to the first similarity score greater than the first set threshold; According to the outer report data structure, match the spreadsheet to be processed with all the selected online reports, and select the successfully matched online report as the candidate matching table; An inner matching module, which is configured to: for each pair of data items of the spreadsheet to be processed and the candidate matching table, calculate the second similarity score of all data items in combination with the inner data structure of the report form, and construct a similarity matrix; reduce the dimension of the similarity matrix to obtain a numerical score, and if the numerical score is greater than the second set threshold, then the candidate matching table is the final corresponding table, and import the spreadsheet to be processed into the final corresponding table.

8. A computer device, characterized in that a processor, adapted to execute a computer program; a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by the processor, the steps in the method for processing the import of multi-version spreadsheets as described in any one of claims 1-6 are implemented.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, and the computer program is adapted to be loaded and executed by the processor to perform the steps in the method for processing the import of multi-version spreadsheets as described in any one of claims 1-6.

10. A computer program product, characterized in that, The computer program product includes a computer program, and when the computer program is executed by the processor, the steps in the method for processing the import of multi-version spreadsheets as described in any one of claims 1-6 are implemented.

Citation Information

Patent Citations

  • Report data processing method and device, computer equipment and storage medium

    CN110377633A

  • Table data processing method and device, electronic equipment and storage medium

    CN113536751A

  • JqGrid table code generation method and device

    CN113641680A

  • Business data processing method and device, computer equipment and storage medium

    CN117852510A

  • Product name identification method and device, electronic equipment and medium

    CN118608295A