Data processing method and device and computer readable storage medium

By receiving and storing the json string of Excel files, generating version identifiers and storing them in key:value, combining back-end services to realize Excel file historical version management, solving the existing technology's inability to meet the needs of complex report scenarios, and providing lightweight Easy to embedded and low cost online form solutions.

CN119067093APending Publication Date: 2024-12-03CHINA MERCHANTS BANK
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411064948.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-05
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

The existing commercial or professional online Excel system has shortcomings in implementing Excel file history version management, which cannot meet the needs of complex reporting scenarios, resulting in poor user experience and high development costs.

Method used

By receiving the json string of Excel file sent by the front-end, the file ID and version time are generated, and Excel files are stored based on key:value, the version identification is managed, and the open source front-end table is secondary encapsulated, and the version is automatically saved and versioned is added. List query and version viewing interfaces, automatically call remote supporting back-end services.

Benefits of technology

It realizes a lightweight online form solution, meets the personalized high-level requirements of the business system for online forms, and natively supports document history version management, with the advantages of lightweight, easy to embed, good experience and low cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119067093A_ABST
    Figure CN119067093A_ABST
Patent Text Reader

Abstract

The invention discloses a data processing method and device and a computer readable storage medium. The method comprises the steps that a to-be-stored json string corresponding to an Excel file sent by a front end is received; obtaining a file ID and version time corresponding to the Excel file; based on the file ID and the version time, generating a version identification key corresponding to the Excel file; the Excel file is stored on the basis of a key: value mode, the key is the version identifier, and the value is the json string to be stored. According to the method, the version identifier is generated through the file ID corresponding to the Excel file and the version time, and the version identifier and the json string of the Excel file are stored in a key: value mode, so that management of the historical version of the Excel file is realized through the version identifier.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a data processing method, device and computer-readable storage medium. Background Art

[0002] The financial industry has a large number of reporting or data collection and registration demand scenarios. These scenarios often require the system to support advanced functions such as online data reporting / registration, display, version records, and historical version viewing. Many systems choose to directly jump to existing shared document platforms and use the platform's capabilities to support such business scenarios. This has spawned a large number of commercial or professional online Excel systems, such as China Merchants Bank's WPS Cloud Documents, the Internet's WeChat Cloud Documents, and Kingsoft Documents.

[0003] Since commercial or professional online Excel systems are too large and are a general tool platform, if you want to embed them into a third-party system without users noticing, the development cost of integration and adaptation is too high and the practicality is too low. Therefore, a large number of systems will use some lightweight Excel plug-ins to implement, such as SpreadJs, EasyExcel, LuckySheet, etc., which can meet basic editing and display requirements. The solutions adopted are basically pure front-end web plug-in tools, which are lightweight, low-cost, and highly compatible. They are very convenient to embed and use in business systems for specific business scenarios. However, because they only have relatively simple front-end display and editing functions, they cannot meet some complex reporting scenarios that require viewing and comparing differences between historical versions of files.

[0004] Therefore, how to manage the historical versions of Excel files through Excel plug-ins is a problem that urgently needs to be solved. Summary of the invention

[0005] The main purpose of the present application is to provide a data processing method, device and computer-readable storage medium, aiming to solve the technical problem of how to manage historical versions of Excel files through an Excel plug-in.

[0006] To achieve the above object, the present application provides a data processing method, which comprises the following steps:

[0007] Receive the json string to be stored corresponding to the Excel file sent by the front end;

[0008] Get the file ID and version time corresponding to the Excel file;

[0009] Based on the file ID and version time, generate a version identification key corresponding to the Excel file;

[0010] The Excel file is stored in a key:value manner, wherein the key is the version identifier and the value is the json string to be stored.

[0011] Furthermore, the data processing method further includes:

[0012] When receiving a file viewing request, obtaining a first version identifier corresponding to the file viewing request;

[0013] Get the target JSON string corresponding to the first version identifier;

[0014] Generate an Excel file to be displayed based on the target json string, and display the Excel file to be displayed.

[0015] Furthermore, the data processing method further includes:

[0016] Get the edited Excel files that have been edited on the current day in the currently stored Excel files;

[0017] Based on the edited Excel file in the currently stored Excel files, obtaining the Excel file to be cleaned up;

[0018] Determine the Excel files to be deleted in the Excel files to be cleaned up based on the version preservation strategy, and delete the Excel files to be deleted.

[0019] Furthermore, the step of obtaining the Excel file to be cleaned up based on the edited Excel file in the currently stored Excel file includes:

[0020] Based on the second version identifier corresponding to the edited Excel file, obtaining a target file ID corresponding to the edited Excel file;

[0021] From the currently stored Excel files, obtain the Excel file to be cleaned corresponding to the target file ID.

[0022] Furthermore, the step of determining the Excel files to be deleted in the Excel files to be cleaned up based on the version preservation strategy includes:

[0023] Based on the third version identifier corresponding to the Excel file to be cleaned up, obtaining the target version time corresponding to the Excel file to be cleaned up;

[0024] Based on the target version time, obtain the latest Excel file corresponding to the version preservation strategy;

[0025] Based on the latest Excel file, the Excel files to be deleted in the Excel files to be cleaned up are determined.

[0026] Furthermore, the step of obtaining the latest Excel file corresponding to the version preservation strategy based on the target version time includes:

[0027] Decompose the date of each target version time to obtain the decomposed version time;

[0028] Based on the decomposed version time and version preservation strategy, the Excel files to be cleaned are grouped to obtain multiple Excel file groups;

[0029] Based on the version preservation strategy, the latest Excel file is obtained in each Excel file group.

[0030] Furthermore, before the step of receiving the json string to be stored corresponding to the Excel file sent by the front end, the data processing method further includes:

[0031] The front end obtains the json string to be stored corresponding to the Excel file;

[0032] The front end sends the json string to be stored corresponding to the Excel file based on the SDK interface.

[0033] Furthermore, the step of the front end obtaining the json string to be stored corresponding to the Excel file includes:

[0034] Get the data size corresponding to the json string;

[0035] If the data size is greater than a preset value, compress the JSON string to obtain the JSON string to be stored;

[0036] If the data is less than or equal to the preset value, the JSON string is used as the JSON string to be stored.

[0037] In addition, to achieve the above-mentioned purpose, the present application also provides a data processing device, which includes: a memory, a processor, and a data processing program stored in the memory and executable on the processor, and the data processing program implements the steps of the aforementioned data processing method when executed by the processor.

[0038] In addition, to achieve the above-mentioned purpose, the present application also provides a computer-readable storage medium, on which a data processing program is stored, and when the data processing program is executed by a processor, the steps of the aforementioned data processing method are implemented.

[0039] The present application determines the json string to be stored based on the json string corresponding to the Excel file sent by the front end; then obtains the file ID and version time corresponding to the Excel file; then generates the version identification key corresponding to the Excel file based on the file ID and version time; then stores the Excel file based on the key:value method, wherein the key is the version identification, and the value is the json string to be stored, generates the version identification through the file ID and version time corresponding to the Excel file, and stores the version identification and the json string of the Excel file in the key:value method, so as to realize the management of the historical version of the Excel file through the version identification.

[0040] At the same time, the open source front-end table is repackaged, and interfaces such as automatic version saving, version list query, and version viewing are added. The interface automatically calls the remote supporting back-end service to realize a complete set of lightweight online table solutions. This implementation solution can well meet the personalized high-level requirements of the business system for online tables, and natively supports document history version management. It has the advantages of lightweight, easy to embed, good experience, and low cost. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0042] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0043] Figure 1 A flowchart of the first embodiment of the data processing method of the present application is provided;

[0044] Figure 2 A schematic diagram of a scenario of an embodiment of the data processing method of the present application;

[0045] Figure 3 A schematic diagram of a scenario of another embodiment of the data processing method of the present application;

[0046] Figure 4 This is a schematic diagram of the module structure of the data processing device according to an embodiment of the present application.

[0047] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0048] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0049] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0050] The main solution of this application is: based on the json string corresponding to the Excel file sent by the front end, determine the json string to be stored; obtain the file ID and version time corresponding to the Excel file; based on the file ID and version time, generate the version identification key corresponding to the Excel file; store the Excel file based on the key:value method, wherein the key is the version identification and the value is the json string to be stored.

