CN111177279A - Form saving method and device, storage medium and electronic equipment - Google Patents

Form saving method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN111177279A
CN111177279A CN201911361097.8A CN201911361097A CN111177279A CN 111177279 A CN111177279 A CN 111177279A CN 201911361097 A CN201911361097 A CN 201911361097A CN 111177279 A CN111177279 A CN 111177279A
Authority
CN
China
Prior art keywords
linked list
target
entity object
trace linked
node
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN201911361097.8A
Other languages
Chinese (zh)
Inventor
周学飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Neusoft Corp
Original Assignee
Neusoft Corp
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 Neusoft Corp filed Critical Neusoft Corp
Priority to CN201911361097.8A priority Critical patent/CN111177279A/en
Publication of CN111177279A publication Critical patent/CN111177279A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • G06F16/288Entity relationship models

Abstract

The disclosure relates to a form storage method, a form storage device, a form storage medium and an electronic device, which are used for saving storage space, realizing quick backtracking of form versions and solving the problems in the related art. The method comprises the following steps: determining whether the form item of the target form is changed; if the form item of the target form changes, updating an entity object corresponding to the target form according to the changed form item, wherein the entity object is obtained by dividing the form item of the target form; and generating a form trace linked list for storage according to the updated entity object of the target form, wherein each node in the form trace linked list is respectively used for representing each entity object corresponding to the target form, each node comprises a generation time attribute, and the generation time attribute is used for representing the generation time of the form trace linked list.

Description

