CN113378524A - Method, device, equipment and storage medium for updating storage information of document - Google Patents

Method, device, equipment and storage medium for updating storage information of document Download PDF

Info

Publication number
CN113378524A
CN113378524A CN202110634924.7A CN202110634924A CN113378524A CN 113378524 A CN113378524 A CN 113378524A CN 202110634924 A CN202110634924 A CN 202110634924A CN 113378524 A CN113378524 A CN 113378524A
Authority
CN
China
Prior art keywords
document
information
annotation
updating
identifier
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
CN202110634924.7A
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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202110634924.7A priority Critical patent/CN113378524A/en
Publication of CN113378524A publication Critical patent/CN113378524A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/38Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/381Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using identifiers, e.g. barcodes, RFIDs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/38Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/383Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content

Abstract

The disclosure discloses a method, a device, equipment and a storage medium for updating storage information of a document, relates to the technical field of computers, in particular to the technical field of cloud storage and the technical field of cloud platforms, and can be applied to a collaborative editing scene of the document. The specific implementation scheme of the method for updating the storage information of the document is as follows: in response to first annotation updating information of the annotation added in the document, generating a first object for the annotation to be added based on the first annotation updating information; taking a first identifier in the first label updating information as a value of a target attribute of the first object; and incorporating the first object into the stored information of the document.

Description