[0051] At present, there are a large number of reporting or data collection and registration demand scenarios in the financial industry. These scenarios often require the system to support advanced functions such as online filling / registration, display, version records, and historical version viewing of data. Many systems choose to directly jump to the existing shared document platform and use the platform's capabilities to support such business scenarios. This has spawned a large number of commercial or professional online Excel systems, such as China Merchants Bank's WPS Cloud Documents, the Internet's WeChat Cloud Documents, and Kingsoft Documents.

[0052] Because commercial or professional online Excel systems are too large and are a general tool platform, if you want to use the functions of these document platforms in a system or subsystem for specific scenarios or business directions by embedding them, users of the target system often have to switch back and forth between the two systems, which will result in a very obvious sense of system fragmentation in use. For example, when a user is originally on a fund management platform and wants to view, edit, and save online reports, the fund management platform opens a new tab page to jump to the China Merchants Bank WPS Cloud Document or other online Excel spreadsheet system to perform the next step. This interactive method has a poor user experience and has the disadvantages of difficult data sharing and poor scalability. If you want to embed a third-party system without users noticing, the development cost of integration and adaptation is too high and the practicality is too low.

[0053] Therefore, a large number of systems will use some lightweight Excel plug-ins to achieve this, such as SpreadJs, EasyExcel, LuckySheet, etc., which can meet basic editing and display requirements. The solutions adopted are basically pure front-end web plug-in tools, which are lightweight, low-cost, and highly compatible. They are very convenient to embed and use in business systems for specific business scenarios. However, because they only have relatively simple front-end display and editing functions, they cannot meet some complex report scenarios that require viewing and comparing historical versions of files.

[0054] Therefore, how to manage the historical versions of Excel files through Excel plug-ins is a problem that urgently needs to be solved.

[0055] This application generates a version identifier through the file ID and version time corresponding to the Excel file, and uses the key:value method to store the version identifier and the json string of the Excel file, so as to facilitate the management of historical versions of the Excel file through the version identifier.

[0056] It should be noted that the execution subject of this embodiment may be a data processing device, or a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or a data processing device capable of realizing the above functions, etc., and this embodiment does not specifically limit this. The following takes the data processing device as the execution subject as an example to illustrate this embodiment and the following embodiments.

[0057] Based on this, this application proposes a data processing method of the first embodiment, please refer to Figure 1 , the data processing method includes steps S101 to S104:

[0058] Step S101, determining the json string to be stored based on the json string corresponding to the Excel file received and sent by the front end;

[0059] In this embodiment, secondary packaging is performed based on the existing Excel plug-in (such as LuckySheet), which encapsulates advanced interfaces such as version saving, version list viewing, and historical version viewing. Each interface automatically connects to the supporting remote back-end service to achieve historical version preservation and tracing.

[0060] This embodiment provides an out-of-the-box integration (embedded) method. The front-end report is implemented as pure js code. The user only needs to register the business system information and version preservation strategy that need to use this solution in the registration service supporting this solution, and then copy the js file provided by this embodiment (hereinafter referred to as SDK) to your own project, and then import it through a relative path to complete the report integration. When using it, directly call the externally exposed interface that the SDK has packaged. The SDK will automatically send version-related information to the supporting back-end service, and the back-end service will save the version to the database; in addition, this application also supports users to provide their own database when registering, and will save the historical version to the database desired by the business party.

[0061] The backend service is a Java service developed based on the SpringBoot framework, which includes three modules: version saving module, version query module, and historical version cleaning module. The database currently uses MySQL for storage. Please refer to Figure 2 Among them, the version preservation module is mainly used for preserving historical versions, including data reception, key generation, data preservation, etc. The version query module is mainly used for historical version list query and specific version data query, including two steps: data query and result assembly. The version cleanup module is a scheduled task module, which is used to clean up the version according to the version control strategy every day, including scheduled task triggers, executors, etc. The backend service is deployed in the native cloud server of China Merchants Bank, using a multi-instance deployment method. It can horizontally expand instances, CPU and memory according to the number of users. The database can be flexibly stored according to the database registered by the user, and there will be no bottleneck in the overall backend service performance.

[0062] In this embodiment, when the front end calls the save interface of the table, the interface automatically obtains the file of the table and serializes it into a json string, and based on the json string, sends the json string to be stored corresponding to the Excel file to the background service, and the background service receives the json string to be stored corresponding to the Excel file.

[0063] In a feasible implementation manner, before step S101, the data processing method may further include steps S105 to S106:

[0064] Step S105, the front end obtains the json string to be stored corresponding to the Excel file;

[0065] Step S106: The front end sends the json string corresponding to the Excel file based on the SDK interface.

[0066] In this embodiment, when saving an Excel file, the built-in interception method obtains the json string corresponding to the Excel file through the getAllSheets method of the LuckySheet table, and obtains the json string to be stored based on the json string. Specifically, in a feasible implementation, step S105 may include steps S1051 to S1053:

[0067] Step S1051, obtaining the data size corresponding to the json string;

[0068] Step S1052: If the data size is greater than a preset value, compress the JSON string to obtain the JSON string to be stored.

[0069] Step S1053: If the data is less than or equal to a preset value, the JSON string is used as the JSON string to be stored.

[0070] In this embodiment, after the front end obtains the json string, it obtains the data size corresponding to the json string, and compares the data size with a preset value. If the data size is greater than the preset value, the json string is compressed to obtain the json string to be stored. If the data is less than or equal to the preset value, the json string is used as the json string to be stored to prevent the json string from being too large due to the file being too large, affecting the transmission efficiency and storage cost. The open source component "pako.js" can be used for json compression and decompression.

[0071] After obtaining the json string to be stored corresponding to the Excel file, the json string to be stored corresponding to the Excel file is sent to the backend service based on the SDK interface. The front end can also send the file ID and version time of the Excel file to the backend service at the same time.

[0072] It should be noted that the Json string is the binary serialization result of the Excel file, which stores the name, number of rows, number of columns, formulas, formats and other information of each cell of the current worksheet. A typical serialized json string contains the following core elements: worksheet name, worksheet color, worksheet index, activation status, worksheet order, whether hidden, worksheet zoom ratio, number of rows, number of columns, font information, alignment information, merged cells, table row height, table column width, hidden rows, hidden columns, borders, cell data used for initialization, cell data used for updating and storage, left and right scroll bar positions, up and down scroll bar positions, selected area, conditional formatting, formula chain, whether pivot table, pivot table settings, filter range, filter configuration, alternating colors, custom alternating colors, frozen rows and columns, chart configuration, position of all rows, position of all columns, width of worksheet area, height of worksheet area, and an indicator that this sheet has been loaded.

[0073] Step S102, obtaining the file ID and version time corresponding to the Excel file;

[0074] In this embodiment, after obtaining the json string to be stored, the file ID and version time corresponding to the Excel file are obtained, wherein the front end can simultaneously upload the file ID and version time corresponding to the Excel file when uploading the json string to be stored.

[0075] Step S103, generating a version identification key corresponding to the Excel file based on the file ID and version time;

[0076] In this embodiment, after obtaining the file ID and version time, the background service generates a version identification key corresponding to the Excel file based on the file ID and version time, where the key can be file ID+version time, for example, 0001_2024-12-30:12:00:00.

[0077] Step S104, storing the Excel file based on the key:value method, wherein the key is the version identifier and the value is the json string to be stored.

[0078] In this embodiment, after obtaining the version identification key, the background service stores the Excel file based on the key:value method, wherein the key is the version identification and the value is the json string to be stored (document serialized json).

[0079] The data processing method proposed in this embodiment determines the json string to be stored based on the json string corresponding to the Excel file sent by the front end; then obtains the file ID and version time corresponding to the Excel file; then generates the version identification key corresponding to the Excel file based on the file ID and version time; then stores the Excel file based on the key:value method, wherein the key is the version identification, and the value is the json string to be stored, generates the version identification through the file ID and version time corresponding to the Excel file, and stores the version identification and the json string of the Excel file in the key:value method, so as to realize the management of the historical version of the Excel file through the version identification.

[0080] At the same time, the open source front-end table is repackaged, and interfaces such as automatic version saving, version list query, and version viewing are added. The interface automatically calls the remote supporting back-end service to realize a complete set of lightweight online table solutions. This implementation solution can well meet the personalized high-level requirements of the business system for online tables, and natively supports document history version management. It has the advantages of lightweight, easy to embed, good experience, and low cost.

[0081] In a feasible implementation manner, the data processing method may further include steps S201 to S203:

[0082] Step S201, when a file viewing request is received, obtaining a first version identifier corresponding to the file viewing request;

[0083] Step S202, obtaining a target JSON string corresponding to the first version identifier;

[0084] Step S203: Generate an Excel file to be displayed based on the target json string, and display the Excel file to be displayed.

[0085] In this embodiment, the user can fuzzily search for all matching version records according to the file key. When the user clicks to select a specific version to view, a file viewing request is triggered. The background service can obtain the first version identification key corresponding to the file viewing request, and obtain the target json string corresponding to the first version identification in all stored Excel files (json strings).

[0086] After obtaining the target json string, generate the Excel file to be displayed based on the target json string, that is, deserialize the target json string into the Excel file to be displayed, and display the Excel file to be displayed. For example, search for the historical version of the 001 file, and search for 001_2023-12-30:12:00:00,001_2023-12-29:12:00:00,001_ If there are four versions, such as 2023-12-28:12:00:00, 001_2023-11-30:12:00:00, etc., the date after the key value is truncated to return the version record [2023-12-30:12:00:00, 2023-12-29:12:00:00, 2023-12-28:12:00:00, 2023-11-30:12:00:00], and displayed in a list, such as Figure 3 shown.

[0087] The data processing method proposed in this embodiment obtains the first version identifier corresponding to the file viewing request when receiving the file viewing request; then obtains the target json string corresponding to the first version identifier; then generates an Excel file to be displayed based on the target json string, and displays the Excel file to be displayed. The version query of the Excel file is realized through the version identifier, and then the query management of the historical version of the Excel file is realized.

[0088] In a feasible implementation manner, the data processing method may further include steps S301 to S303:

[0089] Step S301, obtaining the edited Excel files that have been edited on the current day from the currently stored Excel files;

[0090] Step S302, obtaining an Excel file to be cleaned up based on the edited Excel file in the currently stored Excel files;

[0091] Step S303: Determine the Excel files to be deleted in the Excel files to be cleaned up based on the version preservation strategy, and delete the Excel files to be deleted.

[0092] It should be noted that the present embodiment can provide a flexible version management strategy. When the user system embeds the present solution, it adopts the form of registration to enter the basic information of the user system, and can set the version preservation strategy at the same time. The version strategy adopts a template expression to perform a flexible version control strategy based on the common use habits of historical versions. The template expression is 5 variables with spaces, from left to right (separated by spaces): "Latest version number month date month quarter year", "* represents all possible situations, and 0 represents no record; for example, "10 1-5***" means that the latest 10 versions and the latest versions at the end of each year, each quarter, each month, and the 1st to 5th days of each month need to be retained, and other historical versions can be archived in time; "10 0***" means that the latest 10 versions and the latest versions at the end of each year, each quarter, and each month need to be retained; "10****" means that the latest 10 versions and the latest versions at the end of each year, each quarter, each month, and each day need to be retained; "50 "1-9**" means that you need to keep the latest five versions and the latest version at the end of each year, each quarter, and each month from January to September; "5 0 5 1*" means that you need to keep the latest five versions and the latest version at the end of each year, the end of the first quarter, and May.

[0093] In this embodiment, the edited Excel files that have been edited on the current day can be obtained on a regular basis from the currently stored Excel files. For example, the background service triggers the version archiving task at 0:00:00 every day to obtain the edited Excel files that have been edited on the current day (the day before 0:00:00). The edited Excel files are the Excel files corresponding to the json strings that have been edited. In a feasible implementation, step S302 may include steps S3021 to S3022:

[0094] Step S3021, based on the second version identifier corresponding to the edited Excel file, obtaining a target file ID corresponding to the edited Excel file;

[0095] Step S3022: Obtain the Excel file to be cleaned corresponding to the target file ID from the currently stored Excel files.

[0096] In this embodiment, the background service obtains the second version identifier corresponding to the edited Excel file, and based on the second version identifier, obtains the target file ID corresponding to the edited Excel file, and then obtains the Excel file to be cleaned corresponding to the target file ID in the currently stored Excel file to accurately obtain the Excel file to be cleaned.

[0097] After the edited Excel file is acquired, an Excel file to be cleaned up is acquired based on the edited Excel file in the currently stored Excel files, wherein the Excel file to be cleaned up is an Excel file associated with the edited Excel file.

[0098] In this embodiment, after obtaining the Excel files to be cleaned up, the background service determines the Excel files to be deleted in the Excel files to be cleaned up based on the version preservation strategy, and deletes the Excel files to be deleted. Specifically, in a feasible implementation manner, step S303 may include steps S3031 to S3033:

[0099] Step S3031, based on the third version identifier corresponding to the Excel file to be cleaned up, obtaining the target version time corresponding to the Excel file to be cleaned up;

[0100] Step S3032, based on the target version time, obtaining the latest Excel file corresponding to the version preservation strategy;

[0101] Step S3033: Based on the latest Excel file, determine the Excel files to be deleted in the Excel files to be cleaned up.

[0102] In this embodiment, the background service obtains the target version time corresponding to the Excel file to be cleaned up based on the third version identifier corresponding to the Excel file to be cleaned up, and obtains the latest Excel file corresponding to the version preservation strategy based on the target version time; specifically, in a feasible implementation manner, step S3032 may include steps a1 to a3:

[0103] Step a1, decomposing the date of each target version time to obtain the decomposed version time;

[0104] Step a2: grouping the Excel files to be cleaned up based on the decomposed version time and version preservation strategy to obtain multiple Excel file groups;

[0105] Step a3: based on the version preservation strategy, obtaining the latest Excel file in each Excel file group.

[0106] In this embodiment, the background service decomposes the date of each target version time to obtain the decomposed version time, for example, 001_2023-12-30:12:00:00 is decomposed into 2023-12-30:12:00:00.

[0107] Next, the background service groups the Excel files to be cleaned up based on the decomposed version time and version preservation strategy to obtain multiple Excel file groups. For example, when the version preservation strategy is "2 0***" and requires the version at the end of each quarter and the version of each month to be stored, the decomposed version time is grouped by year, quarter, month, and day, respectively, to obtain a maximum of 4 combined Map-lists (multiple Excel file groups).

[0108] Then, the background service obtains the latest Excel file in each Excel file group based on the version preservation strategy, that is, obtains a latest Excel file in each Excel file group.

[0109] After obtaining the latest Excel file, the background service determines the Excel files to be deleted in the Excel files to be cleaned, wherein the Excel files to be deleted are files other than the latest Excel file in the Excel files to be cleaned, and deletes the Excel files to be deleted, including deleting the key and value of the Excel files to be deleted.

[0110] The data processing method proposed in this embodiment obtains the edited Excel file that has been edited on the current day from the currently stored Excel file; then obtains the Excel file to be cleaned up based on the edited Excel file in the currently stored Excel file; then determines the Excel file to be deleted from the Excel file to be cleaned up based on the version preservation strategy, and deletes the Excel file to be deleted, so that redundant historical versions can be cleaned up in time, thereby realizing version management of Excel files.

[0111] The data processing device provided in the embodiment of the present application adopts the data processing method in the above embodiment, which can solve the technical problem of how to manage the historical versions of Excel files through Excel plug-ins. Compared with the prior art, the beneficial effects of the data processing device provided in the embodiment of the present application are the same as the beneficial effects of the data processing method provided in the above embodiment, and other technical features in the data processing device are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0112] The present application provides a data processing device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the data processing method in the above-mentioned embodiment 1.

[0113] Reference below Figure 4, which shows a schematic diagram of the structure of a data processing device suitable for implementing an embodiment of the present application. The data processing device in the embodiment of the present application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 4 The data processing device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0114] like Figure 4 As shown, the data processing device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the data processing device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the data processing device to communicate with other devices wirelessly or by wire to exchange data. Although the data processing device with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.

[0115] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0116] The data processing device provided by the present application adopts the data processing method in the above embodiment, which can solve the technical problem of how to manage the historical versions of Excel files through Excel plug-ins. Compared with the prior art, the beneficial effects of the data processing device provided by the present application are the same as the beneficial effects of the data processing method provided by the above embodiment, and other technical features in the data processing device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0117] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0118] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0119] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, wherein the computer-readable program instructions are used to execute the data processing method in the above-mentioned embodiment.

[0120] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.

[0121] The computer-readable storage medium may be included in the data processing device; or may exist independently without being installed in the data processing device.

[0122] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the data processing device, the data processing device: receives the json string to be stored corresponding to the Excel file sent by the front end; obtains the file ID and version time corresponding to the Excel file; based on the file ID and version time, generates a version identification key corresponding to the Excel file; stores the Excel file based on the key:value method, wherein the key is the version identification and the value is the json string to be stored.

[0123] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0124] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0125] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0126] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned data processing method, and can solve the technical problem of how to manage the historical versions of Excel files through Excel plug-ins. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the data processing method provided by the above-mentioned embodiment, and will not be elaborated here.

[0127] An embodiment of the present application provides a computer program product, including a computer program, which implements the steps of the above-mentioned data processing method when executed by a processor.

[0128] The computer program product provided by the present application can solve the technical problem of how to manage the historical versions of Excel files through an Excel plug-in. Compared with the prior art, the beneficial effects of the computer program product provided by the embodiment of the present application are the same as the beneficial effects of the data processing method provided by the above embodiment, which will not be repeated here.

[0129] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A data processing method, characterized in that: The data processing method comprises the following steps: Receive the json string to be stored corresponding to the Excel file sent by the front end; Get the file ID and version time corresponding to the Excel file; Based on the file ID and version time, generate a version identification key corresponding to the Excel file; The Excel file is stored in a key:value manner, wherein the key is the version identifier and the value is the json string to be stored.

2. The data processing method according to claim 1, characterized in that: The data processing method further includes: When receiving a file viewing request, obtaining a first version identifier corresponding to the file viewing request; Get the target JSON string corresponding to the first version identifier; Generate an Excel file to be displayed based on the target json string, and display the Excel file to be displayed.

3. The data processing method according to claim 1, characterized in that: The data processing method further includes: Get the edited Excel files that have been edited on the current day in the currently stored Excel files; Based on the edited Excel file in the currently stored Excel files, obtaining the Excel file to be cleaned up; Determine the Excel files to be deleted in the Excel files to be cleaned up based on the version preservation strategy, and delete the Excel files to be deleted.

4. The data processing method according to claim 3, characterized in that: The step of obtaining the Excel file to be cleaned up based on the edited Excel file in the currently stored Excel file includes: Based on the second version identifier corresponding to the edited Excel file, obtaining a target file ID corresponding to the edited Excel file; From the currently stored Excel files, obtain the Excel file to be cleaned corresponding to the target file ID.

5. The data processing method according to claim 3, characterized in that: The step of determining the Excel files to be deleted in the Excel files to be cleaned up based on the version preservation strategy includes: Based on the third version identifier corresponding to the Excel file to be cleaned up, obtaining the target version time corresponding to the Excel file to be cleaned up; Based on the target version time, obtain the latest Excel file corresponding to the version preservation strategy; Based on the latest Excel file, the Excel files to be deleted in the Excel files to be cleaned up are determined.

6. The data processing method according to claim 5, characterized in that: The step of obtaining the latest Excel file corresponding to the version preservation strategy based on the target version time includes: Decompose the date of each target version time to obtain the decomposed version time; Based on the decomposed version time and version preservation strategy, the Excel files to be cleaned are grouped to obtain multiple Excel file groups; Based on the version preservation strategy, the latest Excel file is obtained in each Excel file group.

7. The data processing method according to any one of claims 1 to 6, characterized in that: Before the step of receiving the json string to be stored corresponding to the Excel file sent by the front end, the data processing method further includes: The front end obtains the json string to be stored corresponding to the Excel file; The front end sends the json string to be stored corresponding to the Excel file based on the SDK interface.

8. The data processing method according to claim 7, characterized in that: The step of obtaining the json string to be stored corresponding to the Excel file by the front end includes: Get the data size corresponding to the json string; If the data size is greater than a preset value, compress the JSON string to obtain the JSON string to be stored; If the data is less than or equal to the preset value, the JSON string is used as the JSON string to be stored.

9. A data processing device, characterized in that: The data processing device comprises: a memory, a processor, and a data processing program stored in the memory and executable on the processor, wherein the data processing program implements the steps of the data processing method according to any one of claims 1 to 8 when executed by the processor.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a data processing program, and when the data processing program is executed by a processor, the steps of the data processing method according to any one of claims 1 to 8 are implemented.

Citation Information

Cited By

  • Data processing method, computing device, storage medium and computer program product

    CN120045524A