Form saving method and device, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a form saving method and apparatus, a storage medium, and an electronic device.
Background
Forms are an important tool for paperless office work. During the process of designing the form, such as during the process of designing the header information, it may be necessary to record the modified content for the form information, and in addition, it may be necessary to quickly trace back to any version before modification.
In the related art, a new form can be saved after each modification. The method is simple to implement, and can also quickly perform version backtracking, but the unmodified form content can be repeatedly stored, so that the storage space is wasted. In addition, the related art can also save only the modified content at each modification. Although this approach can save storage space, it cannot quickly trace back to the specified version.
Disclosure of Invention
The disclosure aims to provide a form saving method, a form saving device, a storage medium and electronic equipment, so as to solve the problems in the form saving process in the related art.
In order to achieve the above object, in a first aspect, the present disclosure provides a form saving method, where the method includes:
determining whether a form item of the target form changes;
if the form item of the target form changes, updating an entity object corresponding to the target form according to the changed form item, wherein the entity object is obtained by dividing the form item of the target form;
and generating a form trace linked list for storage according to the updated entity object of the target form, wherein each node in the form trace linked list is respectively used for representing each entity object corresponding to the target form, each node comprises a generation time attribute, and the generation time attribute is used for representing the generation time of the form trace linked list.
Optionally, each node in the form trace linked list further includes a change time attribute, where the change time attribute is used to represent time when a post-node of the node changes, and the form trace linked list is generated and stored according to the updated entity object of the target form, including:
determining a first entity object with changed content in the entity objects after the target form is updated;
acquiring a first historical form trace linked list of the target form before the form item changes;
and updating the nodes corresponding to the first entity object in the first historical form trace linked list, and respectively modifying the change time attribute of the preposed nodes into the updating time of the nodes aiming at all the preposed nodes of the nodes so as to obtain a new form trace linked list for storage.
Optionally, the generating and storing a form trace linked list according to the updated entity object of the target form includes:
determining a second entity object newly added in the entity objects after the target form is updated;
acquiring a second historical form trace linked list of the target form before the form item changes;
and inserting the second entity object as a tail node into the second historical trace linked list to obtain a new form trace linked list for storage.
Optionally, the generating and storing a form trace linked list according to the updated entity object of the target form includes:
determining a deleted third entity object in the updated entity objects of the target form;
acquiring a third history form trace linked list of the target form before the form item changes;
and replacing the node corresponding to the third entity object in the third history form trace linked list with a virtual node to obtain a new form trace linked list for storage.
Optionally, the method further comprises:
in response to receiving a request for checking a difference between a first version and a second version of the target form, comparing a first form trace linked list corresponding to the first version with a second form trace linked list corresponding to the second version, and determining a difference node between the first form trace linked list and the second form trace linked list;
and if the change time attributes of the nodes in the first form trace linked list and the second form trace linked list are the same, stopping comparing the first form trace linked list with the second form trace linked list, and outputting and displaying the form items represented by the entity objects corresponding to the difference nodes as difference form items.
Optionally, the method further comprises:
in response to receiving a request to rollback a current version of the target form to a target historical version, determining a generation time of the target historical version included with the request;
determining the generation time attribute of a node as a target form trace linked list of the generation time in a historical form trace linked list;
and combining the form items represented by the entity objects corresponding to each node in the target form trace linked list to obtain the target form of the target historical version for output and display.
Optionally, the determining whether the form item of the target form is changed includes:
determining a current hash value of each entity object in the target form;
for each entity object in the target form, determining whether the current hash value and the historical hash value of the entity object are the same;
if the form item of the target form changes, updating the entity object corresponding to the target form according to the changed form item, including:
and if the current hash value of the entity object is different from the historical hash value, determining that the form item of the target form changes, and updating the entity object corresponding to the target form.
In a second aspect, the present disclosure further provides a form saving apparatus, including:
the determining module is used for determining whether the form item of the target form changes;
the updating module is used for updating an entity object corresponding to the target form according to the changed form item when the form item of the target form is changed, wherein the entity object is obtained by dividing the form item of the target form;
and the storage module is used for generating a form trace linked list for storage according to the updated entity object of the target form, wherein each node in the form trace linked list is respectively used for representing each entity object corresponding to the target form, each node comprises a generation time attribute, and the generation time attribute is used for representing the generation time of the form trace linked list.
In a third aspect, the present disclosure also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method of any one of the first aspect.
In a fourth aspect, the present disclosure also provides an electronic device, including:
a memory having a computer program stored thereon;
a processor for executing the computer program in the memory to implement the steps of the method of any one of the first aspect.
Through the technical scheme, under the condition that the form item of the target form is changed, the entity object can be updated aiming at the changed form item without storing the content of the whole form again, so that the storage space can be saved. In addition, each node in the form trace linked list represents each entity object corresponding to the target form, and each node comprises a generation time attribute which is used for representing the generation time of the form trace linked list, so that after the generation time of the form version to be traced back is determined, the corresponding form version can be traced back quickly according to the generation time attribute, and the problem of the related technology in the form storage process is solved.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows.
Drawings
The accompanying drawings, which are included to provide a further understanding of the disclosure and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description serve to explain the disclosure without limiting the disclosure. In the drawings:
FIG. 1 is a flow chart diagram illustrating a form saving method according to an exemplary embodiment of the present disclosure;
FIG. 2 is a diagram illustrating a target form and entity objects corresponding to the target form in a form saving method according to an exemplary embodiment of the present disclosure;
FIG. 3 is a diagram illustrating a process of generating a linked list of form traces in a form saving method according to an exemplary embodiment of the present disclosure;
FIG. 4 is a diagram illustrating a process of generating a linked list of form traces in a form saving method according to another exemplary embodiment of the present disclosure;
FIG. 5 is a diagram illustrating a process of generating a linked list of form traces in a form saving method according to another exemplary embodiment of the present disclosure;
FIG. 6 is a block diagram illustrating a form retention mechanism in accordance with an exemplary embodiment of the present disclosure;
fig. 7 is a block diagram illustrating an electronic device according to an exemplary embodiment of the present disclosure.
Detailed Description
The following detailed description of specific embodiments of the present disclosure is provided in connection with the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating the present disclosure, are given by way of illustration and explanation only, not limitation.
Forms are an important tool for paperless office work. During the process of designing the form, such as during the process of designing the header information, it may be necessary to record the modified content for the form information, and in addition, it may be necessary to quickly trace back to any version before modification. In the related art, a new form can be saved after each modification. The method is simple to implement, and can also quickly perform version backtracking, but the unmodified form content can be repeatedly stored, so that the storage space is wasted. In addition, the related art can also save only the modified content at each modification. Although this approach can save storage space, it cannot quickly trace back to the specified version
In view of this, embodiments of the present disclosure provide a form saving method, an apparatus, a storage medium, and an electronic device, so as to save storage space, and implement quick backtracking of form versions, thereby solving the problems in the related art.
Fig. 1 is a flowchart illustrating a form saving method according to an exemplary embodiment of the present disclosure. Referring to fig. 1, the form saving method includes:
step 101, determining whether the form item of the target form is changed.
And 102, if the form item of the target form changes, updating an entity object corresponding to the target form according to the changed form item, wherein the entity object is obtained by dividing the form item of the target form.
And 103, generating a form trace linked list for storage according to the updated entity object of the target form, wherein each node in the form trace linked list is used for representing each entity object corresponding to the target form, each node comprises a generation time attribute, and the generation time attribute is used for representing the generation time of the form trace linked list.
It should be understood that a linked list is made up of a series of nodes, each node including a data field in which data elements are stored and a pointer field for the address of the next node. In the embodiment of the present disclosure, the data field of each node in the form trace linked list may be the entity object ID of each entity object corresponding to the target form, and the pointer field is the entity object ID of the entity object corresponding to the next node. In addition, the form trace linked list in the embodiment of the present disclosure may be a bidirectional linked list or a linked list in other forms, which is not limited in the embodiment of the present disclosure.
In the embodiment of the present disclosure, the actual form content of the target form is stored through a plurality of entity objects, and after the entity objects corresponding to the target form are initially stored, an initial form trace linked list may be generated, where each node in the initial form trace linked list may be an entity object ID of each entity object corresponding to the target form, and thus each node in the form trace linked list may correspond to the entity objects corresponding to the initially stored target form one to one. If the target form is modified subsequently, the entity object corresponding to the target form can be updated according to the changed form item, and then a new form trace linked list is generated according to the updated entity object corresponding to the target form, wherein the new form trace linked list can correspond to the updated entity object one by one.
In this way, the form trace linked list may record each modification for the target form, and the form trace linked list does not store the actual form content of the target form, but stores a reference for each entity object corresponding to the target form, for example, each node in the form trace linked list may be an entity object ID of each entity object corresponding to the target form, so that the modification record for the target form may be completely recorded while saving the storage space. And each node in the form trace linked list comprises a generation time attribute, and the generation time attribute is used for representing the generation time of the form trace linked list, so that after the generation time of the form version to be traced is determined, a target entity object corresponding to the form version can be determined in the form trace linked list according to the generation time attribute, and then the target entity object can be obtained from the stored entity objects, so that the corresponding form version is traced quickly.
In order to make the skilled person understand the form saving method in the embodiment of the present disclosure, the following describes the above steps in detail.
First, before step 101, a form item of the target form may be divided into a plurality of entity objects, and each entity object corresponds to each form item in the target form one to one. For example, in a scenario of designing the header information, the form items of the target form may be divided into a plurality of entity objects according to types of the header information in the target form. For example, referring to fig. 2, the header of the target form includes three items of "name", "gender", and "age", and the target form may be divided into three entity objects according to the type of the header information, where each entity object corresponds to "name", "gender", and "age", respectively.
It should be understood that each entity object may include an entity object ID, a modification time, an extended attribute, and a hash value. Accordingly, the entity object corresponding to the target form may be stored in the form shown in table 1:
TABLE 1
Figure BDA0002337181490000071
Figure BDA0002337181490000081
The entity object ID may be used to uniquely determine the entity object, and the entity object ID of each entity object is different. The modification time may be used to characterize the time of the most recently modified entity object. It should be understood that if the entity object is not modified after the entity object is generated, the modification time of the entity object may be the generation time of the entity object. The extended attribute can be used for characterizing attributes such as form style, content information and the like of the form item corresponding to the entity object. The hash value may be calculated according to various attribute values of the form item corresponding to the entity object, and the specific process is similar to that in the related art and is not described herein again. It should be understood that the contents shown in table 1 are only exemplary illustrations of the entity objects of the target form, and are not intended to limit the present disclosure.
After the target form is divided into a plurality of entity objects to be stored, if a form storing request for the target form is received, whether the form item of the target form changes or not can be determined in response to the form storing request. In a possible approach, the current hash value of each entity object in the target form may be determined first, and then for each entity object in the target form, it is determined whether the current hash value of the entity object is the same as the historical hash value. Correspondingly, if the current hash value of the entity object is different from the historical hash value, the form item of the target form can be determined to be changed, and the entity object corresponding to the target form is updated.
It should be understood that the change of the form item of the target form includes a case where a new form item exists in the target form, a case where an original form item in the target form is deleted, and a case where the content of the original form item in the target form is changed. Correspondingly, when the form item of the target form changes, the updating of the entity object corresponding to the target form may also include three updating modes, respectively.
Specifically, for the case of a new form item in the target form, an entity object corresponding to the new form item may be generated, and the entity object may be added to an entity object stored in the target form history, so as to update the entity object of the target form.
For the condition that the original form item in the target form is deleted, the entity object corresponding to the deleted form item can be determined in the entity objects saved in the target form history, and then the entity object is deleted in the entity objects saved in the target form history, so as to update the entity objects of the target form.
For the condition that the content of the original form item in the target form is modified, the entity object corresponding to the modified form item can be determined in the entity objects saved in the target form history, and then the entity object is modified in the entity objects saved in the target form history, so as to update the entity object of the target form. Or, in order to distinguish the modified entity object from the original entity object, a new entity object may be generated according to the form item whose content is modified and added to the entity object stored in the target form history, so as to update the entity object of the target form.
After the entity object corresponding to the target form is updated, a form trace linked list can be generated and stored according to the updated entity object of the target form. Since the updated entity object may be updated according to any one of the three update operations, the ways of generating the form trace linked list for storage according to the updated entity object of the target form may also include three ways, which are described below one by one.
In a first mode, each node in the form trace linked list may include a change time attribute, where the change time attribute is used to represent the time when a change occurs to a post-node of the node. In this case, the first entity object with changed content in the updated entity object of the target form may be determined first. And then acquiring a first historical form trace linked list of the target form before the form item changes. And finally, updating the nodes corresponding to the first entity object in the first historical form trace linked list, and respectively modifying the change time attribute of the preposed nodes into the updating time of the nodes aiming at all the preposed nodes of the nodes so as to obtain a new form trace linked list for storage.
It should be understood that if the node behind a certain node is not changed, the change time attribute of the node may be null, or may be a generation time attribute of the node, which is not limited in this disclosure.
Referring to fig. 3, taking the form trace linked list as an example of a doubly linked list, the hash values of the entity objects before and after the update of the target form are respectively compared, it is determined that the content of the form item corresponding to the entity object entity2 before the update of the target form is modified, and a new entity object entity 2' is generated. And acquiring a first history form trace linked list of the target form before the form item changes as trace 1. Specifically, in the trace 1, the front node of the node corresponding to the entity object entity2 is the node corresponding to the entity object entity1, and the rear node is the node corresponding to the entity object entity 3. Then, the node corresponding to the entity object entry 2 (the first entity object) in the first history form trace linked list may be updated to be the node corresponding to the entity object entry 2', the change time attribute of the node (the front node) corresponding to the entity object entry 1 is modified to be the update time of the node corresponding to the entity object entry 2, and the rest of the nodes remain unchanged, so that a new form trace linked list shown as trace 2 may be finally obtained and stored.
In the second mode, the newly added second entity object in the entity objects after the target form is updated can be determined. And then, acquiring a second historical form trace linked list of the target form before the form item changes. And finally, inserting the second entity object as a tail node into the second historical trace linked list to obtain a new form trace linked list for storage.
Referring to fig. 4, taking the form trace linked list as an example of a bidirectional linked list, the hash values of the entity objects before and after the update of the target form are respectively compared, it is determined that a newly added entity object entry 4 (a second entity object) exists in the entity objects in the target form, and a second historical form trace linked list of the target form before the change of the form item is obtained as trace 1. Specifically, in the trace 1, the front node of the node corresponding to the entity object entity2 is the node corresponding to the entity object entity1, and the rear node is the node corresponding to the entity object entity 3. Then, the entity object ID of the entity object entity4 may be used as a tail node and inserted into the second history trace linked list, and finally a new form trace linked list shown as trace 2 is obtained and stored.
In a third way, the deleted third entity object in the updated entity objects of the target form may be determined first. And then, acquiring a third history form trace linked list of the target form before the form item changes. And finally, replacing the node corresponding to the third entity object in the third history form trace linked list with a virtual node to obtain a new form trace linked list for storage.
Referring to fig. 5, taking the form trace linked list as an example of a bi-directional linked list, the hash values of the entity objects before and after the update of the target form are respectively compared, it is determined that a deleted entity object entry 3 (a third entity object) exists in the entity objects in the target form, and it is obtained that the third history form trace linked list of the target form before the change of the form item is trace 1. Specifically, in the trace 1, the front node of the node corresponding to the entity object entity2 is the node corresponding to the entity object entity1, and the rear node is the node corresponding to the entity object entity 3. Then, the node corresponding to the entity object entity3 may be replaced by a virtual node, and finally a new form trace linked list as shown in trace 2 is obtained for storage.
The nodes corresponding to the deleted entity object are replaced by the virtual nodes, so that the nodes of the two form trace linked lists can be more conveniently compared one by one to determine the difference between different form versions.
In a possible manner, in response to receiving a request for checking a difference between a first version and a second version of a target form, a first form trace linked list corresponding to the first version and a second form trace linked list corresponding to the second version may be compared to determine a difference node between the first form trace linked list and the second form trace linked list. And if the change time attributes of the nodes in the first form trace linked list and the second form trace linked list are the same, stopping comparing the first form trace linked list with the second form trace linked list, and outputting and displaying the form items represented by the entity objects corresponding to the difference nodes as difference form items.
For example, a request to view a difference between a first version and a second version of a target form may be received, the request including a generation time of the first version and a generation time of the second version. Then, in response to the request, the generation time attribute of the node is acquired as a first history form trace linked list of the generation time according to the generation time of the first version, and the generation time attribute of the node is acquired as a second history form trace linked list of the generation time according to the generation time of the second version.
Then, the first form trace linked list and the second form trace linked list can be compared, and a difference node between the first form trace linked list and the second form trace linked list is determined. In a possible mode, each node in the first form trace linked list can be used as a reference, and the nodes are sequentially compared with the nodes in the second form trace linked list from the first node of the first form trace linked list until the nodes in the first form trace linked list or the second form trace linked list are compared, so that the difference node between the first form trace linked list and the second form trace linked list is obtained finally.
Further, in order to improve the comparison efficiency, the comparison may be performed according to the change time attribute of the node. If the change time attributes of the nodes in the first form trace linked list and the second form trace linked list are the same, the nodes are not changed, namely the nodes are the same in the first form trace linked list and the second form trace linked list, and comparison is not needed to determine the difference nodes. Therefore, in a possible mode, if the change time attributes of the nodes in the first form trace linked list and the second form trace linked list are the same, the comparison between the first form trace linked list and the second form trace linked list can be stopped, and then the form items represented by the entity objects corresponding to all the difference nodes at present are used as the difference form items to be output and displayed.
By the mode, the records can be quickly positioned and modified by comparing the form trace linked lists corresponding to different versions. And the nodes in each form trace linked list correspond to change time attributes, and if the change time attributes are consistent, the comparison can be stopped, so that the comparison efficiency is improved, and the efficiency of positioning and modifying records is improved.
In a possible approach, a generation time of a target historical version included in a request may also be determined in response to receiving the request to rollback a current version of the target form to the target historical version. And then, in the historical form trace linked list, determining the generation time attribute of the node as a target form trace linked list of the generation time. And finally, combining the form items represented by the entity objects corresponding to each node in the target form trace linked list to obtain a target form of the target historical version for output and display.
It should be understood that, in the embodiment of the present disclosure, each time the target form is saved, if the content of the target form changes, a corresponding form trace linked list may be generated, and thus a plurality of history trace linked lists may be saved. After the generation time of the target historical version to be backed off is determined, the generation time attribute of the node can be determined to be the target historical form trace linked list of the generation time in the plurality of historical trace linked lists. And then, acquiring corresponding entity objects according to the entity object IDs corresponding to each node in the history form trace linked list. And finally, combining the form items corresponding to the obtained entity objects to obtain a form of the target historical version for output and display.
By the mode, after the generation time of the form version to be rolled back is determined, the target form trace linked list with the generation time attribute being the generation time can be determined, and therefore the corresponding form version can be quickly traced back.
Based on the same inventive concept, the embodiment of the present disclosure further provides a form saving apparatus, which may be a part or all of an electronic device through software, hardware, or a combination of the two. Referring to fig. 6, the apparatus 600 may include:
a determining module 601, configured to determine whether a form item of the target form changes;
an updating module 602, configured to update an entity object corresponding to the target form according to a changed form item when the form item of the target form is changed, where the entity object is obtained by dividing the form item of the target form;
a saving module 603, configured to generate a form trace linked list according to the updated entity object of the target form, and save the form trace linked list, where each node in the form trace linked list is used to represent each entity object corresponding to the target form, and each node includes a generation time attribute, and the generation time attribute is used to represent generation time of the form trace linked list.
Optionally, each node in the form trace linked list further includes a change time attribute, where the change time attribute is used to represent a time when a change occurs to a post-node of the node, and the storage module 603 is configured to:
determining a first entity object with changed content in the entity objects after the target form is updated;
acquiring a first historical form trace linked list of the target form before the form item changes;
and updating the nodes corresponding to the first entity object in the first historical form trace linked list, and respectively modifying the change time attribute of the preposed nodes into the updating time of the nodes aiming at all the preposed nodes of the nodes so as to obtain a new form trace linked list for storage.
Optionally, the saving module 603 is configured to:
determining a second entity object newly added in the entity objects after the target form is updated;
acquiring a second historical form trace linked list of the target form before the form item changes;
and inserting the second entity object as a tail node into the second historical trace linked list to obtain a new form trace linked list for storage.
Optionally, the saving module 603 is configured to:
determining a deleted third entity object in the updated entity objects of the target form;
acquiring a third history form trace linked list of the target form before the form item changes;
and replacing the node corresponding to the third entity object in the third history form trace linked list with a virtual node to obtain a new form trace linked list for storage.
Optionally, the apparatus 600 further comprises:
the comparison module is used for comparing a first form trace linked list corresponding to the first version with a second form trace linked list corresponding to the second version in response to receiving a request for checking the difference between the first version and the second version of the target form, and determining a difference node between the first form trace linked list and the second form trace linked list;
and the first output module is used for stopping comparing the first form trace linked list with the second form trace linked list when the change time attributes of the nodes in the first form trace linked list and the second form trace linked list are the same, and outputting and displaying the form items represented by the entity objects corresponding to the difference nodes as difference form items.
Optionally, the apparatus 600 further comprises:
a time determination module to determine, in response to receiving a request to rollback a current version of the target form to a target historical version, a generation time of the target historical version included with the request;
the linked list determining module is used for determining the generation time attribute of the node as a target linked list of the generation time in the historical linked list of the form trace;
and the second output module is used for combining the form items represented by the entity objects corresponding to each node in the target form trace linked list to obtain a target form of the target historical version for output and display.
Optionally, the determining module 601 is configured to:
determining a current hash value of each entity object in the target form;
for each entity object in the target form, determining whether the current hash value and the historical hash value of the entity object are the same;
the update module 602 is configured to:
and if the current hash value of the entity object is different from the historical hash value, determining that the form item of the target form changes, and updating the entity object corresponding to the target form.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Based on the same inventive concept, an embodiment of the present disclosure further provides an electronic device, including:
a memory having a computer program stored thereon;
a processor for executing the computer program in the memory to implement the steps of any of the above-described form saving methods.
In a possible approach, a block diagram of the electronic device may be as shown in fig. 7. Referring to fig. 7, the electronic device 700 may include: a processor 701 and a memory 702. The electronic device 700 may also include one or more of a multimedia component 703, an input/output (I/O) interface 704, and a communication component 705.
The processor 701 is configured to control the overall operation of the electronic device 700, so as to complete all or part of the steps in the above-mentioned form saving method. The memory 702 is used to store various types of data to support operations at the electronic device 700, such as instructions for any application or method operating on the electronic device 700 and application-related data, such as a linked list of historical form traces, entity objects corresponding to a target form, and so forth. The Memory 702 may be implemented by any type of volatile or non-volatile Memory device or combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic Memory, flash Memory, magnetic disk, or optical disk. The multimedia components 703 may include screen and audio components. Wherein the screen may be, for example, a touch screen and the audio component is used for outputting and/or inputting audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may further be stored in the memory 702 or transmitted through the communication component 705. The audio assembly also includes at least one speaker for outputting audio signals. The I/O interface 704 provides an interface between the processor 701 and other interface modules, such as a keyboard, mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 705 is used for wired or wireless communication between the electronic device 700 and other devices. Wireless communication, such as Wi-Fi, bluetooth, Near Field Communication (NFC), 2G, 3G, 4G, NB-IOT, eMTC, or other 5G, etc., or a combination of one or more of them, which is not limited herein. The corresponding communication component 705 may thus include: Wi-Fi module, Bluetooth module, NFC module, etc.
In an exemplary embodiment, the electronic Device 700 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for performing the above-described form saving method.
In another exemplary embodiment, there is also provided a computer readable storage medium comprising program instructions which, when executed by a processor, implement the steps of the form saving method described above. For example, the computer readable storage medium may be the above-mentioned memory 702 comprising program instructions executable by the processor 701 of the electronic device 700 to perform the above-mentioned form saving method.
In another exemplary embodiment, a computer program product is also provided, which comprises a computer program executable by a programmable apparatus, the computer program having code portions for performing the above-described form saving method when executed by the programmable apparatus.
The preferred embodiments of the present disclosure are described in detail with reference to the accompanying drawings, however, the present disclosure is not limited to the specific details of the above embodiments, and various simple modifications may be made to the technical solution of the present disclosure within the technical idea of the present disclosure, and these simple modifications all belong to the protection scope of the present disclosure.
It should be noted that, in the foregoing embodiments, various features described in the above embodiments may be combined in any suitable manner, and in order to avoid unnecessary repetition, various combinations that are possible in the present disclosure are not described again.
In addition, any combination of various embodiments of the present disclosure may be made, and the same should be considered as the disclosure of the present disclosure, as long as it does not depart from the spirit of the present disclosure.

