A report data memory sharing method, device, equipment and storage medium
Patent Information
- Application Number
- CN202211106965.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-07
- Publication Date
- 2026-10-30
- Estimated Expiration
- 2042-09-07
AI Technical Summary
[0003]由于每张报表的各个单元格数据独立存储互不共享,当多个用户同时操作同一报表时,需要在计算机中开辟多个相同的内存空间进行展示,浪费大量单元格存储空间
[0035]通过定位目标表格的报表区域,提取报表区域中各个单元格的数据,得到若干个单元格数据;分别将每一单元格数据分类为可共享数据或不可共享数据,得到若干个可共享数据和若干个不可共享数据;为所有可共享数据创建一个共享内存,并根据共享内存确定各个可共享数据的内存地址;在报表区域中的各个单元格对应写入各个不可共享数据和各个可共享数据的内存地址,完成存储报表数据。相比于现有技术,本发明的实施例通过采用报表数据内存共享的方式,将报表中的可共享数据存储于共享内存,将报表中的不可共享数据存储于独立内存,当多用户对报表中的可共享数据进行操作时,可直接引用共享内存中可共享数据的内存地址,无需为报表中的可共享数据创建独立内存,当多用户对报表中的不可共享数据进行操作时,仅需为报表中的不可共享数据创建独立内存,从而能够在多用户操作报表时实现报表数据内存共享,提高内存利用率。
Smart Images

Figure CN115495259B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a method, apparatus, device, and storage medium for sharing report data in memory. Background Technology
[0002] Existing software systems mainly use Excel spreadsheets to display reports. By selecting a two-dimensional matrix in the Excel spreadsheet as the report area, each row and column intersection position in the two-dimensional matrix is configured with a cell storage space. Each cell storage space independently stores the cell data required to display the cell itself, including cell values such as amount and quantity, as well as cell style such as background color and font.
[0003] Because the data in each cell of each report is stored independently and not shared, when multiple users operate on the same report simultaneously, multiple identical memory spaces need to be allocated on the computer for display, wasting a significant amount of cell storage space. Furthermore, the number of cells in each report is actually quite considerable; complex reports can even have hundreds of thousands or millions of cells. When multiple users operate on the same report simultaneously, if methods such as... Figure 1 The memory-exclusive method shown can easily lead to insufficient memory space or even software system crashes due to memory overflow. Therefore, based on current technology, it is not possible to achieve memory sharing of report data when multiple users are operating the report, making it difficult to improve memory utilization. Summary of the Invention
[0004] To overcome the shortcomings of the prior art, the present invention provides a method, apparatus, device and storage medium for sharing report data in memory, which can realize the sharing of report data in memory when multiple users operate reports, thereby improving memory utilization.
[0005] To address the aforementioned technical problems, in a first aspect, an embodiment of the present invention provides a method for sharing report data in memory, comprising:
[0006] Locate the report area of the target table, extract the data of each cell in the report area, and obtain several cell data;
[0007] Each cell data is classified into shareable data or non-shareable data, resulting in a plurality of shareable data and a plurality of non-shareable data.
[0008] Create a shared memory for all the shareable data, and determine the memory address of each of the shareable data based on the shared memory;
[0009] Each cell in the report area contains the memory addresses of the non-shareable data and the shareable data.
[0010] Furthermore, before extracting data from each cell in the report area of the target table to obtain several cell data points, the process further includes:
[0011] In response to a report data memory sharing request initiated by the management terminal, a two-dimensional matrix is extracted from the report data memory sharing request to locate the report area of the target table based on the two-dimensional matrix.
[0012] Furthermore, after writing the memory addresses of each non-shareable data and each shareable data to each cell in the report area, the method further includes:
[0013] In response to a report data operation request initiated by any user terminal, extract the target cell and target cell data from the report data operation request;
[0014] When the target cell data is shareable data, the memory address of the shared object corresponding to the target cell data in the shared memory is written into the target cell;
[0015] When the target cell data is non-shareable data, the target cell data is written to the target cell.
[0016] Furthermore, when the target cell data is shareable data, writing the memory address of the shared object corresponding to the target cell data in the shared memory into the target cell specifically involves:
[0017] When the target cell data is shareable data, query whether there is a shared object corresponding to the target cell data in the shared memory;
[0018] If the shared memory contains a shared object corresponding to the data in the target cell, then the memory address of the shared object is written into the target cell;
[0019] If there is no shared object corresponding to the target cell data in the shared memory, a new shared object is created in the shared memory, and the memory address of the new shared object is written to the target cell.
[0020] Furthermore, the step of classifying each cell data into shareable data or non-shareable data to obtain a plurality of shareable data and a plurality of non-shareable data specifically involves:
[0021] Based on a predefined list of shareable data types, each cell data is classified into shareable data or non-shareable data according to its data type, resulting in a number of shareable data and a number of non-shareable data.
[0022] Furthermore, based on a predefined list of shareable data types, each cell data is categorized into shareable or non-shareable data according to its data type, resulting in a plurality of shareable data and a plurality of non-shareable data, including:
[0023] For each cell data, when the cell data is a cell table, the cell data is classified as shareable data; when the cell data is a cell value, the cell data is classified as non-shareable data, resulting in several shareable data and several non-shareable data.
[0024] Furthermore, determining the memory address of each shareable data item based on the shared memory specifically involves:
[0025] Iterate through each piece of shareable data, and check if there is a shared object corresponding to the current shareable data in the shared memory. If there is, the memory address of the shared object is determined as the memory address of the current shareable data. If not, a new shared object is created in the shared memory, and the memory address of the new shared object is determined as the memory address of the current shareable data.
[0026] Secondly, an embodiment of the present invention provides a report data memory sharing device, comprising:
[0027] The data extraction module is used to locate the report area of the target table, extract the data of each cell in the report area, and obtain several cell data.
[0028] The data classification module is used to classify each cell data into shareable data or non-shareable data, thereby obtaining a number of shareable data and a number of non-shareable data.
[0029] A memory configuration module is used to create a shared memory for all the shareable data and determine the memory address of each of the shareable data based on the shared memory;
[0030] The data writing module is used to write the memory addresses of each non-shareable data and each shareable data to each cell in the report area.
[0031] Thirdly, one embodiment of the present invention provides a report data memory sharing device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, the memory being coupled to the processor, and the processor implementing the report data memory sharing method as described above when executing the computer program.
[0032] Fourthly, one embodiment of the present invention provides a computer-readable storage medium, the computer-readable storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to execute the report data memory sharing method as described above.
[0033] Fifthly, one embodiment of the present invention provides a computer program product that, when run on a computer, causes the computer to execute the report data memory sharing method described above.
[0034] The embodiments of the present invention have the following beneficial effects:
[0035] By locating the report area of the target table, data from each cell in the report area is extracted, resulting in several cell data sets. Each cell data set is then categorized into shareable and non-shareable data, resulting in several shareable and non-shareable data sets. A shared memory is created for all shareable data, and the memory address of each shareable data set is determined based on the shared memory. The memory addresses of each non-shareable and shareable data set are then written into each cell in the report area, completing the storage of the report data. Compared to existing technologies, this embodiment of the invention employs a shared report data memory approach. Shareable data in the report is stored in shared memory, while non-shareable data is stored in independent memory. When multiple users operate on the shareable data in the report, they can directly reference the memory address of the shareable data in shared memory without needing to create independent memory for the shareable data. When multiple users operate on the non-shareable data in the report, only independent memory needs to be created for the non-shareable data. This enables shared report data memory during multi-user report operations, improving memory utilization. Attached Figure Description
[0036] Figure 1 This is a diagram illustrating the exclusive memory usage of report data in existing technologies.
[0037] Figure 2 This is a flowchart illustrating a method for sharing report data in memory according to the first embodiment of the present invention;
[0038] Figure 3 This is a schematic diagram illustrating the sharing of report data memory in the first embodiment of the present invention;
[0039] Figure 4 This is a schematic diagram of a report containing 100 cells, as exemplified in the first embodiment of the present invention;
[0040] Figure 5 This is a schematic diagram of a report data memory sharing device according to the second embodiment of the present invention. Detailed Implementation
[0041] The technical solutions of this invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0042] It should be noted that the step numbers in this document are only for the convenience of explaining the specific embodiments and are not intended to limit the order in which the steps are executed. The method provided in this embodiment can be executed by relevant terminal devices, and the following description uses a processor as the execution subject.
[0043] like Figure 2 As shown, the first embodiment provides a method for sharing report data in memory, including steps S1 to S4:
[0044] S1. Locate the report area of the target table, extract the data of each cell in the report area, and obtain several cell data;
[0045] S2. Classify the data in each cell into shareable data or non-shareable data, resulting in several shareable data and several non-shareable data.
[0046] S3. Create a shared memory for all shareable data, and determine the memory address of each shareable data based on the shared memory;
[0047] S4. Write the memory addresses of each non-shareable data and each shareable data to each cell in the report area.
[0048] As an example, in step S1, according to actual business needs, a target table is obtained, the report area of the target table is located, and the data of each cell in the report area is extracted, including cell values such as amount and quantity, as well as cell styles such as background color and font, to obtain several cell data.
[0049] In step S2, it is determined whether the data in each cell can be shared. All shareable cell data is classified as shareable data, and all non-shareable cell data is classified as non-shareable data, resulting in a number of shareable data and a number of non-shareable data.
[0050] In step S3, after obtaining all shareable data, a shared memory is created for all shareable data, and a shared object is configured for each shareable data in the shared memory. The memory address of the shared object corresponding to each shareable data in the shared memory is determined as the memory address of each shareable data.
[0051] In step S4, each cell in the report area is traversed, and the memory addresses of all non-shareable data and all shareable data belonging to the current cell are written to the current cell. This process is repeated in each cell of the report area to write the memory addresses of each non-shareable data and each shareable data, thus completing the storage of report data.
[0052] This embodiment employs a report data memory sharing approach, storing shareable data from the report in shared memory and storing non-shareable data in independent memory. When multiple users operate on the shareable data in the report, they can directly reference the memory address of the shareable data in shared memory without needing to create independent memory for the shareable data. When multiple users operate on the non-shareable data in the report, only independent memory needs to be created for the non-shareable data. This enables report data memory sharing when multiple users operate on the report, improving memory utilization.
[0053] In a preferred embodiment, before extracting data from each cell in the report area of the target table to obtain several cell data, the method further includes: responding to a report data memory sharing request initiated by the management terminal, extracting a two-dimensional matrix from the report data memory sharing request, and locating the report area of the target table based on the two-dimensional matrix.
[0054] It should be noted that management terminals include communication devices such as mobile phones, computers, and tablets held by management personnel that can connect to the server.
[0055] As an example, when the management terminal initiates a report data memory sharing request for the target table, it responds to the report data memory sharing request, extracts a two-dimensional matrix from the report data memory sharing request, and selects the area where the two-dimensional matrix in the target table is located as the report area.
[0056] In a preferred embodiment, after writing the memory addresses of each non-shareable data and each shareable data to each cell in the report area, the method further includes: responding to a report data operation request initiated by any user terminal, extracting the target cell and target cell data from the report data operation request; when the target cell data is shareable data, writing the memory address of the shared object corresponding to the target cell data in the shared memory to the target cell; when the target cell data is non-shareable data, writing the target cell data to the target cell.
[0057] It should be noted that user terminals include communication devices such as mobile phones, computers, and tablets that can connect to the server.
[0058] As an example, when any user terminal initiates a report data operation request for a report area, the system responds to the report data operation request and extracts the target cell and target cell data from the request. The target cell is the cell the user intends to operate on, and the target cell data is the data the user intends to write to the target cell.
[0059] Upon obtaining the target cell data, it is determined whether the target cell data can be shared. If so, the target cell data is considered shareable; otherwise, it is considered non-shareable. When the target cell data is shareable, a shared object corresponding to the target cell data is queried or created in shared memory, and the memory address of the shared object corresponding to the target cell data is written to the target cell. When the target cell data is non-shareable, the target cell data is written to the target cell, and the target cell data is stored in the independent memory corresponding to the target cell.
[0060] This embodiment employs a report data memory sharing approach, storing shareable data from the report in shared memory and storing non-shareable data in independent memory. When multiple users operate on the shareable data in the report, they can directly reference the memory address of the shareable data in shared memory without needing to create independent memory for the shareable data. When multiple users operate on the non-shareable data in the report, only independent memory needs to be created for the non-shareable data. This enables report data memory sharing when multiple users operate on the report, improving memory utilization.
[0061] In a preferred embodiment, when the target cell data is shareable data, writing the memory address of the shared object corresponding to the target cell data in the shared memory into the target cell specifically involves: when the target cell data is shareable data, querying whether there is a shared object corresponding to the target cell data in the shared memory; if there is a shared object corresponding to the target cell data in the shared memory, then writing the memory address of the shared object into the target cell; if there is no shared object corresponding to the target cell data in the shared memory, then creating a new shared object in the shared memory and writing the memory address of the new shared object into the target cell.
[0062] As an example, when the target cell data is shareable data, first check if there is a shared object corresponding to the target cell data in the shared memory. If there is, the memory address of the queried shared object is directly written to the target cell. If not, a new shared object is created in the shared memory for the target cell data, and the memory address of the new shared object is written to the target cell.
[0063] This embodiment improves the efficiency of report data operations by querying the shared memory for a shared object corresponding to the target cell data when multiple users operate on the shareable data in the report. If a shared object exists, the memory address of the existing shared object corresponding to the target cell data is directly written to the target cell. If not, a new shared object is created in the shared memory for the target cell data, so that the memory address of the new shared object can be directly referenced when writing target cell data to other cells in the report area.
[0064] In a preferred embodiment, classifying each cell data into shareable or non-shareable data to obtain several shareable data and several non-shareable data specifically involves: based on a predefined list of shareable data types, classifying each cell data into shareable or non-shareable data according to the data type of each cell data to obtain several shareable data and several non-shareable data.
[0065] As an example, based on actual business needs, the data types of shareable data are organized, and a list of shareable data types is predefined. Based on the predefined list of shareable data types, each cell's data is classified into shareable or non-shareable data according to its data type, resulting in several shareable data items and several non-shareable data items.
[0066] In a preferred embodiment, the step of classifying each cell data into shareable data or non-shareable data based on a predefined list of shareable data types, according to the data type of each cell data, to obtain a number of shareable data and a number of non-shareable data, includes: for each cell data, when the cell data is a cell table, classifying the cell data as shareable data; when the cell data is a cell value, classifying the cell data as non-shareable data, to obtain a number of shareable data and a number of non-shareable data.
[0067] As an example, such as Figure 3 As shown, based on actual business needs, cell styles such as background color and font are selected as shareable data, while cell values such as amount and quantity are considered non-shareable data. The data types of the cell styles are organized, and a list of shareable data types is defined. For each cell, the data type is retrieved and compared with each data type in the predefined list of shareable data types. If the comparison is successful, the cell is considered a cell style; otherwise, it is considered a cell value. When the cell data is a cell style, it is classified as shareable data; when the cell data is a cell value, it is classified as non-shareable data, resulting in several shareable and several non-shareable data sets.
[0068] In a preferred embodiment, determining the memory address of each shareable data based on shared memory specifically involves: traversing each shareable data, querying whether there is a shared object corresponding to the current shareable data in shared memory; if there is, determining the memory address of the shared object as the memory address of the current shareable data; if not, creating a new shared object in shared memory, and determining the memory address of the new shared object as the memory address of the current shareable data.
[0069] As an example, after creating a shared memory for all shareable data, each shareable data is traversed to check if there is a shared object corresponding to the current shareable data in the shared memory. If there is, the memory address of the shared object is determined as the memory address of the current shareable data. If not, a new shared object is created in the shared memory, and the memory address of the new shared object is determined as the memory address of the current shareable data. In this way, a shared object is configured for each shareable data in the shared memory, and the memory address of each shareable data is determined.
[0070] This embodiment improves memory utilization by assigning multiple shareable data with the same value to the same shared object in shared memory.
[0071] To more clearly illustrate the report data memory sharing method provided in the first embodiment, let's assume a report containing 100 cells, such as... Figure 4 As shown, each cell value object occupies 8 bytes of memory, each cell table object (such as the first row table and the remaining rows table) occupies 100 bytes of memory, and each memory address occupies 8 bytes of memory.
[0072] Using existing technology, the memory usage for displaying or manipulating this report is:
[0073] Single user: 100 * (100 + 8) = 10,800 bytes;
[0074] 100 concurrent users: 100*(100+8)*100=1,080,000 bytes.
[0075] The memory used for displaying or manipulating this report, according to the report data sharing method provided in the first embodiment, is as follows:
[0076] For a single user: 100*(8+8)+2*100=1,800 bytes;
[0077] 100 concurrent users: 100*(8+8)*100+2*100=160,200 bytes.
[0078] A comparison of the report data memory sharing method provided in the first embodiment with existing technologies:
[0079] Displaying this report for a single user can save memory: 10,800 - 1,800 = 9,000 bytes;
[0080] Displaying this report with 100 concurrent users can save 919,800 bytes of memory: 1,080,000 - 160,200 = 919,800 bytes.
[0081] It should be noted that, for simplicity, the example report has 100 cells; the actual number of cells in a report is far greater (the current software system can display a maximum of 500,000 cells). As the number of cells and concurrent users increases, the memory savings will grow exponentially.
[0082] Clearly, the report data memory sharing method provided in the first embodiment can significantly save memory and improve memory utilization.
[0083] Based on the same inventive concept as the first embodiment, the second embodiment provides as follows: Figure 5The illustrated report data memory sharing device includes: a data extraction module 21, used to locate the report area of the target table, extract the data of each cell in the report area, and obtain several cell data; a data classification module 22, used to classify each cell data into shareable data or non-shareable data, and obtain several shareable data and several non-shareable data; a memory configuration module 23, used to create a shared memory for all shareable data, and determine the memory address of each shareable data according to the shared memory; and a data writing module 24, used to write the memory addresses of each non-shareable data and each shareable data to each cell in the report area.
[0084] In a preferred embodiment, the data extraction module 21 is further configured to, before extracting data from each cell in the report area of the target table and obtaining several cell data, respond to a report data memory sharing request initiated by the management terminal, extract a two-dimensional matrix from the report data memory sharing request, and locate the report area of the target table based on the two-dimensional matrix.
[0085] In a preferred embodiment, the report data memory sharing device further includes: a data sharing module, which, after writing the memory addresses of each non-shareable data and each shareable data to each cell in the report area, responds to a report data operation request initiated by any user terminal, extracts the target cell and target cell data from the report data operation request, and when the target cell data is shareable data, writes the memory address of the shared object corresponding to the target cell data in the shared memory to the target cell, and when the target cell data is non-shareable data, writes the target cell data to the target cell.
[0086] In a preferred embodiment, when the target cell data is shareable data, writing the memory address of the shared object corresponding to the target cell data in the shared memory into the target cell specifically involves: when the target cell data is shareable data, querying whether there is a shared object corresponding to the target cell data in the shared memory; if there is a shared object corresponding to the target cell data in the shared memory, then writing the memory address of the shared object into the target cell; if there is no shared object corresponding to the target cell data in the shared memory, then creating a new shared object in the shared memory and writing the memory address of the new shared object into the target cell.
[0087] In a preferred embodiment, the data classification module 22 is specifically used to classify each cell data into shareable data or non-shareable data according to the data type of each cell data based on a predefined list of shareable data types, thereby obtaining a number of shareable data and a number of non-shareable data.
[0088] In a preferred embodiment, the step of classifying each cell data into shareable data or non-shareable data based on a predefined list of shareable data types, according to the data type of each cell data, to obtain a number of shareable data and a number of non-shareable data, includes: for each cell data, when the cell data is a cell table, classifying the cell data as shareable data; when the cell data is a cell value, classifying the cell data as non-shareable data, to obtain a number of shareable data and a number of non-shareable data.
[0089] In a preferred embodiment, the memory configuration module 23 is specifically used to traverse each shareable data, query whether there is a shared object corresponding to the current shareable data in the shared memory, if there is, then the memory address of the shared object is determined as the memory address of the current shareable data, if not, then a new shared object is created in the shared memory, and the memory address of the new shared object is determined as the memory address of the current shareable data.
[0090] Based on the same inventive concept as the first embodiment, the third embodiment provides a report data memory sharing device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. The memory is coupled to the processor, and when the processor executes the computer program, it implements the report data memory sharing method as described in the first embodiment and achieves the same beneficial effects.
[0091] Based on the same inventive concept as the first embodiment, the fourth embodiment provides a computer-readable storage medium including a stored computer program, wherein, when the computer program is running, it controls the device where the computer-readable storage medium is located to execute the report data memory sharing method as described in the first embodiment, and can achieve the same beneficial effects.
[0092] Based on the same inventive concept as the first embodiment, the fifth embodiment provides a computer program product that, when run on a computer, enables the computer to execute the report data memory sharing method as described in the first embodiment, and achieves the same beneficial effects.
[0093] In summary, implementing the embodiments of the present invention has the following beneficial effects:
[0094] By locating the report area of the target table, data from each cell in the report area is extracted, resulting in several cell data sets. Each cell data set is then categorized into shareable and non-shareable data, resulting in several shareable and non-shareable data sets. A shared memory is created for all shareable data, and the memory address of each shareable data set is determined based on the shared memory. The memory addresses of each non-shareable and shareable data set are then written into each cell in the report area, completing the storage of the report data. This embodiment of the invention employs a shared memory approach for report data. Shareable data in the report is stored in shared memory, while non-shareable data is stored in independent memory. When multiple users operate on the shareable data in the report, they can directly reference the memory address of the shareable data in shared memory without needing to create independent memory for the shareable data. When multiple users operate on the non-shareable data in the report, only independent memory needs to be created for the non-shareable data. This enables shared memory for report data during multi-user operations, improving memory utilization.
[0095] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.
[0096] 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 can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above embodiments. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
Claims
1. A method for sharing report data in memory, characterized in that, include: Locate the report area of the target table, extract the data of each cell in the report area, and obtain several cell data; Each cell data is classified into shareable data and non-shareable data, resulting in a plurality of shareable data and a plurality of non-shareable data. Create a shared memory for all the shareable data, and determine the memory address of each of the shareable data based on the shared memory; Each cell in the report area contains the corresponding non-shareable data and the corresponding memory address of the shareable data. In response to a report data operation request initiated by any user terminal, extract the target cell and target cell data from the report data operation request; When the target cell data is shareable data, the memory address of the shared object corresponding to the target cell data in the shared memory is written into the target cell; When the target cell data is non-shareable data, the target cell data is written to the target cell.
2. The report data memory sharing method as described in claim 1, characterized in that, Before extracting data from each cell in the report area of the target table to obtain a plurality of cell data, the process further includes: In response to a report data memory sharing request initiated by the management terminal, a two-dimensional matrix is extracted from the report data memory sharing request to locate the report area of the target table based on the two-dimensional matrix.
3. The report data memory sharing method as described in claim 1, characterized in that, When the target cell data is shareable data, the memory address of the shared object corresponding to the target cell data in the shared memory is written into the target cell, specifically: When the target cell data is shareable data, query whether there is a shared object corresponding to the target cell data in the shared memory; If the shared memory contains a shared object corresponding to the data in the target cell, then the memory address of the shared object is written into the target cell; If there is no shared object corresponding to the target cell data in the shared memory, a new shared object is created in the shared memory, and the memory address of the new shared object is written to the target cell.
4. The report data memory sharing method as described in claim 1, characterized in that, The step of classifying each cell data into shareable data or non-shareable data to obtain a plurality of shareable data and a plurality of non-shareable data is as follows: Based on a predefined list of shareable data types, each cell data is classified into shareable data and non-shareable data according to its data type, resulting in a number of shareable data and a number of non-shareable data.
5. The report data memory sharing method as described in claim 4, characterized in that, The method, based on a predefined list of shareable data types, categorizes each cell data into shareable or non-shareable data according to its data type, resulting in a plurality of shareable data and a plurality of non-shareable data, including: For each cell data, when the cell data is a cell table, the cell data is classified as shareable data; when the cell data is a cell value, the cell data is classified as non-shareable data, resulting in several shareable data and several non-shareable data.
6. The report data memory sharing method as described in claim 1, characterized in that, The step of determining the memory address of each shareable data based on the shared memory specifically involves: Iterate through each piece of shareable data, and check if there is a shared object corresponding to the current shareable data in the shared memory. If there is, the memory address of the shared object is determined as the memory address of the current shareable data. If not, a new shared object is created in the shared memory, and the memory address of the new shared object is determined as the memory address of the current shareable data.
7. A report data memory sharing device, characterized in that, include: The data extraction module is used to locate the report area of the target table, extract the data of each cell in the report area, and obtain several cell data. The data classification module is used to classify each cell data into shareable data and non-shareable data, thereby obtaining a number of shareable data and a number of non-shareable data. A memory configuration module is used to create a shared memory for all the shareable data and determine the memory address of each of the shareable data based on the shared memory; The data writing module is used to write each non-shareable data to each cell in the report area, and the memory address to which each shareable data is written. The data sharing module is used to respond to report data operation requests initiated by any user terminal, extract the target cell and target cell data from the report data operation request, and when the target cell data is shareable data, write the memory address of the shared object corresponding to the target cell data in the shared memory into the target cell; when the target cell data is non-shareable data, write the target cell data into the target cell.
8. A report data memory sharing device, characterized in that, The system includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, the memory being coupled to the processor, and the processor implementing the report data memory sharing method as described in any one of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to perform the report data memory sharing method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Table editing method, device and equipment, and storage medium
CN113268964A
Method and system for processing formatting information in a spreadsheet
US5231577A
