Web application automatic generation and data processing method based on spreadsheet mapping
By constructing a type fingerprint matrix and using topology decoupling technology, the problem of converting unstructured spreadsheets to structured Web object models was solved, achieving stability and accuracy in complex layout and multi-table mixed layout scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-27
- Publication Date
- 2026-03-27
AI Technical Summary
Existing technologies struggle to effectively convert unstructured spreadsheets into structured Web object models during heterogeneous system integration and legacy data migration. This is especially true when dealing with non-standard structures such as free layout, multi-table mixed layout, and nested headers. Reliance on predefined logic parsing mechanisms leads to parsing biases and unstable structural reconstruction.
By constructing a type fingerprint matrix, identifying logical boundaries using type purity indicators and topological relationships, and correcting boundaries by combining reference dependencies, a stable transformation from a two-dimensional mesh to an object model is achieved, including vertical topological decoupling and horizontal logical partitioning, ensuring the accuracy and stability of data processing.
It enables accurate reconstruction of tree-like hierarchical structures in free-format and unstructured data sources, eliminates semantic understanding dependencies, ensures the stability and accuracy of data processing, adapts to complex two-dimensional typesetting spaces, and maintains the integrity of data calculation logic.
Smart Images

Figure CN121579812B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to a Web application automatic generation and data processing method based on electronic table mapping, and belongs to the technical field of electric digital data processing. BACKGROUND
[0002] In the current integration of heterogeneous systems and migration of legacy data, converting unstructured electronic tables into structured Web object models is a core data processing task. Electronic tables are stored in a two-dimensional discrete grid based on row and column coordinates, and data correlation depends on visual layout with empty row separation, border surrounding, and implicit position adjacency relationship, lacking self-descriptive metadata. Web applications follow object attribute tree storage based on objects, and require data to have a strict parent-child nested structure and type definition.
[0003] To solve the mapping conflict of heterogeneous data storage structures, the existing technology mainly adopts preset coordinate template matching or natural language processing text semantic inference path. Template matching requires that the source data strictly adapt to the fixed row and column, which is difficult to adapt to free layout. Semantic inference parses cell text to guess field attributes. Although logical templates are introduced to alleviate the rigidity of coordinates, it is still difficult to rely on prior rules in the face of complex business data. For example, a report generation method disclosed in Chinese patent application No. CN115169308A imports an algorithm logic preset template into an electronic table software to indicate data processing. This method is essentially a static mapping based on rules, and the flexibility is limited to the coverage range of the template. The source data layout is fine-tuned or mixed with multiple tables, and the nested table header has a non-standard structure. The dependence on predefined logic analysis mechanism fails to adapt to the topology relationship due to the lack of self-adaptive sensing capability, and cannot accurately reconstruct the structure without manual reconfiguration.
[0004] Therefore, the technical problem to be solved by the present application is to eliminate the dependence on specific text semantic understanding and preset rigid templates, and to determine the boundaries of logical entities and reconstruct the tree hierarchy structure according to the statistical characteristics and topological relationship of data meta types in two-dimensional discrete space, so as to realize stable automatic conversion from two-dimensional grid to object model. SUMMARY
[0005] To solve the problems in the background art, the technical solution of the present application is as follows: a Web application automatic generation and data processing method based on electronic table mapping, comprising the following steps:
[0006] Traverse the cell array of the target electronic table, extract the data meta type of each cell, and map it to the corresponding preset enumeration value to construct a type fingerprint matrix consistent with the row and column dimensions of the original table. The data meta type at least includes numerical type, text type and null type;
[0007] perform vertical topology decoupling on the type fingerprint matrix, calculate a type purity index of each column vector in the type fingerprint matrix, the type purity index being a quantized value generated based on statistical distribution characteristics of non-empty data types within the column vector, and used to represent a type consistency degree of the column vector, in response to the type purity indexes of consecutive column vectors satisfying a preset isolation condition, define the consecutive column vectors as a vertical blocking band, and split the type fingerprint matrix in the vertical dimension into a plurality of mutually disconnected orthogonal sub-matrices with the vertical blocking band as a physical boundary;
[0008] independently perform row-wise feature scanning within a constraint range of each orthogonal sub-matrix, calculate a type distribution difference value between adjacent row vectors in the orthogonal sub-matrix row by row, in response to the type distribution difference value being greater than a preset logical breaking threshold, determine a horizontal logical division line in the orthogonal sub-matrix, and thereby define the orthogonal sub-matrix into a plurality of independent logical data blocks according to the horizontal logical division line;
[0009] based on a column data type arrangement pattern in each logical data block, instantiate a corresponding Web component configuration object, and assemble the Web component configuration object into a Web application object model according to the topology coordinates of the orthogonal sub-matrix and the logical data block in the original type fingerprint matrix.
[0010] Preferably, calculating the type purity index of each column vector in the type fingerprint matrix specifically includes: counting a number of unique data element types contained in a target column vector and a proportion of null cells; in response to the target column vector being all null or the target column vector containing only a single non-text type data, determining that the target column vector has a high type purity index; and identifying a continuous column vector set with a high type purity index satisfying a preset isolation condition.
[0011] Preferably, calculating the type distribution difference value between adjacent row vectors in the orthogonal sub-matrix specifically includes: calculating a type oscillation index of each column vector in the orthogonal sub-matrix, the type oscillation index being used to represent a frequency of type switching of the column data in the vertical direction; generating a column weight vector based on the type oscillation index, wherein the type oscillation index and a corresponding column weight value are in a negative correlation relationship; and performing weighted summation on element differences of the adjacent row vectors by using the column weight vector to obtain the type distribution difference value.
[0012] Preferably, after defining a plurality of independent logical data blocks, the method further comprises a structure homogeneity determination step of performing column-wise homogeneity analysis on each logical data block; in response to the existence of a continuous sequence of rows with consistent type fingerprints within the logical data block, determining that the logical data block is of a list type structure, and extracting the first row text of the logical data block as a field key name; in response to the presence of alternating text type columns and non-text type columns within the logical data block, determining that the logical data block is of a key-value pair type structure, and extracting the text column as a label and the adjacent non-text column as an input control.
[0013] Preferably, the method further comprises a logical boundary correction step based on reference flux, before determining the horizontal logical division line, parsing the coordinates of the target cell containing the operation formula and the referenced source cell in the target spreadsheet, and constructing a reference dependency vector set; calculating the reference flux density of the reference dependency vector passing through the proposed horizontal logical division line , the calculation formula of which is: , wherein, is the total number of reference dependency vectors passing through the horizontal logical division line, is the preset quantization intensity value of the th reference dependency vector, is the preset dependency weight coefficient, is the total number of column vectors contained in the orthogonal submatrix; in response to the reference flux density being higher than the preset aggregation intensity threshold, canceling the horizontal logical division line at the position, and marking the row vector where the target cell is located as an aggregation attribute row.
[0014] Preferably, in the model isomorphism generation step, it further comprises: in response to identifying the aggregation attribute row, parsing the source data area pointed to by the reference dependency vector corresponding to the aggregation attribute row; in the generated Web application object model, converting the aggregation attribute row into a dynamic calculation attribute node; configuring the dynamic calculation attribute node to perform real-time numerical value updating for data changes in the source data area.
[0015] Preferably, in the structure homogeneity determination step, it further comprises a table header texture contrast anchoring sub-step, for the logical data block determined to be of a list type structure, establishing a sliding window containing the first row and a subsequent preset number of rows; extracting a first statistical feature vector of the first row, and calculating an average statistical feature vector of the subsequent rows, the first statistical feature vector and the average statistical feature vector both including a character length mean value and a special symbol distribution frequency; calculating the Euclidean distance between the first statistical feature vector and the average statistical feature vector; in response to the Euclidean distance being greater than a preset anchoring threshold, determining the first row as a field definition row of the list type structure.
[0016] Preferably, the method further comprises a rule injection step based on the value range distribution, the numerical value range distribution and the character length distribution of each column of data in the statistical logic data block are counted, a numerical value range check rule is generated in response to the numerical values of a certain column of data being concentrated in a specific interval, a mandatory check rule is generated in response to the non-empty rate of a certain column of data being 100%, and the numerical value range check rule and the mandatory check rule are injected into the corresponding Web component configuration object.
[0017] Preferably, in the orthogonal topology decoupling step, the process of splitting the type fingerprint matrix in the vertical dimension further comprises: in response to the width of the identified vertical blocking band being greater than a preset threshold, marking the vertical blocking band itself as a layout separator component; in the model isomorphism generation step, based on the position of the layout separator component in the original type fingerprint matrix, a corresponding layout container or blank interval component is generated in the Web application object model.
[0018] Preferably, the method further comprises an incremental update adaptation step, in response to receiving update data for the target spreadsheet, a new local type fingerprint matrix is generated; only the changed orthogonal sub-matrix is executed to perform the restricted logic boundary scanning step, the corresponding local Web component configuration object is regenerated, and the local Web component configuration object is merged into the existing Web application object model.
[0019] Compared with the prior art, the application has the following beneficial effects:
[0020] 1. In the Web application automatic generation based on spreadsheet mapping, the semantic-independent structure reconstruction traverses the two-dimensional discrete grid data source based on the type fingerprint matrix, converts the original data unit containing ambiguous natural language into a single data type identifier, determines the logical boundary by using the edit distance or Hamming distance between row vectors, realizes the complete decoupling of the structure recognition process and the text semantic content through the original data dimension reduction mapping and vectorization processing, eliminates the analysis deviation caused by non-standard abbreviations, industry term ambiguity or recognition errors based on the data distribution statistical characteristics rather than semantic understanding, and only determines the logical entity boundary and level according to the data type in the two-dimensional space physical arrangement rule when processing the free layout or unstructured data source without explicit header, thereby guaranteeing the stability and accuracy of the conversion process of heterogeneous data to structured object model.
[0021] 2、Based on the column entropy valley detection of the orthogonal interference decoupling, the orthogonal pre-segmentation mechanism based on the column purity index is introduced, the vertical dimension topology analysis is made on the global matrix before the row logical segmentation, the vertical isolation band is located by identifying the column vector set with the type purity lower than the preset threshold, the global matrix is physically split into multiple independent subspace matrices, the data noise coupling between the horizontal independent logical entities is eliminated from the topological structure, the right data source row feature fluctuation is prevented from being superimposed as high frequency noise to the left row vector, through the vertical decoupling and horizontal segmentation time sequence control, the row difference calculation is limited within a single logical entity when processing the compact instrument panel or multi-table mixed layout, the full-dimensional adaptation and accurate analysis of the complex two-dimensional layout space are realized.
[0022] 3、Based on the reference topology flux of the logical boundary correction, the reference dependent vector set is constructed by using the implicit formula reference relationship of the electronic table, the dependent relationship is used as the logical connection tension superimposed to the space segmentation algorithm, the reference flux density passing through the tentative segmentation boundary is calculated, the aggregated attribute row with strong dependent relationship is identified by calculating the reference flux density passing through the tentative segmentation boundary, the data blood relationship analysis constraint mechanism is introduced, the implicit operation associated relationship is used to deny the false segmentation based on the explicit space distance, the summary row or the calculation row is reserved within the logical entity, the data calculation logic integrity in the generated object model is maintained, the logical parent-child relationship fragmentation caused by the format modification or the layout requirement is avoided, and the data processing result calculation traceability is ensured. BRIEF DESCRIPTION OF DRAWINGS
[0023] Fig. 1 The vertical topology decoupling and horizontal logical segmentation of the Web application generation schematic diagram are combined for the application.
[0024] Fig. 2 The row difference noise suppression effect comparison graph based on the column oscillation index weighting is combined for the application.
[0025] Fig. 3 The type fingerprint matrix construction time sequence graph based on the cell enumeration mapping is combined for the application. DETAILED DESCRIPTION
[0026] The specific embodiments and examples disclosed in the specification are only used to explain and illustrate the technical solutions of the application, and are not intended to limit the protection scope of the application, and any modifications, equivalent replacements and improvements made within the spirit and principles of the application should be included in the protection scope of the application.
[0027] The embodiment of the application provides a kind of based on spreadsheet mapping Web application automatic generation and data processing method, including the type fingerprinting mapping of two-dimensional heterogeneous data source, vertical topology decoupling based on column entropy field, horizontal logical segmentation based on weighted edit distance, logical boundary correction based on reference flux and Web application object model isomorphic assembly;For spreadsheet data processing, processor executes type fingerprinting mapping, processor traverses the cell array of target spreadsheet , extracts the data format metadata of each cell, according to the preset enumeration mapping table, processor converts the original cell array into the type fingerprint matrix of the same dimension , enumeration mapping table sets the enumeration value corresponding to numerical data , the enumeration value corresponding to short text data , the enumeration value corresponding to date data , the enumeration value corresponding to null value , this step converts the semantic information of original data into digital type identification for subsequent calculation;For processing multi-table mixed arrangement scene, system performs vertical topology decoupling on type fingerprint matrix , processor scans the matrix column by column, calculates the type purity index of each column vector , the calculation process counts the number of unique data type values of non-null cells in column vector And the proportion of null cells , when Equal to And the unique type is non-text type or Greater than the preset blank threshold , determine that the column is high-purity separation column, and mark the corresponding type purity index As high value, wherein the blank threshold is set to , system identifies the continuous column vector set with high value type purity index , defines it as vertical blocking zone, and processor splits type fingerprint matrix Into a plurality of mutually disconnected orthogonal sub-matrices in the vertical dimension along the center line of vertical blocking zone .
[0028] Within the constraint range of each orthogonal sub-matrix , system performs row feature scanning to determine the horizontal boundary of logical data block, processor calculates the type shock index of each column vector in sub-matrix , and the calculation formula is: , wherein Is the number of rows, when Not equal to Function Take value , otherwise Based on this oscillation index, the processor generates a column weight vector. , of which Column weights and There is a negative correlation. The calculation follows the formula ,in, The processor uses column weight vectors to adjust the preset adjustment coefficients. Calculate adjacent row vectors row by row and Weighted type distribution difference values between ,when When the value exceeds the preset logic break threshold, the processor will... With Action A predetermined horizontal logical dividing line is marked between them; the system introduces a boundary correction mechanism based on reference flux to handle aggregated summary rows; the system parses the formula reference chain stored in the underlying XML data structure of the spreadsheet and constructs a set of reference dependency vectors. For each proposed horizontal logical partition line, the processor calculates the reference flux density of the reference dependency vectors that cross that partition line. The calculation is performed based on the following formula: ,in, The total number of reference dependency vectors that cross this dividing line. For the first The preset quantization intensity value of each vector. The preset dependency weight coefficients, The total number of columns in the submatrix, when calculated... When the aggregation intensity exceeds the preset threshold, the system removes the horizontal logical dividing line at that point and marks the involved row vector as an aggregation attribute row.
[0029] After determining the physical boundaries of the logical data blocks, the system performs structural homogeneity determination and header anchoring for each data block. For candidate list-type data blocks, the system establishes a header anchoring mechanism that includes the first row and subsequent rows. A sliding window with rows, where Given a preset positive integer, the processor extracts the first statistical feature vector from the first row. and the average statistical eigenvector of subsequent rows The feature vector contains the mean character length and the frequency distribution of special symbols, which the processor calculates. and Euclidean distance between ,like greater than the preset anchor threshold, the system establishes the first line as the field definition line, arranges the column data types in the data block according to the mode, instantiates the Web component configuration object, and converts the aggregation attribute line into a dynamic calculation attribute node, finally, the system assembles the Web component configuration object into a Web application object model according to the topological coordinates of each data block in the original type fingerprint matrix; in the reference flux density calculation, a preset quantization intensity value According to the reference topological type classification setting, the point-to-point direct reference in the same worksheet is set as the reference value 1.0, and the reference involving the area sum function or the complex reference across the worksheets is set as the enhanced weighting value 1.2 to 1.5; the dependence weight coefficient According to the inverse calibration of the average reference density of the target business domain historical data set, the working interval of 0.5 to 2.0 is selected, and when there are a large number of compact summary lines in the business scene, the high value of the interval is selected to enhance the logical aggregation sensitivity. When the operation logic depends on the strength more than the physical space barrier strength, the proposed horizontal logical segmentation line cancellation instruction is triggered; the logical breaking threshold and the vertical blocking band are calibrated, the gradient statistical analysis method is used to scan the training sample set, the difference value of the adjacent row vector type distribution is calculated, the difference value probability density distribution curve is generated, the first derivative of the curve is calculated as the zero extreme point, and the statistical trough point between the intra-class difference peak value and the inter-class difference peak value is selected as the reference logical breaking threshold; the vertical topological decoupling identifies the high air value rate column vector, and performs parallel identification based on the type fingerprint mutation. When the type fingerprint sequence of the two adjacent column vectors is detected to have a non-empty value type overall switching and the Hamming distance between the two columns exceeds the preset heterogeneous judgment threshold, even if there is no physical empty column between the two columns, the intersection is determined to be an implicit vertical blocking band according to the fingerprint overall mutation characteristics, and the physical splitting of the orthogonal sub-matrix is performed.
[0030] Embodiment 1: In the application scene of digital reconstruction of an enterprise legacy financial system, the technical scheme of the present application processes an asset and liability daily report table electronic form containing multi-region mixed data. The electronic form presents a typical horizontal parallel feature in layout, the left region is a current asset detail table, the right region is a current liability detail table, and the two tables are physically separated by a column with extremely narrow width. The left current asset detail table contains a note column for recording temporary notes, and there is an asset total line at the bottom of the table for summary calculation. When the system receives the electronic form file, the processor performs type fingerprint mapping, the processor maps the specific amount value in the cell to an enumeration value , the subject name is mapped to an enumeration value , and a type fingerprint matrix is constructed to strip the specific semantics ; the system performs vertical topological decoupling to solve the interference problem caused by horizontal parallel layout, the processor scans the matrix column vector, calculates the type purity index of each column , since the empty column separating the two tables is all empty in the vertical direction, The system identifies the vertical blocking band and generates a type fingerprint matrix The system splits the matrix into independent left-asset and right-liability orthogonal sub-matrices along the blocking band, which blocks the signal interference of the dynamic change of the number of rows of the right-liability table on the recognition of the row structure of the left-asset table. When performing row-wise feature scanning on the left-asset orthogonal sub-matrix, the data types in the comment column present a random alternation of text and null values. The processor calculates the type shock index of the column A high shock value is obtained, and a lower column weight is generated according to the negative correlation When calculating the difference value of adjacent row vectors The difference contribution of the comment column is suppressed, ensuring that consecutive rows with different comment contents but consistent core business data types are not misjudged as logical breaks.
[0031] For the bottom asset total row, the type distribution difference with the above detail rows in visual layout may cause a preliminary scanning to determine a horizontal logical division line. The system then starts the reference flux correction mechanism. The processor analyzes the summation formula in the cell of the row to construct a reference dependency vector set , and calculates the reference flux density across the proposed division line Since the asset total row has a high density of operation references to all the above detail rows, the calculated is higher than the preset aggregation strength threshold. The system cancels the horizontal logical division line and marks the row as an aggregation attribute row. Finally, the system generates a Web application object model containing two independent Web component configuration objects based on the above processing results. The left component contains the comment field but maintains the continuity of the row structure, and the bottom asset total is instantiated as a dynamic attribute node automatically calculated by the front end. The Web application object model accurately reproduces the business logic structure of the original report in the Web interface.
[0032] Example 2: To verify the engineering effectiveness and boundary stability of the Web application automatic generation and data processing method based on the spreadsheet mapping of the present application in processing high-noise, non-standardized industrial data sources, a controlled test is constructed. The test object used in the test is a simulated data set containing 5200 heterogeneous spreadsheets. The data set is reconstructed based on the publicly available EnronSpreadsheetCorpus corpus. The test simulates the multi-table mixed arrangement, unstructured comment column interference, and implicit aggregation row working conditions existing in the legacy systems of enterprises. The test is run on a computing workstation equipped with an Intel Xeon Platinum 8260 processor and 128 GB DDR4 memory. The operating system is CentOS 7.6, and the algorithm running environment is configured as Node.js 14.17.0. Before starting the formal test, the core parameter logical break threshold The parameter setting involves an engineering trade-off between over-segmentation and under-segmentation, setting too low will lead to logical entity fragmentation, setting too high will lead to different table error merging, the test adopts gradient-based statistical calibration method, selects 50 typical samples with artificial annotation true value, calculates the average type distribution difference value between adjacent rows and the average difference value at the logical boundary , the measurement data shows, distributed in to interval, distributed in to interval, according to the principle of maximum inter-class variance, set to , the value is located at the statistical trough of the distribution interval of the two, used to separate the logical connected domain and the logical broken domain; To verify the effectiveness of the column entropy stability weighted mechanism in suppressing high-frequency noise, the test design includes a control experiment of comparative sample group A and the sample group of the present application. Comparative sample group A uses equal weight edit distance algorithm, that is, it is assumed that all columns in the matrix contribute equally to the row features. The sample group of the present application activates the adaptive weighted logic based on type shock index , the test actively injects random noise of different intensities into specific comment columns and temporary record columns in the data set to simulate real working conditions. The noise source is set to randomly replace the cell content with a preset probability as a numerical value, short text or null value, artificially manufacturing unordered jumps of type fingerprints. Table 1 shows the intermediate calculation results of the same set of original input data containing high-frequency fluctuation comment columns under different noise injection intensities.
[0033] Table 1: Comparison of row difference calculation results under noise interference
[0034]
[0035] Data analysis shows that as the noise intensity increases, the row difference value calculated by comparative sample group A presents a linear growth trend, and in the high noise working condition, reaches , which exceeds the set logical broken threshold , causing the algorithm to cut off the continuous data rows that belong to the same table, resulting in over-segmentation error. The sample group of the present application monitors the vertical change frequency of the column vector and captures the shock index from to , the system degrades the weight coefficient of the column according to the negative correlation weight formula, so that the final calculated weighted difference value stabilizes at to Within the specified range, no layout splitting instruction was triggered. This result confirms that the column entropy stability weighting mechanism retains the core business column structure information while shielding high-frequency noise interference from auxiliary columns.
[0036] To verify the effectiveness and boundary conditions of the reference flux-based logical boundary correction mechanism in handling aggregate logic, a gradient test was constructed that included an out-of-range control group. In the test sample, the bottom summary row and the top detail row differed in data type arrangement. The experimental variable was the number of reference dependency vectors crossing the proposed dividing line, i.e., the reference flux. Data shows that when When no formula is referenced, the system performs physical partitioning, and the generated Web model treats it as an independent component. Increase to When the above is mentioned, flux density is used. It started to climb but did not reach the polymerization strength threshold, when Exceed That is, when the summary row depends on a large number of detail rows above it. Exceeding the threshold triggers a closure command, the physical dividing line is revoked, and the summary row is converted into a dynamically calculated attribute node. Experiments show a performance inflection point when the depth of a single-table reference chain exceeds 5 levels and the number of references reaches a certain level. At this point, the time cost of resolving reference dependency vectors increases exponentially, indicating that a graph-based pruning strategy is needed to maintain real-time performance at this extreme scale. Based on the experimental data, the hybrid segmentation strategy based on column entropy weighting and reference flux constraints adopted in this invention achieves good performance even at signal-to-noise ratios as low as [insert value here]. In a data environment, maintain The accuracy of logical structure restoration is determined by the operational dependencies between data. The experimental results confirm that the present invention solves the structural distortion problem caused by noise interference and implicit logic loss during the conversion of two-dimensional discrete grids to tree object models by introducing vertical topology decoupling and logical tension correction.
[0037] Example 3: This example combines Figs. 1 to 3 This section describes the automatic generation and data processing methods for web applications based on spreadsheet mapping, such as... Fig. 1As shown, the system receives a target spreadsheet as a two-dimensional discrete grid data source. Through a type fingerprinting mapping step, cells are mapped to enumerated values to construct a type fingerprint matrix. On one hand, vertical topological decoupling is performed to identify blocking bands based on column purity and split the matrix into orthogonal submatrices. On the other hand, an adaptive weighted metric based on column oscillation index is performed to generate column weight vectors, thereby suppressing high-entropy noise interference. The results of these two processes converge in a horizontal logical segmentation step. Using the provided column weight vectors, the weighted type distribution difference is calculated, and the proposed logical data block boundaries are determined. During this process, a logical boundary correction mechanism based on reference flux is combined. By calculating reference dependency density, erroneous segments are revoked, aggregated rows are marked, and the proposed segmentation line is verified. Finally, based on the established logical data block pattern, components are instantiated and a Web application object model is assembled, thereby outputting a structured Web application deliverable with hierarchical structure and type definitions.
[0038] like Fig. 2 As shown, the horizontal axis represents the interval between adjacent rows from row 1-2 to row 9-10, and the vertical axis represents the difference between rows. The graph contains three key curves or straight lines, with the dashed line representing the unweighted original difference value. This value peaks in the range of rows 5-6 and crosses the logical break threshold marked by the horizontal dashed line multiple times, while the solid line represents the weighted difference value after correction by the column oscillation index. This value remains stable throughout the entire range and is below the logic break threshold; for example... Fig. 3 As shown, the processor sends a request to the spreadsheet to load the file and obtain row and column dimension information. It then enters a loop to traverse each cell. After reading cell (i,j), the processor calls the cell parser to extract data format metadata. Based on the four different types of data identified—numerical data, short text data, date data, or null values—it sends a query request to the enumeration mapping table and returns the corresponding enumeration values N, T, D, or E. These enumeration values are then written to the matrix position (i,j). After all cells have been traversed, a complete type fingerprint matrix with dimensions consistent with the original table and semantic information converted into digital type identifiers is finally returned.
[0039] Example 4: In an application scenario of web-based reconstruction of a material master data management system for a large manufacturing enterprise, the technical solution of this invention is used to process an electronic spreadsheet containing tens of thousands of records of raw material inventory. This data source has typical characteristics of high value and high constraints, requiring the generated web application not only to display the data, but also to automatically implement strict data quality control on the front-end input interface. After completing type fingerprint mapping, orthogonal topology decoupling, and logical data block segmentation, the system initiates a reverse extraction program of constraint rules based on statistical distribution characteristics for the identified list-type logical data blocks. The processor performs a full statistical scan on each column vector in the data block and calculates the fill rate index. This metric is defined as the ratio of the number of non-empty cells to the total number of rows. For the material code column, even though there are a small number of empty values in the original data due to historical data entry errors, the system, based on its preset fault-tolerance decision logic, will detect empty values when they are found. If the value exceeds the set required confidence threshold, the column is determined to be a required field in the business logic. The system sets the `required` attribute of the corresponding field to `true` in the generated Web component configuration object. This setting automatically generates a red asterisk marker and blocks null value submission validation on the front end. The required confidence threshold is set to... .
[0040] For the key numerical column of safety stock, the system executes a value range boundary delimitation procedure based on the normal distribution assumption, and the processor calculates the arithmetic mean of the set of values in this column. and standard deviation To eliminate outlier interference caused by human input errors, the system uses... Statistical principles limit the effective numerical range to the lower limit is less than zero and the column physical attribute does not support negative values, the system automatically corrects the lower limit to zero, injects the corrected closed interval into the min and max attributes of the front-end digital input control, and configures corresponding out-of-limit alarm prompt information, which ensures that the newly entered data always conforms to the historical statistical law of the material; for batch tracking numbers and other text columns with specific coding rules, the system uses a character mask-based pattern recognition algorithm for regular constraint extraction. The processor performs bit-by-bit analysis on all non-empty texts in the column, identifies fixed and unchanging character substrings and fixed-length number placeholders, and the system calculates the character set distribution entropy of each character. For bits with zero entropy, it is determined as a constant constraint; for bits with non-zero entropy but single character type, it is determined as a type constraint, the system automatically synthesizes a regular expression describing the coding rule, and encapsulates the expression into the pattern verification attribute of the Web form component. For example, for the rule of prefix BATCH- followed by 6-digit numbers, the system automatically synthesizes the verification rule logic as: using the fixed string BATCH- as the starting anchor, followed by a sequence of number characters with a length strictly limited to 6 bits, and using the number sequence as the end. Through the above deep analysis and mapping based on statistical characteristics, the present application completely inherits and solidifies the business logic constraints implied in the data distribution, and realizes the automatic evolution from unstructured data to intelligent Web applications with self-protection ability.
[0041] In the pre-deployment calibration scenario of a multinational group enterprise-level data integration project, the present application is deployed in an IT infrastructure environment with highly heterogeneous characteristics. The data sources of the environment cover thousands of financial statements uploaded by different regional branches. Although these statements comply with the unified accounting standards, there are differences in the underlying file formats and the arrangement order of non-core fields. To ensure that the system can adaptively process these differences after formal online, in the initialization stage, the system performs a set of standardized offline calibration and data filling procedures to build a dynamic reference knowledge base for supporting type mapping and boundary determination. The system extracts a representative sample set from the historical data warehouse through an automated script, which covers all known file format variants and layout modes. Then, the system performs full-scan on the sample set to extract the metadata features of each column, including data type distribution, null rate, and character length statistics, and parameterizes these features and stores them in the reference database. Based on these reference data, the system trains a lightweight classifier through a machine learning algorithm to determine the format type of the new input table in real time during runtime, and automatically adjusts the initial setting values of the logical break threshold and column weight coefficient accordingly.
[0042] When a system faces a new deployment environment or integrates with a new business department, executing the pre-deployment calibration procedure is a crucial step in ensuring system stability. This procedure requires technicians to perform stress tests and parameter fine-tuning on the system using a pre-set gold standard dataset before the system's initial startup. This dataset includes designed extreme cases, such as completely empty columns, extremely long text comments, and deeply nested merged cells. When processing these cases, the system automatically records the intermediate output results of each core algorithm module, such as the sparsity of the type fingerprint matrix, the generation position of logical dividing lines, and the calculated value of reference flux density. By comparing these actual outputs with the expected standard outputs, the system can automatically identify performance drift caused by environmental differences and prompt technicians to fine-tune relevant threshold parameters. For example, if the system is found to frequently over-segment when processing reports from a specific department, the procedure will guide technicians to smooth out the noise impact by adjusting the sensitivity coefficient of the oscillation index. This series of standardized calibration steps ensures that the system maintains a consistent high-precision parsing capability under different application scenarios.
[0043] Example 6: This example constructs a standardized logical break threshold calibration procedure for system deployment. It is applicable to the system initialization phase where heterogeneous spreadsheets need to be automatically parsed in different business scenarios. Technical personnel need to randomly select no less than 50 representative historical spreadsheet samples from the target business domain, manually annotate them, and establish the true logical relationship between each row. The system performs a full scan of the sample set and calculates the type distribution difference value between all adjacent row vectors in the sample. Based on the manual annotation results, the system divides these difference values into two sets: the first set is the logically connected set, which contains the difference values of all adjacent rows within the same logical block; the second set is the logical break set, which contains the difference values of all adjacent rows at the boundary of different logical blocks. The system calculates the probability density function of these two sets respectively and plots their distribution curves.
[0044] Based on this, the system executes a threshold optimization algorithm, which in... to Within the range, with Iterate through all possible candidate thresholds for the step size. For each candidate threshold The system calculates the probability that it misclassifies an element in a logically connected set as a broken element. And the probability of misclassifying elements in a logical break set as connected. The system defines the total misclassification cost function. ,in, and In this typical configuration, a weighting coefficient is set based on the business's tolerance for over-segmentation and under-segmentation. and All set to , the system selects the which reaches the minimum value as the optimal logical break threshold value under this business scenario Finally, the system writes the determined into the global configuration file of the system as the reference parameter in the subsequent online running.
[0045] It is apparent for those skilled in the art that the present application is not limited to the details of the above exemplary embodiments, and the present application can be implemented in other specific forms without departing from the spirit or essential characteristics of the present application.
[0046] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application and are not limiting. Although the present application has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that the technical solutions of the present application can be modified or replaced equivalently without departing from the spirit and scope of the technical solutions of the present application.
Claims
1. A method for automatically generating and processing data for web applications based on spreadsheet mapping, characterized in that, Includes the following steps: Traverse the cell array of the target spreadsheet, extract the data element type of each cell and map it to the corresponding preset enumeration value, and construct a type fingerprint matrix with the same row and column dimensions as the original spreadsheet. The data element types include at least numeric, text and null values. Vertical topological decoupling is performed on the type fingerprint matrix, and the type purity index of each column vector in the type fingerprint matrix is calculated. The type purity index is a quantitative value generated based on the statistical distribution characteristics of non-empty data types in the column vector, which is used to characterize the type consistency of the column vector. In response to the type purity index of continuous column vectors satisfying the preset isolation condition, the continuous column vectors are defined as vertical blocking bands. With the vertical blocking bands as the physical boundary, the type fingerprint matrix is split into multiple unconnected orthogonal submatrices in the vertical dimension. Within the constraints of each orthogonal submatrix, row-direction feature scanning is performed independently. The type distribution difference value between adjacent row vectors in the orthogonal submatrix is calculated row by row. In response to the type distribution difference value being greater than the preset logical break threshold, a horizontal logical dividing line is determined in the orthogonal submatrix. Thus, the orthogonal submatrix is defined into several independent logical data blocks based on the horizontal logical dividing line. Based on the column data type arrangement pattern within each logical data block, the corresponding Web component configuration object is instantiated, and the Web component configuration object is assembled into a Web application object model according to the orthogonal submatrix and the topological coordinates of the logical data block in the original type fingerprint matrix.
2. The method for automatic generation and data processing of web applications based on spreadsheet mapping according to claim 1, characterized in that, The calculation of the type purity index of each column vector in the type fingerprint matrix includes: counting the number of unique data element types contained in the target column vector and the proportion of empty cells; in response to the target column vector being all empty or containing only a single non-text type of data, determining that the target column vector has a high type purity index; identifying continuous type purity indices that meet preset isolation conditions, specifically identifying a continuous set of column vectors with high type purity indices.
3. The method for automatic generation and data processing of web applications based on spreadsheet mapping according to claim 1, characterized in that, The type distribution difference value between adjacent row vectors in the orthogonal submatrix is calculated row by row. Specifically, this includes: calculating the type oscillation index of each column vector in the orthogonal submatrix, which is used to characterize the frequency of type switching of the column vector data in the vertical direction; generating column weight vectors based on the type oscillation index, where the type oscillation index is negatively correlated with the corresponding column weight value; and using the column weight vector to perform a weighted summation of the differences between corresponding elements of adjacent row vectors to obtain the type distribution difference value.
4. The method for automatic generation and data processing of web applications based on spreadsheet mapping according to claim 1, characterized in that, After defining the data into several independent logical data blocks, the method further includes a structural homogeneity determination step, which performs column-oriented homogeneity analysis on each logical data block; in response to the existence of a continuous row sequence with consistent type fingerprints within the logical data block, the logical data block is determined to be a list structure, and the first row of text of the logical data block is extracted as the field key name. In response to the presentation of alternating text and non-text columns within the logical data block, the logical data block is determined to be a key-value pair structure, and the text columns are extracted as labels and the adjacent non-text columns are extracted as input controls.
5. The method for automatic generation and data processing of web applications based on spreadsheet mapping according to claim 1, characterized in that, The method also includes a logical boundary correction step based on reference flux. Before determining the horizontal logical dividing line, the coordinates of the target cells containing the calculation formulas and the source cells referenced in the target spreadsheet are parsed to construct a set of reference dependency vectors. The reference flux density of the reference dependency vectors crossing the proposed horizontal logical dividing line is calculated. The calculation formula is as follows: ,in, The total number of reference dependency vectors that cross this horizontal logical dividing line. For the first The preset quantization strength value of each reference dependency vector. The preset dependency weight coefficients, The total number of column vectors contained in the orthogonal submatrix; in response to the reference flux density. If the aggregation intensity exceeds the preset threshold, remove the horizontal logical dividing line at the location and mark the row vector containing the target cell as the aggregation attribute row.
6. The method for automatic generation and data processing of web applications based on spreadsheet mapping according to claim 5, characterized in that, The model isomorphic generation step also includes: in response to the identification of an aggregated attribute row, parsing the source data region pointed to by the reference dependency vector corresponding to the aggregated attribute row; in the generated Web application object model, converting the aggregated attribute row into a dynamically computed attribute node; configuring the dynamically computed attribute node to perform real-time numerical updates for changes in data within the source data region.
7. The method for automatic generation and data processing of web applications based on spreadsheet mapping according to claim 4, characterized in that, The structural homogeneity determination step also includes a header texture contrast anchoring sub-step. For logical data blocks determined to be of list structure, a sliding window containing the first row and a preset number of subsequent rows is established; the first statistical feature vector of the first row is extracted, and the average statistical feature vector of the subsequent rows is calculated. Both the first statistical feature vector and the average statistical feature vector include the average character length and the distribution frequency of special symbols; the Euclidean distance between the first statistical feature vector and the average statistical feature vector is calculated; in response to the Euclidean distance being greater than a preset anchoring threshold, the first row is established as the field definition row of the list structure.
8. The method for automatic generation and data processing of web applications based on spreadsheet mapping according to claim 1, characterized in that, The method also includes a rule injection step based on value range distribution, which involves statistically analyzing the numerical range distribution and character length distribution of each column of data in the logical data block; generating numerical range validation rules in response to the concentration of numerical values in a certain column of data within a specific range; generating mandatory field validation rules in response to the 100% non-empty rate of a certain column of data; and injecting the numerical range validation rules and mandatory field validation rules into the corresponding Web component configuration object.
9. The method for automatically generating and processing data of a web application based on spreadsheet mapping according to claim 1, characterized in that, In the orthogonal topology decoupling step, the process of splitting the type fingerprint matrix in the vertical dimension also includes: in response to the width of the identified vertical blocking band being greater than a preset threshold, marking the vertical blocking band itself as a layout separator component; in the model isomorphism generation step, based on the position of the layout separator component in the original type fingerprint matrix, generating the corresponding layout container or blanking interval component in the Web application object model.
10. The method for automatically generating and processing data of a web application based on spreadsheet mapping according to claim 1, characterized in that, The method also includes an incremental update adaptation step, which generates a new local type fingerprint matrix in response to receiving updated data for the target spreadsheet; performs a restricted logic boundary scan step only on the changed orthogonal submatrices, regenerates the corresponding local Web component configuration objects, and merges the local Web component configuration objects into the existing Web application object model.
Citation Information
Patent Citations
Report generation method, terminal and computer readable storage medium
CN115169308A
RAG-based table data processing method and system
CN120354833A
Automated document processing for detecting, extracting, and analyzing tables and tabular data
US20220318224A1