Claims (10)

1. A form saving method, comprising:
determining whether a form item of the target form changes;
if the form item of the target form changes, updating an entity object corresponding to the target form according to the changed form item, wherein the entity object is obtained by dividing the form item of the target form;
and generating a form trace linked list for storage according to the updated entity object of the target form, wherein each node in the form trace linked list is respectively used for representing each entity object corresponding to the target form, each node comprises a generation time attribute, and the generation time attribute is used for representing the generation time of the form trace linked list.
2. The method of claim 1, wherein each node in the form trace linked list further includes a change time attribute, the change time attribute is used for representing a time when a post-node of the node is changed, and the generating and storing the form trace linked list according to the updated entity object of the target form includes:
determining a first entity object with changed content in the entity objects after the target form is updated;
acquiring a first historical form trace linked list of the target form before the form item changes;
and updating the nodes corresponding to the first entity object in the first historical form trace linked list, and respectively modifying the change time attribute of the preposed nodes into the updating time of the nodes aiming at all the preposed nodes of the nodes so as to obtain a new form trace linked list for storage.
3. The method of claim 1, wherein generating a form trace linked list for saving according to the updated entity object of the target form comprises:
determining a second entity object newly added in the entity objects after the target form is updated;
acquiring a second historical form trace linked list of the target form before the form item changes;
and inserting the second entity object as a tail node into the second historical trace linked list to obtain a new form trace linked list for storage.
4. The method of claim 1, wherein generating a form trace linked list for saving according to the updated entity object of the target form comprises:
determining a deleted third entity object in the updated entity objects of the target form;
acquiring a third history form trace linked list of the target form before the form item changes;
and replacing the node corresponding to the third entity object in the third history form trace linked list with a virtual node to obtain a new form trace linked list for storage.
5. The method of claim 2, further comprising:
in response to receiving a request for checking a difference between a first version and a second version of the target form, comparing a first form trace linked list corresponding to the first version with a second form trace linked list corresponding to the second version, and determining a difference node between the first form trace linked list and the second form trace linked list;
and if the change time attributes of the nodes in the first form trace linked list and the second form trace linked list are the same, stopping comparing the first form trace linked list with the second form trace linked list, and outputting and displaying the form items represented by the entity objects corresponding to the difference nodes as difference form items.
6. The method according to any one of claims 1-5, further comprising:
in response to receiving a request to rollback a current version of the target form to a target historical version, determining a generation time of the target historical version included with the request;
determining the generation time attribute of a node as a target form trace linked list of the generation time in a historical form trace linked list;
and combining the form items represented by the entity objects corresponding to each node in the target form trace linked list to obtain the target form of the target historical version for output and display.
7. The method of any of claims 1-5, wherein determining whether a form item of the target form has changed comprises:
determining a current hash value of each entity object in the target form;
for each entity object in the target form, determining whether the current hash value and the historical hash value of the entity object are the same;
if the form item of the target form changes, updating the entity object corresponding to the target form according to the changed form item, including:
and if the current hash value of the entity object is different from the historical hash value, determining that the form item of the target form changes, and updating the entity object corresponding to the target form.
8. A form holding apparatus, the apparatus comprising:
the determining module is used for determining whether the form item of the target form changes;
the updating module is used for updating an entity object corresponding to the target form according to the changed form item when the form item of the target form is changed, wherein the entity object is obtained by dividing the form item of the target form;
and the storage module is used for generating a form trace linked list for storage according to the updated entity object of the target form, wherein each node in the form trace linked list is respectively used for representing each entity object corresponding to the target form, each node comprises a generation time attribute, and the generation time attribute is used for representing the generation time of the form trace linked list.
9. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
10. An electronic device, comprising:
a memory having a computer program stored thereon;
a processor for executing the computer program in the memory to carry out the steps of the method of any one of claims 1 to 7.
CN201911361097.8A 2019-12-25 2019-12-25 Form saving method and device, storage medium and electronic equipment Pending CN111177279A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911361097.8A CN111177279A (en) 2019-12-25 2019-12-25 Form saving method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911361097.8A CN111177279A (en) 2019-12-25 2019-12-25 Form saving method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN111177279A true CN111177279A (en) 2020-05-19

