Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing the devices, modules or units, and are not used for limiting the devices, modules or units to be different devices, modules or units, and also for limiting the sequence or interdependence relationship of the functions executed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
The following describes the technical solutions of the present disclosure and how to solve the above technical problems in specific embodiments. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present disclosure will be described below with reference to the accompanying drawings.
The execution subject of the technical scheme of the present disclosure is a computer device, including but not limited to a server, a personal computer, a notebook computer, a tablet computer, a smart phone, and the like. The computer equipment comprises user equipment and network equipment. Wherein, the user equipment includes but is not limited to computers, smart phones, PDAs, etc.; network devices include, but are not limited to, a single network server, a server group of multiple network servers, or a Cloud of numerous computers or network servers in Cloud Computing (Cloud Computing), wherein Cloud Computing is one type of distributed Computing, a super virtual computer consisting of a collection of loosely coupled computers. Wherein, the computer equipment can be operated alone to realize the disclosure, and also can be accessed to the network and realize the disclosure through the interactive operation with other computer equipment in the network. The network in which the computer device is located includes, but is not limited to, the internet, a wide area network, a metropolitan area network, a local area network, a VPN network, etc.
As shown in fig. 1, the online table data in the technical solution of the present disclosure may be split into metadata and cell data (e.g., sub-table data shown in the figure), where the cell data may be further split into block data, and as shown in the figure, the sub-table data may be split into a plurality of block data, and after splitting the sub-table, the storing, transmitting, and loading are facilitated. The metadata may be related data stored in the cell and used for performing calculation, filtering, and other processing on the cell data, such as "formula, filtering" of the metadata portion shown in the figure.
Fig. 2 is a schematic flow chart of an online table data processing method according to an embodiment of the present disclosure, and as shown in fig. 2, the method may include:
step S101, receiving a data restoration request aiming at an online form, wherein the online form corresponds to metadata of each version, the metadata of at least two versions correspond to a correlation relationship, and the correlation relationship is the correspondence relationship between a version identifier of the metadata and cell data of the version;
wherein the data restore request may be a request to restore the online form from a current version to a historical version. The online table corresponds to metadata of each version, the metadata of each version has a corresponding version identifier, the version identifier of the metadata changes once for each editing operation of the online table, the version identifier of the block data targeted by the editing operation also changes correspondingly, each unit cell data comprises at least one block data, and the version identifiers of the block data may be the same or different.
The metadata of at least two versions of the online table are in corresponding association relationship, the association relationship is the correspondence relationship between the version identification of the metadata and the cell data of the version, the version identification of the metadata and the cell data of the version are stored in association, and the corresponding cell data can be inquired through the version identification of the metadata corresponding to the association relationship.
Step S102, determining the identification of the target version of the metadata to be restored based on the data restoration request;
specifically, the data restoration request is analyzed, and which historical version the online form needs to be restored from the current version, that is, the target version (designated historical version) of the metadata to be restored, can be determined according to the analysis result, so that the identifier of the target version of the metadata to be restored is determined. The identifier of the target version may specifically be identification information capable of uniquely determining the version of the metadata, for example, the version number, which may be in a digital form, and the value of the version number may be increased according to the increase of the number of editing operations.
In a specific example, as shown in fig. 3, the version number of the metadata of the online form data is 100, and the corresponding associated cell data includes: block data 1, corresponding to the data of 1-200 rows in the table data (block 1, row number: 1-200 shown in the figure), block data 2, corresponding to the data of 201-400 rows in the table data (block 2, row number: 201-400 shown in the figure), block data 3, corresponding to the data of 401-600 rows in the table data (block 3, row number: 401-600 shown in the figure); the editing operation as shown in the figure is performed: setting a cell of a 300 th row, wherein the version number of the editing operation is as follows: 101, since the editing operation is to edit the data in the cell of the 300 th row of the table data, and the 300 th row of data corresponds to the block 2, the block 2 in the online table data after the editing operation is changed to the block 2-1, and the version number is 101.
Step S103, acquiring cell data corresponding to the metadata to be restored based on the identification and the incidence relation of the target version;
after the identification of the target version is determined, the cell data corresponding to the version identification of the metadata of the target version can be inquired according to the identification and the association relation of the target version.
As an example shown in fig. 3, according to the version identification 100 of the metadata and the corresponding association relationship, the corresponding cell data block 1, block 2, and block 3 can be queried; according to the version identification 101 of the metadata and the corresponding association relationship, the corresponding cell data block 1, block 2-1 and block 3 can be inquired.
And step S104, performing data reduction processing on the online table based on the acquired cell data.
Specifically, the cell data of the current version corresponding to the metadata is updated to the cell data corresponding to the metadata of the target version, and the metadata of the target version is used for covering the metadata of the current version, so that the metadata and the cell data of the online form of the current version are restored to the metadata and the cell data of the target version.
The processing manner of the above steps S103-S104 is a processing manner under the condition that the metadata of the target version has a corresponding association relationship, and when the metadata of the target version does not have a corresponding association relationship, a specific implementation manner of performing data restoration on the online table is shown in the following embodiment.
In a possible implementation manner, when there is no corresponding association relationship in the metadata of the target version, the method further includes:
determining an identifier of an associated version of the target version, wherein the associated version is a version which is positioned in front of the target version, is closest to the target version and has a corresponding association relation;
based on the identification and the association relationship of the association version, acquiring cell data corresponding to the association version, and acquiring corresponding editing operation between the association version and a target version;
performing data reduction processing on the online form based on the acquired cell data, including:
and performing data reduction processing on the online table based on the cell data corresponding to the associated version and the editing operation.
In the embodiment of the disclosure, for the metadata, the association relationship may not be configured for the metadata of each version, and the association relationship may be configured once at intervals for the metadata of several versions, and when the form data is restored, the restoration to the target version may be implemented by using the metadata configured with the association relationship, and the association relationship does not need to be configured for the metadata of each version, thereby reducing the number of times of configuration and saving the storage space.
In practical application, when the metadata of the target version does not have a corresponding association relationship, the metadata of the associated version of the target version and the cell data are required to be used for performing data reduction processing on the online form of the current version. The associated version is a version which is positioned before the target version, is closest to the target version and has a corresponding association relationship. Because the associated version is different from the target version, besides the cell data corresponding to the associated version, the corresponding editing operation between the associated version and the target version needs to be acquired, and the editing operation is applied to the cell data corresponding to the associated version, thereby realizing the purpose of restoring the online form of the current version to the target version. In the embodiment, the metadata of the associated version and the cell data are used for restoring the online form of the current version, so that the problem that when the target version has no association relationship, the metadata of the initial version can only be used for calculation, and calculation resources are wasted is solved.
In a specific embodiment, as shown in fig. 4, when configuring an association relationship corresponding to metadata, configuring an association relationship once at an interval of two versions, where metadata with a version number of 1 has an association relationship, and associated cell data are a block 1 (version number 1) and a block 2 (version number 1); metadata with version numbers 2 and 3 do not have an association relationship, the metadata with version number 2 corresponds to a block 1 (version number 2) and a block 2 (version number 1) in the graph, is not the association relationship corresponding to the metadata with version number 2, but is block data corresponding to the metadata with the version, and similarly, the metadata with version number 3 corresponds to the block 1 (version number 2) and the block 2 (version number 3) in the graph, nor is the association relationship corresponding to the metadata with version number 3, but is block data corresponding to the metadata with the version; the metadata with the version number of 4 has an association relationship, and the associated cell data are a block 1 (version number 2) and a block 2 (version number 4); metadata with version number 5 is metadata of the current version, and there is no association, and corresponds to a block 1 (version number 5) and a block 2 (version number 4) in the drawing, but is not an association corresponding to the metadata with version number 5, but block data corresponding to the metadata of the version. After the editing operation a1, partition 1 (version number 1) is updated to partition 1 (version number 2), and after the editing operation a2, partition 2 (version number 1) is updated to partition 2 (version number 3). If the metadata with the version numbers 1 and 4 have an association relationship, the cell data corresponding to the metadata of the version can be determined according to the association relationship and the version numbers. If there is no association among metadata with version numbers 2, 3, and 5, the cell data of the corresponding version cannot be determined.
When data is restored, because metadata with a version number of 4 has an association relationship, if an online form of a current version (metadata with a version number of 5) is to be restored to an online form of metadata with a version number of 4, the version number of a target version is 4, the association relationship of the metadata with the version number of 4 is obtained, cell data corresponding to the metadata with the version number of 4 is obtained according to the association relationship, the cell data corresponding to the metadata with the current version is updated to the cell data corresponding to the metadata with the version number of 4, and the metadata with the version number of 4 is used for covering the metadata with the current version.
Because the metadata with the version number of 3 has an association relationship, if the online table of the current version is required to be restored to the online table of the metadata with the version number of 3, the version number of the target version is 3, the association version of the target version is determined, that is, the version number is 1, the metadata with the version number of 1 covers the metadata of the current version, and the cell data corresponding to the metadata with the version number of 1 is obtained, and the editing operations a1 and a2 are obtained and applied to the cell data corresponding to the metadata with the version number of 1, so as to obtain the online table data of the metadata with the version number of 3.
In one possible implementation, the method further includes:
and storing the metadata and the cell data of the online form after data reduction processing into a preset database.
In practical application, the metadata and the cell data after each data reduction processing can be stored in a preset database, so that subsequent query and call of the data are facilitated.
Besides the reduction processing of the online form, the editing processing of the online form can also be performed, and the specific implementation manner is shown in the following embodiment.
In one possible implementation, the method further includes:
receiving an editing request aiming at the online table, and determining metadata and cell data corresponding to the editing request;
loading metadata and cell data corresponding to the editing request into a memory, and performing corresponding editing processing on the cell data based on the editing request to obtain edited cell data;
and updating the version identification of the metadata based on the edited cell data to obtain the updated metadata.
In practical application, the method can also be used for editing the online form, receiving an editing request for the online form, analyzing the editing request, determining metadata and corresponding cell data corresponding to the editing request according to an analysis result, loading the metadata and the corresponding cell data into a memory, correspondingly editing the cell data, and updating the version identifier of the metadata based on the edited cell data.
In one possible implementation, the method further includes:
and when the version identification of the updated metadata meets a first preset condition, establishing and storing an association relation corresponding to the metadata of the version.
In practical application, the first preset condition may be set according to specific needs, for example, the association relationship corresponding to the metadata may be stored every 5 versions, the number of the alternate versions may be set according to needs, and the more versions of the association relationship of the stored metadata, the smaller the calculation amount when performing the data reduction technology.
When the online form is used daily, all cell data are stored, and storage space is greatly wasted. Taking only one block data of each version of the online table as an example, and the version number of the current editing operation is 1000, the online table has 1000 block data in total, while the latest version of the online table only needs one block data, and the storage space utilization rate is only 0.1%. Therefore, the cell data that is not needed to be used needs to be determined and deleted, which is specifically shown in the following embodiment.
In one possible implementation, the method further includes:
determining the latest version identification of the metadata of the online form data, and acquiring the association relationship of the metadata before the latest version;
acquiring cell data having an association relation with metadata before the latest version based on the association relation of the metadata before the latest version;
traversing all the cell data before the latest version, and marking the cell data which has an association relation with the metadata before the latest version and the cell data of the latest version;
all unmarked cell data is deleted.
In practical applications, the cell data having an association relationship with the metadata of each version and the cell data of the latest version may be marked, and the unmarked cell data may be deleted. Unmarked cell data are not used subsequently, and the storage space is wasted, so that the unmarked cell data are deleted.
In the embodiment shown in fig. 4, the block 1 (version number 1), the block 2 (version number 1), the block 1 (version number 2), the block 2 (version number 4), and the latest version of cell data, which have an association relationship with the respective versions of metadata, are: the block 1 (version number 5) and the block 2 (version number 4) are marked, and unmarked blocks are deleted.
In addition to determining the cell data to be deleted by means of the mark, it can also determine which cell data to delete by means of copying the cell data having an association relationship with the metadata, as shown in the following embodiments.
In one possible implementation, the method further includes:
copying cell data having an incidence relation with all metadata, and storing the cell data in a preset database;
and deleting the cell data which is not stored in the preset database before the latest version.
In practical application, it is also not necessary to traverse all the cell data before the latest version, but when the association relationship of the metadata is stored each time, the cell data having the association relationship with the metadata is stored in the preset database, and when the cell data before the latest version and stored in the preset database is subsequently subjected to data reduction, the cell data before the latest version and not stored in the preset database may be deleted.
In a specific embodiment, as shown in fig. 5, a block 1 (version number 1) and a block 2 (version number 1) which have an association relationship with metadata with a version number of 1 are copied to obtain a History block 1 (version number 1) and a History block 2 (version number 1), respectively, and the obtained History block 1 (version number 1) and History block 2 (version number 1) are stored in a preset database; copying a block 1 (version number 2) and a block 2 (version number 4) which have an association relation with metadata with a version number of 4 to obtain a History block 1 (version number 2) and a History block 2 (version number 4), respectively, storing the History block 1 and the History block 2 into a preset database, and deleting unit lattice data (all white background blocks shown in the figure) which are not stored in the database before the latest version.
In the online form data processing method provided by the embodiment of the disclosure, a data restoration request for an online form is received, the online form corresponds to metadata of each version, the metadata of at least two versions correspond to an association relationship, and the association relationship is a correspondence between a version identifier of the metadata and cell data of the version; determining an identifier of a target version of metadata to be restored based on the data restoration request; acquiring cell data corresponding to metadata to be restored based on the identification and the association relation of the target version; and carrying out data reduction processing based on the acquired cell data. According to the technical scheme provided by the disclosure, at least two versions of metadata in the versions of metadata corresponding to the online form are associated with the association relationship, the data of the online form is restored based on the metadata with the association relationship, calculation is not needed to be started from the initial version, and the efficiency of restoring the data of the online form is improved.
Based on the same principle as the method shown in fig. 2, an embodiment of the present disclosure also provides an online form data processing apparatus 20, as shown in fig. 6, where the online form data processing apparatus 20 may include:
the receiving module 21 is configured to receive a data restoring request for an online form, where the online form corresponds to metadata of each version, and at least two versions of the metadata correspond to an association relationship, where the association relationship is a correspondence relationship between a version identifier of the metadata and cell data of the version;
a determining module 22, configured to determine, based on the data restoring request, an identifier of a target version of the metadata to be restored;
the obtaining module 23 is configured to obtain cell data corresponding to the metadata to be restored based on the identifier and the association relationship of the target version;
and the restoring module 24 is configured to perform data restoring processing on the online table based on the acquired cell data.
In a possible implementation manner, when there is no corresponding association relationship in the metadata of the target version, the online form data processing apparatus 20 further includes an association version determining module, configured to:
determining an identifier of an associated version of the target version, wherein the associated version is a version which is positioned in front of the target version, is closest to the target version and has a corresponding association relation;
based on the identification and the association relationship of the association version, acquiring cell data corresponding to the association version, and acquiring corresponding editing operation between the association version and a target version;
and the restoring module 24 is configured to perform data restoring processing on the online table based on the cell data corresponding to the associated version and the editing operation.
In a possible implementation, the online form data processing apparatus 20 further includes a storage module configured to:
and storing the metadata and the cell data of the online form after data reduction processing into a preset database.
In one possible implementation, the online form data processing apparatus 20 further includes an editing module configured to:
receiving an editing request aiming at the online table, and determining metadata and cell data corresponding to the editing request;
loading metadata and cell data corresponding to the editing request into a memory, and performing corresponding editing processing on the cell data based on the editing request to obtain edited cell data;
and updating the version identification of the metadata based on the edited cell data to obtain the updated metadata.
In a possible implementation manner, the online form data processing apparatus 20 further includes an association relationship establishing module, configured to:
and when the version identification of the updated metadata meets a first preset condition, establishing and storing an association relation corresponding to the metadata of the version.
In one possible implementation, the online form data processing apparatus 20 further includes a first cell data processing module configured to:
determining the latest version identification of the metadata of the online form data, and acquiring the association relationship of the metadata before the latest version;
acquiring cell data having an association relation with metadata before the latest version based on the association relation of the metadata before the latest version;
traversing all the cell data before the latest version, and marking the cell data which has an association relation with the metadata before the latest version and the cell data of the latest version;
all unmarked cell data is deleted.
In a possible implementation, the online form data processing apparatus 20 further includes a second cell data processing module, configured to:
copying cell data having an incidence relation with all metadata, and storing the cell data in a preset database;
and deleting the cell data which is not stored in the preset database before the latest version.
The online form data processing device provided by the embodiment of the disclosure receives a data restoration request for an online form, the online form corresponds to metadata of each version, the metadata of at least two versions correspond to an association relationship, and the association relationship is a correspondence relationship between a version identifier of the metadata and cell data of the version; determining an identifier of a target version of metadata to be restored based on the data restoration request; acquiring cell data corresponding to metadata to be restored based on the identification and the association relation of the target version; and carrying out data reduction processing based on the acquired cell data. According to the technical scheme provided by the disclosure, at least two versions of metadata in the versions of metadata corresponding to the online form are associated with the association relationship, the data of the online form is restored based on the metadata with the association relationship, calculation is not needed to be started from the initial version, and the efficiency of restoring the data of the online form is improved.
Referring now to FIG. 7, a block diagram of an electronic device 600 suitable for use in implementing embodiments of the present disclosure is shown. The execution subject of the technical solution of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle-mounted terminal (e.g., a car navigation terminal), etc., and a stationary terminal such as a digital TV, a desktop computer, etc. The electronic device shown in fig. 7 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
The electronic device includes: a memory and a processor, wherein the processor may be referred to as a processing device 601 described below, and the memory may include at least one of a Read Only Memory (ROM)602, a Random Access Memory (RAM)603, and a storage device 608, which are described below:
as shown in fig. 7, electronic device 600 may include a processing means (e.g., central processing unit, graphics processor, etc.) 601 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Generally, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While fig. 7 illustrates an electronic device 600 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 609, or may be installed from the storage means 608, or may be installed from the ROM 602. The computer program, when executed by the processing device 601, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText transfer protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: receiving a data restoration request aiming at an online form, wherein the online form corresponds to metadata of each version, the metadata of at least two versions correspond to an association relationship, and the association relationship is the correspondence between the version identification of the metadata and the cell data of the version; determining an identifier of a target version of metadata to be restored based on the data restoration request; acquiring cell data corresponding to metadata to be restored based on the identification and the association relation of the target version; and carrying out data reduction processing based on the acquired cell data. According to the technical scheme, at least two versions of metadata in the versions of the metadata corresponding to the online form are associated with the association relationship, the data of the online form are restored based on the metadata with the association relationship, calculation is not needed to be started from the initial version, and the efficiency of restoring the data of the online form is improved.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. 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. 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 the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block 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. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules or units described in the embodiments of the present disclosure may be implemented by software or hardware. Wherein the designation of a module or unit does not in some cases constitute a limitation of the unit itself.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
According to one or more embodiments of the present disclosure, there is provided an online form data processing method, the method including:
receiving a data restoration request aiming at an online form, wherein the online form corresponds to metadata of each version, the metadata of at least two versions correspond to an association relationship, and the association relationship is the correspondence between the version identification of the metadata and the cell data of the version;
determining an identifier of a target version of metadata to be restored based on the data restoration request;
acquiring cell data corresponding to the metadata to be restored based on the identification of the target version and the incidence relation;
and performing data reduction processing on the online form based on the acquired cell data.
In a possible implementation manner, when there is no corresponding association relationship in the metadata of the target version, the method further includes:
determining an identifier of an associated version of the target version, wherein the associated version is a version which is located before the target version, is closest to the target version and has a corresponding association relation;
based on the identification of the associated version and the association relationship, acquiring cell data corresponding to the associated version, and acquiring corresponding editing operation between the associated version and the target version;
the data reduction processing of the online form based on the acquired cell data includes:
and performing data reduction processing on the online form based on the cell data corresponding to the associated version and the editing operation.
In one possible implementation, the method further includes:
and storing the metadata and the cell data of the online form after data reduction processing into a preset database.
In one possible implementation, the method further includes:
receiving an editing request aiming at the online table, and determining metadata and cell data corresponding to the editing request;
loading the metadata and the cell data corresponding to the editing request into a memory, and performing corresponding editing processing on the cell data based on the editing request to obtain edited cell data;
and updating the version identification of the metadata based on the edited cell data to obtain updated metadata.
In one possible implementation, the method further includes:
and when the version identification of the updated metadata meets a first preset condition, establishing and storing an association relation corresponding to the metadata of the version.
In one possible implementation, the method further includes:
determining the latest version identification of the metadata of the online form data, and acquiring the association relationship of the metadata before the latest version;
acquiring cell data having an association relation with the metadata before the latest version based on the association relation of the metadata before the latest version;
traversing all the cell data before the latest version, and marking the cell data which has an association relation with the metadata before the latest version and the cell data of the latest version;
all unmarked cell data is deleted.
In one possible implementation, the method further includes:
copying cell data having an incidence relation with all metadata, and storing the cell data in a preset database;
and deleting the cell data which is not stored in the preset database before the latest version.
According to one or more embodiments of the present disclosure, there is provided an online form data processing apparatus including:
the receiving module is used for receiving a data restoration request aiming at an online form, the online form corresponds to metadata of each version, the metadata of at least two versions correspond to an association relationship, and the association relationship is the correspondence between the version identification of the metadata and the cell data of the version;
the determining module is used for determining the identifier of the target version of the metadata to be restored based on the data restoring request;
the obtaining module is used for obtaining the cell data corresponding to the metadata to be restored based on the identification of the target version and the incidence relation;
and the restoring module is used for carrying out data restoring processing on the online form based on the acquired cell data.
In a possible implementation manner, when there is no corresponding association relationship in the metadata of the target version, the online form data processing apparatus further includes an association version determination module;
the association version determination module is to:
determining an identifier of an associated version of the target version, wherein the associated version is a version which is located before the target version, is closest to the target version and has a corresponding association relation;
based on the identification of the associated version and the association relationship, acquiring cell data corresponding to the associated version, and acquiring corresponding editing operation between the associated version and the target version;
the reduction module is used for: and performing data reduction processing on the online form based on the cell data corresponding to the associated version and the editing operation.
In one possible implementation manner, the online form data processing apparatus further includes a storage module;
the storage module is used for:
and storing the metadata and the cell data of the online form after data reduction processing into a preset database.
In one possible implementation, the online form data processing apparatus further includes an editing module;
the editing module is used for:
receiving an editing request aiming at the online table, and determining metadata and cell data corresponding to the editing request;
loading the metadata and the cell data corresponding to the editing request into a memory, and performing corresponding editing processing on the cell data based on the editing request to obtain edited cell data;
and updating the version identification of the metadata based on the edited cell data to obtain updated metadata.
In a possible implementation manner, the online form data processing apparatus further includes an association relationship establishing module;
the incidence relation establishing module is used for:
and when the version identification of the updated metadata meets a first preset condition, establishing and storing an association relation corresponding to the metadata of the version.
In one possible implementation manner, the online form data processing apparatus further includes a first cell data processing module;
the first cell data processing module is configured to:
determining the latest version identification of the metadata of the online form data, and acquiring the association relationship of the metadata before the latest version;
acquiring cell data having an association relation with the metadata before the latest version based on the association relation of the metadata before the latest version;
traversing all the cell data before the latest version, and marking the cell data which has an association relation with the metadata before the latest version and the cell data of the latest version;
all unmarked cell data is deleted.
In a possible implementation manner, the online form data processing apparatus further includes a second cell data processing module;
the second cell data processing module is configured to:
copying cell data having an incidence relation with all metadata, and storing the cell data in a preset database;
and deleting the cell data which is not stored in the preset database before the latest version.
In accordance with one or more embodiments of the present disclosure, there is provided an electronic device including:
one or more processors;
a memory;
one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to: and executing the operation corresponding to the online table data processing method provided by the embodiment of the disclosure.
According to one or more embodiments of the present disclosure, a computer-readable medium for storing computer instructions, which, when executed on a computer, enable the computer to perform operations corresponding to the online form data processing method provided by the embodiments of the present disclosure.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.