Spreadsheet-based multidimensional data management method and system
By employing a multi-dimensional data management method based on spreadsheets, and utilizing drag-and-drop, hidden filtering, and sorting commands, the problem of insufficient multi-dimensional modeling capabilities in spreadsheet tools is solved, thereby achieving refined inventory management and improved data security.
Patent Information
- Application Number
- CN202510762870.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-09
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2045-06-09
AI Technical Summary
Existing spreadsheet tools (such as Excel and WPS) are insufficient in multi-dimensional modeling capabilities, making it difficult to meet enterprises' needs for refined and personalized inventory management. Furthermore, they lack operational auditing and version traceability mechanisms, leading to potential data security and reliability risks.
This paper provides a multi-dimensional data management method based on spreadsheets. It allows users to quickly update the spreadsheet structure and data through drag-and-drop, hiding filters, and sorting operations, and capture operation timestamps to record historical modifications. It supports multi-dimensional operations and version tracking.
It enhances the flexibility and efficiency of data management, meets enterprises' needs for refined inventory management, and improves data security and reliability, enabling the tracking of operators and modification history.
Smart Images

Figure CN120278134B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a multi-dimensional data management method and system based on spreadsheets. Background Technology
[0002] In modern enterprise operations, inventory management is a key link in ensuring the smooth operation of production, sales, and the supply chain. Taking small and medium-sized discrete manufacturing enterprises as an example, these enterprises typically face the production needs of multiple varieties and small batches, requiring meticulous management of raw materials, semi-finished products, and finished products.
[0003] In related technologies, enterprises typically use spreadsheet tools (such as Excel and WPS) for data management. However, these spreadsheet tools lack the ability to perform multi-dimensional modeling, making it difficult to meet the enterprise's needs for refined and personalized inventory management. Furthermore, spreadsheet tools lack operation auditing and version tracking mechanisms. Once data is modified, it is difficult to trace the specific operator and modification history, posing a threat to data security and reliability. Summary of the Invention
[0004] This application provides a spreadsheet-based multi-dimensional data management method and system. To provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. This summary is not intended as a general commentary, nor is it intended to identify key / important components or describe the scope of protection of these embodiments. Its sole purpose is to present some concepts in a simple form as a prelude to the detailed description that follows.
[0005] In a first aspect, embodiments of this application provide a multi-dimensional data management method based on a spreadsheet, the method comprising:
[0006] In response to editing operation commands for a spreadsheet displayed on a client, update the spreadsheet's table structure and table data; the editing operation commands include at least one of the following: drag commands for freely combining rows and columns of the spreadsheet, hide filter commands for hiding filtered rows and columns, and sort commands for sorting the data in rows and columns;
[0007] Capture the timestamps corresponding to the editing operation instructions, use the timestamps as indexes, the updated table structure and table data as historical data modification records, and store the mapping relationship between the index and historical data modification records;
[0008] When a historical operation record query instruction is received from the client, multiple historical data modification records corresponding to the time range carried by the historical operation record query instruction are retrieved from the mapping relationship.
[0009] Multiple historical data modification records are displayed sequentially according to the timeline.
[0010] Optionally, the method further comprises:
[0011] receiving cell data input by the client;
[0012] in the case where the cell data does not affect other cell data, sending the cell data to a business database of a business system in real time through an API interface for saving; or
[0013] in the case where the cell data affects other cell data, calculating, according to the cell data, linkage data required by the affected cells; and sending the cell data and the linkage data required by the affected cells to the business database of the business system in real time through the API interface for saving.
[0014] Optionally, the electronic form is initialized based on a front-end framework comprising React components, Ant Design components and formily components, and the front-end framework comprises Tabs multi-tab and Transfer transfer box; the editing operation instruction carries a field identifier sequence for operating the electronic form and an action function for defining an operation type.
[0015] updating the table structure and the table data of the electronic form, comprising:
[0016] obtaining the state of the Tabs multi-tab and the Transfer transfer box;
[0017] updating the state of the Tabs multi-tab and the Transfer transfer box according to the field identifier sequence and the action function, so as to adjust the layout of the electronic form and obtain updated table structure;
[0018] obtaining, from a business database of a business system, field values corresponding to each table field in the updated table structure;
[0019] rendering the field values corresponding to each table field into the updated table structure to obtain updated table data.
[0020] Optionally, updating the state of the Tabs multi-tab and the Transfer transfer box according to the field identifier sequence and the action function comprises:
[0021] parsing the action function to obtain an action type and an operation target object identifier;
[0022] traversing tab nodes in a state tree of the Tabs multi-tab, and comparing the traversed tab nodes with the operation target object identifier to obtain a target tab node matched with the operation target object identifier;
[0023] According to the field identifier sequence and the action function, the history state of the target tab node is modified to update the state of the Tabs multi-tab.
[0024] The selected field list of the Transfer shuttle box is obtained.
[0025] The field identifier sequence and the selected fields in the selected field list are merged and filtered.
[0026] According to the filtered result, the state of the Transfer shuttle box is updated.
[0027] Optionally, according to the field identifier sequence and the action function, the history state of the target tab node is modified, including:
[0028] In the case that the action function indicates adding fields, it is determined whether each field identifier in the field identifier sequence exists in the current field list of the target tab node.
[0029] If not, each field identifier is added to the current field list of the target tab node to obtain a target field list; and the state of each target field in the target field list is set to enabled.
[0030] If yes, the state of each current field in the current field list is set to enabled.
[0031] Optionally, according to the field identifier sequence and the action function, the history state of the target tab node is modified, including:
[0032] In the case that the action function indicates deleting fields, it is determined whether each current field in the current field list of the target tab node exists in the field identifier sequence.
[0033] If yes, the current field in the current field list that exists in the field identifier sequence is deleted, and the state of the remaining current field is set to enabled.
[0034] If not, the state of each current field in the current field list is set to enabled.
[0035] Optionally, according to the field identifier sequence and the action function, the history state of the target tab node is modified, including:
[0036] In the case that the action function indicates adjusting the field order, it is determined whether the order of each current field in the current field list of the target tab node is consistent with the order of the field identifier in the field identifier sequence.
[0037] If yes, the state of each current field in the current field list is set to enabled.
[0038] If no, adjust the order of each current field in the current field list of the target tab node to the order of the field identifier in the field identifier sequence, and set the state of each current field in the current field list with the adjusted order to enabled.
[0039] Optionally, the state tree of the Tabs multi-tab is generated according to the following steps, including:
[0040] Obtain code file information of the Tabs multi-tab, and the code file information pre-defines a plurality of Tab labels and nested relationships thereof;
[0041] From the plurality of Tab labels and the nested relationships thereof, obtain the id and the list of child tabs of each tab;
[0042] Identify the hierarchical size and the association information between the id and the list of child tabs of each tab;
[0043] According to the hierarchical size, divide the root tab node and the child tab node from each tab;
[0044] According to the association information, determine the corresponding child tab node to be inserted on each root tab node to obtain the state tree of the Tabs multi-tab.
[0045] Optionally, the tab node traversed is compared with the operation target object identifier, including:
[0046] The tab node traversed is input into a preset tab feature encoder to output tab feature encoding;
[0047] The operation target object identifier is input into a preset identifier encoder to output identifier feature encoding;
[0048] The tab feature encoding and the identifier feature encoding are respectively subjected to nonlinear transformation to obtain a tab feature vector and an identifier feature vector;
[0049] The cosine similarity between the tab feature vector and the identifier feature vector is calculated;
[0050] Based on the cosine similarity, the target tab node matched with the operation target object identifier is determined.
[0051] In a second aspect, an embodiment of the present application provides a multi-dimensional data management system based on an electronic table, and the system comprises:
[0052] A response module is configured to update the table structure and the table data of the electronic table in response to an editing operation instruction for the electronic table displayed on the client, and the editing operation instruction at least includes one of a drag instruction for freely combining rows and columns of the electronic table, a hidden filtering instruction for hiding rows and columns for filtering, and a sorting instruction for sorting data of rows and columns.
[0053] an updating module configured to capture a timestamp corresponding to an editing operation instruction, to index historical data modification records of an updated table structure and table data, and to store a mapping relationship between the index and the historical data modification records;
[0054] a querying module configured to, when receiving a historical operation record query instruction input by a client, query, from the mapping relationship, a plurality of historical data modification records corresponding to a time range carried by the historical operation record query instruction;
[0055] a displaying module configured to sequentially display the plurality of historical data modification records in a time sequence.
[0056] The technical scheme provided by the embodiments of the present application can have the following beneficial effects:
[0057] In the embodiments of the present application, the multi-dimensional data management method based on an electronic table can enable a user to quickly update a table structure and data through simple drag-and-drop, hiding, filtering and sorting operation instructions, greatly improving the flexibility and efficiency of data management, and the multi-dimensional operation can meet the needs of enterprises for refined and personalized inventory management. Meanwhile, the system automatically captures the timestamp of an operation and stores each modification record as historical data, so that the historical operation can be queried and traced back at any time, the operator and the modification history can be tracked, and the security and reliability of data are improved.
[0058] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, and cannot limit the present application. BRIEF DESCRIPTION OF DRAWINGS
[0059] The accompanying drawings, which are incorporated into and form part of the specification, illustrate embodiments consistent with the present application and, together with the specification, serve to explain the principles of the present application.
[0060] Figure 1 is a method flow diagram of a multi-dimensional data management method based on an electronic table provided by the embodiments of the present application;
[0061] Figure 2 is an electronic table diagram provided by the embodiments of the present application;
[0062] Figure 3 is another electronic table diagram provided by the embodiments of the present application;
[0063] Figure 4 is a field filtering diagram provided by the embodiments of the present application;
[0064] Figure 5 is a structure diagram of a state tree provided by the embodiments of the present application;
[0065] Figure 6 is a structural schematic diagram of a multi-dimensional data management system based on a spreadsheet provided by an embodiment of the present application;
[0066] Figure 7 is a structural schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0067] The following description and drawings are illustrative of specific embodiments of the present application and are not intended to limit the scope of the present application.
[0068] It should be clear that the described embodiments are only some of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the scope of protection of the present application.
[0069] The following description refers to the accompanying drawings. Unless otherwise indicated, same numbers in different drawings indicate same or similar elements. The implementations described in the following example embodiments are not meant to represent all implementations consistent with the present application. Rather, they are merely examples of systems and methods consistent with some aspects of the present application as detailed in the appended claims.
[0070] In the description of the present application, it should be understood that the terms "first", "second", etc. are only for the purpose of description, and cannot be understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood in specific cases. In addition, in the description of the present application, unless otherwise specified, "multiple" means two or more. "And / or", which describes the relationship between the associated objects, means that there can be three relationships, for example, A and / or B can mean that A exists alone, A and B exist together, and B exists alone. The character " / " generally represents that the associated objects before and after are in an "or" relationship.
[0071] At present, enterprises usually use table tools (such as Excel, WPS) for data management.
[0072] The inventors realized that the table tool is insufficient in multi-dimensional modeling and is difficult to meet the needs of enterprises for inventory management refinement and individualization; in addition, the table tool does not have an operation audit and version trace mechanism, once the data is modified, it is difficult to track the specific operator and modification history, which brings hidden dangers to the safety and reliability of data.
[0073] To solve the above problems, the application provides a multi-dimensional data management method and system based on a spreadsheet to solve the problems existing in the above related technical problems. In the embodiment of the application, the multi-dimensional data management method based on a spreadsheet can quickly update the table structure and data through simple drag, hide filtering and sorting operation instructions, greatly improving the flexibility and efficiency of data management, and the multi-dimensional operation can meet the needs of enterprises for inventory management refinement and individualization. At the same time, the system automatically captures the time stamp of the operation and stores each modification record as historical data, which can be queried and traced back at any time, and the operation personnel and modification history can be tracked, improving the security and reliability of the data. The following will be described in detail with exemplary embodiments.
[0074] The following will be described in detail with exemplary embodiments. Figure 1 -Appendix Figure 5 The multi-dimensional data management method based on a spreadsheet provided in the embodiment of the application will be described in detail. The method can be realized by relying on a computer program and can run on a multi-dimensional data management system based on a spreadsheet based on the von Neumann system. The computer program can be integrated in an application or run as an independent tool application.
[0075] Please refer to Figure 1 A flowchart of a multi-dimensional data management method based on a spreadsheet is provided in the embodiment of the application. As shown in Figure 1 The method of the embodiment of the application can include the following steps:
[0076] S101, in response to an editing operation instruction for a client displayed spreadsheet, updating the table structure and table data of the spreadsheet; the editing operation instruction at least includes one of a drag instruction for dragging rows and columns of the spreadsheet for free combination, a hide filtering instruction for hiding rows and columns, and a sorting instruction for sorting data of rows and columns;
[0077] The client displayed spreadsheet refers to the spreadsheet interface displayed on the device used by the user, which is one component in the Web browser or desktop application, used to display and operate data. For example Figure 2The editing operation instruction refers to the operation command initiated by the user through the client interface to modify or adjust the electronic table. The table structure refers to the layout and organization of the electronic table, including the arrangement of rows, columns, cells, and their relationships. The table data refers to the specific information stored in the electronic table. The drag instruction refers to the operation instruction of adjusting the position of rows, columns, or cells of the table through drag operation by the user through the mouse or other input devices. The drag instruction is used to change the structure of the table, such as adjusting the order of columns or moving the position of rows. The hide filter instruction refers to the operation instruction of hiding rows or columns in the table that do not meet certain conditions through the filter function. The hide filter instruction is used to filter data according to the conditions set by the user, so that the table only displays the required part of the data. The sorting instruction refers to the operation instruction of sorting the row or column data in the table through the sorting function. The sorting instruction is used to rearrange the data in the table according to the sorting rules specified by the user (such as ascending or descending order).
[0078] For example Figure 3 As shown in the figure, the user can drag any row or column in the electronic table through the drag component in the red box in the electronic table.
[0079] For example Figure 4 As shown in the figure, the user can hide the filter row or column through the hide component.
[0080] In one possible implementation, on the electronic table interface displayed on the client, an event listener is set up to capture various editing operations of the user, including mouse drag, button click, input filter condition, etc. When the user initiates an operation, the system needs to identify the type of operation, such as one of drag operation, hide filter operation, or sorting operation. This can be achieved by listening to different event types, such as listening to the drag event to identify the drag operation, and listening to the click event to identify the button click operation. For each operation, the system needs to obtain the relevant parameters. For example, for the drag operation, the starting position and ending position of the drag need to be obtained; for the filter operation, the filter condition input by the user needs to be obtained.
[0081] For example, when the editing operation instruction indicates the operation of dragging a column, the system needs to update the order of the columns. For example, moving the 3rd column to the 1st position requires updating the column order array.
[0082] For example, when the editing operation instruction indicates the operation of dragging a row, the system needs to update the order of the rows.
[0083] For example, when the editing operation instruction indicates the operation of hiding the filter, the system needs to hide or display specific rows or columns according to the filter condition.
[0084] For example, if the operation editing operation instruction indicates sorting, the system needs to reorder the data in the table according to the sorting instruction.
[0085] For example, if the operation editing operation instruction indicates hiding the filter, the system needs to filter the data according to the filter condition.
[0086] For example, if the operation editing operation instruction indicates editing the cell content, the system needs to update the data of the corresponding cell.
[0087] The electronic table is initialized based on a front-end framework containing React components, Ant Design components, and formily components, and the front-end framework includes Tabs multi-tab and Transfer transfer box. The editing operation instruction carries a field identifier sequence for operating the electronic table and an action function for defining the operation type.
[0088] React is a JavaScript library for building user interfaces, and React components are the smallest reusable units in a React application, used to encapsulate and reuse UI logic. Ant Design is a UI design language and component library based on React. Formily is a React-based form solution. Tabs multi-tab is a UI component that allows users to view different content by switching between different tab pages on the same page. Transfer transfer box is a UI component that allows users to select items between two lists.
[0089] In some embodiments of the present application, the specific process of updating the table structure and table data of the electronic table includes: obtaining the state of the Tabs multi-tab and the Transfer transfer box; updating the state of the Tabs multi-tab and the Transfer transfer box according to the field identifier sequence and the action function to adjust the layout of the electronic table and obtain the updated table structure; obtaining the field values corresponding to each table field in the updated table structure from the business database of the business system; rendering the field values corresponding to each table field into the updated table structure to obtain the updated table data.
[0090] The business system refers to an information system used by an enterprise or organization to manage and process daily business processes. The business database is a database in the business system used to store and manage business data. Field values are the core content of electronic table data, and users manage these field values by operating the electronic table (such as sorting, filtering, editing, etc.).
[0091] For example, the user drags the "inventory quantity" column in front of the "product name" column. The system updates the column order of the table, generates a new table structure. The system re-renders the table, and the order of the columns becomes "inventory quantity", "product name".
[0092] In the embodiments of the present application, based on the multi-dimensional data management method of the electronic table, the user can quickly update the table structure and data through simple drag, hide, filter and sort operation instructions, greatly improving the flexibility and efficiency of data management, and the multi-dimensional operation can meet the needs of enterprises for inventory management refinement and individualization.
[0093] In some embodiments of the present application, the specific process of updating the state of Tabs multi-tab and Transfer shuttle box according to the field identifier sequence and the action function includes: parsing the action function to obtain the action type and the operation target object identifier; traversing the tab nodes in the state tree of the Tabs multi-tab, comparing the traversed tab nodes with the operation target object identifier to obtain the target tab node matched with the operation target object identifier; modifying the historical state of the target tab node according to the field identifier sequence and the action function to update the state of the Tabs multi-tab; obtaining the selected field list of the Transfer shuttle box; merging and filtering the field identifier sequence and the selected fields in the selected field list; and updating the state of the Transfer shuttle box according to the filtered result.
[0094] The action type refers to the specific operation type performed by the action function, such as sorting, filtering, dragging, etc. The operation target object identifier is an identifier for uniquely identifying the operation target object (such as a tab, a field, etc.). The tab node is a node in the state tree of the Tabs multi-tab, representing a specific tab. The selected field list is the field list selected by the user in the Transfer shuttle box. The state tree of the Tabs multi-tab is a hierarchical data structure for storing the state information of the Tabs multi-tab.
[0095] In a possible implementation, the specific process of modifying the historical state of the target tab node according to the field identifier sequence and the action function includes: in the case where the action function indicates adding fields, for each field identifier in the field identifier sequence, determining whether each field identifier exists in the current field list of the target tab node; if not, adding each field identifier to the current field list of the target tab node to obtain a target field list; setting the state of each target field in the target field list to enabled; and if yes, setting the state of each current field in the current field list to enabled.
[0096] For example, in the inventory management system, a user adds a new field in the "inventory management" tab, the initial field list of the target tab node is [product name, inventory quantity], the field identification sequence is [product name, unit price], and the "product name" field already exists in the field list of the target tab node, so it is skipped. The "unit price" field does not exist in the field list of the target tab node, so it is added to the field list. The updated field list is: [product name, inventory quantity, unit price], and the status of each field in the updated field list is set to enabled.
[0097] In another possible implementation, according to the field identification sequence and the action function, the specific process of modifying the historical state of the target tab node includes: in the case that the action function indicates deleting a field, determining whether each current field in the current field list of the target tab node exists in the field identification sequence; if yes, deleting the current field in the current field list that exists in the field identification sequence, and setting the status of the remaining current fields to enabled; if no, setting the status of each current field in the current field list to enabled.
[0098] For example, in the inventory management system, a user deletes a field in the "inventory management" tab, the initial field list of the target tab node is [product name, inventory quantity, unit price, supplier], the field identification sequence is [unit price, supplier], and the "unit price" field exists in the field list of the target tab node, so it is deleted. The "supplier" field also exists in the field list of the target tab node, so it is deleted. The status of the remaining fields is set to enabled.
[0099] In another possible implementation, according to the field identification sequence and the action function, the specific process of modifying the historical state of the target tab node includes: in the case that the action function indicates adjusting the order of the fields, determining whether the order of each current field in the current field list of the target tab node is consistent with the order of the field identifications in the field identification sequence; if yes, setting the status of each current field in the current field list to enabled; if no, adjusting the order of each current field in the current field list of the target tab node to the order of the field identifications in the field identification sequence, and setting the status of each current field in the adjusted current field list to enabled.
[0100] For example, in the inventory management system, a user adjusts the order of the fields in the "inventory management" tab, the initial field list of the target tab node is [product name, inventory quantity, unit price, supplier], the field identification sequence is [unit price, product name, inventory quantity, supplier], and the order is found to be inconsistent by comparing the field order. The order of the current field list is adjusted to the order of the field identification sequence, and the status of each field in the adjusted field list is set to enabled.
[0101] In some embodiments of the present application, the specific process of generating the state tree of the Tabs multi-tab includes: obtaining code file information of the Tabs multi-tab, the code file information pre-defines a plurality of Tab labels and their nesting relationship; from the plurality of Tab labels and their nesting relationship, obtaining the id and the list of child tabs of each tab; identifying the hierarchy size and the association information between the id and the list of child tabs of each tab; according to the hierarchy size, dividing the root tab node and the child tab node from each tab; according to the association information, determining the corresponding child tab node on each root tab node to be inserted to obtain the state tree of the Tabs multi-tab.
[0102] Wherein, the code file information of the Tabs multi-tab refers to the code file that defines the structure and behavior of the Tabs multi-tab. The nesting relationship is used to describe the hierarchical structure between tabs, which helps the system to understand and identify the root tab and the child tab. The hierarchy size refers to the hierarchical depth of the tab in the nested structure. The hierarchy of the root tab is 1, the hierarchy of its child tab is 2, and so on. The association information refers to the parent-child relationship between tabs. The root tab node refers to the tab node without a parent, which is the top-level tab of the Tabs component. The state tree of the Tabs multi-tab is a hierarchical data structure used to store the state information of the Tabs multi-tab.
[0103] In a possible implementation manner of the present application, the id, label and children information of each TabPane are extracted by a static code analysis tool. A mapping table map is created to quickly find each tab node. tabDefinitions are traversed, and the hierarchical relationship is constructed according to the children attribute. If a tab has no child node, it is directly added to the children of the root node. If a tab has child nodes, its parent node is found, and the child nodes are added to the children of the parent node. The constructed state tree can show the hierarchical structure of the tabs, including the root tab and the child tab. The state tree in some embodiments is shown in the following figure. Figure 5
[0104] In some embodiments of the present application, the specific process of comparing the traversed tab node with the operation target object identifier includes: inputting the traversed tab node into a preset tab feature encoder to output tab feature encoding; inputting the operation target object identifier into a preset identifier encoder to output identifier feature encoding; performing nonlinear transformation on the tab feature encoding and the identifier feature encoding respectively to obtain tab feature vectors and identifier feature vectors; calculating the cosine similarity between the tab feature vectors and the identifier feature vectors; determining the target tab node matched with the operation target object identifier based on the cosine similarity.
[0105] The tab feature encoder is a model or function that converts the features of a tab node (such as the id, label, children, etc. of the tab) into a feature encoding. The identifier encoder is a model or function that converts the identifier (such as the id) of the target object of the operation into a feature encoding. The cosine similarity is the cosine value of the angle between two vectors in a multi-dimensional space, used to measure the similarity between two vectors. The value range of the cosine similarity is [-1, 1], and the closer the value is to 1, the more similar the two vectors are. The cosine similarity is used to calculate the similarity between the tab feature vector and the identifier feature vector, so as to determine the most matching tab node.
[0106] S102, capture the timestamp corresponding to the editing operation instruction, use the timestamp as an index, update the table structure and table data as historical data modification records, and store the mapping relationship between the index and the historical data modification records;
[0107] The timestamp is used to record the specific time when the operation occurs. The mapping relationship refers to the correspondence between the timestamp and the historical data modification record. Through the mapping relationship, the modification record at a specific time point can be quickly queried.
[0108] In some embodiments of the present application, for example, a user performs an operation of adding a new field supplier, records the timestamp when the operation occurs, updates the table structure and data according to the operation instruction, and stores the timestamp, the updated table structure and data as historical data modification records, and stores the timestamp and the historical data modification records in a mapping table. The mapping table in some embodiments is shown in Table 1.
[0109] Table 1
[0110]
[0111] S103, when receiving a historical operation record query instruction input by the client, querying a plurality of historical data modification records corresponding to the time range carried by the historical operation record query instruction from the mapping relationship;
[0112] In some embodiments of the present application, for example, a user inputs a query instruction through a system interface, and specifies to query all historical operation records between time stamps 1633072800 and 1633072900. The system receives the query instruction input by the user, and extracts the query time range: from 1633072800 to 1633072900. The system checks the mapping relationship table storing the historical data modification records, and finds all records with timestamps within this range. The system checks the timestamp of each record one by one, and determines whether it is within the time range specified by the user. If the timestamp is within the range, the system adds the record to the result list.
[0113] S104, sequentially display the plurality of historical data modification records in the result list according to the chronological order.
[0114] In some embodiments of the present application, after obtaining the result list, the plurality of historical data modification records in the result list can be sequentially displayed according to the chronological order.
[0115] Further, after updating the table structure and the table data of the electronic form, the updated data needs to be synchronized to the business database of the business system, and the process includes: receiving the cell data input by the client; in the case that the cell data does not affect other cell data, sending the cell data to the business database of the business system through the API interface for saving in real time; or in the case that the cell data affects other cell data, calculating the required linkage data of the affected cells according to the cell data; sending the cell data and the required linkage data of the affected cells to the business database of the business system through the API interface for saving in real time.
[0116] In the embodiments of the present application, the electronic form tool has a real-time data synchronization function, and when multiple users operate the same inventory data on different terminals, data inconsistency does not occur, ensuring the unity and integrity of the data.
[0117] In the embodiments of the present application, based on the multi-dimensional data management method of the electronic form, the user can quickly update the table structure and data through simple drag-and-drop, hiding filtering and sorting operation instructions, greatly improving the flexibility and efficiency of data management. The multi-dimensional operation can meet the needs of enterprises for inventory management refinement and individualization. At the same time, the system automatically captures the time stamp of the operation and stores each modification record as historical data, which can query and trace back the historical operation at any time, track the operator and modification history, and improve the security and reliability of the data.
[0118] The following is an embodiment of the system of the present application, which can be used to execute the method embodiments of the present application. For details not disclosed in the system embodiments of the present application, please refer to the method embodiments of the present application.
[0119] Please refer to Figure 6 which shows a structure schematic diagram of a multi-dimensional data management system based on an electronic form provided by an exemplary embodiment of the present application. The multi-dimensional data management system based on the electronic form can be realized by software, hardware or a combination of both to become all or part of an electronic device. The system 1 includes a response module 10, an update module 20, a query module 30 and a display module 40.
[0120] The response module 10 is configured to update the table structure and the table data of the electronic form in response to an editing operation instruction for the displayed electronic form of the client, wherein the editing operation instruction comprises at least one of a drag instruction for dragging and combining rows and columns of the electronic form, a hide filter instruction for hiding filter rows and columns, and a sorting instruction for sorting data of rows and columns.
[0121] The updating module 20 is configured to capture a timestamp corresponding to the editing operation instruction, store the mapping relationship between the index and the historical data modification record of the updated table structure and table data.
[0122] The query module 30 is configured to query a plurality of historical data modification records corresponding to a time range carried by the historical operation record query instruction from the mapping relationship when receiving the historical operation record query instruction input by the client.
[0123] The display module 40 is configured to sequentially display the plurality of historical data modification records in chronological order.
[0124] It should be noted that the above embodiment provides a multi-dimensional data management system based on an electronic form, which is only used as an example to divide the above functions, and in actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the above described functions. In addition, the multi-dimensional data management system based on an electronic form and the multi-dimensional data management method based on an electronic form provided in the above embodiment belong to the same concept, and the implementation process is described in detail in the method embodiment, which will not be repeated here.
[0125] The serial number of the above embodiment of the present application is only for description, and does not represent the advantages and disadvantages of the embodiment.
[0126] In the embodiment of the present application, the multi-dimensional data management method based on an electronic form can quickly update the table structure and data by simple drag, hide filter and sorting operation instructions, greatly improving the flexibility and efficiency of data management, and the multi-dimensional operation can meet the needs of enterprises for inventory management refinement and individualization. At the same time, the system automatically captures the timestamp of the operation and stores each modification record as historical data, which can query and trace back the historical operation at any time, track the operator and modification history, and improve the security and reliability of the data.
[0127] The present application also provides a computer readable medium having program instructions stored thereon, wherein the program instructions are executed by a processor to implement the multi-dimensional data management method based on an electronic form provided by each of the above method embodiments.
[0128] The application further provides a computer program product comprising instructions which, when executed on a computer, cause the computer to perform the spreadsheet-based multi-dimensional data management method of each of the method embodiments.
[0129] Please refer to Figure 7 A structural schematic diagram of an electronic device is provided for the embodiments of the application. As shown in the figure, Figure 7 The electronic device 1000 can include at least one processor 1001, at least one network interface 1004, a user interface 1003, a memory 1005, and at least one communication bus 1002.
[0130] The communication bus 1002 is configured to realize the connection and communication between the components.
[0131] The user interface 1003 can include a display screen (Display) and a camera (Camera). Optionally, the user interface 1003 can further include a standard wired interface and a wireless interface.
[0132] The network interface 1004 can optionally include a standard wired interface and a wireless interface (such as a WI-FI interface).
[0133] The processor 1001 can include one or more processing cores. The processor 1001 connects various parts of the electronic device 1000 through various interfaces and lines, executes various functions of the electronic device 1000 and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 1005, and calling data stored in the memory 1005. Optionally, the processor 1001 can be implemented in at least one of the following hardware forms: digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 1001 can be integrated with a combination of one or more of the following: central processing unit (CPU), graphics processing unit (GPU), and modem. The CPU is mainly used to process operating systems, user interfaces, and application programs. The GPU is used to render and draw the content to be displayed on the display screen. The modem is used to process wireless communication. It can be understood that the above-mentioned modem can also not be integrated into the processor 1001, but can be realized by a separate chip.
[0134] The memory 1005 can include a random access memory (RAM) and can also include a read-only memory (ROM). Optionally, the memory 1005 includes a non-transitory computer-readable storage medium. The memory 1005 can be used to store instructions, programs, codes, code sets, or instruction sets. The memory 1005 can include a program storage area and a data storage area, where the program storage area can store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the various method embodiments described above, etc.; the data storage area can store data involved in the various method embodiments described above, etc. The memory 1005 can also be at least one storage system located away from the aforementioned processor 1001. As shown in Figure 7 The memory 1005 as a computer storage medium can include an operating system, a network communication module, a user interface module, and a spreadsheet-based multi-dimensional data management application.
[0135] In the electronic device 1000 shown in Figure 7 In the electronic device 1000 shown in, the user interface 1003 is mainly used to provide an interface for user input and obtain data input by the user; and the processor 1001 can be used to call the spreadsheet-based multi-dimensional data management application stored in the memory 1005 and specifically perform the following operations:
[0136] In response to an editing operation instruction for a spreadsheet displayed on the client, updating the table structure and the table data of the spreadsheet; the editing operation instruction at least includes one of a drag instruction for dragging rows and columns of the spreadsheet for free combination, a hidden filter instruction for hiding filter rows and columns, and a sorting instruction for sorting data of rows and columns;
[0137] Capturing a timestamp corresponding to the editing operation instruction, taking the timestamp as an index, and updating the table structure and the table data as a historical data modification record, storing a mapping relationship between the index and the historical data modification record;
[0138] When receiving a historical operation record query instruction input by the client, querying a plurality of historical data modification records corresponding to a time range carried by the historical operation record query instruction from the mapping relationship;
[0139] According to the chronological order, the plurality of historical data modification records are sequentially displayed.
[0140] In one embodiment, the processor 1001 further performs the following operations:
[0141] receiving cell data input by the client;
[0142] in the case where the cell data does not affect other cell data, sending the cell data to a business database of a business system in real time through an API interface for saving; or
[0143] in the case where the cell data affects other cell data, calculating linkage data required by the affected cells according to the cell data; and sending the cell data and the linkage data required by the affected cells to the business database of the business system in real time through the API interface for saving.
[0144] In one embodiment, the processor 1001, when performing updating of the table structure and the table data of the electronic table, specifically performs the following operations:
[0145] obtaining the state of Tabs multi-tabs and Transfer transfer boxes;
[0146] updating the state of Tabs multi-tabs and Transfer transfer boxes according to the field identification sequence and the action function, so as to adjust the layout of the electronic table and obtain updated table structure;
[0147] obtaining the field values corresponding to each table field in the updated table structure from the business database of the business system;
[0148] rendering the field values corresponding to each table field into the updated table structure to obtain updated table data.
[0149] In one embodiment, the processor 1001, when performing updating of the state of Tabs multi-tabs and Transfer transfer boxes according to the field identification sequence and the action function, specifically performs the following operations:
[0150] parsing the action function to obtain an action type and an operation target object identifier;
[0151] traversing tab nodes in a state tree of Tabs multi-tabs, and comparing the traversed tab nodes with the operation target object identifier to obtain a target tab node matched with the operation target object identifier;
[0152] modifying the historical state of the target tab node according to the field identification sequence and the action function, so as to update the state of Tabs multi-tabs;
[0153] obtaining a selected field list of Transfer transfer boxes;
[0154] merging and filtering the field identification sequence and the selected fields in the selected field list;
[0155] According to the filtered result, the state of the Transfer shuttle box is updated.
[0156] In one embodiment, the processor 1001, when performing the operation of modifying the history state of the target tab node according to the field identifier sequence and the action function, specifically performs the following operation:
[0157] In the case where the action function indicates adding fields, for each field identifier in the field identifier sequence, it is determined whether each field identifier exists in the current field list of the target tab node;
[0158] If not, each field identifier is added to the current field list of the target tab node to obtain a target field list, and the state of each target field in the target field list is set to enabled;
[0159] If yes, the state of each current field in the current field list is set to enabled.
[0160] In one embodiment, the processor 1001, when performing the operation of modifying the history state of the target tab node according to the field identifier sequence and the action function, specifically performs the following operation:
[0161] In the case where the action function indicates deleting fields, it is determined whether each current field in the current field list of the target tab node exists in the field identifier sequence;
[0162] If yes, the current field in the current field list that exists in the field identifier sequence is deleted, and the state of the remaining current field is set to enabled;
[0163] If not, the state of each current field in the current field list is set to enabled.
[0164] In one embodiment, the processor 1001, when performing the operation of modifying the history state of the target tab node according to the field identifier sequence and the action function, specifically performs the following operation:
[0165] In the case where the action function indicates adjusting the order of fields, it is determined whether the order of each current field in the current field list of the target tab node is consistent with the order of the field identifiers in the field identifier sequence;
[0166] If yes, the state of each current field in the current field list is set to enabled;
[0167] If not, the order of each current field in the current field list of the target tab node is adjusted to the order of the field identifiers in the field identifier sequence, and the state of each current field in the adjusted current field list is set to enabled.
[0168] In one embodiment, the processor 1001 further performs the following operation:
[0169] Obtain code file information of the Tabs multi-tab, and the code file information defines a plurality of Tab tags and their nested relationship in advance;
[0170] From the plurality of Tab tags and their nested relationship, obtain the id and the list of sub-tab of each tab;
[0171] Identify the hierarchical size and the association information between the id and the list of sub-tab of each tab;
[0172] According to the hierarchical size, divide the root tab node and the sub-tab node from each tab;
[0173] According to the association information, determine the corresponding sub-tab node on each root tab node for insertion, and obtain the state tree of the Tabs multi-tab.
[0174] In an embodiment, when the processor 1001 performs the comparison between the traversed tab node and the operation target object identifier, the following operations are specifically performed:
[0175] Input the traversed tab node into a preset tab feature encoder, and output a tab feature code;
[0176] Input the operation target object identifier into a preset identifier encoder, and output an identifier feature code;
[0177] Respectively perform nonlinear transformation on the tab feature code and the identifier feature code to obtain a tab feature vector and an identifier feature vector;
[0178] Calculate the cosine similarity between the tab feature vector and the identifier feature vector;
[0179] Based on the cosine similarity, determine the target tab node matched with the operation target object identifier.
[0180] In the embodiments of the present application, the multi-dimensional data management method based on the electronic table can quickly update the table structure and data through simple drag, hide filtering and sorting operation instructions, greatly improving the flexibility and efficiency of data management. The multi-dimensional operation can meet the needs of enterprises for inventory management refinement and individualization. At the same time, the system automatically captures the time stamp of the operation, and stores each modification record as historical data, which can be queried and traced back at any time. The operation personnel and modification history can be tracked, and the security and reliability of the data are improved.
[0181] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by a computer program instructing relevant hardware. The program for managing multi-dimensional data based on a spreadsheet can be stored in a computer readable storage medium. When the program is executed, the program can include the processes of the above-mentioned embodiment methods. The storage medium of the program for managing multi-dimensional data based on a spreadsheet can be a disk, an optical disk, a read-only memory, a random access memory, or the like.
[0182] The above disclosure is merely preferred embodiments of the present application and cannot limit the scope of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope of the present application.
Claims
1. A method for managing multi-dimensional data based on a spreadsheet, characterized by, The method comprises: In response to an editing operation instruction for a client displayed spreadsheet, updating the table structure and table data of the spreadsheet; the editing operation instruction at least includes one of a drag instruction for dragging the rows and columns of the spreadsheet for free combination, a hidden filtering instruction for filtering the rows and columns, and a sorting instruction for sorting the data of the rows and columns; the spreadsheet is initialized based on a front-end framework containing React components, Ant Design components and formily components, and the front-end framework includes Tabs multi-tab and Transfer transfer box; the editing operation instruction carries a field identifier sequence for operating the spreadsheet and an action function for defining operation type; Wherein, the editing operation instruction refers to the operation command initiated by the user through the client interface to modify or adjust the spreadsheet; an event listener is set on the interface to capture various editing operations of the user, including mouse dragging, clicking buttons, and inputting filtering conditions; The updating of the table structure and table data of the spreadsheet comprises: Obtaining the state of the Tabs multi-tab and the Transfer transfer box; According to the field identifier sequence and the action function, updating the state of the Tabs multi-tab and the Transfer transfer box to adjust the layout of the spreadsheet, and obtaining the updated table structure; From the business database of the business system, obtaining the field values corresponding to each table field in the updated table structure; Rendering the field values corresponding to each table field into the updated table structure to obtain the updated table data; The updating of the state of the Tabs multi-tab and the Transfer transfer box according to the field identifier sequence and the action function comprises: Parsing the action function to obtain the action type and the operation target object identifier; Traversing the tab node in the state tree of the Tabs multi-tab, comparing the traversed tab node with the operation target object identifier to obtain the target tab node matched with the operation target object identifier; According to the field identifier sequence and the action function, modifying the historical state of the target tab node to update the state of the Tabs multi-tab; Obtaining the selected field list of the Transfer transfer box; Merging and filtering the field identifier sequence and the selected fields in the selected field list; According to the filtered result, updating the state of the Transfer transfer box; Capturing the timestamp corresponding to the editing operation instruction, taking the timestamp as an index, and updating the historical data modification record of the updated table structure and table data, storing the mapping relationship between the index and the historical data modification record; When a historical operation record query instruction input by the client is received, querying a plurality of historical data modification records corresponding to the time range carried by the historical operation record query instruction from the mapping relationship; According to the chronological order, the plurality of historical data modification records are displayed in sequence.
2. The method of claim 1, wherein, The method further comprises: receive cell data input by the client; in the case where the cell data does not affect other cell data, send the cell data to a business database of a business system in real time through an API interface for saving; or in the case where the cell data affects other cell data, calculate linkage data required by the affected cells according to the cell data; send the cell data and the linkage data required by the affected cells to the business database of the business system in real time through the API interface for saving.
3. The method of claim 1, wherein, The modifying the historical state of the target tab node according to the field identifier sequence and the action function comprises: in the case where the action function indicates adding a field, determining whether each field identifier in the field identifier sequence exists in a current field list of the target tab node; if not, adding the each field identifier to the current field list of the target tab node to obtain a target field list; and setting the state of each target field in the target field list to enabled; if yes, setting the state of each current field in the current field list to enabled.
4. The method of claim 1, wherein, The modifying the historical state of the target tab node according to the field identifier sequence and the action function comprises: in the case where the action function indicates deleting a field, determining whether each current field in a current field list of the target tab node exists in the field identifier sequence; if yes, deleting the current field in the current field list that exists in the field identifier sequence, and setting the state of the remaining current field to enabled; if not, setting the state of each current field in the current field list to enabled.
5. The method of claim 1, wherein, The modifying the historical state of the target tab node according to the field identifier sequence and the action function comprises: in the case where the action function indicates adjusting the order of a field, determining whether the order of each current field in a current field list of the target tab node is consistent with the order of the field identifier sequence; if yes, setting the state of each current field in the current field list to enabled; if not, adjusting the order of each current field in the current field list of the target tab node to the order of the field identifier sequence, and setting the state of each current field in the current field list with the adjusted order to enabled.
6. The method of claim 1, wherein, The state tree of the Tabs multi-tab is generated according to the following steps, comprising: obtaining code file information of the Tabs multi-tab, wherein the code file information predefines a plurality of Tab labels and a nested relationship thereof; obtaining the id of each tab and a sub-tab list from the plurality of Tab labels and the nested relationship thereof; identifying the hierarchical size and association information between the id of each tab and the sub-tab list; according to the hierarchical size, dividing a root tab node and a sub-tab node from each tab; according to the association information, determining each corresponding sub-tab node of each root tab node to be inserted, to obtain the state tree of the Tabs multi-tab.
7. The method of claim 1, wherein, The comparing the traversed tab node with the operation target object identifier comprises: inputting the traversed tab node into a preset tab feature encoder to output tab feature encoding; inputting the operation target object identifier into a preset identifier encoder to output identifier feature encoding; respectively performing nonlinear transformation on the tab feature encoding and the identifier feature encoding to obtain a tab feature vector and an identifier feature vector; calculating a cosine similarity between the tab feature vector and the identifier feature vector; determining a target tab node matched with the operation target object identifier based on the cosine similarity.
8. A spreadsheet-based multidimensional data management system implemented using the method of any one of claims 1-7, wherein, The system comprises: a response module configured to update a table structure and table data of a displayed spreadsheet in response to an editing operation instruction for the spreadsheet; the editing operation instruction comprises at least one of a drag instruction for freely combining rows and columns of the spreadsheet, a hide instruction for hiding and filtering the rows and columns, and a sort instruction for sorting data of the rows and columns; an update module configured to capture a timestamp corresponding to the editing operation instruction, store a mapping relationship between the timestamp and a history data modification record of the updated table structure and table data; a query module configured to query a plurality of history data modification records corresponding to a time range carried by a history operation record query instruction input by a client from the mapping relationship when the history operation record query instruction is received; a display module configured to sequentially display the plurality of history data modification records in chronological order.
Citation Information
Patent Citations
Page updating method, device, storage medium and electronic equipment
CN114036417A
Table processing method and device, electronic equipment and storage medium
CN118939643A
Change-oriented electronic list application
CN1904879A