Method, device, equipment and storage medium for updating storage information of document
Technical Field
The disclosure relates to the technical field of computers, in particular to the technical field of cloud storage and the technical field of cloud platforms, and can be applied to a collaborative editing scene of a document.
Background
With the development of computer technology and internet technology, the scene requirements for online collaborative editing of files are more and more extensive. In a document stored in an object (object) form, when an existing annotation in the document is updated, an object to be updated and stored in a storage content needs to be located.
Disclosure of Invention
Provided are a method, apparatus, device, and storage medium for updating storage information of a husband, which improve update efficiency and editing convenience.
According to an aspect of the present disclosure, there is provided a method of updating storage information of a document, including: in response to first annotation updating information of the annotation added in the document, generating a first object for the annotation to be added based on the first annotation updating information; taking a first identifier in the first label updating information as a value of a target attribute of the first object; and incorporating the first object into the stored information of the document.
According to another aspect of the present disclosure, there is provided an apparatus for updating storage information of a document, including: the object generation module is used for responding to first label updating information of labels added in the document and generating a first object aiming at the labels to be added on the basis of the first label updating information; an attribute value obtaining module, configured to use a first identifier in the first annotation update information as a value of a target attribute of the first object; and the information merging module is used for merging the first object into the storage information of the document.
According to another aspect of the present disclosure, there is provided an electronic device including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a method of updating stored information of a document provided by the present disclosure.
According to another aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform a method of updating stored information of a document provided by the present disclosure.
According to another aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the method of updating stored information of a document provided by the present disclosure.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is a schematic diagram of an application scenario of a method, an apparatus, a device and a storage medium for updating storage information of a document according to an embodiment of the present disclosure;
FIG. 2 is a schematic flow chart diagram of a method of updating stored information of a document according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram illustrating a second object to be marked for modification in stored information of a document according to an embodiment of the disclosure;
FIG. 4 is a schematic diagram of updating stored information of a document, according to another embodiment of the present disclosure;
FIG. 5 is a block diagram of an apparatus for updating stored information of a document according to an embodiment of the present disclosure; and
fig. 6 is a block diagram of an electronic device for implementing a method of updating stored information of a document according to an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
The present disclosure provides a method for updating storage information of a document, which comprises an object generation phase, an attribute value obtaining phase and an information merging phase. In the object generation phase, in response to first annotation update information for adding annotations in the document, a first object for the annotations to be added is generated based on the first annotation update information. In the attribute value obtaining stage, the first identifier in the first label updating information is used as the value of the target attribute of the first object. In the information merging phase, the first object is merged into the stored information of the document.
An application scenario of the method and apparatus provided by the present disclosure will be described below with reference to fig. 1.
Fig. 1 is a schematic view of an application scenario of a method, an apparatus, a device and a storage medium for updating storage information of a document according to an embodiment of the present disclosure.
As shown in FIG. 1, the application scenario 100 includes one or more terminal devices 111-112 and a database server 120, where the one or more terminal devices may communicate with the database server 120 through a network to obtain a document from the database server or store an edited and modified document in the database server 120. The network may include wired or wireless communication links, among others.
The terminal devices 111 to 112 may be terminal devices having a display screen and capable of performing document editing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The database server 120 may be, for example, a server having a storage function. The server may be a cloud server, a server of a distributed system, or a server with a combined blockchain.
According to an embodiment of the disclosure, one or more users can edit the document via the one or more terminal devices 111-112, for example, annotations can be added to the document or existing annotations can be modified in the document. The one or more terminal devices can respond to the operation of adding the label or modifying the existing label, and render the front-end display page so as to display the document after the label is added or the existing label is modified to the one or more users. The one or more terminal devices may further send annotation update information indicating addition of an annotation or modification of an existing annotation to the database server 120, so that the database server 120 invokes the installed merge engine 140 to update the storage information of the document, add an annotation indicated by the annotation update information to the storage information, or perform modification indicated by the annotation update information on the storage information, thereby obtaining a new document 150. The modification of the existing label may include adding the label content of the existing label, modifying the label content of the existing label, deleting the existing label, and the like, which is not limited in the present disclosure.
In an embodiment, multiple users may collaboratively edit a document online. For example, a first user may add a first annotation 131 to a document via terminal device 111, and a second user may add a second annotation 132 to the document via terminal device 112. The terminal device can send annotation update information indicating the addition of the first annotation and annotation update information indicating the addition of the second annotation to the database server 120. The database server 120 may respectively create an object for the first annotation and an object for the second annotation based on the received annotation update information by invoking the merge engine 140, and merge the created objects into the storage information of the original document to obtain the storage information of the new document 150, thereby implementing the update of the storage content of the document. Wherein each object has a unique identifier and each object uniquely corresponds to an annotation. It is to be understood that online collaborative editing of a document may be implemented based on, for example, cloud platform technology and cloud storage technology, which are not limited by this disclosure.
According to the embodiment of the present disclosure, since the terminal device renders the display page at the front end, the database server 120 has not completed updating the storage information of the document, that is, has not generated the object corresponding to the newly added annotation. Then in the front-end rendering stage, the identifier of the object corresponding to the newly added label cannot be obtained. Usually, the terminal device generates a temporary identifier for the newly added label, and carries the temporary identifier in the label update information to distinguish different labels.
When the database server 120 updates the stored information of the document based on the annotation update information indicating that a certain annotation is added, the time required for the update may be long. In the actual scenario, during the updating process, the terminal device may receive an operation of modifying the certain annotation by the user, and send annotation update information indicating that the certain annotation is modified to the database server 120. In this case, after the update is completed based on the tag update information indicating that a certain tag is added, the database server 120 needs to change the object for the certain tag based on the tag update information indicating that the certain tag is modified. However, since the label update information indicating to modify the certain label carries the temporary identifier, the database server 120 needs to solve the problem of how to correspond the temporary identifier to the object for the certain label.
In order to solve the above problem, the above situation can be avoided by means of locking. For example, in a process in which a database server updates document storage information based on annotation update information indicating that a certain annotation is added, the document is locked so that the user cannot modify the existing annotation in the document. Or, only the user who adds the certain label has the right to modify the certain label through locking, so as to ensure that the addition and the modification of the certain label are synchronized at the same terminal. However, in the case of editing a document by multiple persons in cooperation, the editing efficiency and the user experience are reduced to some extent.
In order to solve the above problem, the database server 120 may further establish a mapping relationship between the temporary identifier in the tag update information and the identifier of the object for the certain tag when receiving the tag update information indicating that the certain tag is added, so that when the database server 120 modifies the tag update information for the certain tag, the database server 120 may locate the object for the certain tag from the mapping relationship based on the temporary identifier in the tag update information, so as to modify the object based on the tag update information for modifying the certain tag. The method can solve the problems of low editing efficiency and poor user experience, but the complexity of updating the document storage information can be increased because the mapping relation needs to be constructed in advance and needs to be read when the label is modified each time.
In order to solve the above problem, a method of updating the storage information of the document described below may also be adopted, for example, when the database server 120 generates an object to which a label is to be added, the temporary identifier of the to-be-added label generated by the terminal device may be used as a value for a certain attribute in the object to which the label is to be added. Thereby providing a basis for the database server 120 to subsequently locate the object to be annotated.
It should be noted that the method for updating the storage information of the document provided by the present disclosure may be executed by the database server 120. Accordingly, the apparatus for updating the storage information of the document provided by the present disclosure may be provided in the database server 120.
It should be understood that the number and type of terminal devices and database servers in fig. 1 are merely illustrative. There may be any number and type of terminal devices and database servers, as desired for implementation.
The method for updating the storage information of the document provided by the present disclosure will be described in detail through fig. 2 to 4 in conjunction with the scenario described in fig. 1.
Fig. 2 is a flowchart of a method of updating storage information of a document according to an embodiment of the present disclosure.
As shown in fig. 2, the method 200 of updating the storage information of the document of this embodiment may include operations S210 to S230.
In operation S210, in response to first annotation update information for adding an annotation to a document, a first object for the annotation to be added is generated based on the first annotation update information.
According to the embodiment of the disclosure, when the first annotation update information is received, if the database server does not update the document, the first object can be generated in time based on the first annotation update information. If the database server executes the operation of updating the storage information of the document, the first object may be generated based on the first annotation update information after the operation is executed.
According to an embodiment of the present disclosure, the Document may be a Document stored in an object form, for example, a Portable Document Format (PDF) Document, and the like. Wherein each element in the document is stored in the form of an object, and each object has a unique identifier (id value), which is an integer word. In a PDF document, this identifier is used to cross-reference the storage location of the table index object.
The added labels in the document can be text box labels, highlight labels, underline labels or strikethrough labels, etc. By generating the first object and merging the first object into the storage information of the original document, the updated storage information can include the added labeled information, and the storage information of the document can be updated. It is to be understood that the above-mentioned added references are only examples to facilitate understanding of the present disclosure, and the present disclosure is not limited thereto.
According to the embodiment of the present disclosure, the first object is used for recording related information of the added annotation, for example, an id value of the object, an annotation type, coordinates, a color, a line width, author information, a creation time, a modification time, and the like of the annotation can be recorded. The related information may be embodied in the form of attributes, for example, the first object may have a plurality of attributes, which may include an exhibition stream (application Streams), color, creation time, identifier, callout Name (Name, NM), indirect referencing object, pop-up box object, default user space, coordinates of the location of each element in the callout, location, type, and subtype of parent node, and the like. Wherein, NM is an optional attribute, and is a string of characters for recording a label name, wherein the label name is unique in a document page to which the label belongs.
When the first object is generated, each piece of information in the first label update information may be used as a value of each attribute in the first object, and the first label update information may include the above related information. It is understood that a merge engine installed in the database server may be invoked to generate the first object, and a generation method of the first object is similar to that of the related art and will not be described in detail herein. The merge engine may be integrated with a program module for updating a document stored in an object form in the related art, which is not described in detail herein.
In operation S220, the first identifier in the first annotation update information is used as the value of the target attribute of the first object.
According to an embodiment of the present disclosure, the target property may be the NM described above, or any other property. The first identifier in the first annotation update information may be a temporary identifier generated by the terminal device for the annotation to be added.
After the first object is generated, the first identifier may be read, for example, from a byte in which the identifier is recorded in the first annotation update information, and the read first identifier is assigned to a target attribute of the first object. The byte of the record identifier may be determined according to a preset protocol, and the location of the byte is not limited in the present disclosure.
In operation S230, the first object is incorporated into the storage information of the document.
After the first object is obtained and the value of the first object is set, the first object may be added to the original storage information of the document stored in the database memory to form storage information of a new document. Thereby realizing the update of the storage information of the document.
According to the embodiment of the disclosure, after the label object for the label to be added is generated based on the label to be added, the temporary identifier generated by the terminal device is assigned to the target attribute of the first object. Thus, the attribute of the first object includes the attribute taking the value as the identifier of the first object, and also includes the temporary identifier taking the value as the object to be labeled. Therefore, the association between the temporary identifier generated by the terminal equipment and the object can be realized without additionally establishing a mapping relation. Therefore, the updating efficiency of the stored information of the document can be improved to a certain extent, and the complexity of a system engine for updating the stored information in the database server is reduced. Moreover, because the embodiment can establish the association between the temporary identifier generated by the terminal device and the identifier of the object by assigning a value to the attribute of the object, a technical scheme that the temporary identifier cannot be associated with the object is not required to be solved by a locking mode, and therefore the archive editing efficiency and the user experience can be improved.
By the method for updating the storage information based on the first annotation update information added with the annotation in the document, when the annotation update information of the annotation in the modified document is subsequently received, the object aiming at the document to be modified can be positioned according to the identifier of the object and the temporary identifier in the target attribute of the object, so that the accurate modification of the annotation is realized. The method of locating an object will be described in detail below with reference to fig. 3.
Fig. 3 is a schematic diagram illustrating a principle of determining a second object to be annotated in stored information of a document according to an embodiment of the present disclosure.
According to the embodiment of the present disclosure, when the annotation update information received by the database server is the second annotation update information for modifying the annotation in the document, the embodiment may first determine the second object to be modified and marked in the storage information of the document.
In one embodiment, as shown in fig. 3, when determining the second object, the embodiment 300 may first determine the identifier in the second annotation update information 310 as the second identifier 320. A second object to be annotated for modification in the stored information of the document is then determined based on the second identifier 320. The document may have at least one label, and accordingly, the stored information of the document includes at least one object respectively corresponding to the at least one label.
Illustratively, if the document displayed by the terminal device is an updated document acquired from the database server, the terminal device responds to the operation of modifying the label by the user, and an identifier carried in the label updating request sent to the database server is an identifier of an object to be modified and labeled. Thus, in this embodiment, when determining the second object based on the second identifier 320, the identifier of at least one object (i.e., the object identifier 340) may be sequentially matched with the second identifier 320, resulting in the first matching result 350. The identifiers of the objects in the storage information 330 of the document may be traversed, and one identifier obtained through the traversal may be matched with the second identifier 320 to determine whether the two identifiers are consistent. And if so, determining that the object to which the acquired identifier belongs is the second object. If not, the traversal retrieves another identifier and matches the another identifier with the second identifier. Until the identifiers of the objects matched with the second identifiers are obtained, or the identifiers of all the objects in the storage information of all the documents are matched with the second identifiers. Wherein the first matching result 350 may include having an object identifier that matches the second identifier and not having an object identifier that matches the second identifier. If the first matching result 350 is that there is a matching object identifier, the object to which the object identifier belongs is taken as the second object 360.
Illustratively, if the first matching result 350 is an identifier that does not have an object that matches the second identifier. It may be due to the fact that the document displayed by the terminal device is not an updated document obtained from the database server, and the terminal device does not yet know the identifier for the object of the annotation to be modified. In this case, the identifier in the tag update information sent by the terminal device is a temporary identifier generated for the tag by the terminal device. The embodiment may also match the second identifier 320 with the value of the target attribute of the at least one object if it is determined that the identifiers of the at least one object do not all match the second identifier 320. Specifically, the value of the target property of each of the at least one object may be determined first. The object to which the value of the target attribute matching the second identifier belongs is then determined to be the second object.
For example, the value 370 of the target attribute of at least one object may be sequentially matched with the second identifier to obtain a second matching result 380. The target attribute of at least one object in the storage information of the document may be traversed to obtain a value 370 of the target attribute, and the traversed value of the target attribute may be matched with the second identifier to determine whether the two are consistent. If the values of the target attribute obtained by the traversal are consistent, the object to which the values of the target attribute belong is determined as a second object 360. And if the values are not consistent, the traversal retrieves the value of the other target attribute, and matches the value of the other target attribute with the second identifier. Until the value of the target attribute matching the second identifier is obtained, or the value of the target attribute of at least one object is matched with the second identifier. Wherein the second match result 380 may include a value having a target attribute that matches the second identifier and a value not having a target attribute that matches the second identifier. If the second matching result is a value without the target attribute matching the second identifier, which may be due to an error in the second annotation update information sent by the terminal device, the second annotation update information may be selected to be discarded.
After the second object 360 to be annotated in the stored information of the document is determined, the second object 360 can be amended based on the second annotation updating information 310. For example, if the to-be-modified label is modified to modify the color of the label, the value of the color attribute in the attribute of the second object is modified. If the label to be modified is modified to delete the label to be modified, the second object can be directly deleted. By modifying the second object, updating of the stored information of the document can be achieved. It is to be understood that the method of updating the stored information of the document based on the second annotation is similar to the related art, and will not be described in detail herein.
In summary, when the second annotation update information of the annotation in the modified document is received and the identifier of the object matching the second identifier is not matched, the object to be modified and labeled can be determined by matching the second identifier with the value of the target attribute of the object without acquiring the mapping relationship in the related art and then searching the object identifier having the mapping relationship with the second identifier from the mapping relationship based on the second identifier. Therefore, the efficiency of updating the storage information of the document can be effectively improved.
FIG. 4 is a schematic diagram of a principle of updating stored information of a document according to another embodiment of the present disclosure.
According to the embodiment of the disclosure, when receiving the annotation update information sent by the terminal device, the database server may update the storage information of the document based on the annotation update information in time, for example, in an idle state. The annotation update information may be cached first, and the storage information of the document may be updated periodically based on the cached annotation update information.
For example, the method of updating the stored information of the document of this embodiment may cache the third annotation update information in response to receiving the third annotation update information. And then, periodically updating the storage information of the document according to the cached third label updating information. The update period may be set according to actual requirements, for example, and this disclosure does not limit this. It can be understood that the stored information of the update document of the foregoing embodiment is more prominent in the scenario of the periodic update.
According to an embodiment of the present disclosure, when the storage information of the document is periodically updated, the embodiment 400 may first obtain the cached third annotation update information 420 from the cache space 410. After obtaining the cached third annotation update information 420, the type of the cached third annotation update information 420 may be determined. The types include a type of adding annotations in the document and a type of modifying annotations in the document. And then updating the stored information of the document based on the type of the cached third annotation updating information 420. It will be appreciated that modifying annotations in a document may include deleting annotations in the document, adding, deleting, modifying, etc. the content of the annotations in the document.
For example, an information transmission protocol may be set between the terminal device and the database server, and the information transmission protocol may specify a target byte having an indication of the information type in the information. The embodiment can determine the type based on the value of the target byte when determining the type of the cached third annotation update information 420. For example, as shown in FIG. 4, after the cached third annotation update information 420 is obtained from the cache space 410, the value 430 of the target byte in the cached third annotation update information 420 may be determined. If the value of the target byte is 1, the type 440 of the cached third annotation update information may be determined to be the type of the annotation added to the document. If the value of the target byte is 0, the type 440 of the cached third annotation update information can be determined to be the type of the annotation in the modified document. It is to be understood that the target byte may be any byte in the third tag update information, and the value of the target byte and the corresponding relationship between the value of the target byte and the type of the third tag update information are only examples to facilitate understanding of the disclosure, and the disclosure is not limited thereto.
According to an embodiment of the present disclosure, if the determined type 440 of the cached third annotation update information 420 is a type of adding an annotation to the husband, the cached third annotation update information may be used as the foregoing first annotation update information, and the foregoing operation performed in response to the first annotation update information is adopted to merge the object to be annotated, which is indicated by the third annotation update information, into the storage information of the document, so as to complete the update of the storage information of the document.
According to an embodiment of the present disclosure, if the determined type 440 of the cached third annotation update information 420 is a type of modifying an annotation in the document, the cached third annotation update information may be used as the second annotation update information described above, and the object to be annotated, which is indicated by the third annotation update information, is modified by using the operation performed in response to the second annotation update information, so as to complete the update of the storage information of the document.
It is to be understood that the above-mentioned operation of determining the type of the cached third annotation update information can also be performed before caching the third annotation update information, and different types of the third annotation update information can be cached in different cache spaces.
It is to be understood that the above method for determining the type of the cached third annotation update information is only an example to facilitate understanding of the present disclosure, and the present disclosure is not limited thereto. By identifying the type of the cached label updating information, the effective updating of the storage information of the document can be realized.
Based on the method for updating the storage information of the document, the disclosure also provides a device for updating the storage information of the document. The apparatus will be described in detail below with reference to fig. 5.
Fig. 5 is a block diagram of a structure of an apparatus for updating storage information of a document according to an embodiment of the present disclosure.
As shown in fig. 5, the apparatus 500 for updating storage information of a document of this embodiment may include an object generation module 510, an attribute value obtaining module 520, and an information merging module 530.
The object generating module 510 is configured to generate a first object for an annotation to be added based on first annotation update information in response to the first annotation update information for adding an annotation in a document. In an embodiment, the object generating module 510 may be configured to perform the operation S210 described above, which is not described herein again.
The attribute value obtaining module 520 is configured to use the first identifier in the first annotation update information as the value of the target attribute of the first object. In an embodiment, the attribute value obtaining module 520 may be configured to perform the operation S220 described above, which is not described herein again.
The information merging module 530 is configured to merge the first object into the stored information of the document. In an embodiment, the information merging module 530 may be configured to perform the operation S230 described above, which is not described herein again.
According to an embodiment of the present disclosure, the apparatus 500 for updating storage information of a document may further include an object determination module and an object modification module. The object determination module is used for responding to second annotation updating information of the annotation in the modified document, and determining a second object to be modified and annotated in the storage information of the document based on a second identifier in the second annotation updating information. The object modification module is used for modifying the second object based on the second label updating information so as to update the storage information of the document.
According to an embodiment of the present disclosure, the document includes at least one label; the storage information of the document comprises at least one object respectively aiming at least one label. The object determination module may include a matching sub-module, an attribute value determination sub-module, and an object determination sub-module. The matching submodule is used for matching the identifier of at least one object with the second identifier in sequence. The attribute value determination submodule is configured to determine a value of a respective target attribute of the at least one object in response to the identifier of the at least one object not matching the second identifier. The object determination submodule is used for determining an object to which the value of the target attribute matched with the second identifier belongs as a second object.
According to an embodiment of the present disclosure, the object determination sub-module is further configured to: and in response to the target identifier in the identifiers of the at least one object being matched with the second identifier, determining that the object to which the target identifier belongs is the second object.
According to an embodiment of the present disclosure, the apparatus 500 for updating storage information of a document may further include an information caching module and an information updating module. The information caching module is used for responding to the received third label updating information and caching the third label updating information. And the information updating module is used for periodically updating the storage information of the document according to the cached third label updating information.
According to an embodiment of the present disclosure, the information updating module includes an information type determining sub-module and an updating sub-module. The information type determining submodule is used for determining the type of the cached third label updating information based on the value of the target byte in the cached third label updating information. And the updating submodule is used for updating the storage information of the document based on the type of the cached third label updating information. The type of the third annotation updating information comprises the type of adding the annotation in the document and the type of modifying the annotation in the document.
According to an embodiment of the present disclosure, the document includes a document in a portable document format.
It should be noted that, in the technical solution of the present disclosure, the acquisition, storage, application, and the like of the personal information of the related user all conform to the regulations of the relevant laws and regulations, and do not violate the common customs of the public order.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
FIG. 6 illustrates a schematic block diagram of an example electronic device 600 that can be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 6, the apparatus 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM)602 or a computer program loaded from a storage unit 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 can also be stored. The calculation unit 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.
A number of components in the device 600 are connected to the I/O interface 605, including: an input unit 606 such as a keyboard, a mouse, or the like; an output unit 607 such as various types of displays, speakers, and the like; a storage unit 608, such as a magnetic disk, optical disk, or the like; and a communication unit 609 such as a network card, modem, wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The computing unit 601 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The calculation unit 601 executes the respective methods and processes described above, such as a method of updating storage information of a document. For example, in some embodiments, the method of updating stored information of a document may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 600 via the ROM 602 and/or the communication unit 609. When the computer program is loaded into RAM 603 and executed by the computing unit 601, one or more steps of the above-described method of updating stored information of a document may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured by any other suitable means (e.g., by means of firmware) to perform the method of updating the stored information of the document.
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
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.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The Server may be a cloud Server, which is also called a cloud computing Server or a cloud host, and is a host product in a cloud computing service system, so as to solve the defects of high management difficulty and weak service extensibility in a traditional physical host and a VPS service ("Virtual Private Server", or simply "VPS"). The server may also be a server of a distributed system, or a server incorporating a blockchain.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, and the present disclosure is not limited herein.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.

Claims (17)

1. A method of updating stored information of a document, comprising:
in response to first annotation updating information of adding annotations in a document, generating a first object for the annotations to be added based on the first annotation updating information;
taking a first identifier in the first annotation updating information as a value of a target attribute of the first object; and
and merging the first object into the storage information of the document.
2. The method of claim 1, further comprising:
responding to second annotation updating information for modifying the annotation in the document, and determining a second object to be modified and annotated in the storage information of the document based on a second identifier in the second annotation updating information; and
and modifying the second object based on the second label updating information to update the storage information of the document.
3. The method of claim 2, wherein the document includes at least one annotation therein; the storage information of the document comprises at least one object respectively aiming at the at least one label; determining a second object to be marked for modification in the stored information of the document comprises:
matching the identifier of the at least one object with the second identifier in sequence;
in response to the identifiers of the at least one object each not matching the second identifier, determining a value of a respective target attribute of the at least one object; and
and determining an object to which the value of the target attribute matched with the second identifier belongs as the second object.
4. The method of claim 3, further comprising:
and in response to the target identifier in the identifiers of the at least one object being matched with the second identifier, determining that the object to which the target identifier belongs is the second object.
5. The method of any of claims 1-4, further comprising:
caching third label updating information in response to receiving the third label updating information; and
and periodically updating the storage information of the document according to the cached third label updating information.
6. The method of claim 5, wherein periodically updating the stored information of the document comprises periodically:
determining the type of the cached third label updating information based on the value of the target byte in the cached third label updating information; and
updating the stored information of the document based on the type of the cached third annotation update information,
the type of the third annotation updating information comprises the type of adding the annotation in the document and the type of modifying the annotation in the document.
7. The method of any of claims 1-6, wherein the document comprises a document in a portable document format.
8. An apparatus for updating stored information of a document, comprising:
the object generation module is used for responding to first label updating information of adding labels in a document, and generating a first object aiming at the labels to be added based on the first label updating information;
an attribute value obtaining module, configured to use a first identifier in the first annotation update information as a value of a target attribute of the first object; and
and the information merging module is used for merging the first object into the storage information of the document.
9. The apparatus of claim 8, further comprising:
the object determination module is used for responding to second annotation updating information for modifying the annotation in the document, and determining a second object to be modified and annotated in the storage information of the document based on a second identifier in the second annotation updating information; and
and the object modification module is used for modifying the second object based on the second label updating information so as to update the storage information of the document.
10. The apparatus of claim 9, wherein the document includes at least one annotation therein; the storage information of the document comprises at least one object respectively aiming at the at least one label; the object determination module includes:
the matching submodule is used for matching the identifier of the at least one object with the second identifier in sequence;
an attribute value determination submodule, configured to determine a value of a respective target attribute of the at least one object in response to the identifier of the at least one object not matching the second identifier; and
and the object determining submodule is used for determining an object to which the value of the target attribute matched with the second identifier belongs as the second object.
11. The apparatus of claim 10, the object determination sub-module further to:
and in response to the target identifier in the identifiers of the at least one object being matched with the second identifier, determining that the object to which the target identifier belongs is the second object.
12. The apparatus of any of claims 8-11, further comprising:
the information caching module is used for responding to the received third label updating information and caching the third label updating information; and
and the information updating module is used for periodically updating the storage information of the document according to the cached third label updating information.
13. The apparatus of claim 12, wherein the information update module comprises:
the information type determining submodule is used for determining the type of the cached third label updating information based on the value of the target byte in the cached third label updating information; and
an update sub-module, configured to update the stored information of the document based on the type of the cached third tag update information,
the type of the third annotation updating information comprises the type of adding the annotation in the document and the type of modifying the annotation in the document.
14. The method of any of claims 8-13, wherein the document comprises a document in a portable document format.
15. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.
16. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any of claims 1-7.
17. A computer program product comprising a computer program which, when executed by a processor, implements a method according to any one of claims 1 to 7.
CN202110634924.7A 2021-06-07 2021-06-07 Method, device, equipment and storage medium for updating storage information of document Pending CN113378524A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110634924.7A CN113378524A (en) 2021-06-07 2021-06-07 Method, device, equipment and storage medium for updating storage information of document

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110634924.7A CN113378524A (en) 2021-06-07 2021-06-07 Method, device, equipment and storage medium for updating storage information of document