Family

ID=70655681

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911361097.8A Pending CN111177279A (en) 2019-12-25 2019-12-25 Form saving method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN111177279A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112799948A (en) * 2021-02-03 2021-05-14 网易(杭州)网络有限公司 Webpage data processing method and device, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5873097A (en) * 1993-05-12 1999-02-16 Apple Computer, Inc. Update mechanism for computer storage container manager
US6098078A (en) * 1995-12-29 2000-08-01 Lucent Technologies Inc. Maintaining consistency of database replicas
US20040088334A1 (en) * 2002-11-01 2004-05-06 Klein Ralph Wilhelm System and method for generating reports for a versioned database
CN101127034A (en) * 2006-08-18 2008-02-20 国际商业机器公司 Change oriented electronic table application
US20080104141A1 (en) * 2006-10-30 2008-05-01 Mcmahon Douglas James Copy-on-write versioning of documents
US20090070349A1 (en) * 2007-09-10 2009-03-12 International Business Machines Corporation Method and system for capturing and applying changes to a data structure

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5873097A (en) * 1993-05-12 1999-02-16 Apple Computer, Inc. Update mechanism for computer storage container manager
US6098078A (en) * 1995-12-29 2000-08-01 Lucent Technologies Inc. Maintaining consistency of database replicas
US20040088334A1 (en) * 2002-11-01 2004-05-06 Klein Ralph Wilhelm System and method for generating reports for a versioned database
CN101127034A (en) * 2006-08-18 2008-02-20 国际商业机器公司 Change oriented electronic table application
US20080104141A1 (en) * 2006-10-30 2008-05-01 Mcmahon Douglas James Copy-on-write versioning of documents
US20090070349A1 (en) * 2007-09-10 2009-03-12 International Business Machines Corporation Method and system for capturing and applying changes to a data structure

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112799948A (en) * 2021-02-03 2021-05-14 网易(杭州)网络有限公司 Webpage data processing method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN107924319B (en) User directed partial graphical execution
US20220179642A1 (en) Software code change method and apparatus
CN110221899B (en) User interface adjusting method, device and system
CN107958365B (en) Material information changing method and device, storage medium and electronic equipment
CN111078672B (en) Data comparison method and device for database
CN111752960B (en) Data processing method and device
US9311348B2 (en) Method and system for implementing an array using different data structures
US10262081B2 (en) Method and apparatus for improved database searching
CN111177279A (en) Form saving method and device, storage medium and electronic equipment
CN107526816B (en) Stream distribution record storage method and device and electronic equipment
WO2019085354A1 (en) Excel system interface-based database linkage method, electronic device, and storage medium
CN111142990A (en) WeChat applet page display method and device and storage medium
CN116048609A (en) Configuration file updating method, device, computer equipment and storage medium
US9514554B2 (en) Computer readable recording medium recorded with graphics editing program, and graphics editing apparatus
CN114637794A (en) Report data processing method, device, equipment, storage medium and product
CN113377368A (en) Project development method, device, server and storage medium
CN113626409B (en) Test data processing method, device, equipment and storage medium
CN115729641B (en) Metadata circulation method and device of custom component and electronic equipment
JP2012108740A (en) Input support method and program
WO2023082994A1 (en) Page rendering method and apparatus, and terminal device and computer storage medium
CN114238356A (en) Test case snapshot generation method, device, equipment and readable storage medium
JP2018197993A (en) Terminal device, server device, control program for terminal device, control method for server device, and system
US9703532B1 (en) Dynamically updating class instances based on class definition changes
CN112434001A (en) Multi-data-source configurable MongoDB data synchronization system supporting data preprocessing, electronic equipment and medium
CN110569223A (en) database log processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination