Cell operation history tracking method and system for spreadsheets
By using a nested array structure to store cell operation history in the MES system, the query performance problem caused by the growth of data volume in traditional MES systems is solved, and efficient operation history tracing is achieved.
Patent Information
- Application Number
- CN202511453401.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-13
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2045-10-13
AI Technical Summary
Traditional MES systems generate an independent data record for each operation when tracing operation history, resulting in an exponential increase in data volume, slow query performance, and reduced efficiency in tracing operation history.
By using a nested array structure to store cell operation history in a preset dynamic data table, the first array stores all cell operation data for a row of cells, and multiple second arrays are set to store the operation data for a row of cells. This new data structure avoids the regeneration of an independent data record for each operation, dynamically storing the operation data of all cells in each row for each person, thus reducing data redundancy.
It significantly reduced the amount of data, improved query performance, and enhanced the efficiency of tracing operation history.
Smart Images

Figure CN120929497B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, in particular to a cell operation history tracing method and system for electronic spreadsheets. BACKGROUND
[0002] In modern manufacturing and industrial production, production execution system (MES) plays a vital role. Among them, the intelligent tabular collaborative management system as an advanced MES tool is widely used in production planning, material management, quality control and other links. However, in the environment of high frequency data interaction in multiple links, tracing operation history has become a technical problem to be solved.
[0003] In related technologies, the traditional MES system adopts the scheme of storing each operation of each person on each cell of each row as an independent data record when tracing the operation history. This scheme realizes the comprehensive record of operation history by recording the personnel ID, row ID, cell ID and operation content and other information of each operation in detail.
[0004] However, this method leads to exponential growth of data volume. Each operation generates an independent data record, which makes the system need to store a large amount of redundant data. Due to the large amount of data, the query performance is slow when tracing the operation history, thereby reducing the operation history tracing efficiency. SUMMARY
[0005] The embodiments of the present application provide a cell operation history tracing method and system for electronic spreadsheets. To have a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. This part is not a general review, nor is it intended to determine the key / important elements or delineate the protection scope of these embodiments. Its only purpose is to present some concepts in a simple form as a prelude to the detailed description below.
[0006] In a first aspect, the embodiments of the present application provide a cell operation history tracing method for electronic spreadsheets, the method comprising:
[0007] receiving an operation history tracing request for an electronic spreadsheet in a production execution system;
[0008] According to the operation history tracing request and a preset dynamic data table, determine the final cell operation history requested by the operation history tracing request, wherein the preset dynamic data table is obtained based on dynamic storage of a main data table, the main data table comprises a cell operation data field, the cell operation data field stores cell operation histories of multiple rows of cells in the spreadsheet in multiple first arrays, and one first array is used to store cell operation histories of one row of cells in the spreadsheet, one element in one first array is used to store all cell operation histories of one cell in one row of cells, and one element is a second array, and each element in the second array is used to store one piece of cell operation history of one cell;
[0009] Display the final cell operation history.
[0010] Optionally, the preset dynamic data table is generated according to the following steps, comprising:
[0011] Create a main data table for storing cell operation histories;
[0012] In response to a user's operation instruction on the spreadsheet in the production execution system, obtain the current user ID of the user, the current row ID to be operated, the current cell position to be operated, and the current content of the operation;
[0013] According to the current user ID, the current row ID and the current cell position, dynamically store the current content in the main data table as a preset dynamic data table.
[0014] Optionally, the preset dynamic data table stores an association relationship between the first array and the user ID and the row ID;
[0015] According to the current user ID, the current row ID and the current cell position, dynamically store the current content in the main data table as a preset dynamic data table, comprising:
[0016] From the association relationship, query the historical first array corresponding to the current user ID and the current row ID to obtain a query result;
[0017] In the case that the query result indicates that there is a historical first array, from all first arrays under the cell operation data field, obtain the historical first array corresponding to the current user ID and the current row ID;
[0018] In the historical first array, query the historical second array indicated by the array subscript corresponding to the current cell position;
[0019] Store the current content as an element of the historical second array in the historical second array to obtain the preset dynamic data table.
[0020] Optionally, the main data table further comprises a personnel ID field and a row ID field;
[0021] The method further comprises:
[0022] In a case where the query result indicates that the historical first array does not exist, a backup first array corresponding to the current user ID and the current row ID is created under the cell operation data field;
[0023] In the spreadsheet, the number of cells corresponding to the current row ID is counted;
[0024] A plurality of backup second arrays corresponding to the number of cells are created in the backup first array, one backup second array corresponding to one cell;
[0025] In the plurality of created backup second arrays, a backup second array corresponding to the current cell position is determined;
[0026] The current content is stored in the backup second array corresponding to the current cell position;
[0027] The current user ID and the current row ID are stored in the personnel ID field and the row ID field, respectively;
[0028] An association relationship between the current user ID, the current row ID and the backup first array in which the plurality of second arrays exist and the current content exists in the second array is established, and a preset dynamic data table is obtained.
[0029] Optionally, the preset dynamic data table stores an association relationship between the first array and the user ID and the row ID, and the first array includes a plurality of second arrays;
[0030] According to the operation history tracing request and the preset dynamic data table, a final cell operation history requested by the operation history tracing request is determined, comprising:
[0031] In a case where the operation history tracing request is used to request the operation history of the target cell, the target row ID and the target cell position carried by the operation history tracing request are obtained;
[0032] In the association relationship, a plurality of to-be-processed first arrays corresponding to the target row ID are queried;
[0033] From each to-be-processed first array, a to-be-processed second array corresponding to the target cell position is obtained by traversal;
[0034] All cell operation histories existing in each to-be-processed second array are obtained by traversal and sorted according to operation time, and a historical operation record corresponding to the target cell is obtained;
[0035] The historical operation record corresponding to the target cell is used as the final cell operation history requested by the operation history tracing request.
[0036] Optionally, a preset dynamic data table stores the association between the first array and the user ID and row ID, and there are multiple second arrays in the first array;
[0037] Based on the operation history tracing request and the preset dynamic data table, determine the final cell operation history requested by the operation history tracing request, including:
[0038] When using an operation history tracing request to traceive the operation history of a target row, obtain the target row ID carried in the operation history tracing request;
[0039] In the association, query the corresponding first array to be processed based on the target row ID;
[0040] From the first array to be processed, traverse and get each element in the first array to be processed, and each element corresponds to a second array to be processed;
[0041] Iterate through all the cell operation history in each second array to be processed and sort them by operation time. Merge all sorted operation records to get the historical operation record corresponding to the target row.
[0042] The historical operation record corresponding to the target row is used as the final cell operation history requested by the operation history tracing request.
[0043] Optionally, a preset dynamic data table stores the association between the first array and the user ID and row ID, and there are multiple second arrays in the first array;
[0044] Based on the operation history tracing request and the preset dynamic data table, determine the final cell operation history requested by the operation history tracing request, including:
[0045] When an operation history tracing request is used to request tracing of the target operation user, obtain the target user ID carried in the operation history tracing request;
[0046] In the association, query the corresponding first array to be processed based on the target user ID;
[0047] Iterate through each of the first arrays to be processed to obtain the existing second arrays to be processed;
[0048] Iterate through all the cell operation history in each second array to be processed and sort them by operation time. Merge all sorted operation records to obtain the historical operation record corresponding to the target user.
[0049] The historical operation records corresponding to the target user are used as the final cell operation history requested in the operation history tracing request.
[0050] Optionally, display the final cell operation history, including:
[0051] Retrieve the first display style identifier carried in the operation history tracing request;
[0052] Obtain the first display style template corresponding to the first display style identifier from the pre-established mapping relationship between display style identifiers and display style templates in the display style template database;
[0053] The final cell operation history is rendered to the first display style template to obtain the cell operation history rendering result;
[0054] Displays the rendering results of the cell operation history.
[0055] Optionally, the following steps are used to generate a pre-established mapping relationship between display style identifiers and display style templates, including:
[0056] Receive the display style template used for uploading;
[0057] Analyze the style keywords of the display style template as display style identifiers;
[0058] The display style template database stores the mapping relationship between display style templates and display style identifiers.
[0059] Secondly, embodiments of this application provide a cell operation history tracing system for spreadsheets, the system comprising:
[0060] The request receiving module is used to receive requests for tracing the operation history of spreadsheets in the production execution system.
[0061] The cell operation history determination module is used to determine the final cell operation history requested by the operation history tracing request based on the operation history tracing request and the preset dynamic data table. The preset dynamic data table is obtained by dynamically storing the main data table. The main data table includes a cell operation data field. The cell operation data field stores the cell operation history of multiple rows of cells in the spreadsheet in multiple first arrays. One first array is used to store the cell operation history of one row of cells in the spreadsheet. One element in the first array is used to store all the cell operation history of one cell in the row of cells. One element is a second array. Each element in the second array is used to store one cell operation history of one cell.
[0062] The cell operation history display module is used to display the final cell operation history.
[0063] The technical solutions provided in this application embodiment may include the following beneficial effects:
[0064] In this embodiment, a first array stores the operation history of all cells in a row. Specifically, multiple second arrays are set in the first array to store multiple cell operation histories of each cell in the row. At this time, the operation data of all cells in each row of each person can be dynamically stored in the same data in the format of an array, avoiding the generation of an independent data record for each operation. The nested array structure significantly reduces data redundancy, thereby greatly reducing the amount of data. This allows for quick location of relevant data when querying operation history, improving query performance and enhancing the efficiency of tracing the operation history of the spreadsheet.
[0065] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0066] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0067] Figure 1 This is a flowchart illustrating a method for tracing the cell operation history of a spreadsheet, as provided in an embodiment of this application.
[0068] Figure 2 This is a UI interface diagram of operation history tracing from different dimensions provided in the embodiments of this application;
[0069] Figure 3 This is a parameter selection diagram for a cell dimension provided in an embodiment of this application;
[0070] Figure 4 This is a schematic diagram of the data structure of a cell operation data field provided in an embodiment of this application;
[0071] Figure 5 This is the display result after filling data into a timeline style template provided in this application embodiment;
[0072] Figure 6 This is a flowchart illustrating a method for generating a preset dynamic data table according to an embodiment of this application.
[0073] Figure 7 This is a schematic flowchart illustrating the process of generating a preset dynamic data table according to an embodiment of this application;
[0074] Figure 8This is a schematic diagram of a cell operation history tracing system for spreadsheets provided in an embodiment of this application;
[0075] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0076] The following description and accompanying drawings fully illustrate specific embodiments of this application to enable those skilled in the art to practice them.
[0077] It should be understood that the described embodiments are merely some, not all, of the embodiments in this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.
[0078] In the following description, when referring to the accompanying drawings, the same numbers in different drawings denote the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of systems and methods consistent with some aspects of this application as detailed in the appended claims.
[0079] In the description of this application, it should be understood that the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances. Furthermore, in the description of this application, unless otherwise stated, "multiple" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship.
[0080] Currently, traditional MES systems trace operation history by storing each person's operation on each cell of each row as an independent data record. This approach achieves comprehensive recording of operation history by meticulously recording information such as the person's ID, row ID, cell ID, and operation content for each operation.
[0081] The applicant of this application recognized that this method leads to an exponential increase in data volume. Each operation generates a separate data record, requiring the system to store a large amount of redundant data. Due to the massive data volume, query performance when tracing operation history is slow, thereby reducing the efficiency of operation history tracing.
[0082] To address the aforementioned problems, this application provides a method and system for tracing cell operation history in spreadsheets, thereby resolving the issues present in the related technologies. In this embodiment, a first array stores the operation history of all cells in a row. Specifically, multiple second arrays are set within this first array to store multiple cell operation histories for each cell in the row. This allows the operation data of all cells in each row for each user to be dynamically stored in the same data entry in array format, avoiding the generation of a separate data record for each operation. This nested array structure significantly reduces data redundancy, thereby greatly reducing the data volume and enabling rapid location of relevant data when querying operation history, improving query performance and enhancing the efficiency of tracing the operation history of spreadsheets. The following detailed description uses exemplary embodiments.
[0083] The following will be combined with the appendix Figure 1 -Appendix Figure 7 This application provides a detailed description of the cell operation history tracing method for spreadsheets, as provided in the embodiments of this application. This method can be implemented using a computer program and can run on a von Neumann architecture-based cell operation history tracing system for spreadsheets. This computer program can be integrated into an application or run as a standalone utility application.
[0084] Please see Figure 1 This document provides a flowchart illustrating a method for tracing the history of cell operations in a spreadsheet, as described in an embodiment of this application. Figure 1 As shown, the method in this application embodiment includes the following steps:
[0085] S101, Receive a request to trace the operation history of a spreadsheet in the production execution system;
[0086] The Manufacturing Execution System (MES) is an information system used to manage the manufacturing process. A spreadsheet is a software tool used to organize, analyze, and store data, presented in tabular form. In the MES system, spreadsheets can be used to record production data, operation records, etc. An operation history traceability request is a query request initiated by a user, requesting the system to provide the operation history of a specific cell, row, or user.
[0087] In some embodiments of this application, a user initiates an operation history tracing request through a user interface (such as a webpage, desktop application, etc.). If the request is to trace the operation history of a specific user, the request may include the target user ID; if the request is to trace the operation history of a specific row, the request may include the target row ID; if the request is to trace the operation history of a specific cell, the request may include the target row ID and the target cell position.
[0088] For example Figure 2 As shown, users can initiate operation history tracing across different dimensions through the system interface. For example, if a user selects "cell dimension," they can jump to... Figure 3 Users can select relevant variable parameters, and the mini preview module can locate the relevant row. Clicking "Next" will then return the user to the previous page. Figure 2 The interface displays relevant parameters for quickly locating the area, which the user then triggers. Figure 2 When the system starts tracing the component, it can generate an operation history tracing request to trace the operation history of a specific cell. The request content can include the target row ID (row1) and the target cell position (A1). After receiving the request, the system parses the request content and extracts the target row ID and the target cell position.
[0089] S102, based on the operation history tracing request and the preset dynamic data table, determine the final cell operation history requested by the operation history tracing request; wherein, the preset dynamic data table is obtained by dynamically storing the main data table, the main data table includes a cell operation data field, the cell operation data field stores the cell operation history of multiple rows of cells in the spreadsheet in multiple first arrays, and one first array is used to store the cell operation history of one row of cells in the spreadsheet, one element in one first array is used to store all the cell operation history of one cell in one row of cells, and one element is a second array, each element in the second array is used to store one cell operation history of one cell;
[0090] The master data table is the core data structure that stores all operation history. This data structure includes three fields: the personnel ID field, which records the ID of the operator; the row ID field, which records the ID of the row being operated on; and the cell operation data field, which stores the cell operation history and is presented in the form of a nested array.
[0091] The cell operation data field is a nested array used to store the operation history of multiple rows of cells in the spreadsheet. Each first array stores the operation history of one row of cells. An element in each first array forms a second array, storing all the operation history for that cell. An element in each second array is an operation record, storing one operation history entry for that cell. The data structure of the cell operation data field is as follows: Figure 4 As shown, row 100 uses the first array, which contains multiple second arrays. The first cell A contains 5 records stored in the second array. The second cell B contains 3 records stored in the second array.
[0092] In some embodiments of this application, the specific process of generating a preset dynamic data table includes: creating a master data table for storing cell operation history; in response to a user's operation instruction on a spreadsheet in the production execution system, obtaining the user's current user ID, the current row ID being operated on, the current cell position being operated on, and the current content being operated on related to the operation instruction; and dynamically storing the current content into the master data table based on the current user ID, the current row ID, and the current cell position, as a preset dynamic data table.
[0093] In one possible implementation, the master data table is designed with the following fields: `user_id`: User ID, recording the user performing the operation; `row_id`: Row ID, recording the row where the operation occurred; `cell_position`: Cell position, recording the cell where the operation occurred; `operation_content`: Operation content, recording the specific details of the operation; and `operation_time`: Operation time, recording the timestamp of the operation. The system listens for user operation events in the spreadsheet. When a user performs an operation, relevant information is captured: User ID, Row ID, Cell position, and Operation content. Based on the User ID, Row ID, Cell position, and Operation content, the current content can be dynamically stored in the master data table as a preset dynamic data table.
[0094] The preset dynamic data table stores the association between the first array and the user ID and row ID.
[0095] Specifically, the process of dynamically storing the current content into the main data table as a preset dynamic data table, based on the current user ID, current row ID, and current cell position, includes: querying the historical first array corresponding to the current user ID and current row ID from the association relationship to obtain the query result; if the query result indicates the existence of a historical first array, retrieving the historical first array corresponding to the current user ID and current row ID from all first arrays under the cell operation data field; querying the historical second array indicated by the array index corresponding to the current cell position in the historical first array; and storing the current content as an element of the historical second array to obtain the preset dynamic data table.
[0096] For example, user123 modified cell A of Row-100, changing its content to the value 1. The initial data table is as follows:
[0097] cell_operations = {
[0098] "user123": {
[0099] "Row-100": [
[0100] {"A": [{"time": "2025-09-18 10:00:00", "content": "Initial value"}]},
[0101] {"B": [{"time": "2025-09-18 10:00:00", "content": "Initial value"}]}
[0102] ],
[0103] "Row-101": [
[0104] {"A": [{"time": "2025-09-18 10:00:00", "content": "Initial value"}]},
[0105] {"B": [{"time": "2025-09-18 10:00:00", "content": "Initial value"}]} ]
[0107] }
[0108] }
[0109] By finding Row-100 and A in the initial data table, the stored content is: insert_operation("user123", "Row-100", "A", "Change to new value 1"). Dynamically storing this content into the initial data table results in the following data table:
[0110] cell_operations = {
[0111] "user123": {
[0112] "Row-100": [
[0113] {"A": [
[0114] {"time": "2025-09-18 10:00:00", "content": "Initial value"},
[0115] {"time": "2025-09-18 10:05:00", "content": "Changed to new value 1"}
[0116] ]},
[0117] {"B": [{"time": "2025-09-18 10:00:00", "content": "Initial value"}]}
[0118] ],
[0119] "Row-101": [
[0120] {"A": [{"time": "2025-09-18 10:00:00", "content": "Initial value"}]},
[0121] {"B": [{"time": "2025-09-18 10:00:00", "content": "Initial value"}]} ]
[0123] }
[0124] }
[0125] The master data table also includes a personnel ID field and a row ID field.
[0126] Specifically, when the query results indicate that no historical first array exists, a backup first array corresponding to the current user ID and the current row ID is created under the cell operation data field; in the spreadsheet, the number of cells corresponding to the current row ID is counted; multiple backup second arrays, the same number as the number of cells, are created sequentially in the backup first array, with one backup second array corresponding to one cell; among the multiple created backup second arrays, the backup second array corresponding to the current cell position is determined; the current content is stored in the backup second array corresponding to the current cell position; the current user ID and the current row ID are stored in the personnel ID field and the row ID field, respectively; the association relationship between the current user ID, the current row ID, and the backup first arrays that have multiple second arrays and contain the current content is established, resulting in a preset dynamic data table.
[0127] For example, user123 modified cell A of Row-101, changing its content to the value 1. The initial data table is as follows:
[0128] cell_operations = {
[0129] "user123": {
[0130] "Row-100": [
[0131] {"A": [{"time": "2025-09-18 10:00:00", "content": "Initial value"}]},
[0132] {"B": [{"time": "2025-09-18 10:00:00", "content": "Initial value"}]} ]
[0134] }
[0135] }
[0136] By searching for cell A (Row-101) in the initial data table, which does not exist, the stored content is: insert_operation("user123", "Row-101", "A", "Change to new value 1"). This content is dynamically stored in the initial data table, resulting in the following data table:
[0137] cell_operations = {
[0138] "user123": {
[0139] "Row-100": [
[0140] {"A": [{"time": "2025-09-18 10:00:00", "content": "Initial value"}]},
[0141] {"B": [{"time": "2025-09-18 10:00:00", "content": "Initial value"}]}
[0142] ],
[0143] "Row-101": [
[0144] {"A": [{"time": "2025-09-18 10:05:00", "content": "Changed to new value 1"}]},
[0145] {"B": []},
[0146] {"C": []} ]
[0148] }
[0149] }
[0150] The preset dynamic data table stores the association between the first array and the user ID and row ID, and there are multiple second arrays in the first array.
[0151] In some embodiments of this application, the specific process of determining the final cell operation history requested by the operation history tracing request based on the operation history tracing request and the preset dynamic data table includes: when the operation history tracing request is used to request tracing the operation history of the target cell, obtaining the target row ID and the target cell position carried by the operation history tracing request; in the association relationship, querying multiple corresponding first arrays to be processed based on the target row ID; traversing from each first array to be processed to obtain the second array to be processed corresponding to the target cell position; traversing to obtain all cell operation histories existing in each second array to be processed and sorting them by operation time to obtain the historical operation record corresponding to the target cell; and using the historical operation record corresponding to the target cell as the final cell operation history requested by the operation history tracing request.
[0152] In other embodiments of this application, the specific process of determining the final cell operation history requested by the operation history tracing request based on the operation history tracing request and the preset dynamic data table is as follows: When the operation history tracing request is used to request the tracing of the operation history of the target row, the target row ID carried by the operation history tracing request is obtained; in the association relationship, the corresponding first array to be processed is queried according to the target row ID; from the first array to be processed, each element in the first array to be processed is obtained through traversal, and each element corresponds to a second array to be processed; all cell operation histories existing in each second array to be processed are obtained through traversal and sorted according to the operation time, and all sorted operation records are merged to obtain the historical operation record corresponding to the target row; the historical operation record corresponding to the target row is used as the final cell operation history requested by the operation history tracing request.
[0153] In other embodiments of this application, the specific process of determining the final cell operation history requested by the operation history tracing request based on the operation history tracing request and the preset dynamic data table is as follows: When the operation history tracing request is used to request the tracing of the target operation user, the target user ID carried in the operation history tracing request is obtained; in the association relationship, the corresponding first array to be processed is queried according to the target user ID; from each first array to be processed, the existing second array to be processed is obtained through traversal; all cell operation histories existing in each second array to be processed are obtained through traversal and sorted by operation time, and all sorted operation records are merged to obtain the historical operation record corresponding to the target operation user; the historical operation record corresponding to the target operation user is used as the final cell operation history requested by the operation history tracing request.
[0154] S103 displays the final cell operation history.
[0155] In some embodiments of this application, the specific process of displaying the final cell operation history includes: obtaining the first display style identifier carried in the operation history tracing request; obtaining the first display style template corresponding to the first display style identifier from the pre-established mapping relationship between display style identifiers and display style templates in the display style template database; rendering the final cell operation history into the first display style template to obtain the cell operation history rendering result; and displaying the cell operation history rendering result.
[0156] The first display style identifier is an identifier carried in the request, specifying the display style the user wishes to use. The system can select the corresponding display style template based on this identifier. The display style template database stores all display style templates and their identifiers. A mapping table associates display style identifiers with specific display style templates. The system uses this mapping table to find the display style template requested by the user. The first display style template is the one corresponding to the first display style identifier and is used to render the final operation history display result. The cell operation history rendering result is the result of rendering the final cell operation history data onto the display style template.
[0157] For example, user123 initiates a request to trace operation history. The request includes the target row ID (Row-100), the target cell position (A), and the first display style identifier (timeline). The first display style identifier "timeline" is extracted from the request. A template with the identifier "timeline" is searched in the display style template database. For example, this template might be a timeline style template that defines how to display operation history in a timeline format. This operation history data is then populated into the timeline style template to generate the final display content, such as... Figure 5 As shown.
[0158] In some embodiments of this application, the specific process of generating a pre-established mapping relationship between display style identifiers and display style templates includes: receiving a display style template for uploading; analyzing the style keywords of the display style template as display style identifiers; and storing the mapping relationship between display style templates and display style identifiers in a display style template database.
[0159] In one possible implementation, a user interface (such as a web form) is provided, allowing users to upload display style template files. The system receives the uploaded files and saves them to a specified path on the server. The content of the uploaded display style template file is read. The file content is analyzed to extract key style information or keywords. These keywords can be the template name, specific CSS class names, tags in the HTML structure, etc. The extracted keywords are used as display style identifiers. The display style template file is saved to a display style template database. The database records the mapping relationship between display style identifiers and display style template file paths.
[0160] In this embodiment, a first array stores the operation history of all cells in a row. Specifically, multiple second arrays are set in the first array to store multiple cell operation histories of each cell in the row. At this time, the operation data of all cells in each row of each person can be dynamically stored in the same data in the format of an array, avoiding the generation of an independent data record for each operation. The nested array structure significantly reduces data redundancy, thereby greatly reducing the amount of data. This allows for quick location of relevant data when querying operation history, improving query performance and enhancing the efficiency of tracing the operation history of the spreadsheet.
[0161] Please see Figure 6 This is a flowchart illustrating a method for generating a preset dynamic data table, as provided in this application embodiment. Figure 6 As shown, the method in this application embodiment includes the following steps:
[0162] S201, Create a master data table to store the history of cell operations;
[0163] S202, in response to a user's operation command on a spreadsheet in the production execution system, obtains the user's current user ID, the current row ID being operated on, the current cell position being operated on, and the current content being operated on, which are related to the operation command;
[0164] S203: Based on the current user ID, current row ID, and current cell position, dynamically store the current content in the main data table as a preset dynamic data table.
[0165] For example Figure 7 As shown, Figure 7This is a schematic flowchart of the process of generating a preset dynamic data table provided in this application. A master data table is created to store the history of cell operations. In response to the user's operation instructions on the spreadsheet in the production execution system, the current user ID, the current row ID, the current cell position, and the current content of the operation related to the operation instruction are obtained. From the association relationship, the first historical array corresponding to the current user ID and the current row ID is queried to obtain the query result and determine whether the query result indicates that the first historical array exists.
[0166] If so, retrieve the historical first array corresponding to the current user ID and current row ID from all the first arrays under the cell operation data field. In the historical first array, query the historical second array indicated by the array index corresponding to the current cell position, store the current content as an element of the historical second array, and obtain the preset dynamic data table.
[0167] If not, under the cell operation data field, create a backup first array corresponding to the current user ID and the current row ID; in the spreadsheet, count the number of cells corresponding to the current row ID; in the backup first array, create multiple backup second arrays with the same number of cells, one backup second array corresponding to one cell; among the multiple created backup second arrays, determine the backup second array corresponding to the current cell position; store the current content in the backup second array corresponding to the current cell position; store the current user ID and the current row ID in the personnel ID field and the row ID field respectively; establish the association relationship between the current user ID, the current row ID and the backup first array that has multiple second arrays and contains the current content, to obtain the preset dynamic data table.
[0168] In this embodiment, a first array stores the operation history of all cells in a row. Specifically, multiple second arrays are set in the first array to store multiple cell operation histories of each cell in the row. At this time, the operation data of all cells in each row of each person can be dynamically stored in the same data in the format of an array, avoiding the generation of an independent data record for each operation. The nested array structure significantly reduces data redundancy, thereby greatly reducing the amount of data. This allows for quick location of relevant data when querying operation history, improving query performance and enhancing the efficiency of tracing the operation history of the spreadsheet.
[0169] The following are system embodiments of this application, which can be used to execute the method embodiments of this application. For details not disclosed in the system embodiments of this application, please refer to the method embodiments of this application.
[0170] Please see Figure 8This illustration shows a schematic diagram of a cell operation history tracing system for spreadsheets provided in an exemplary embodiment of this application. This cell operation history tracing system for spreadsheets can be implemented as all or part of an electronic device through software, hardware, or a combination of both. System 1 includes a request receiving module 10, a cell operation history determination module 20, and a cell operation history display module 30.
[0171] Request receiving module 10 is used to receive requests for tracing the operation history of spreadsheets in the production execution system;
[0172] The cell operation history determination module 20 is used to determine the final cell operation history requested by the operation history tracing request based on the operation history tracing request and the preset dynamic data table. The preset dynamic data table is obtained by dynamically storing the main data table. The main data table includes a cell operation data field. The cell operation data field stores the cell operation history of multiple rows of cells in the spreadsheet in multiple first arrays. One first array is used to store the cell operation history of one row of cells in the spreadsheet. One element in the first array is used to store all the cell operation history of one cell in one row of cells. One element is a second array. Each element in the second array is used to store one cell operation history of one cell.
[0173] The cell operation history display module 30 is used to display the final cell operation history.
[0174] It should be noted that the cell operation history tracing system for spreadsheets provided in the above embodiments is only illustrated by the division of the above functional modules when executing the cell operation history tracing method for spreadsheets. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the cell operation history tracing system for spreadsheets and the cell operation history tracing method embodiments provided in the above embodiments belong to the same concept, and the implementation process is detailed in the method embodiments, which will not be repeated here.
[0175] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0176] In this embodiment, a first array stores the operation history of all cells in a row. Specifically, multiple second arrays are set in the first array to store multiple cell operation histories of each cell in the row. At this time, the operation data of all cells in each row of each person can be dynamically stored in the same data in the format of an array, avoiding the generation of an independent data record for each operation. The nested array structure significantly reduces data redundancy, thereby greatly reducing the amount of data. This allows for quick location of relevant data when querying operation history, improving query performance and enhancing the efficiency of tracing the operation history of the spreadsheet.
[0177] This application also provides a computer-readable medium having program instructions stored thereon, which, when executed by a processor, implement the cell operation history tracing method for spreadsheets provided in the above-described method embodiments.
[0178] This application also provides a computer program product containing instructions that, when run on a computer, cause the computer to execute the cell operation history tracing method for spreadsheets described in the various method embodiments above.
[0179] Please see Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 9 As shown, the electronic device 1000 may 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.
[0180] The communication bus 1002 is used to realize the connection and communication between these components.
[0181] The user interface 1003 may include a display screen and a camera. Optionally, the user interface 1003 may also include a standard wired interface and a wireless interface.
[0182] The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).
[0183] The processor 1001 may include one or more processing cores. The processor 1001 connects to various parts within the electronic device 1000 using various interfaces and lines. It executes various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 1005, and by calling data stored in the memory 1005. Optionally, the processor 1001 may be implemented using at least one hardware form selected from Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 1001 may integrate one or more of the following: a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), and a modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content to be displayed on the screen; and the modem handles wireless communication. It is understood that the modem may also be implemented as a separate chip, without being integrated into the processor 1001.
[0184] The memory 1005 may include random access memory (RAM) or read-only memory. Optionally, the memory 1005 may include a non-transitory computer-readable storage medium. The memory 1005 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 1005 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory 1005 may also be at least one storage system located remotely from the aforementioned processor 1001. Figure 9 As shown, the memory 1005, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and a cell operation history tracing application for spreadsheets.
[0185] exist Figure 9In the illustrated electronic device 1000, the user interface 1003 is mainly used to provide an input interface for the user and to obtain the user's input data; while the processor 1001 can be used to call the spreadsheet cell operation history tracing application stored in the memory 1005, and specifically perform the following operations:
[0186] Receive requests to trace the operation history of spreadsheets in the production execution system;
[0187] Based on the operation history tracing request and the preset dynamic data table, the final cell operation history requested by the operation history tracing request is determined. The preset dynamic data table is obtained by dynamically storing the main data table. The main data table includes a cell operation data field. The cell operation data field stores the cell operation history of multiple rows of cells in the spreadsheet in multiple first arrays. One first array is used to store the cell operation history of one row of cells in the spreadsheet. One element in one first array is used to store all the cell operation history of one cell in one row of cells. One element is a second array. Each element in the second array is used to store one cell operation history.
[0188] Displays the final cell operation history.
[0189] In one embodiment, when the processor 1001 generates a preset dynamic data table, it specifically performs the following operations:
[0190] Create a master data table to store the history of cell operations;
[0191] In response to user operation commands for spreadsheets in the production execution system, obtain the current user ID, the current row ID being operated on, the current cell position being operated on, and the current content being operated on, which are related to the operation command.
[0192] Based on the current user ID, current row ID, and current cell position, dynamically store the current content in the main data table as a preset dynamic data table.
[0193] In one embodiment, when processor 1001 executes the operation of dynamically storing the current content into the main data table based on the current user ID, current row ID, and current cell position, as a preset dynamic data table, it specifically performs the following operations:
[0194] From the association relationships, query the first historical array corresponding to the current user ID and the current row ID to obtain the query results;
[0195] If the query results indicate the existence of a historical first array, retrieve the historical first array corresponding to the current user ID and the current row ID from all first arrays under the cell operation data field;
[0196] Within the first historical array, find the second historical array indicated by the array index corresponding to the current cell position;
[0197] Store the current content as an element in the second historical array to obtain a preset dynamic data table.
[0198] In one embodiment, the processor 1001 also performs the following operations:
[0199] If the query results indicate that there is no historical first array, create a backup first array corresponding to the current user ID and the current row ID in the cell operation data field;
[0200] In a spreadsheet, count the number of cells corresponding to the current row ID;
[0201] In the first backup array, create multiple second backup arrays in sequence, the same number as the number of cells, with one second backup array corresponding to one cell;
[0202] Among the multiple backup second arrays created, determine the backup second array corresponding to the current cell position;
[0203] Store the current content into the spare second array corresponding to the current cell position;
[0204] Store the current user ID and the current row ID in the personnel ID field and the row ID field, respectively;
[0205] Establish the association between the current user ID, the current row ID, and a backup first array that has multiple second arrays and contains the current content, to obtain a preset dynamic data table.
[0206] In one embodiment, when the processor 1001 determines the final cell operation history requested by the operation history tracing request based on the operation history tracing request and a preset dynamic data table, it specifically performs the following operations:
[0207] When an operation history tracing request is used to request tracing the operation history of a target cell, obtain the target row ID and the target cell position carried in the operation history tracing request;
[0208] In the association relationship, based on the target row ID, query the corresponding multiple unprocessed first arrays;
[0209] From each of the first arrays to be processed, traverse to obtain the second array corresponding to the target cell position;
[0210] Iterate through all the cell operation history in each second array to be processed and sort them by operation time to obtain the historical operation record corresponding to the target cell;
[0211] The historical operation record corresponding to the target cell is used as the final cell operation history requested by the operation history tracing request.
[0212] In one embodiment, when the processor 1001 determines the final cell operation history requested by the operation history tracing request based on the operation history tracing request and a preset dynamic data table, it specifically performs the following operations:
[0213] When using an operation history tracing request to traceive the operation history of a target row, obtain the target row ID carried in the operation history tracing request;
[0214] In the association, query the corresponding first array to be processed based on the target row ID;
[0215] From the first array to be processed, traverse and get each element in the first array to be processed, and each element corresponds to a second array to be processed;
[0216] Iterate through all the cell operation history in each second array to be processed and sort them by operation time. Merge all sorted operation records to get the historical operation record corresponding to the target row.
[0217] The historical operation record corresponding to the target row is used as the final cell operation history requested by the operation history tracing request.
[0218] In one embodiment, when the processor 1001 determines the final cell operation history requested by the operation history tracing request based on the operation history tracing request and a preset dynamic data table, it specifically performs the following operations:
[0219] When an operation history tracing request is used to request tracing of the target operation user, obtain the target user ID carried in the operation history tracing request;
[0220] In the association, query the corresponding first array to be processed based on the target user ID;
[0221] Iterate through each of the first arrays to be processed to obtain the existing second arrays to be processed;
[0222] Iterate through all the cell operation history in each second array to be processed and sort them by operation time. Merge all sorted operation records to obtain the historical operation record corresponding to the target user.
[0223] The historical operation records corresponding to the target user are used as the final cell operation history requested in the operation history tracing request.
[0224] In one embodiment, when the processor 1001 executes the operation to display the final cell operation history, it specifically performs the following operations:
[0225] Retrieve the first display style identifier carried in the operation history tracing request;
[0226] Obtain the first display style template corresponding to the first display style identifier from the pre-established mapping relationship between display style identifiers and display style templates in the display style template database;
[0227] The final cell operation history is rendered to the first display style template to obtain the cell operation history rendering result;
[0228] Displays the rendering results of the cell operation history.
[0229] In one embodiment, the processor 1001 also performs the following operations:
[0230] Receive the display style template used for uploading;
[0231] Analyze the style keywords of the display style template as display style identifiers;
[0232] The display style template database stores the mapping relationship between display style templates and display style identifiers.
[0233] In this embodiment, a first array stores the operation history of all cells in a row. Specifically, multiple second arrays are set in the first array to store multiple cell operation histories of each cell in the row. At this time, the operation data of all cells in each row of each person can be dynamically stored in the same data in the format of an array, avoiding the generation of an independent data record for each operation. The nested array structure significantly reduces data redundancy, thereby greatly reducing the amount of data. This allows for quick location of relevant data when querying operation history, improving query performance and enhancing the efficiency of tracing the operation history of the spreadsheet.
[0234] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program for tracing the cell operation history of a spreadsheet can be stored in a computer-readable storage medium. When executed, the program can include the processes of the embodiments of the above methods. The storage medium for the program for tracing the cell operation history of a spreadsheet can be a magnetic disk, optical disk, read-only memory, or random access memory, etc.
[0235] The above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Therefore, any equivalent variations made in accordance with the claims of this application shall still fall within the scope of this application.
Claims
1. A method for cell operation history tracking for a spreadsheet, the method comprising: The method comprises: receiving an operation history tracing request for an electronic form in a production execution system; determining a final cell operation history requested by the operation history tracing request according to the operation history tracing request and a preset dynamic data table, wherein the preset dynamic data table is obtained based on dynamic storage of a master data table, the master data table comprises a cell operation data field, the cell operation data field stores cell operation histories of multiple rows of cells in the electronic form in multiple first arrays, and one first array is used to store cell operation histories of one row of cells in the electronic form, one element in one first array is used to store all cell operation histories of one cell in the row of cells, the one element is a second array, and each element in the second array is used to store one cell operation history of one cell; generating the preset dynamic data table according to the following steps, comprising: creating a master data table for storing cell operation histories; in response to an operation instruction of a user for an electronic form in the production execution system, obtaining a current user ID of the user, a current row ID to be operated, a current cell position to be operated, and current content of the operation; and dynamically storing the current content in the master data table as a preset dynamic data table according to the current user ID, the current row ID, and the current cell position; the preset dynamic data table stores an association relationship between the first array and the user ID and the row ID; the dynamic storage of the current content in the master data table as the preset dynamic data table according to the current user ID, the current row ID, and the current cell position comprises: querying a historical first array corresponding to the current user ID and the current row ID from the association relationship to obtain a query result; in a case where the query result indicates that the historical first array exists, obtaining the historical first array corresponding to the current user ID and the current row ID from all first arrays under the cell operation data field; querying a historical second array indicated by an array index corresponding to the current cell position in the historical first array; and storing the current content as an element of the historical second array in the historical second array to obtain the preset dynamic data table; displaying the final cell operation history.
2. The method of claim 1, wherein, The master data table further comprises a personnel ID field and a row ID field; The method further comprises: in a case where the query result indicates that the historical first array does not exist, creating a backup first array corresponding to the current user ID and the current row ID under the cell operation data field; counting a number of cells corresponding to the current row ID in the electronic form; creating multiple backup second arrays in the backup first array, one backup second array corresponding to one cell; determining a backup second array corresponding to the current cell position in the multiple backup second arrays. storing the current content into a backup second array corresponding to the current cell position; storing the current user ID and the current row ID into the personnel ID field and the row ID field respectively; establishing an association between the current user ID, the current row ID and the backup first array in which the current content exists in the plurality of second arrays, to obtain a preset dynamic data table.
3. The method of claim 1, wherein, The preset dynamic data table stores the association between the first array and the user ID and the row ID, and the first array has a plurality of second arrays; The method for determining the final cell operation history requested by the operation history trace request according to the operation history trace request and the preset dynamic data table comprises: When the operation history trace request is used to request the operation history of the target cell, obtaining the target row ID and the target cell position carried by the operation history trace request; In the association, according to the target row ID, a plurality of to-be-processed first arrays corresponding to the target row ID are queried; From each to-be-processed first array, a to-be-processed second array corresponding to the target cell position is obtained by traversal; All cell operation histories existing in each to-be-processed second array are obtained by traversal and sorted according to operation time, to obtain the historical operation record corresponding to the target cell; The historical operation record corresponding to the target cell is taken as the final cell operation history requested by the operation history trace request.
4. The method of claim 1, wherein, The preset dynamic data table stores the association between the first array and the user ID and the row ID, and the first array has a plurality of second arrays; The method for determining the final cell operation history requested by the operation history trace request according to the operation history trace request and the preset dynamic data table comprises: When the operation history trace request is used to request the operation history of the target row, obtaining the target row ID carried by the operation history trace request; In the association, according to the target row ID, a to-be-processed first array corresponding to the target row ID is queried; From the to-be-processed first array, each element in the to-be-processed first array is obtained by traversal, and one element corresponds to one to-be-processed second array; All cell operation histories existing in each to-be-processed second array are obtained by traversal and sorted according to operation time, and all sorted operation records are combined to obtain the historical operation record corresponding to the target row; The historical operation record corresponding to the target row is taken as the final cell operation history requested by the operation history trace request.
5. The method of claim 1, wherein, The preset dynamic data table stores the association between the first array and the user ID and the row ID, and the first array has a plurality of second arrays; The method for determining the final cell operation history requested by the operation history trace request according to the operation history trace request and the preset dynamic data table comprises: When the operation history trace request is used to request the operation history of the target operation user, obtaining the target user ID carried by the operation history trace request; In the association, according to the target user ID, a to-be-processed first array corresponding to the target user ID is queried; From each to-be-processed first array, traverse to obtain the existing to-be-processed second array; Traverse to obtain all cell operation histories existing in each to-be-processed second array and sort them according to operation time, and combine all the sorted operation records to obtain the historical operation record corresponding to the target operation user; The historical operation record corresponding to the target operation user is used as the final cell operation history requested by the operation history tracing request.
6. The method of claim 1, wherein, The final cell operation history is displayed, including: Obtaining the first display style identifier carried in the operation history tracing request; From the mapping relationship between the pre-established display style identifier and the display style template in the display style template database, obtain the first display style template corresponding to the first display style identifier; Render the final cell operation history into the first display style template to obtain a cell operation history rendering result; Display the cell operation history rendering result.
7. The method of claim 6, wherein, The mapping relationship between the pre-established display style identifier and the display style template is generated according to the following steps, including: Receiving a display style template for uploading; Analyzing the style keywords of the display style template as a display style identifier; In the display style template database, store the mapping relationship between the display style template and the display style identifier.
8. A cell operation history tracking system for electronic spreadsheets implemented using the method of any of claims 1-7, wherein, The system includes: A request receiving module is configured to receive an operation history tracing request for an electronic spreadsheet in a production execution system; A cell operation history determination module is configured to determine a final cell operation history requested by the operation history tracing request based on the operation history tracing request and a preset dynamic data table, wherein the preset dynamic data table is obtained based on dynamic storage of a main data table, the main data table includes a cell operation data field, the cell operation data field stores cell operation histories of multiple rows of cells in the electronic spreadsheet in multiple first arrays, one first array is used to store cell operation histories of one row of cells in the electronic spreadsheet, one element in one first array is used to store all cell operation histories of one cell in the row of cells, the one element is a second array, and each element in the second array is used to store one cell operation history of one cell; A cell operation history display module is configured to display the final cell operation history.
Citation Information
Patent Citations
Historical record viewing method and device for cells, equipment and storage medium
CN117251432A