Publications (1)

Publication Number Publication Date
CN113378524A true CN113378524A (en) 2021-09-10

Family

ID=77576328

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110634924.7A Pending CN113378524A (en) 2021-06-07 2021-06-07 Method, device, equipment and storage medium for updating storage information of document

Country Status (1)

Country Link
CN (1) CN113378524A (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050160355A1 (en) * 2004-01-15 2005-07-21 International Business Machines Corporation Maintaining annotations for distributed and versioned files
US20060150079A1 (en) * 2004-12-17 2006-07-06 International Business Machines Corporation Method for associating annotations with document families
US20070061704A1 (en) * 2005-09-14 2007-03-15 Microsoft Corporation Dynamic anchoring of annotations to editable content
CN101727674A (en) * 2008-10-30 2010-06-09 北大方正集团有限公司 Method for marking picture in file, and method for reproducing mark of picture in file
CN101872340A (en) * 2009-04-23 2010-10-27 北京大学 Typesetting method and device based on format layout template
CN103257956A (en) * 2013-04-19 2013-08-21 北京小米科技有限责任公司 Method and device for data updating of electronic document
CN107943777A (en) * 2017-12-14 2018-04-20 北京久蓉科技有限公司 A kind of collaborative editing, cooperative processing method, device, equipment and storage medium
CN108885611A (en) * 2016-04-15 2018-11-23 科普拉公司 document automation
CN110532449A (en) * 2019-08-30 2019-12-03 盈盛智创科技(广州)有限公司 A kind of processing method of service profile, device, equipment and storage medium
CN111695518A (en) * 2020-06-12 2020-09-22 北京百度网讯科技有限公司 Method and device for labeling structured document information and electronic equipment
CN112417826A (en) * 2020-11-24 2021-02-26 济南智学承远信息技术有限公司 PDF online editing method and device, electronic equipment and readable storage medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050160355A1 (en) * 2004-01-15 2005-07-21 International Business Machines Corporation Maintaining annotations for distributed and versioned files
US20060150079A1 (en) * 2004-12-17 2006-07-06 International Business Machines Corporation Method for associating annotations with document families
US20070061704A1 (en) * 2005-09-14 2007-03-15 Microsoft Corporation Dynamic anchoring of annotations to editable content
CN101727674A (en) * 2008-10-30 2010-06-09 北大方正集团有限公司 Method for marking picture in file, and method for reproducing mark of picture in file
CN101872340A (en) * 2009-04-23 2010-10-27 北京大学 Typesetting method and device based on format layout template
CN103257956A (en) * 2013-04-19 2013-08-21 北京小米科技有限责任公司 Method and device for data updating of electronic document
CN108885611A (en) * 2016-04-15 2018-11-23 科普拉公司 document automation
CN107943777A (en) * 2017-12-14 2018-04-20 北京久蓉科技有限公司 A kind of collaborative editing, cooperative processing method, device, equipment and storage medium
CN110532449A (en) * 2019-08-30 2019-12-03 盈盛智创科技(广州)有限公司 A kind of processing method of service profile, device, equipment and storage medium
CN111695518A (en) * 2020-06-12 2020-09-22 北京百度网讯科技有限公司 Method and device for labeling structured document information and electronic equipment
CN112417826A (en) * 2020-11-24 2021-02-26 济南智学承远信息技术有限公司 PDF online editing method and device, electronic equipment and readable storage medium

Similar Documents

Publication Publication Date Title
US7739309B2 (en) Method, system, and computer-readable medium for merging data from multiple data sources for use in an electronic document
EP4145298A1 (en) Method and apparatus for snapshotting metadata
CN113626223A (en) Interface calling method and device
CN112966469A (en) Method, device and equipment for processing chart in document and storage medium
CN112783482B (en) Visual form generation method, device, equipment and storage medium
CN110308907B (en) Data conversion method and device, storage medium and electronic equipment
CN114168119B (en) Code file editing method, device, electronic equipment and storage medium
CN116245052A (en) Drawing migration method, device, equipment and storage medium
CN116185389A (en) Code generation method and device, electronic equipment and medium
CN113378524A (en) Method, device, equipment and storage medium for updating storage information of document
CN112540958B (en) File processing method, device, equipment and computer storage medium
CN113190718A (en) Data processing method and device for graph database, electronic equipment and storage medium
CN113656533A (en) Tree control processing method and device and electronic equipment
CN115774712A (en) Metadata management method, system, device and storage medium
CN113515504B (en) Data management method, device, electronic equipment and storage medium
CN114281981B (en) News brief report generation method and device and electronic equipment
CN117407468A (en) Method and device for displaying generated content, electronic equipment and storage medium
CN115981657A (en) Code generation method and device, electronic equipment and readable medium
CN117539832A (en) File system object renaming method, device and computer program product
CN115905322A (en) Service processing method and device, electronic equipment and storage medium
CN116186455A (en) Catalog generation method, catalog operation method, device and equipment
CN115495368A (en) Data testing method and device and electronic equipment
CN117742686A (en) Program source code file generation method and device, electronic equipment and storage medium
CN116009847A (en) Code generation method, device, electronic equipment and storage medium
CN113434595A (en) Database synchronization method and device, electronic equipment and storage medium

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