WO2022042322A1 - 电子表格的处理方法及设备 - Google Patents

电子表格的处理方法及设备 Download PDF

Info

Publication number
WO2022042322A1
WO2022042322A1 PCT/CN2021/112320 CN2021112320W WO2022042322A1 WO 2022042322 A1 WO2022042322 A1 WO 2022042322A1 CN 2021112320 W CN2021112320 W CN 2021112320W WO 2022042322 A1 WO2022042322 A1 WO 2022042322A1
Authority
WO
WIPO (PCT)
Prior art keywords
version number
historical
rollback
spreadsheet
new
Prior art date
Application number
PCT/CN2021/112320
Other languages
English (en)
French (fr)
Inventor
伍文韬
林海涛
Original Assignee
北京字节跳动网络技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京字节跳动网络技术有限公司 filed Critical 北京字节跳动网络技术有限公司
Publication of WO2022042322A1 publication Critical patent/WO2022042322A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/177Editing, e.g. inserting or deleting of tables; using ruled lines
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/103Formatting, i.e. changing of presentation of documents
    • G06F40/117Tagging; Marking up; Designating a block; Setting of attributes

Definitions

  • the embodiments of the present disclosure relate to the technical field of data processing, and in particular, to a method and device for processing electronic forms.
  • An online spreadsheet is a spreadsheet that stores data in rows. Each row is an independent minimum storage unit, and each column is a fixed type of data. It is a spreadsheet in the form of a web (World Wide Web).
  • people often do a lot of editing operations to make a lot of adjustments to the content, style, and structure of the spreadsheets, and take snapshots of the online spreadsheets at regular intervals. of the online spreadsheet as a snapshot and assign a version number to that snapshot.
  • the snapshot number is the historical version number of the target, and the spreadsheet corresponding to the snapshot is used as the spreadsheet to be rolled back, so that when a new data editing request is obtained, according to the data editing request, on the spreadsheet to be rolled back Perform data editing processing.
  • Embodiments of the present disclosure provide a method and device for processing an electronic form, so as to solve the problem that row data of the original version is overwritten due to version rollback according to the version number.
  • an embodiment of the present disclosure provides a method for processing an electronic form, including:
  • a new spreadsheet is established under the rollback version number, so that when a data editing request is acquired, according to the data editing request, The data editing process is performed on the new spreadsheet; wherein, the record identifier corresponding to each row of data in the new spreadsheet is a new record identifier.
  • an electronic form processing device including:
  • a request obtaining module configured to obtain a rollback request, where the rollback request includes a rollback version number and a rollback record identifier
  • a processing module configured to obtain, according to the rollback request, a history spreadsheet to be rolled back corresponding to the rollback version number and the rollback record identifier;
  • the processing module is also used to obtain the historical record identifier corresponding to each historical electronic form under the rollback version number, and according to each of the historical record identifiers, generate a new one that is different from each of the historical record identifiers. record identification;
  • the processing module is configured to, according to the historical spreadsheet to be rolled back and the new record identifier, create a new spreadsheet under the rollback version number, so that when acquiring a data editing request, In response to the data editing request, data editing processing is performed on the new electronic form; wherein, the record identifier corresponding to each row of data in the new electronic form is a new record identifier.
  • embodiments of the present disclosure provide an electronic device, including: at least one processor and a memory.
  • the memory stores computer-executable instructions.
  • the at least one processor executes the computer-implemented instructions stored in the memory, causing the at least one processor to perform the method of processing a spreadsheet as described in the first aspect and various possible designs of the first aspect above.
  • embodiments of the present disclosure provide a computer-readable storage medium, where computer-executable instructions are stored in the computer-readable storage medium, and when a processor executes the computer-executable instructions, the first aspect and the first Aspects various possible designs of the described spreadsheet processing method.
  • embodiments of the present disclosure provide a computer program product, including computer program instructions, the computer program instructions enable a computer to execute the electronic form processing method described in the first aspect and various possible designs of the first aspect.
  • the embodiments of the present disclosure further provide a computer program, when the computer program runs on a computer, the computer executes the method for processing a spreadsheet as described in the first aspect and various possible designs of the first aspect.
  • the electronic form processing method and device obtained by the present embodiment, the method obtains the historical electronic form to be rolled back corresponding to the rollback version number and the rollback record identifier in the rollback request, that is, the required rollback is obtained.
  • the rollback record identifier is used to distinguish different historical spreadsheets under the same version number, and a new record identifier is generated, which is different from the one corresponding to each historical spreadsheet under the rollback version number.
  • History record identification and then according to the historical spreadsheet to be rolled back and the new record identification, under the rollback version number, create a new spreadsheet, when subsequent data editing processing is required, directly on the new spreadsheet Just do it.
  • a record identifier is added to further distinguish the auxiliary version number. Therefore, when the current spreadsheet is faulty or abnormal, it will go back to the historical spreadsheet. After that, when further editing is performed on this basis, and when the snapshot is saved under the historical version number, the record identifier corresponding to the spreadsheet saved based on the snapshot will not be covered in the prior art.
  • FIG. 1 is an example diagram of an online electronic form provided by an embodiment of the present disclosure
  • FIG. 2 is an example diagram of editing a spreadsheet provided by an embodiment of the present disclosure
  • FIG. 3 is an example diagram of a spreadsheet rollback in the prior art
  • FIG. 4 is a schematic flowchart 1 of a method for processing an electronic form according to an embodiment of the present disclosure
  • FIG. 5 is a schematic diagram of all electronic forms under version number V20 provided by an embodiment of the present disclosure.
  • FIG. 6 is a schematic diagram of editing a new electronic form provided by an embodiment of the present disclosure.
  • FIG. 7 is a second schematic flowchart of a method for processing an electronic form according to an embodiment of the present disclosure.
  • FIG. 8 is a third schematic flowchart of a method for processing an electronic form according to an embodiment of the present disclosure.
  • FIG. 9 is a fourth schematic flowchart of a method for processing an electronic form according to an embodiment of the present disclosure.
  • FIG. 10 is a structural block diagram of a processing device for an electronic form provided by an embodiment of the present disclosure.
  • FIG. 11 is a schematic diagram of a hardware structure of an electronic device provided by an embodiment of the present disclosure.
  • Online spreadsheets are spreadsheets that store data row by row.
  • people often do a lot of editing operations to make a lot of adjustments to the content, style, and structure of the table, and take snapshots of the online spreadsheets at regular intervals.
  • the online spreadsheet acts as a snapshot and assigns a version number to that snapshot.
  • the version numbers of the snapshots are generally in an increasing order, for example, V0, V1, . . . , Vn.
  • the snapshots corresponding to the current version numbers are stored only at certain version numbers. For example, after the snapshots corresponding to V0 are stored, the snapshots corresponding to V20 are stored at intervals of 20 version numbers.
  • FIG. 3 is an example diagram of a version rollback in the prior art.
  • snapshots are saved every 20 version numbers, that is, snapshots corresponding to V0 and snapshots corresponding to V20 are saved.
  • the spreadsheet in the snapshot corresponding to V0 includes multiple rows of data, and each row of data can be determined by the three variables of table id/record revision/record id.
  • the table id (that is, the table in V0 and V20) represents The table ID of the spreadsheet, the record revision represents the version number (ie V0 and V20), and the record id represents the row number.
  • rec_0 in FIG. 3 indicates that the version number of the row data in the spreadsheet is V0
  • rec_20 indicates that the version number of the row data in the spreadsheet is V20.
  • the technical idea of the present invention is to establish a new spreadsheet after determining a new spreadsheet to be rolled back when performing version rollback, and to associate the new spreadsheet with the one to be rolled back through the record identifier.
  • Differentiate the spreadsheet so that the new spreadsheet and the spreadsheet to be rolled back are two separate spreadsheets.
  • the corresponding data editing processing is not directly performed on the spreadsheet to be rolled back. , but perform the corresponding data editing processing on the new spreadsheet, and in the process of performing the corresponding data editing processing on the new spreadsheet, it will not affect the returned spreadsheet, so that the new spreadsheet will not be affected.
  • the new snapshot obtained on the basis of the spreadsheet will not overwrite the snapshot obtained on the basis of the spreadsheet to be rolled back, that is, it will not overwrite the original snapshot before rollback.
  • FIG. 4 is a first schematic flowchart of a method for processing an electronic form according to an embodiment of the present disclosure.
  • the method in this embodiment can be applied to electronic devices such as terminal devices or servers, and the version rollback method includes:
  • S401 Obtain a rollback request, where the rollback request includes a rollback version number and a rollback record identifier.
  • the rollback request further includes the table identifier of the spreadsheet for which data recovery needs to be performed.
  • the rollback request after the rollback request is acquired, the rollback request includes a table identifier, and the spreadsheet that needs data recovery is determined according to the table identifier, and the rollback request further includes the rollback version number and rollback Record ID, obtain the historical spreadsheet to be rolled back corresponding to the rollback version number and rollback record ID, and the row data in the historical spreadsheet to be rolled back is the row required by the spreadsheet that needs data recovery Data, that is, the historical spreadsheet to be rolled back is the historical spreadsheet to be rolled back.
  • the version rollback request may be input by the user according to actual needs. For example, if the user wants to re-edit based on a certain historical version, a corresponding rollback request is input.
  • the rollback record identifier is the record identifier corresponding to the row data in the spreadsheet, which is used to distinguish different spreadsheets under the same version number.
  • the historical spreadsheet to be rolled back cannot be determined only by the rollback version number, and it needs to be further limited by the rollback record identifier.
  • the record ID corresponding to the row data in the first spreadsheet is 0, that is, the record ID corresponding to the first spreadsheet is 0, the record ID corresponding to the second spreadsheet is 1, and the third spreadsheet corresponds to The record identifier of 2 is 2. It is impossible to determine which of the three spreadsheets is the historical spreadsheet to be rolled back only through the version number V20. Therefore, the record identifier needs to be used for further qualification.
  • S403 Acquire a history record identifier corresponding to each historical spreadsheet under the rollback version number, and generate a new record identifier different from each historical record identifier according to each historical record identifier.
  • a history record table corresponding to each historical spreadsheet under the rollback version number is obtained, a history record identifier corresponding to the rollback version number is obtained, and then a new record identifier is generated, and the new record identifier is different The history record identifier corresponding to the rollback version number.
  • the largest historical record identifier can be determined from the historical record identifier, that is, the largest historical record identifier in the historical record identifier corresponding to the rollback version number is obtained, and then the largest historical record identifier is obtained.
  • the sum of the preset increment value is determined as a new record identifier, thereby obtaining a new record identifier different from each historical record identifier.
  • the preset increment value can be set according to the user's needs, which is not limited here.
  • the rollback version number is V20
  • the default increment value is 1
  • the history record identifiers corresponding to V20 are 0, 1 and 2
  • the largest history record identifier is 2, then
  • the new record ID can be set to 3.
  • rec_20_0 in FIG. 5 indicates that the version number of the row data in the spreadsheet is V20, and the record ID is 0.
  • rec_20_1 indicates that the version number of the row data in the spreadsheet is V20, and the record ID is 1.
  • rec_20_2 indicates that the version number of the row data in the spreadsheet is V20, and the record ID is 2.
  • a new spreadsheet is created under the rollback version number
  • the version number of the new spreadsheet is the rollback version number
  • the row data in the new spreadsheet is the same as the historical electronic form to be rolled back.
  • the row data in the table is the same, that is, the content of the new spreadsheet is the same as the content of the historical spreadsheet to be rolled back
  • the record identifier corresponding to each row data in the new spreadsheet is a new record identifier
  • the data editing processing of the new spreadsheet will not affect the reverted historical spreadsheet, so that a new snapshot is obtained during the data editing processing of the new spreadsheet It also does not affect the historical snapshot obtained on the basis of the historical spreadsheet to be rolled back, that is, the new snapshot will not affect the original snapshot before the rollback.
  • the data editing request includes data editing processing that needs to be performed on the new spreadsheet. For example, if the row data in the new spreadsheet includes an age value, add 1 to the age value, and after obtaining the data editing request , then the corresponding data editing processing is performed on the new spreadsheet to realize the response to the data editing request.
  • the rollback version number is V0
  • the rollback record ID is 0,
  • the historical spreadsheet corresponding to the version number V0 and the record ID 0 is used as the spreadsheet to be rolled back
  • Figure 6 The spreadsheet with version number V0 in the drawing on the left side of the dividing line in FIG. 6 is the spreadsheet to be rolled back, and the spreadsheet with version number V1 in the drawing on the left side of the dividing line in FIG. Obtained during data editing processing on the spreadsheet to be rolled back.
  • the new record ID is 1, create a new spreadsheet under the version number V0, the version number of the new spreadsheet is V0, the record ID corresponding to the new spreadsheet is 1, and the new spreadsheet
  • the content of the form is the same as the content of the historical electronic form to be rolled back, that is, the content of the electronic form corresponding to the version number V0 and the record ID 1 is the same as the content of the historical electronic form corresponding to the version number V0 and the record ID 0.
  • the new electronic form that is, the electronic form corresponding to the version number V1 and the record ID 1 is obtained in the process of performing data editing processing on the electronic form corresponding to the version number V0 and the record ID 1, that is, the electronic form corresponding to the version number V1 and the record ID is obtained.
  • the snapshot corresponding to 1, the spreadsheet corresponding to version number V1 and record identifier 1, will not overwrite the original spreadsheet corresponding to version number V1 and record identifier 0 before the rollback, so it will not overwrite the original version , the spreadsheet corresponding to the version number V1 and the record identifier 1 and the spreadsheet corresponding to the version number V1 and the record identifier 0 are jointly stored under the version number V1.
  • rec_0_0 in FIG. 6 indicates that the version number of the row data in the spreadsheet is V0, and the record identifier is 0.
  • rec_1_0 indicates that the version number of the row data in the spreadsheet is V1, and the record identifier is 0.
  • rec_0_1 indicates the electronic The version number of the row data in the table is V0, and the record ID is 1.
  • rec_1_1 indicates that the version number of the row data in the spreadsheet is V1, and the record ID is 1.
  • the table id/record revision/record id/history level the table id represents the table ID of the spreadsheet
  • the record revision represents the version number
  • the history level represents the record identifier.
  • obtaining the historical spreadsheet to be rolled back corresponding to the rollback version number and rollback record identifier in the rollback request is to obtain the historical spreadsheet to be rolled back, and the rollback record identifier is used to Distinguish different historical spreadsheets under the same version number, generate a new record identifier, the new record identifier is different from the historical record identifier corresponding to each historical spreadsheet under the rollback version number, and then according to the history to be rolled back Spreadsheet and new record identifier, create a new spreadsheet under the rollback version number, and when subsequent data editing processing is required, it can be performed directly on the new spreadsheet, that is, when the current spreadsheet appears In case of failure or abnormality, after returning to the historical spreadsheet, edit the new spreadsheet further, and save the snapshot obtained during the editing process to the historical version number, based on the record ID corresponding to the spreadsheet saved by the snapshot,
  • the problems covered in the prior art also do not arise.
  • a new snapshot will be obtained.
  • the following will describe the process of how to obtain a new snapshot based on the new spreadsheet with a specific embodiment.
  • FIG. 7 is a second schematic flowchart of a method for processing an electronic form according to an embodiment of the present disclosure.
  • the process of how to obtain a new snapshot based on a new electronic form is described in detail, and the processing method of the electronic form includes:
  • S701 Obtain a rollback request, where the rollback request includes a rollback version number and a rollback record identifier.
  • S703 Obtain a history record identifier corresponding to each historical spreadsheet under the rollback version number, and generate a new record identifier different from each historical record identifier according to each historical record identifier.
  • steps S701 to S704 are the same as those of steps S401 to S404 in the above-mentioned embodiment.
  • steps S401 to S404 please refer to the discussion of steps S401 to S404, which will not be repeated here.
  • S705 Determine the version number corresponding to the current snapshot every predetermined time, and perform snapshot processing on the new spreadsheet, so as to store the new spreadsheet processed by the snapshot under the version number corresponding to the current snapshot.
  • the user can perform data editing processing on the new electronic form.
  • the version number corresponding to the current snapshot is determined every predetermined time, the new spreadsheet is processed by snapshot, and the new spreadsheet after the snapshot processing is used as a snapshot.
  • the data in the snapshot is the same as the data in the current new spreadsheet, and the snapshot is saved under the version number corresponding to the current snapshot.
  • a preset value is generally automatically added to the version number corresponding to the previous snapshot to obtain the version number corresponding to the current snapshot.
  • the predetermined time is 5 minutes
  • the version number of the new spreadsheet is V20.
  • the version number corresponding to the current snapshot is V21
  • perform snapshot processing on the new spreadsheet that is, take the current new spreadsheet as a snapshot
  • the version number corresponding to the current snapshot is V22
  • the snapshot processing is performed on the new spreadsheet, that is, the current new spreadsheet is taken as a snapshot
  • the snapshot is saved under the version number V22.
  • the new record identifier corresponding to the row data in the new spreadsheet is different from that corresponding to the row data in the historical spreadsheet under the version number corresponding to the current snapshot. Record ID.
  • the snapshot obtained after the snapshot processing of the new spreadsheet is different from other snapshots under the historical version number, so as to avoid the situation that the new snapshot overwrites other snapshots.
  • the editing operation is actually an editing operation that is changed from a snapshot to the adjacent snapshot after the snapshot, and the editing operation is stored in the historical editing operation set, so that the subsequent editing operation can be directly from the historical editing operation Get the desired historical editing operations in one place.
  • snapshots are saved at intervals of a certain version number, when saving the snapshot to be rolled back, that is, the historical spreadsheet to be rolled back, it can be obtained directly, but when the snapshot to be rolled back is not saved, it needs to be Saved snapshots, i.e. historical spreadsheets based on push to get the historical spreadsheets to be rolled back.
  • Saved snapshots i.e. historical spreadsheets based on push to get the historical spreadsheets to be rolled back. The process of how to obtain the historical electronic form to be rolled back will be described below with a specific embodiment.
  • FIG. 8 is a third schematic flowchart of a method for processing an electronic form according to an embodiment of the present disclosure. The process of how to obtain the historical spreadsheet to be rolled back is described in detail in this embodiment, and the version rollback method includes:
  • S801 Obtain a rollback request, where the rollback request includes a rollback version number and a rollback record identifier.
  • the rollback version number and rollback record identifier can be directly obtained through the rollback version number and the rollback record identifier.
  • the historical spreadsheet that is, the historical spreadsheet to be rolled back
  • the version number of the historical spreadsheet to be rolled back is the rollback version number
  • the record identifier corresponding to each row of data in the historical spreadsheet to be rolled back is The fallback record identifier.
  • S805 Obtain the historical spreadsheet to be rolled back according to the first version number, the rollback version number, the historical editing operations between the first version number and the rollback version number, and the rollback record identifier.
  • FIG. 9 is an electronic form provided by an embodiment of the present disclosure.
  • a schematic flowchart of the processing method for , this embodiment describes S805 in detail on the basis of the foregoing embodiment, for example, on the basis of the embodiment described in FIG. 8 .
  • the historical spreadsheet to be rolled back is obtained, including:
  • S901 Obtain a history spreadsheet to be edited corresponding to the first version number and the rollback version record identifier.
  • the historical electronic form to be edited is obtained by taking the historical electronic form corresponding to the first version number and the rollback record identifier as the historical electronic form to be edited. Judging whether the first version number is smaller than the rollback version number, when it is determined that the first version number is smaller than the rollback version number, it indicates that the historical spreadsheet to be edited is the version before the historical spreadsheet to be rolled back, and the Perform related editing operations on the historical spreadsheet to be edited to obtain the spreadsheet to be rolled back, then obtain the first historical editing operation from the first version number to the rollback version number from the historical editing operation set. The operation actually refers to the editing operation performed from the historical spreadsheet to be edited to the historical spreadsheet to be rolled back.
  • S903 Perform a first history editing operation on the historical electronic form to be edited, so as to use the edited electronic form as the historical electronic form to be rolled back.
  • the edited row data of the historical spreadsheet is the same as the historical electronic table to be rolled back. If the row data of the table is the same, the edited historical spreadsheet can be used as the historical spreadsheet to be rolled back.
  • the first version number is V1
  • the rollback record ID is 0.
  • the history spreadsheet performs the first history editing operation. After all the first history editing operations are performed, the obtained edited history spreadsheet corresponding to V1 and record identifier 0 may be used as the history spreadsheet to be rolled back.
  • the first history editing operation when the first history editing operation is performed on the history spreadsheet to be edited, the first history editing operation needs to be performed in the order in which the first history editing operation is performed, that is, the earliest performed first history editing operation is performed first. For example, first perform operation A on the historical spreadsheet corresponding to V1 and record identifier 0, then perform operation B, and finally perform operation C to obtain the historical spreadsheet corresponding to V2 and record identifier 0, then when V1 is the first version number
  • V2 is the rollback version number
  • operation A, operation B and operation C are the first historical editing operations
  • the historical spreadsheet corresponding to V1 and record identifier 0 is the historical spreadsheet to be edited
  • the historical spreadsheet corresponding to V2 and record identifier 0 is the historical spreadsheet to be edited.
  • the historical spreadsheet corresponding to 0 is the historical spreadsheet to be rolled back, according to the order of execution of the first historical editing operations, that is, on the historical spreadsheet to be edited, first perform operation A, then perform operation B, and finally perform operation C. After operation C is completed, the edited history spreadsheet is used as the history spreadsheet to be rolled back.
  • the first version number is greater than the rollback version number
  • Edit operation to obtain the spreadsheet to be rolled back then obtain the second historical editing operation from the rollback version number to the first version number from the historical editing operation set.
  • the second historical editing operation actually refers to the 's history spreadsheet changes to the edit operation of the history spreadsheet to be edited.
  • the second historical editing operation is removed from the historical spreadsheet to be edited, and after all the second historical editing operations are removed, the edited row data of the historical spreadsheet The same as the row data of the historical spreadsheet to be rolled back, the edited historical spreadsheet can be used as the historical spreadsheet to be rolled back.
  • the first version number is V3
  • the rollback record identifier is 0, and the The second historical editing operation is removed from the historical spreadsheet corresponding to V3 and record identifier 0.
  • the obtained edited historical spreadsheet corresponding to V3 and record identifier 0 can be used as a pending rollback history spreadsheet.
  • removing the second history editing operation from the history spreadsheet to be edited actually means that the history spreadsheet to be edited performs an operation opposite to the second history editing operation. For example, if the second history editing operation is to add 1 to the age, then Its opposite operation is to decrement the age by 1.
  • the second history editing operation needs to be removed in the reverse order of the execution order of the second history editing operation, that is, the second history editing operation performed last is removed first. For example, first perform operation D on the historical spreadsheet corresponding to V2 and record identifier 0, then perform operation E, and finally perform operation F to obtain the historical spreadsheet corresponding to V3 and record identifier 0, then when V3 is the first version number
  • operation D, operation E and operation F are the second historical editing operations
  • the historical spreadsheet corresponding to V3 and record identifier 0 is the historical spreadsheet to be edited
  • the historical spreadsheet corresponding to V2 and record identifier 0 is the historical spreadsheet to be edited.
  • the historical spreadsheet corresponding to 0 is the historical spreadsheet to be rolled back, and the second historical editing operation is removed in the reverse order of the execution order of the second historical editing operation, that is, operation F is first removed on the historical spreadsheet to be edited, and then The operation E is removed, and finally the operation D is removed. After the removal of the operation D is completed, the edited historical spreadsheet is used as the historical spreadsheet to be rolled back.
  • first version numbers 2
  • first version numbers 2
  • first version numbers greater than the rollback version number 2
  • arbitrarily selected from all the first version numbers A first version number and then use the selected first version number to obtain the historical spreadsheet to be rolled back.
  • the first version numbers are V1 and V3, and V3 is selected
  • the historical spreadsheet corresponding to V3 and the rollback record identifier will be The table acts as a historical spreadsheet to be edited.
  • the first version number after the first version number is obtained, by judging whether the first version number is greater than the rollback version number or smaller than the rollback version number, it is determined whether to perform a relevant historical editing operation on the historical spreadsheet to be edited or not Relevant historical editing operations are removed, thereby ensuring that the historical spreadsheet to be rolled back obtained according to the historical spreadsheet to be edited is correct.
  • S806 Acquire a history record identifier corresponding to each historical spreadsheet under the rollback version number, and generate a new record identifier different from each historical record identifier according to each historical record identifier.
  • S807 According to the historical spreadsheet to be rolled back and the new record identifier, under the rollback version number, create a new spreadsheet, so that when a data editing request is obtained, data is performed on the new spreadsheet according to the data editing request Edit processing.
  • the record identifier corresponding to each row of data in the new spreadsheet is a new record identifier.
  • steps S806 to S807 are the same as those of steps S403 to S404 in the above-mentioned embodiment.
  • steps S403 to S404 please refer to the discussion of steps S403 to S404, which will not be repeated here.
  • the historical spreadsheet to be rolled back when obtaining the historical spreadsheet to be rolled back, if there is a rollback version number in the historical version number, the historical spreadsheet to be rolled back can be directly obtained, so as to realize the rapidity of the spreadsheet to be rolled back.
  • a version of the historical spreadsheet does not exist, it cannot be rolled back to the historical spreadsheet, resulting in data recovery failure.
  • FIG. 10 is a structural block diagram of a device for processing an electronic form according to an embodiment of the present disclosure.
  • the electronic form processing device 1000 includes: a request acquisition module 1001 and a processing module 1002 .
  • the request obtaining module 1001 is configured to obtain a rollback request, where the rollback request includes a rollback version number and a rollback record identifier.
  • the processing module 1002 is configured to obtain, according to the rollback request, the historical spreadsheet to be rolled back corresponding to the rollback version number and the rollback record identifier.
  • the processing module 1002 is further configured to obtain a history record identifier corresponding to each historical spreadsheet under the rollback version number, and generate a new record identifier different from each historical record identifier according to each historical record identifier.
  • the processing module 1002 is configured to create a new electronic form under the rollback version number according to the historical electronic form to be rolled back and the new record identifier, so that when the data editing request is obtained, the new electronic form can be stored in the new electronic form according to the data editing request. Data editing processing is performed on the form.
  • the record identifier corresponding to each row of data in the new spreadsheet is a new record identifier.
  • the processing module 1002 is further configured to determine the version number corresponding to the current snapshot every predetermined time, and perform snapshot processing on the new spreadsheet, so as to store the new spreadsheet after the snapshot processing. Under the version number corresponding to the current snapshot.
  • the processing module 1002 is further configured to, if the version number corresponding to the current snapshot is a historical version number, the new record identifier corresponding to the row data in the new spreadsheet is different from the version corresponding to the current snapshot The record ID corresponding to the row data in the historical spreadsheet under the number.
  • the processing module 1002 is further configured to acquire editing operations between spreadsheets corresponding to the snapshots before and after a predetermined time, and store the editing operations in a historical editing operation set.
  • the processing module 1002 is further configured to determine whether there is a rollback version number in the historical version number according to the rollback request.
  • the processing module 1002 is further configured to obtain a history spreadsheet to be rolled back corresponding to the rollback version number and the rollback record identifier when it is determined that a rollback version number exists in the historical version number.
  • the processing module 1002 is further configured to obtain all the version numbers corresponding to all the historical spreadsheets respectively when it is determined that there is no rollback version number in the historical version numbers, and respectively determine each The absolute value of the difference between the first version number and the rollback version number, and the version number with the smallest absolute value of the difference is used as the first version number.
  • the processing module 1002 is further configured to acquire the historical spreadsheet to be rolled back according to the first version number, the rollback version number, the historical editing operations between the first version number and the rollback version number, and the rollback record identifier.
  • the processing module 1002 is further configured to acquire the historical spreadsheet to be edited corresponding to the first version number and the rollback version number.
  • the processing module 1002 is further configured to obtain the first historical editing operation from the first version number to the rolling back version number from the historical editing operation set when it is determined that the first version number is smaller than the rollback version number.
  • the processing module 1002 is further configured to perform a first history editing operation on the historical electronic form to be edited, so as to use the edited electronic form as the historical electronic form to be rolled back.
  • the processing module 1002 is further configured to obtain, from the historical editing operation set, a second version number between the rollback version number and the first version number when it is determined that the first version number is greater than the rollback version number. History editing operations.
  • the processing module 1002 is further configured to remove the second historical editing operation from the historical electronic form to be edited, so as to use the edited electronic form as the historical electronic form to be rolled back.
  • the processing module 1002 is further configured to determine the largest historical record identifier from the historical record identifiers.
  • the processing module 1002 is further configured to determine the sum of the largest historical record identifier and the preset increment value as a new record identifier.
  • the device provided in this embodiment can be used to implement the technical solutions of the foregoing method embodiments, and the implementation principles and technical effects thereof are similar, and details are not described herein again in this embodiment.
  • the electronic device 1100 may be a terminal device or a server.
  • the terminal equipment may include, but is not limited to, such as mobile phones, notebook computers, digital broadcast receivers, personal digital assistants (Personal Digital Assistant, referred to as PDA), tablet computers (Portable Android Device, referred to as PAD), portable multimedia players (Portable Media Player, PMP for short), mobile terminals such as in-vehicle terminals (such as in-vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, and the like.
  • PDA Personal Digital Assistant
  • PAD Portable Android Device
  • PMP Portable Multimedia Player
  • mobile terminals such as in-vehicle terminals (such as in-vehicle navigation terminals), etc.
  • fixed terminals such as digital TVs, desktop computers, and the like.
  • the electronic device shown in FIG. 11 is only an example, and should not impose any limitation on the function and scope of use of the embodiments of the present disclosure.
  • the electronic device 1100 may include a processing device (such as a central processing unit, a graphics processor, etc.) 1101, which may be stored in a read only memory (Read Only Memory, ROM for short) 1102 according to a program or from a storage device 1108 loads a program into a random access memory (Random Access Memory, RAM for short) 1103 to perform various appropriate actions and processes.
  • a processing device such as a central processing unit, a graphics processor, etc.
  • ROM read only memory
  • RAM Random Access Memory
  • various programs and data necessary for the operation of the electronic device 1100 are also stored.
  • the processing device 1101, the ROM 1102, and the RAM 1103 are connected to each other through a bus 1104.
  • An input/output (I/O) interface 1105 is also connected to the bus 1104 .
  • an input device 1106 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; including, for example, a Liquid Crystal Display (LCD for short) ), speaker, vibrator, etc. output device 1107; storage device 1108 including, eg, magnetic tape, hard disk, etc.; and communication device 1109.
  • Communication means 1109 may allow electronic device 1100 to communicate wirelessly or by wire with other devices to exchange data.
  • FIG. 9 shows the electronic device 1100 having various means, it should be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
  • embodiments of the present disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the method illustrated in the flowchart.
  • the computer program may be downloaded and installed from the network via the communication device 1109, or from the storage device 1108, or from the ROM 1102.
  • the processing apparatus 1101 the above-mentioned functions defined in the methods of the embodiments of the present disclosure are executed.
  • the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the above two.
  • the computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or a combination of any of the above.
  • Computer readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable Programmable read-only memory (electrical programmable ROM, EPROM or flash memory), optical fiber, portable compact disk read-only memory (compact disc ROM, CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with computer-readable program code embodied thereon. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • a computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device .
  • Program code embodied on a computer readable medium may be transmitted using any suitable medium including, but not limited to, electrical wire, optical fiber cable, RF (radio frequency), etc., or any suitable combination of the foregoing.
  • the above-mentioned computer-readable medium may be included in the above-mentioned electronic device; or may exist alone without being assembled into the electronic device.
  • the aforementioned computer-readable medium carries one or more programs, and when the aforementioned one or more programs are executed by the electronic device, causes the electronic device to execute the methods shown in the foregoing embodiments.
  • the present disclosure also provides a computer program, the computer program enables a computer to execute the methods shown in the above embodiments.
  • Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including object-oriented programming languages—such as Java, Smalltalk, C++, but also conventional Procedural programming language - such as the "C" language or similar programming language.
  • the program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server.
  • the remote computer can be connected to the user's computer through any kind of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or, can be connected to an external A computer (eg using an internet service provider to connect via the internet).
  • LAN Local Area Network
  • WAN Wide Area Network
  • each block in the flowchart or block diagrams may represent a module, segment, or portion of code that contains one or more logical functions for implementing the specified functions executable instructions.
  • the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations can be implemented in dedicated hardware-based systems that perform the specified functions or operations , or can be implemented in a combination of dedicated hardware and computer instructions.
  • the units involved in the embodiments of the present disclosure may be implemented in a software manner, and may also be implemented in a hardware manner.
  • the name of the unit does not constitute a limitation of the unit itself under certain circumstances, for example, the first obtaining unit may also be described as "a unit that obtains at least two Internet Protocol addresses".
  • exemplary types of hardware logic components include: field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products ( Application specific standard product, ASSP), system on chip (system on chip, SOC), complex programmable logic device (complex programmable logic device, CPLD) and so on.
  • FPGAs field-programmable gate arrays
  • ASICs application-specific integrated circuits
  • ASSP application-specific standard product
  • SOC system on chip
  • complex programmable logic device complex programmable logic device
  • CPLD complex programmable logic device
  • a machine-readable medium may be a tangible medium that may contain or store a program for use by or in connection with the instruction execution system, apparatus or device.
  • the machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
  • Machine-readable media may include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or devices, or any suitable combination of the foregoing.
  • machine-readable storage media would include one or more wire-based electrical connections, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), fiber optics, compact disk read only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the foregoing.
  • RAM random access memory
  • ROM read only memory
  • EPROM or flash memory erasable programmable read only memory
  • CD-ROM compact disk read only memory
  • magnetic storage or any suitable combination of the foregoing.
  • a method for processing an electronic form including:
  • a new spreadsheet is established under the rollback version number, so that when a data editing request is acquired, according to the data editing request, The data editing process is performed on the new spreadsheet; wherein, the record identifier corresponding to each row of data in the new spreadsheet is a new record identifier.
  • the method further includes:
  • the version number corresponding to the current snapshot is determined, and snapshot processing is performed on the new spreadsheet, so as to store the new spreadsheet processed by the snapshot under the version number corresponding to the current snapshot.
  • the method further includes:
  • the new record identifier corresponding to the row data in the new spreadsheet is different from the row data in the historical spreadsheet under the version number corresponding to the current snapshot The corresponding record ID.
  • the method further includes:
  • the editing operations between the spreadsheets corresponding to the snapshots before and after the predetermined time are acquired, and the editing operations are stored in a historical editing operation set.
  • obtaining the historical spreadsheet to be rolled back corresponding to the rollback version number and the rollback record identifier according to the rollback request includes:
  • the method further includes:
  • the rollback version number According to the first version number, the rollback version number, the historical editing operation between the first version number and the rollback version number, and the rollback record identifier, obtain the to-be-rolled-back version number. History spreadsheet.
  • the method further includes:
  • the rollback version number obtains the to-be-returned A spreadsheet of history of withdrawals, including:
  • a first history editing operation is performed on the historical electronic form to be edited, so as to use the edited electronic form as the historical electronic form to be rolled back.
  • the method further includes:
  • the second historical editing operation is removed from the historical electronic form to be edited, so that the edited electronic form is used as the historical electronic form to be rolled back.
  • generating a new record identifier different from each of the historical record identifiers according to each of the historical record identifiers includes:
  • the sum of the largest historical record identifier and the preset increment value is determined as the new record identifier.
  • an electronic form processing device including:
  • a request obtaining module configured to obtain a rollback request, where the rollback request includes a rollback version number and a rollback record identifier
  • a processing module configured to obtain, according to the rollback request, a history spreadsheet to be rolled back corresponding to the rollback version number and the rollback record identifier;
  • the processing module is also used to obtain the historical record identifier corresponding to each historical electronic form under the rollback version number, and according to each of the historical record identifiers, generate a new one that is different from each of the historical record identifiers. record identification;
  • the processing module is configured to, according to the historical spreadsheet to be rolled back and the new record identifier, create a new spreadsheet under the rollback version number, so that when acquiring a data editing request, In response to the data editing request, data editing processing is performed on the new electronic form; wherein, the record identifier corresponding to each row of data in the new electronic form is a new record identifier.
  • the processing module is further configured to determine the version number corresponding to the current snapshot every predetermined time, and perform snapshot processing on the new spreadsheet, so as to The new spreadsheet is stored under the version number corresponding to the current snapshot.
  • the processing module is further configured to, if the version number corresponding to the current snapshot is a historical version number, create a new record identifier corresponding to the row data in the new spreadsheet It is different from the record identifier corresponding to the row data in the historical spreadsheet under the version number corresponding to the current snapshot.
  • the processing module is further configured to acquire editing operations between the spreadsheets corresponding to the snapshots before and after the predetermined time, and store the editing operations in a historical editing operation set.
  • the processing module is further configured to determine whether the rollback version number exists in the historical version number according to the rollback request;
  • the processing module is further configured to acquire a history spreadsheet to be rolled back corresponding to the rollback version number and the rollback record identifier when it is determined that the rollback version number exists in the historical version number.
  • the processing module is further configured to obtain all version numbers corresponding to all historical spreadsheets respectively when it is determined that the rollback version number does not exist in the historical version numbers, and Determine the absolute value of the difference between each version number and the rollback version number in all version numbers, and then use the version number with the smallest absolute value of the difference as the first version number;
  • the processing module is further configured to, according to the first version number, the rollback version number, the historical editing operation between the first version number and the rollback version number, and the rollback record identifier , to obtain the historical spreadsheet to be rolled back.
  • the processing module is further configured to acquire a history spreadsheet to be edited corresponding to the first version number and the rollback version number;
  • the processing module is further configured to obtain the first version number from the first version number to the rollback version number from the historical editing operation set when it is determined that the first version number is smaller than the rollback version number. History editing operations;
  • the processing module is further configured to perform a first history editing operation on the historical electronic form to be edited, so as to use the edited electronic form as the historical electronic form to be rolled back.
  • the processing module is further configured to, when it is determined that the first version number is greater than the rollback version number, obtain from a set of historical editing operations from the rollback version number to the rollback version number a second history editing operation between the first version numbers;
  • the processing module is further configured to remove the second historical editing operation from the historical electronic form to be edited, so as to use the edited electronic form as the historical electronic form to be rolled back.
  • the processing module is further configured to determine the largest historical record identifier from the historical record identifiers;
  • the processing module is further configured to determine the sum of the largest historical record identifier and a preset increment value as the new record identifier.
  • an electronic device comprising: at least one processor and a memory;
  • the memory stores computer-executable instructions
  • the at least one processor executes the computer-implemented instructions stored in the memory, causing the at least one processor to perform the method of processing a spreadsheet as described in the first aspect and various possible designs of the first aspect above.
  • a computer-readable storage medium where computer-executable instructions are stored in the computer-readable storage medium, and when a processor executes the computer-executable instructions, The method for processing a spreadsheet as described above in the first aspect and various possible designs of the first aspect is implemented.
  • a computer program product comprising computer program instructions, the computer program instructions causing a computer to perform the above-described first aspect and various possible designs of the first aspect the processing method of the spreadsheet.
  • a computer program that, when the computer program runs on a computer, causes the computer to execute the first aspect and various possible designs of the first aspect above. How to handle spreadsheets.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

一种电子表格的处理方法及设备,该方法包括:获取回退请求,回退请求包括回退版本号和回退记录标识(S401);根据回退请求,获取与回退版本号和回退记录标识对应的待回退的历史电子表格(S402);获取回退版本号下的每个历史电子表格对应的历史记录标识,并根据每个历史记录标识,生成不同于每个历史记录标识的新的记录标识(S403);根据待回退的历史电子表格和新的记录标识,在回退版本号下,建立新的电子表格,以在获取数据编辑请求时,根据数据编辑请求,在新的电子表格上进行数据编辑处理,其中,新的电子表格中每个行数据对应的记录标识均为新的记录标识(S404)。利用上述方法,在对新的电子表格进行数据编辑处理的过程中得到的新的快照不会覆盖回退之前的原有的在待回退的历史电子表格基础上得到的快照,保证原有版本的数据不被覆盖。

Description

电子表格的处理方法及设备
相关申请的交叉引用
本申请要求于2020年8月27日提交中国专利局、申请号为202010874582.1、发明名称为“电子表格的处理方法及设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本公开实施例涉及数据处理技术领域,尤其涉及一种电子表格的处理方法及设备。
背景技术
在线电子表格是按行存储数据的电子表格,每行是一个独立的最小的存储单位,每一列都是固定类型的数据,是一种web(World Wide Web,万维网)形态的电子表格。人们在使用在线电子表格过程中,经常会进行大量的编辑操作以对电子表格的内容、样式、结构进行大量的调整,并且每隔一定时间便会对在线电子表格进行快照处理,将快照处理后的在线电子表格作为一个快照,并为该快照分配一个版本号。当电子表格中的记录发生异常或由于其它原因时,需要对电子表格进行数据恢复,将电子表格由当前版本回退到目标历史版本,即直接获取目标历史版本的目标历史版本号,然后查找版本号为该目标历史版本号的快照,并将该快照对应的电子表格作为待回退的电子表格,以在获取新的数据编辑请求时,根据该数据编辑请求,在待回退的电子表格上进行数据编辑处理。
然而,发明人发现:当根据版本号进行版本回退,在待回退的电子表格上进行数据编辑处理的过程中,得到的新的快照会覆盖一些回退之前的原有的快照,例如,目标版本号为V20,在V20的电子表格上进行数据编辑处理的过程中,得到版本号为V21的新的快照,则其会覆盖回退之前的版本号为V21的快照,从而导致原有版本的数据被覆盖。
发明内容
本公开实施例提供一种电子表格的处理方法及设备,以解决根据版本号进行版本回退导致原有版本的行数据被覆盖的问题。
第一方面,本公开实施例提供一种电子表格的处理方法,包括:
获取回退请求,所述回退请求包括回退版本号和回退记录标识;
根据所述回退请求,获取与所述回退版本号和所述回退记录标识对应的待回退的历史电子表格;
获取所述回退版本号下的每个历史电子表格对应的历史记录标识,并根据每个所述历史记录标识,生成不同于每个所述历史记录标识的新的记录标识;
根据所述待回退的历史电子表格和所述新的记录标识,在所述回退版本号下,建立新的电子表格,以在获取数据编辑请求时,根据所述数据编辑请求,在所述新的电子表格上进行数据编辑处理;其中,新的电子表格中每个行数据对应的记录标识均为新的记录标识。
第二方面,本公开实施例提供一种电子表格的处理设备,包括:
请求获取模块,用于获取回退请求,所述回退请求包括回退版本号和回退记录标识;
处理模块,用于根据所述回退请求,获取与所述回退版本号和所述回退记录标识对应的待回退的历史电子表格;
所述处理模块,还用于获取所述回退版本号下的每个历史电子表格对应的历史记录标识,并根据每个所述历史记录标识,生成不同于每个所述历史记录标识的新的记录标识;
所述处理模块,用于根据所述待回退的历史电子表格和所述新的记录标识,在所述回退版本号下,建立新的电子表格,以在获取数据编辑请求时,根据所述数据编辑请求,在所述新的电子表格上进行数据编辑处理;其中,新的电子表格中每个行数据对应的记录标识均为新的记录标识。
第三方面,本公开实施例提供一种电子设备,包括:至少一个处理器和存储器。
所述存储器存储计算机执行指令。
所述至少一个处理器执行所述存储器存储的计算机执行指令,使得所述至少一个处理器执行如上第一方面以及第一方面各种可能的设计所述的电子表格的处理方法。
第四方面,本公开实施例提供一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机执行指令,当处理器执行所述计算机执行指令时,实现如上第一方面以及第一方面各种可能的设计所述的电子表格的处理方法。
第五方面,本公开实施例提供一种计算机程序产品,包括计算机程序指令,该计算机程序指令使得计算机执行如上第一方面以及第一方面各种可能的设计所述的电子表格的处理方法。
第六方面,本公开实施例还提供了一种计算机程序,当计算机程序在计算机上运行时,使得计算机执行如上第一方面以及第一方面各种可能的设计所述的电子表格的处理方法。
本实施例提供的电子表格的处理方法及设备,该方法通过获取与回退请求中的回退版本号和回退记录标识对应的待回退的历史电子表格,即得到所需要回退到的历史电子表格,回退记录标识是用来区分同一版本号下的不同历史电子表格的,生成新的记录标识,该新的记录标识不同于该回退版本号下的每个历史电子表格对应的历史记录标识,然后根据待回退的历史电子表格和新的记录标识,在该回退版本号下,建立新的电子表格,当后续需要进行数据编辑处理时,直接在该新的电子表格上进行即可,对于历史电子表格,除了版本号进行区分之外,还增加了记录标识以辅助版本号进行进一步区分,因此,当当前的电子表格出现故障或者异常时,在回退到历史电子表格后,在此基础上进一步编辑,以及快照保存到历史版本号下时,基于快照保存的电子表格对应的记录标识,也不会出现现有技术中覆盖的问题。
附图说明
为了更清楚地说明本公开实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本公开的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为本公开实施例提供的在线电子表格的示例图;
图2为本公开实施例提供的编辑电子表格的示例图;
图3为现有技术中一种电子表格回退的示例图;
图4为本公开实施例提供的电子表格的处理方法的流程示意图一;
图5为本公开实施例提供的版本号V20下的所有电子表格的示意图;
图6为本公开实施例提供的编辑新的电子表格的示意图;
图7为本公开实施例提供的电子表格的处理方法的流程示意图二;
图8为本公开实施例提供的电子表格的处理方法的流程示意图三;
图9为本公开实施例提供的电子表格的处理方法的流程示意图四;
图10为本公开实施例提供的电子表格的处理设备的结构框图;
图11为本公开实施例提供的电子设备的硬件结构示意图。
具体实施方式
为使本公开实施例的目的、技术方案和优点更加清楚,下面将结合本公开实施例中的附图,对本公开实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本公开一部分实施例,而不是全部的实施例。基于本公开中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本公开保护的范围。
在线电子表格(如图1所示)是按行存储数据的电子表格。人们在使用在线电子表格过程中,经常会进行大量的编辑操作以对表格的内容、样式、结构进行大量的调整,并且每隔一定时间便会对在线电子表格进行快照处理,将快照处理后的在线电子表格作为一个快照,并为该快照分配一个版本号。如图2所示,快照的版本号一般是递增的顺序,例如,V0、V1、…、Vn。为了减少快照占用的存储资源,每隔一定的版本号,才对当前版本号对应的快照进行存储,例如,将V0对应的快照存储后,间隔20个版本号,即对V20对应的快照进行存储,当该在线电子表格中的行数据发生异常或由于其它原因,需要对该在线电子表格进行数据恢复,即将该在线电子表格由当前版本回退到某个历史版本。
参考图3,图3为现有技术中一种版本回退的示例图。现有技术中,参考图3中分割线的左侧附图,每隔20个版本号,便对快照进行保存,即对V0对应的快照、V20对应的快照进行保存。其中,V0对应的快照中的电子表格包括多条行数据,每条行数据均可以通过table id/record revision/record id这三个变量进行确定,该table id(即V0和V20中table)表示电子表格的表格标识,该record revision表示版本号(即V0和V20),该record id表示行编号。另外,图3中的rec_0表示电子表格中的行数据的版本号为V0,rec_20表示电子表格中的行数据的版本号为V20。
当在线电子表格需要进行数据恢复时,例如,将在线电子表格由当前版本回退到V0版本时,查找版本号为V0的快照,将版本号为V0的快照所对应的电子表格作为待回退的电子表格,实现版本的回退,在接收到新的数据编辑请求时,在对该待回退的在线电子表格进行相应的数据编辑处理,并在进行数据编辑处理的过程中,对该回退后的电子表格进行快照处理后,会得到一个新的版本号为V20的快照,参见图3中分割线的右侧附图,新的V20对应的快照会覆盖回退之前的原有的版本号为V20的快照,即会覆盖原有的版本号为V20的快照中的数据,导致回退之前的原有版本的数据被覆盖,因此,当 仅根据版本号进行版本回退时,会出现原有版本的数据被覆盖的问题。
因此,针对上述问题,本发明的技术构思是在进行版本回退时,确定新的待回退的电子表格后,建立一个新的电子表格,通过记录标识将新的电子表格与待回退的电子表格进行区分,以使新的电子表格与待回退的电子表格是两个独立的电子表格,在获取到数据编辑请求后,未直接在该待回退的电子表格上进行相应数据编辑处理,而是在该新的电子表格上进行相应数据编辑处理,且在对该新的电子表格上进行相应数据编辑处理的过程中,不会对待回退的电子表格造成影响,从而在新的电子表格的基础上得到的新的快照不会覆盖在待回退的电子表格的基础上得到的快照,即不会覆盖回退之前的原有的快照。
参考图4,图4为本公开实施例提供的电子表格的处理方法的流程示意图一。本实施例的方法可以应用在终端设备或服务器等电子设备中,该版本回退方法包括:
S401:获取回退请求,回退请求包括回退版本号和回退记录标识。
S402:根据回退请求,获取与回退版本号和回退记录标识对应的待回退的历史电子表格。
可选的,回退请求还包括需要进行数据恢复的电子表格的表格标识。
在本实施例中,在获取到回退请求后,该回退请求中包括表格标识,根据该表格标识确定需要进行数据恢复的电子表格,且该回退请求还包括回退版本号和回退记录标识,获取与回退版本号和回退记录标识对应的待回退的历史电子表格,该待回退的历史电子表格中的行数据便为该需要进行数据恢复的电子表格所需的行数据,即该待回退的历史电子表格为需要回退到的历史电子表格。
其中,版本回退请求可以为用户根据实际需要输入的,例如,用户想要在某个历史版本的基础上重新进行编辑,则输入相应的回退请求。
具体地,回退记录标识是电子表格中的行数据对应的记录标识,其是用来区分同一版本号下的不同电子表格。在确定待回退的历史电子表格是,仅通过回退版本号无法确定待回退的历史电子表格,需要通过回退记录标识进行进一步限定,如图5所示,版本号V20下有3个电子表格,第一个电子表格中的行数据对应的记录标识为0,即第一个电子表格对应的记录标识为0,第二个电子表格对应的记录标识为1,第三个电子表格对应的记录标识为2,仅通过版本号V20无法确定这三个电子表格哪个是待回退的历史电子表格,因此,需要使用记录标识进行进一步限定。
S403:获取回退版本号下的每个历史电子表格对应的历史记录标识,并根据每个历史记录标识,生成不同于每个历史记录标识的新的记录标识。
在本实施例中,获取回退版本号下的每个历史电子表格对应的历史记录表格,得到该回退版本号对应的历史记录标识,然后生成一个新的记录标识,该新的记录标识不同于该回退版本号对应的历史记录标识。
具体地,在生成新的记录标识时,可以从历史记录标识中确定最大的历史记录标识,即获取回退版本号对应的历史记录标识中的最大的历史记录标识,然后将最大的历史记录标识与预设增加数值的和,确定为新的记录标识,从而得到不同于每个历史记录标识的新的记录标识。
其中,预设增加数值可以根据用户需要自行设定,在此,不对其进行限定。
以一个具体应用场景为例,如图5所示,回退版本号为V20,预设增加数值为1,V20对应的历史记录标识有0,1和2,最大的历史记录标识为2,则新的记录标识可以设置为3。
另外,需要说明的是图5中的rec_20_0表示电子表格中的行数据的版本号为V20,记录标识为0,相应地,rec_20_1表示电子表格中的行数据的版本号为V20,记录标识为1,rec_20_2表示电子表格中的行数据的版本号为V20,记录标识为2。
S404:根据待回退的历史电子表格和新的记录标识,在回退版本号下,建立新的电子表格,以在获取数据编辑请求时,根据数据编辑请求,在新的电子表格上进行数据编辑处理。其中,新的电子表格中每个行数据对应的记录标识均为新的记录标识。
在本实施例中,在回退版本号下,建立新的电子表格,该新的电子表格的版本号为该回退版本号,该新的电子表格中的行数据与待回退的历史电子表格中的行数据相同,即该新的电子表格的内容与待回退的历史电子表格的内容相同,且该新的电子表格中的每个行数据对应的记录标识均为新的记录标识,因此,虽然新的电子表格与待回退的历史电子表格的内容相同,版本号相同,但新的电子表格与待回退的历史电子表格为两个独立的电子表格,即使在获取待数据编辑请求后,按照该数据编辑请求,对该新的电子表格进行数据编辑处理也不会对待回退的历史电子表格产生影响,从而在对新的电子表格进行数据编辑处理过程中得到的新的快照也不会对在待回退的历史电子表格的基础上得到的历史快照,即新的快照不会对回退之前原有的快照产生影响。
可选的,数据编辑请求包括在新的电子表格上所需执行的数据编辑处理,例如,新的电子表格中的行数据包括年龄值,将该年龄值加1,在获取到数据编辑请求后,便在新的电子表格上进行相应的数据编辑处理,实现数据编辑请求的响应。
以一个具体应用场景为例,参见图6,回退版本号为V0,回退记录标识为0,将与版本号V0和记录标识0对应的历史电子表格作为待回退的电子表格,图6中的分割线的左侧附图中的版本号为V0的电子表格便为待回退的电子表格,图6中的分割线的左侧附图中的版本号为V1的电子表格为在该待回退的电子表格上进行数据编辑处理的过程中得到的。获取版本号V0下的每个历史电子表格对应的记录标识,得到该版本号V0对应的记录标识,该版本号V0对应的记录标识只有0,生成一个不同于版本号V0对应的记录标识的新的记录标识,例如,新的记录标识为1,在版本号V0下建立一个新的电子表格,该新的电子表格的版本号为V0,新的电子表格对应的记录标识为1,新的电子表格的内容与待回退的历史电子表格的内容相同,即与版本号V0和记录标识1对应的电子表格的内容和与版本号V0和记录标识0对应的历史电子表格的内容相同,在该新的电子表格,即在与版本号V0和记录标识1对应的电子表格上进行数据编辑处理的过程中得到与版本号V1和记录标识1对应的电子表格,即得到与版本号V1和记录标识1对应的快照,该与版本号V1和记录标识1对应的电子表格,其不会覆盖回退之前的原有的与版本号V1和记录标识0对应的电子表格,从而不会覆盖原有版本的数据,版本号V1和记录标识1对应的电子表格以及版本号V1和记录标识0对应的电子表格共同保存在版本号V1下。
另外,图6中的rec_0_0表示电子表格中的行数据的版本号为V0,记录标识为0,rec_1_0表示电子表格中的行数据的版本号为V1,记录标识为0,相应地,rec_0_1表示 电子表格中的行数据的版本号为V0,记录标识为1,rec_1_1表示电子表格中的行数据的版本号为V1,记录标识为1。
在本实例中,在获取到回退请求后,表明需要将需要进行数据恢复的电子表格由当前版本回退到一个历史版本,即回退到待回退的历史电子表格,为了避免出现由于直接回退到待回退的历史电子表格导致在该待回退的历史电子表格的基础上得到的回退之后的快照会覆盖回退之前的原有的快照的情况,在得到回退的历史电子表格后,不直接回退到该待回退的历史电子表格,即不在该待回退的历史电子表格上进行数据编辑处理,而是新建一个新的电子电子表格,该新的电子表格的版本号与该待回退的历史电子表格的版本号相同且两个表格所包括的行数据相同,但新的电子表格的记录标识不同于该待回退的历史电子表格的记录标识,从而使新的电子表格不同于待回退的历史电子表格,两个电子表格相互独立,在获取到新的数据编辑请求后,在该新的电子表格进行相应的数据编辑处理的过程中,得到的新的快照不会覆盖回退之前的原有的快照,当后续进行版本回退时,可以需要进行回退的电子表格回退到任意版本。
另外,在查找某条行数据时,可以通过table id/record revision/record id/history level这四个变量进行确定,该table id表示电子表格的表格标识,该record revision表示版本号,该record id表示行编号,该history level表示记录标识,当获取到这四个变量对应的具体值后,便可以查找到相应的行数据。
从上述描述可知,获取与回退请求中的回退版本号和回退记录标识对应的待回退的历史电子表格,即得到所需要回退到的历史电子表格,回退记录标识是用来区分同一版本号下的不同历史电子表格的,生成新的记录标识,该新的记录标识不同于该回退版本号下的每个历史电子表格对应的历史记录标识,然后根据待回退的历史电子表格和新的记录标识,在该回退版本号下,建立新的电子表格,当后续需要进行数据编辑处理时,直接在该新的电子表格上进行即可,即当当前的电子表格出现故障或者异常时,在回退到历史电子表格后,在新的电子表格上进一步编辑,在将编辑过程中得到的快照保存到历史版本号下时,基于快照保存的电子表格对应的记录标识,也不会出现现有技术中覆盖的问题。
具体地,在对新的电子表格进行数据编辑处理的过程中,会得到新的快照,下面将以一个具体的实施例来描述如何在新的电子表格的基础上得到新的快照的过程。
参考图7,图7为本公开实施例提供的电子表格的处理方法的流程示意图二。本实施例中详细描述如何在新的电子表格的基础上得到新的快照的过程,该电子表格的处理方法包括:
S701:获取回退请求,回退请求包括回退版本号和回退记录标识。
S702:根据回退请求,获取与回退版本号和回退记录标识对应的待回退的历史电子表格。
S703:获取回退版本号下的每个历史电子表格对应的历史记录标识,并根据每个历史记录标识,生成不同于每个历史记录标识的新的记录标识。
S704:根据待回退的历史电子表格和新的记录标识,在回退版本号下,建立新的电子表格,以在获取数据编辑请求时,根据数据编辑请求,在新的电子表格上进行数据编辑处理。其中,新的电子表格中每个行数据对应的记录标识均为新的记录标识。
在本实施例中,步骤S701至S704与上述实施例中步骤S401至S404的一致,详细论述请参考步骤S401至S404的论述,这里不再赘述。
S705:每隔预定时间,确定当前快照对应的版本号,并对新的电子表格进行快照处理,以将快照处理后的新的电子表格存储在当前快照对应的版本号下。
在本实施例中,在建立新的电子表格后,用户可以对该新的电子表格进行数据编辑处理。在用户对新的电子表格进行编辑处理的过程中,每隔预定时间,便确定当前快照对应的版本号,对新的电子表格进行快照处理,将快照处理后的新的电子表格作为一个快照,该快照中的数据与当前新的电子表格中的数据相同,并将该快照保存在当前快照对应的版本号下。
具体地,在确定当前快照对应的版本号时,一般是在上一个快照对应的版本号上自动加上预设值,得到当前快照对应的版本号。
以一个具体应用场景为例,预定时间为5分钟,新的电子表格的版本号为V20,在对新的电子表格进行编辑处理的过程中,经过5分钟后,则当前快照对应的版本号为V21,对新的电子表格进行快照处理,即将当前新的电子表格作为一个快照,并将该快照保存到版本号V21下。再经过5分钟后,则当前快照对应的版本号为V22,对新的电子表格进行快照处理,即将当前新的电子表格作为一个快照,并将该快照保存到版本号V22下。
可选的,若当前快照对应的版本号是历史版本号,则新的电子表格中的行数据对应的新的记录标识不同于当前快照对应的版本号下的历史电子表格中的行数据对应的记录标识。
在本实施例中,在确定当前快照对应的版本号是历史版本号时,表明该当前快照对应的版本号已经存在,但由于新的电子表格中的行数据对应的记录标识不同于该历史版本号对应的记录标识,因此,对新的电子表格进行快照处理后得到的快照不同于该历史版本号下的其它快照,避免出现新的快照覆盖其它快照的情况。
另外,为了实现在某一版本的历史电子表格的基础上得到另一版本的历史电子表格,需要对在电子表格上进行的编辑操作进行存储,即获取预定时间前后快照对应的电子表格之间的编辑操作,该编辑操作实际为由一个快照变更到在该快照之后的相邻的快照所进行编辑操作,并将所述编辑操作存储在历史编辑操作集中,以便于后续可以直接从该历史编辑操作集中获取所需的历史编辑操作。
由于是间隔一定版本号,保存快照的,因此当保存待回退的快照时,即待回退的历史电子表格时,可以直接进行获取,但当未保存待回退的快照时,需要根据其它已保存的快照,即历史电子表格的基础上推到得到该待回退的历史电子表格。下面将以一个具体的实施例来描述如何得到该待回退的历史电子表格的过程。
参考图8,图8为本公开实施例提供的电子表格的处理方法的流程示意图三。本实施例中详细描述如何得到该待回退的历史电子表格的过程,该版本回退方法包括:
S801:获取回退请求,回退请求包括回退版本号和回退记录标识。
S802:根据回退请求,确定历史版本号中是否存在回退版本号。
在本实施例中,在获取到针对电子表格的回退请求后,表明需要对该电子表格进行数据恢复,即将需要进行恢复的电子表格回退到某一历史电子表格,则通过判断该需要进行恢复的电子表格对应的所有历史版本号中是否存在回退版本号,来确定需要回退到 的历史电子表格是否存在。
S803:在确定历史版本号中存在回退版本号时,获取与回退版本号和回退记录标识对应的待回退的历史电子表格。
在本实施例中,在确定所有历史版本号中存在回退版本号时,表明存在需要回退到的历史电子表格,则直接可以通过回退版本号和回退记录标识获取需要回退到的历史电子表格,即待回退的历史电子表格,该待回退的历史电子表格的版本号为回退版本号且该待回退的历史电子表格中的每个行数据对应的记录标识均为该回退记录标识。
S804:在确定历史版本号中不存在回退版本号时,分别获取所有历史电子表格对应的所有版本号,并分别确定所有版本号中每个版本号与回退版本号的差值的绝对值,再将差值绝对值最小的版本号作为第一版本号。
S805:根据第一版本号,回退版本号,第一版本号和回退版本号之间的历史编辑操作,以及回退记录标识,获取待回退的历史电子表格。
在本实施例中,在确定该电子表格对应的所有历史版本号中不存在回退版本号时,表明未保存需要回退到的历史电子表格,即不存在待回退的电子表格,需要利用其它电子表格得到待回退的电子表格,则获取所有历史电子表格对应的所有版本号,然后针对所有版本号中的各版本号,计算该版本号与回退版本号的差值的绝对值,将差值的绝对值最小的版本号作为第一版本号,与该第一版本号和回退记录标识对应的历史电子表格内的数据与待回退的历史电子表格内的数据差异最小,即与该第一版本号和回退记录标识对应的历史电子表格为与该待回退的电子表格最接近的历史电子表格,因此,可以在与该第一版本号和回退记录标识对应的历史电子表格的基础上,根据第一版本号和回退版本号之间的历史编辑操作,快速得到该待回退的电子表格。
具体地,如何在与该第一版本号和回退记录标识对应的历史电子表格的基础上,得到待回退的电子表格,参见图9所示,图9为本公开实施例提供的电子表格的处理方法的流程示意图,本实施例在上述实施例的基础上,例如,在图8所述的实施例的基础上,对S805进行了详细说明。所述根据第一版本号,回退版本号,第一版本号和回退版本号之间的历史编辑操作,以及回退记录标识,获取待回退的历史电子表格,包括:
S901:获取与第一版本号和回退版本记录标识对应的待编辑的历史电子表格。
S902:在确定第一版本号小于回退版本号,则从历史编辑操作集中获取从第一版本号至回退版本号之间的第一历史编辑操作。
在本实施例中,将与第一版本号和回退记录标识对应的历史电子表格作为待编辑的历史电子表格,获取该待编辑的历史电子表格。判断该第一版本号是否小于回退版本号,在确定第一版本号小于回退版本号时,表明该待编辑的历史电子表格为在待回退的历史电子表格之前的版本,需要对该待编辑的历史电子表格执行相关编辑操作以得到待回退的电子表格,则从历史编辑操作集中获取从第一版本号至回退版本号之间的第一历史编辑操作,该第一历史编辑操作实际是指由待编辑的历史电子表格变更到待回退的历史电子表格所进行的编辑操作。
S903:对待编辑的历史电子表格执行第一历史编辑操作,以将编辑后的电子表格作为待回退的历史电子表格。
在得到第一历史编辑操作后,对待编辑的历史电子表格执行第一历史编辑操作,当 所有第一历史编辑操作执行完成后,编辑后的该历史电子表格的行数据与待回退的历史电子表格的行数据相同,则可以将该编辑后的历史电子表格作为待回退的历史电子表格,例如,第一版本号为V1,回退记录标识为0,对与V1和记录标识0对应的历史电子表格执行第一历史编辑操作,当所有第一历史编辑操作执行完成后,可以将得到的编辑后的与V1和记录标识0对应的历史电子表格作为待回退的历史电子表格。
具体地,对待编辑的历史电子表格执行第一历史编辑操作时,需按照第一历史编辑操作的先后执行顺序来执行,即先执行最早执行的第一历史编辑操作。例如,在与V1和记录标识0对应的历史电子表格上先执行操作A,然后执行操作B,最后执行操作C得到与V2和记录标识0对应的历史电子表格,则当V1为第一版本号时,V2为回退版本号时,操作A、操作B和操作C均为第一历史编辑操作,与V1和记录标识0对应的历史电子表格为待编辑的历史电子表格,与V2和记录标识0对应的历史电子表格为待回退的历史电子表格,按照第一历史编辑操作的先后执行顺序,即在待编辑的历史电子表格上先执行操作A,然后执行操作B,最后执行操作C,在操作C执行完毕后,将编辑后的该历史电子表格作为待回退的历史电子表格。
S904:在确定第一版本号大于回退版本号,则从历史编辑操作集中获取从回退版本号至第一版本号之间的第二历史编辑操作。
在本实施例中,在确定第一版本号大于回退版本号时,表明该待编辑的历史电子表格为在待回退的电子表格之后的版本,需要对该待编辑的历史电子表格去除相关编辑操作以得到待回退的电子表格,则从历史编辑操作集中获取从回退版本号至第一版本号之间的第二历史编辑操作,该第二历史编辑操作实际是指由待回退的历史电子表格变更到待编辑的历史电子表格所进行的编辑操作。
S905:从待编辑的历史电子表格中去除第二历史编辑操作,以将编辑后的电子表格作为待回退的历史电子表格。
在本实施例中,在得到第二历史编辑操作后,从待编辑的历史电子表格中去除第二历史编辑操作,当去除所有第二历史编辑操作后,编辑后的该历史电子表格的行数据与待回退的历史电子表格的行数据相同,则可以将该编辑后的历史电子表格作为待回退的历史电子表格,例如,第一版本号为V3,回退记录标识为0,从与V3和记录标识0对应的历史电子表格中去除第二历史编辑操作,当去除所有第二历史编辑操作后,可以将得到的编辑后的与V3和记录标识0对应的历史电子表格作为待回退的历史电子表格。
其中,从待编辑的历史电子表格中去除第二历史编辑操作实际是指对待编辑的历史电子表格执行与第二历史编辑操作相反的操作,例如,第二历史编辑操作为将年龄加1,则其相反的操作为将年龄减1。
具体地,在从待编辑的历史电子表格中去除第二历史编辑操作时,需按照与第二历史编辑操作的执行顺序相反的顺序来去除,即先去除最晚执行的第二历史编辑操作。例如,在与V2和记录标识0对应的历史电子表格上先执行操作D,然后执行操作E,最后执行操作F得到与V3和记录标识0对应的历史电子表格,则当V3为第一版本号时,V2为回退版本号时,操作D、操作E和操作F均为第二历史编辑操作,与V3和记录标识0对应的历史电子表格为待编辑的历史电子表格,与V2和记录标识0对应的历史电子表格为待回退的历史电子表格,按照与第二历史编辑操作的执行顺序相反的顺序去除第二历 史编辑操作,即在待编辑的历史电子表格上先去除操作F,然后去除操作E,最后去除操作D,在操作D去除完毕后,将编辑后的该历史电子表格作为待回退的历史电子表格。
另外,当确定第一版本号的数量为2时,即不仅存在小于回退版本号的第一版本号,也存在大于回退版本号的第一版本号,从所有第一版本号中任意选取一个第一版本号,然后利用选取的第一版本号得到待回退的历史电子表格,例如,第一版本号为V1和V3,选取V3,则将与V3和回退记录标识对应的历史电子表格作为待编辑的历史电子表格。
在本实施例中,在得到第一版本号后,通过判断第一版本号后是大于回退版本号还是小于回退版本号,确定在待编辑的历史电子表格上是执行相关历史编辑操作还是去除相关历史编辑操作,从而保证根据待编辑的历史电子表格得到的待回退的历史电子表格是正确的。
S806:获取回退版本号下的每个历史电子表格对应的历史记录标识,并根据每个历史记录标识,生成不同于每个历史记录标识的新的记录标识。
S807:根据待回退的历史电子表格和新的记录标识,在回退版本号下,建立新的电子表格,以在获取数据编辑请求时,根据数据编辑请求,在新的电子表格上进行数据编辑处理。其中,新的电子表格中每个行数据对应的记录标识均为新的记录标识。
在本实施例中,步骤S806至S807与上述实施例中步骤S403至S404的一致,详细论述请参考步骤S403至S404的论述,这里不再赘述。
在本实施例中,在获取待回退的历史电子表格时,如果历史版本号中存在回退版本号,则可以直接获取到待回退的历史电子表格,实现待回退的电子表格的快速获取,如果历史版本号中不存在回退版本号,表明待回退的历史电子表格不存在,则可以利用存在的历史电子表格得到待回退的历史电子表格,从而保证在进行数据恢复时,可以回退到任意版本的历史电子表格,不会出现当某一版本的历史电子表格不存在时,便无法回退到该历史电子表格,从而造成数据恢复失败的问题。
对应于上文实施例的电子表格的处理方法,图10为本公开实施例提供的电子表格的处理设备的结构框图。为了便于说明,仅示出了与本公开实施例相关的部分。参照图10,电子表格的处理设备1000包括:请求获取模块1001和处理模块1002。其中,请求获取模块1001,用于获取回退请求,回退请求包括回退版本号和回退记录标识。处理模块1002,用于根据回退请求,获取与回退版本号和回退记录标识对应的待回退的历史电子表格。处理模块1002,还用于获取回退版本号下的每个历史电子表格对应的历史记录标识,并根据每个历史记录标识,生成不同于每个历史记录标识的新的记录标识。处理模块1002,用于根据待回退的历史电子表格和新的记录标识,在回退版本号下,建立新的电子表格,以在获取数据编辑请求时,根据数据编辑请求,在新的电子表格上进行数据编辑处理。其中,新的电子表格中每个行数据对应的记录标识均为新的记录标识。
在本公开的一个实施例中,处理模块1002,还用于每隔预定时间,确定当前快照对应的版本号,并对新的电子表格进行快照处理,以将快照处理后的新的电子表格存储在当前快照对应的版本号下。
在本公开的一个实施例中,处理模块1002,还用于若当前快照对应的版本号是历史版本号,则新的电子表格中的行数据对应的新的记录标识不同于当前快照对应的版本号下的历史电子表格中的行数据对应的记录标识。
在本公开的一个实施例中,处理模块1002,还用于获取预定时间前后快照对应的电子表格之间的编辑操作,并将编辑操作存储在历史编辑操作集中。
在本公开的一个实施例中,处理模块1002,还用于根据回退请求,确定历史版本号中是否存在回退版本号。
处理模块1002,还用于在确定历史版本号中存在回退版本号时,获取与回退版本号和回退记录标识对应的待回退的历史电子表格。
在本公开的一个实施例中,处理模块1002,还用于在确定历史版本号中不存在回退版本号时,分别获取所有历史电子表格对应的所有版本号,并分别确定所有版本号中每个版本号与回退版本号的差值的绝对值,再将差值绝对值最小的版本号作为第一版本号。
处理模块1002,还用于根据第一版本号,回退版本号,第一版本号和回退版本号之间的历史编辑操作,以及回退记录标识,获取待回退的历史电子表格。
在本公开的一个实施例中,处理模块1002,还用于获取与第一版本号和回退版本号对应的待编辑的历史电子表格。
处理模块1002,还用于在确定第一版本号小于回退版本号,则从历史编辑操作集中获取从第一版本号至回退版本号之间的第一历史编辑操作。
处理模块1002,还用于对待编辑的历史电子表格执行第一历史编辑操作,以将编辑后的电子表格作为待回退的历史电子表格。
在本公开的一个实施例中,处理模块1002,还用于在确定第一版本号大于回退版本号,则从历史编辑操作集中获取从回退版本号至第一版本号之间的第二历史编辑操作。
处理模块1002,还用于从待编辑的历史电子表格中去除第二历史编辑操作,以将编辑后的电子表格作为待回退的历史电子表格。
在本公开的一个实施例中,处理模块1002,还用于从历史记录标识中确定最大的历史记录标识。
处理模块1002,还用于将最大的历史记录标识与预设增加数值的和,确定为新的记录标识。
本实施例提供的设备,可用于执行上述方法实施例的技术方案,其实现原理和技术效果类似,本实施例此处不再赘述。
参考图11,其示出了适于用来实现本公开实施例的电子设备1100的结构示意图,该电子设备1100可以为终端设备或服务器。其中,终端设备可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、个人数字助理(Personal Digital Assistant,简称PDA)、平板电脑(Portable Android Device,简称PAD)、便携式多媒体播放器(Portable Media Player,简称PMP)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。图11示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。
如图11所示,电子设备1100可以包括处理装置(例如中央处理器、图形处理器等)1101,其可以根据存储在只读存储器(Read Only Memory,简称ROM)1102中的程序或者从存储装置1108加载到随机访问存储器(Random Access Memory,简称RAM)1103中的程序而执行各种适当的动作和处理。在RAM 1103中,还存储有电子设备1100操作所需的各种程序和数据。处理装置1101、ROM 1102以及RAM 1103通过总线1104彼此 相连。输入/输出(input/output,I/O)接口1105也连接至总线1104。
通常,以下装置可以连接至I/O接口1105:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置1106;包括例如液晶显示器(Liquid Crystal Display,简称LCD)、扬声器、振动器等的输出装置1107;包括例如磁带、硬盘等的存储装置1108;以及通信装置1109。通信装置1109可以允许电子设备1100与其他设备进行无线或有线通信以交换数据。虽然图9示出了具有各种装置的电子设备1100,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置1109从网络上被下载和安装,或者从存储装置1108被安装,或者从ROM 1102被安装。在该计算机程序被处理装置1101执行时,执行本公开实施例的方法中限定的上述功能。
需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(electrical programmable ROM,EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(compact disc ROM,CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频,radio frequency)等等,或者上述的任意合适的组合。
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备执行上述实施例所示的方法。
本公开还提供了一种计算机程序,该计算机程序使得计算机执行上述实施例所示的方法。
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可 以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(Local Area Network,简称LAN)或广域网(Wide Area Network,简称WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本公开实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,单元的名称在某种情况下并不构成对该单元本身的限定,例如,第一获取单元还可以被描述为“获取至少两个网际协议地址的单元”。
本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(field-programmable gate array,FPGA)、专用集成电路(application-specific integrated circuit,ASIC)、专用标准产品(application specific standard product,ASSP)、片上系统(system on chip,SOC)、复杂可编程逻辑设备(complex programmable logic device,CPLD)等等。
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。
第一方面,根据本公开的一个或多个实施例,提供了一种电子表格的处理方法,包括:
获取回退请求,所述回退请求包括回退版本号和回退记录标识;
根据所述回退请求,获取与所述回退版本号和所述回退记录标识对应的待回退的历史电子表格;
获取所述回退版本号下的每个历史电子表格对应的历史记录标识,并根据每个所述历史记录标识,生成不同于每个所述历史记录标识的新的记录标识;
根据所述待回退的历史电子表格和所述新的记录标识,在所述回退版本号下,建立新的电子表格,以在获取数据编辑请求时,根据所述数据编辑请求,在所述新的电子表格上进行数据编辑处理;其中,新的电子表格中每个行数据对应的记录标识均为新的记录标识。
根据本公开的一个或多个实施例,所述方法还包括:
每隔预定时间,确定当前快照对应的版本号,并对所述新的电子表格进行快照处理,以将快照处理后的新的电子表格存储在所述当前快照对应的版本号下。
根据本公开的一个或多个实施例,所述方法还包括:
若所述当前快照对应的版本号是历史版本号,则所述新的电子表格中的行数据对应的新的记录标识不同于所述当前快照对应的版本号下的历史电子表格中的行数据对应的记录标识。
根据本公开的一个或多个实施例,所述方法还包括:
获取所述预定时间前后快照对应的电子表格之间的编辑操作,并将所述编辑操作存储在历史编辑操作集中。
根据本公开的一个或多个实施例,所述根据所述回退请求,获取与所述回退版本号和所述回退记录标识对应的待回退的历史电子表格,包括:
根据所述回退请求,确定历史版本号中是否存在所述回退版本号;
在确定所述历史版本号中存在所述回退版本号时,获取与所述回退版本号和所述回退记录标识对应的待回退的历史电子表格。
根据本公开的一个或多个实施例,所述方法还包括:
在确定所述历史版本号中不存在所述回退版本号时,分别获取所有历史电子表格对应的所有版本号,并分别确定所有版本号中每个版本号与所述回退版本号的差值的绝对值,再将差值绝对值最小的版本号作为第一版本号;
根据所述第一版本号,所述回退版本号,所述第一版本号和所述回退版本号之间的历史编辑操作,以及所述回退记录标识,获取所述待回退的历史电子表格。
根据本公开的一个或多个实施例,所述方法还包括:
所述根据所述第一版本号,所述回退版本号,所述第一版本号和所述回退版本号之间的历史编辑操作,以及所述回退记录标识,获取所述待回退的历史电子表格,包括:
获取与所述第一版本号和所述回退版本号对应的待编辑的历史电子表格;
在确定所述第一版本号小于所述回退版本号,则从历史编辑操作集中获取从所述第一版本号至所述回退版本号之间的第一历史编辑操作;
对所述待编辑的历史电子表格执行第一历史编辑操作,以将编辑后的电子表格作为所述待回退的历史电子表格。
根据本公开的一个或多个实施例,所述方法还包括:
在确定所述第一版本号大于所述回退版本号,则从历史编辑操作集中获取从所述回退版本号至所述第一版本号之间的第二历史编辑操作;
从所述待编辑的历史电子表格中去除所述第二历史编辑操作,以将编辑后的电子表格作为所述待回退的历史电子表格。
根据本公开的一个或多个实施例,所述根据每个所述历史记录标识,生成不同于每 个所述历史记录标识的新的记录标识,包括:
从所述历史记录标识中确定最大的历史记录标识;
将所述最大的历史记录标识与预设增加数值的和,确定为所述新的记录标识。
第二方面,根据本公开的一个或多个实施例,提供了一种电子表格的处理设备,包括:
请求获取模块,用于获取回退请求,所述回退请求包括回退版本号和回退记录标识;
处理模块,用于根据所述回退请求,获取与所述回退版本号和所述回退记录标识对应的待回退的历史电子表格;
所述处理模块,还用于获取所述回退版本号下的每个历史电子表格对应的历史记录标识,并根据每个所述历史记录标识,生成不同于每个所述历史记录标识的新的记录标识;
所述处理模块,用于根据所述待回退的历史电子表格和所述新的记录标识,在所述回退版本号下,建立新的电子表格,以在获取数据编辑请求时,根据所述数据编辑请求,在所述新的电子表格上进行数据编辑处理;其中,新的电子表格中每个行数据对应的记录标识均为新的记录标识。
根据本公开的一个或多个实施例,所述处理模块,还用于每隔预定时间,确定当前快照对应的版本号,并对所述新的电子表格进行快照处理,以将快照处理后的新的电子表格存储在所述当前快照对应的版本号下。
根据本公开的一个或多个实施例,所述处理模块,还用于若所述当前快照对应的版本号是历史版本号,则所述新的电子表格中的行数据对应的新的记录标识不同于所述当前快照对应的版本号下的历史电子表格中的行数据对应的记录标识。
根据本公开的一个或多个实施例,所述处理模块,还用于获取所述预定时间前后快照对应的电子表格之间的编辑操作,并将所述编辑操作存储在历史编辑操作集中。
根据本公开的一个或多个实施例,所述处理模块,还用于根据所述回退请求,确定历史版本号中是否存在所述回退版本号;
所述处理模块,还用于在确定所述历史版本号中存在所述回退版本号时,获取与所述回退版本号和所述回退记录标识对应的待回退的历史电子表格。
根据本公开的一个或多个实施例,所述处理模块,还用于在确定所述历史版本号中不存在所述回退版本号时,分别获取所有历史电子表格对应的所有版本号,并分别确定所有版本号中每个版本号与所述回退版本号的差值的绝对值,再将差值绝对值最小的版本号作为第一版本号;
所述处理模块,还用于根据所述第一版本号,所述回退版本号,所述第一版本号和所述回退版本号之间的历史编辑操作,以及所述回退记录标识,获取所述待回退的历史电子表格。
根据本公开的一个或多个实施例,所述处理模块,还用于获取与所述第一版本号和所述回退版本号对应的待编辑的历史电子表格;
所述处理模块,还用于在确定所述第一版本号小于所述回退版本号,则从历史编辑操作集中获取从所述第一版本号至所述回退版本号之间的第一历史编辑操作;
所述处理模块,还用于对所述待编辑的历史电子表格执行第一历史编辑操作,以将 编辑后的电子表格作为所述待回退的历史电子表格。
根据本公开的一个或多个实施例,所述处理模块,还用于在确定所述第一版本号大于所述回退版本号,则从历史编辑操作集中获取从所述回退版本号至所述第一版本号之间的第二历史编辑操作;
所述处理模块,还用于从所述待编辑的历史电子表格中去除所述第二历史编辑操作,以将编辑后的电子表格作为所述待回退的历史电子表格。
根据本公开的一个或多个实施例,所述处理模块,还用于从所述历史记录标识中确定最大的历史记录标识;
所述处理模块,还用于将所述最大的历史记录标识与预设增加数值的和,确定为所述新的记录标识。
第三方面,根据本公开的一个或多个实施例,提供了一种电子设备,包括:至少一个处理器和存储器;
所述存储器存储计算机执行指令;
所述至少一个处理器执行所述存储器存储的计算机执行指令,使得所述至少一个处理器执行如上第一方面以及第一方面各种可能的设计所述的电子表格的处理方法。
第四方面,根据本公开的一个或多个实施例,提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机执行指令,当处理器执行所述计算机执行指令时,实现如上第一方面以及第一方面各种可能的设计所述的电子表格的处理方法。
第五方面,根据本公开的一个或多个实施例,提供了一种计算机程序产品,包括计算机程序指令,该计算机程序指令使得计算机执行如上第一方面以及第一方面各种可能的设计所述的电子表格的处理方法。
第六方面,根据本公开的一个或多个实施例,提供了一种计算机程序,当计算机程序在计算机上运行时,使得计算机执行如上第一方面以及第一方面各种可能的设计所述的电子表格的处理方法。
以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开中所涉及的公开范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述公开构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。
此外,虽然采用特定次序描绘了各操作,但是这不应当理解为要求这些操作以所示出的特定次序或以顺序次序执行来执行。在一定环境下,多任务和并行处理可能是有利的。同样地,虽然在上面论述中包含了若干具体实现细节,但是这些不应当被解释为对本公开的范围的限制。在单独的实施例的上下文中描述的某些特征还可以组合地实现在单个实施例中。相反地,在单个实施例的上下文中描述的各种特征也可以单独地或以任何合适的子组合的方式实现在多个实施例中。
尽管已经采用特定于结构特征和/或方法逻辑动作的语言描述了本主题,但是应当理解所附权利要求书中所限定的主题未必局限于上面描述的特定特征或动作。相反,上面所描述的特定特征和动作仅仅是实现权利要求书的示例形式。

Claims (22)

  1. 一种电子表格的处理方法,其特征在于,所述方法包括:
    获取回退请求,所述回退请求包括回退版本号和回退记录标识;
    根据所述回退请求,获取与所述回退版本号和所述回退记录标识对应的待回退的历史电子表格;
    获取所述回退版本号下的每个历史电子表格对应的历史记录标识,并根据每个所述历史记录标识,生成不同于每个所述历史记录标识的新的记录标识;
    根据所述待回退的历史电子表格和所述新的记录标识,在所述回退版本号下,建立新的电子表格,以在获取数据编辑请求时,根据所述数据编辑请求,在所述新的电子表格上进行数据编辑处理;其中,新的电子表格中每个行数据对应的记录标识均为新的记录标识。
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    每隔预定时间,确定当前快照对应的版本号,并对所述新的电子表格进行快照处理,以将快照处理后的新的电子表格存储在所述当前快照对应的版本号下。
  3. 根据权利要求2所述的方法,其特征在于,所述方法还包括:
    若所述当前快照对应的版本号是历史版本号,则所述新的电子表格中的行数据对应的新的记录标识不同于所述当前快照对应的版本号下的历史电子表格中的行数据对应的记录标识。
  4. 根据权利要求2或3所述的方法,其特征在于,所述方法还包括:
    获取所述预定时间前后快照对应的电子表格之间的编辑操作,并将所述编辑操作存储在历史编辑操作集中。
  5. 根据权利要求1至4任一项所述的方法,其特征在于,所述根据所述回退请求,获取与所述回退版本号和所述回退记录标识对应的待回退的历史电子表格,包括:
    根据所述回退请求,确定历史版本号中是否存在所述回退版本号;
    在确定所述历史版本号中存在所述回退版本号时,获取与所述回退版本号和所述回退记录标识对应的待回退的历史电子表格。
  6. 根据权利要求5所述的方法,其特征在于,所述方法还包括:
    在确定所述历史版本号中不存在所述回退版本号时,分别获取所有历史电子表格对应的所有版本号,并分别确定所有版本号中每个版本号与所述回退版本号的差值的绝对值,再将差值绝对值最小的版本号作为第一版本号;
    根据所述第一版本号,所述回退版本号,所述第一版本号和所述回退版本号之间的历史编辑操作,以及所述回退记录标识,获取所述待回退的历史电子表格。
  7. 根据权利要求6所述的方法,其特征在于,所述方法还包括:
    所述根据所述第一版本号,所述回退版本号,所述第一版本号和所述回退版本号之间的历史编辑操作,以及所述回退记录标识,获取所述待回退的历史电子表格,包括:
    获取与所述第一版本号和所述回退版本号对应的待编辑的历史电子表格;
    在确定所述第一版本号小于所述回退版本号,则从历史编辑操作集中获取从所述第一版本号至所述回退版本号之间的第一历史编辑操作;
    对所述待编辑的历史电子表格执行第一历史编辑操作,以将编辑后的电子表格作为所述待回退的历史电子表格。
  8. 根据权利要求7所述的方法,其特征在于,所述方法还包括:
    在确定所述第一版本号大于所述回退版本号,则从历史编辑操作集中获取从所述回退版本号至所述第一版本号之间的第二历史编辑操作;
    从所述待编辑的历史电子表格中去除所述第二历史编辑操作,以将编辑后的电子表格作为所述待回退的历史电子表格。
  9. 根据权利要求1至8任一项所述的方法,其特征在于,所述根据每个所述历史记录标识,生成不同于每个所述历史记录标识的新的记录标识,包括:
    从所述历史记录标识中确定最大的历史记录标识;
    将所述最大的历史记录标识与预设增加数值的和,确定为所述新的记录标识。
  10. 一种电子表格的处理设备,其特征在于,所述设备包括:
    请求获取模块,用于获取回退请求,所述回退请求包括回退版本号和回退记录标识;
    处理模块,用于根据所述回退请求,获取与所述回退版本号和所述回退记录标识对应的待回退的历史电子表格;
    所述处理模块,还用于获取所述回退版本号下的每个历史电子表格对应的历史记录标识,并根据每个所述历史记录标识,生成不同于每个所述历史记录标识的新的记录标识;
    所述处理模块,用于根据所述待回退的历史电子表格和所述新的记录标识,在所述回退版本号下,建立新的电子表格,以在获取数据编辑请求时,根据所述数据编辑请求,在所述新的电子表格上进行数据编辑处理;其中,新的电子表格中每个行数据对应的记录标识均为新的记录标识。
  11. 根据权利要求10所述的设备,其特征在于,所述处理模块,还用于每隔预定时间,确定当前快照对应的版本号,并对所述新的电子表格进行快照处理,以将快照处理后的新的电子表格存储在所述当前快照对应的版本号下。
  12. 根据权利要求11所述的设备,其特征在于,所述处理模块,还用于若所述当前快照对应的版本号是历史版本号,则所述新的电子表格中的行数据对应的新的记录标识不同于所述当前快照对应的版本号下的历史电子表格中的行数据对应的记录标识。
  13. 根据权利要求11或12所述的设备,其特征在于,所述处理模块,还用于获取所述预定时间前后快照对应的电子表格之间的编辑操作,并将所述编辑操作存储在历史编辑操作集中。
  14. 根据权利要求10至13任一项所述的设备,其特征在于,所述处理模块,还用于根据所述回退请求,确定历史版本号中是否存在所述回退版本号;
    所述处理模块,还用于在确定所述历史版本号中存在所述回退版本号时,获取与所述回退版本号和所述回退记录标识对应的待回退的历史电子表格。
  15. 根据权利要求14所述的设备,其特征在于,所述处理模块,还用于在确定所述历史版本号中不存在所述回退版本号时,分别获取所有历史电子表格对应的所有版本号,并分别确定所有版本号中每个版本号与所述回退版本号的差值的绝对值,再将差值绝对值最小的版本号作为第一版本号;
    所述处理模块,还用于根据所述第一版本号,所述回退版本号,所述第一版本号和所述回退版本号之间的历史编辑操作,以及所述回退记录标识,获取所述待回退的历史电子表格。
  16. 根据权利要求15所述的设备,其特征在于,所述处理模块,还用于获取与所述第一版本号和所述回退版本号对应的待编辑的历史电子表格;
    所述处理模块,还用于在确定所述第一版本号小于所述回退版本号,则从历史编辑操作集中获取从所述第一版本号至所述回退版本号之间的第一历史编辑操作;
    所述处理模块,还用于对所述待编辑的历史电子表格执行第一历史编辑操作,以将编辑后的电子表格作为所述待回退的历史电子表格。
  17. 根据权利要求16所述的设备,其特征在于,所述处理模块,还用于在确定所述第一版本号大于所述回退版本号,则从历史编辑操作集中获取从所述回退版本号至所述第一版本号之间的第二历史编辑操作;
    所述处理模块,还用于从所述待编辑的历史电子表格中去除所述第二历史编辑操作,以将编辑后的电子表格作为所述待回退的历史电子表格。
  18. 根据权利要求10至17任一项所述的设备,其特征在于,所述处理模块,还用于从所述历史记录标识中确定最大的历史记录标识;
    所述处理模块,还用于将所述最大的历史记录标识与预设增加数值的和,确定为所述新的记录标识。
  19. 一种电子设备,其特征在于,包括:至少一个处理器和存储器;
    所述存储器存储计算机执行指令;
    所述至少一个处理器执行所述存储器存储的计算机执行指令,使得所述至少一个处理器执行如权利要求1至9任一项所述的电子表格的处理方法。
  20. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算机执行指令,当处理器执行所述计算机执行指令时,实现如权利要求1至9任一项所述的电子表格的处理方法。
  21. 一种计算机程序产品,其特征在于,包括计算机程序指令,所述计算机程序指令被计算机执行时,使得所述计算机实现如权利要求1至9任一项所述的电子表格的处理方法。
  22. 一种计算机程序,其特征在于,所述计算机程序被计算机执行时,使得所述计算机实现如权利要求1至9任一项所述的电子表格的处理方法。
PCT/CN2021/112320 2020-08-27 2021-08-12 电子表格的处理方法及设备 WO2022042322A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010874582.1 2020-08-27
CN202010874582.1A CN112016284B (zh) 2020-08-27 2020-08-27 电子表格的处理方法及设备

Publications (1)

Publication Number Publication Date
WO2022042322A1 true WO2022042322A1 (zh) 2022-03-03

Family

ID=73503610

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/112320 WO2022042322A1 (zh) 2020-08-27 2021-08-12 电子表格的处理方法及设备

Country Status (2)

Country Link
CN (1) CN112016284B (zh)
WO (1) WO2022042322A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112016284B (zh) * 2020-08-27 2023-08-01 北京字节跳动网络技术有限公司 电子表格的处理方法及设备
CN112835492A (zh) * 2021-02-01 2021-05-25 长沙市到家悠享网络科技有限公司 表单快照回填方法、装置、设备和存储介质
CN114064665B (zh) * 2022-01-19 2022-07-05 浙江省人力资源和社会保障信息中心 一种数据回退方法、系统、电子设备及可存储介质

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150154413A1 (en) * 2013-12-03 2015-06-04 International Business Machines Corporation Managing Document Revisions
CN107220315A (zh) * 2017-05-16 2017-09-29 北京酷我科技有限公司 一种app版本更新时数据库降级的用户数据保护方法
CN107741889A (zh) * 2017-09-01 2018-02-27 广州视源电子科技股份有限公司 文档恢复方法、系统、可读存储介质及终端
CN109308231A (zh) * 2017-07-28 2019-02-05 中国石油化工股份有限公司 一种空间数据版本的管理方法
CN109492200A (zh) * 2018-10-26 2019-03-19 天津字节跳动科技有限公司 协同文档还原方法、装置、存储介质及电子设备
US10534858B2 (en) * 2016-01-11 2020-01-14 Microsoft Technology Licensing, Llc. Document version of interest discoverability and persistence
CN112016284A (zh) * 2020-08-27 2020-12-01 北京字节跳动网络技术有限公司 电子表格的处理方法及设备

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150154413A1 (en) * 2013-12-03 2015-06-04 International Business Machines Corporation Managing Document Revisions
US10534858B2 (en) * 2016-01-11 2020-01-14 Microsoft Technology Licensing, Llc. Document version of interest discoverability and persistence
CN107220315A (zh) * 2017-05-16 2017-09-29 北京酷我科技有限公司 一种app版本更新时数据库降级的用户数据保护方法
CN109308231A (zh) * 2017-07-28 2019-02-05 中国石油化工股份有限公司 一种空间数据版本的管理方法
CN107741889A (zh) * 2017-09-01 2018-02-27 广州视源电子科技股份有限公司 文档恢复方法、系统、可读存储介质及终端
CN109492200A (zh) * 2018-10-26 2019-03-19 天津字节跳动科技有限公司 协同文档还原方法、装置、存储介质及电子设备
CN112016284A (zh) * 2020-08-27 2020-12-01 北京字节跳动网络技术有限公司 电子表格的处理方法及设备

Also Published As

Publication number Publication date
CN112016284A (zh) 2020-12-01
CN112016284B (zh) 2023-08-01

Similar Documents

Publication Publication Date Title
WO2022042322A1 (zh) 电子表格的处理方法及设备
CN111198859B (zh) 数据处理方法、装置、电子设备及计算机可读存储介质
CN111857720B (zh) 用户界面状态信息的生成方法、装置、电子设备及介质
CN110704833A (zh) 数据权限配置方法、设备、电子设备及存储介质
WO2020119484A1 (zh) 一种信息提示的方法、装置、电子设备及可读介质
CN111163336A (zh) 视频资源推送方法、装置、电子设备及计算机可读介质
CN111259066A (zh) 服务器集群数据同步方法及装置
CN111460432B (zh) 在线文档权限控制方法、装置、设备及计算机可读介质
CN111274104B (zh) 数据处理方法、装置、电子设备及计算机可读存储介质
CN111198853B (zh) 数据处理方法、装置、电子设备及计算机可读存储介质
CN111596992A (zh) 导航栏展示方法、装置和电子设备
CN111177260A (zh) 数据库远程复制方法、装置及电子设备
WO2022017458A1 (zh) 同步数据方法、装置、电子设备和介质
CN111143355B (zh) 数据处理方法及装置
CN111538717B (zh) 数据处理的方法、装置、电子设备及计算机可读介质
CN111338827B (zh) 表格数据的粘贴方法、装置以及电子设备
CN116360710B (zh) 应用于服务器集群的数据存储方法、电子设备和可读介质
CN115827415B (zh) 系统进程性能测试方法、装置、设备和计算机介质
CN116467178B (zh) 数据库检测方法、装置、电子设备和计算机可读介质
CN116701181B (zh) 信息校验流程展示方法、装置、设备和计算机可读介质
CN117369952B (zh) 集群的处理方法、装置、设备及存储介质
CN116431523B (zh) 一种测试数据管理方法、装置、设备及存储介质
CN118035594B (zh) 生产文档访问方法、装置、电子设备与计算机可读介质
CN112346630B (zh) 状态确定方法、装置、设备和计算机可读介质
CN109150612B (zh) 一种用于无人车的基于分布式系统的检测方法及电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21860161

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 23/06/2023)

122 Ep: pct application non-entry in european phase

Ref document number: 21860161

Country of ref document: EP

Kind code of ref document: A1