Document processing method and device, electronic equipment and storage medium

By inserting controls into documents and forming structured data, the problem of difficulty in efficiently managing unstructured data in the prior art is solved, and efficient governance and cost reduction of document content is achieved.

CN120045515APending Publication Date: 2025-05-27GUANGZHOU KINGSOFT MOBILE TECH +3
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311591199.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-24
Publication Date
2025-05-27

AI Technical Summary

Technical Problem

The existing technology is difficult to efficiently manage unstructured data, resulting in users facing higher data governance costs.

Method used

By responding to control reference operations in a document, inserting controls and forming structured data, storing them in association with the document, converting unstructured data into structured data for efficient governance.

Benefits of technology

It realizes the conversion of document content from unstructured form to structured data, thereby improving the governance capabilities of document content and reducing the cost of data governance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120045515A_ABST
    Figure CN120045515A_ABST
Patent Text Reader

Abstract

The invention relates to a document processing method and device, electronic equipment and a storage medium, and the method comprises the steps that in response to a control reference operation triggered in a document, a control is inserted in the document, and the control is used for displaying document content; and forming structured data of the control, and carrying out associated storage on the structured data and the document. In this way, the text content, originally needing to be edited in an unstructured form, in the document can be converted into the structured data, so that the governance capacity of the document content is improved, and a user can efficiently govern the document.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computers, and in particular, to a document processing method, apparatus, electronic device, and storage medium. Background Art

[0002] With the popularization of informatization, the amount of data within an organization (such as an enterprise) is increasing, and most of it is unstructured data, such as contracts, regulations, prospectuses, etc. Among them, unstructured data refers to data without a clearly defined data format or schema, and it is difficult to be effectively managed and processed by structured tools such as traditional relational database management systems.

[0003] Since unstructured data does not have a clearly defined data format or schema, it is often difficult to be effectively governed, which brings great data governance costs to users. Therefore, there is an urgent need for a method that can achieve efficient governance of documents. Summary of the Invention

[0004] This application provides a document processing method, apparatus, electronic device, and storage medium to solve the technical problem in the prior art that documents cannot be efficiently governed.

[0005] In a first aspect, this application provides a document processing method, and the method includes:

[0006] In response to a control reference operation triggered in the document, insert a control into the document, where the control is used to display document content;

[0007] Form structured data of the control and store the structured data in association with the document.

[0008] In a possible implementation manner, the step of inserting a control into the document in response to a control reference operation triggered in the document includes:

[0009] In response to a control reference operation triggered in the document, display a control material set,

[0010] In response to a selection operation on the control in the control material set, insert the selected control into the document.

[0011] In a possible implementation manner, the step of inserting a control into the document in response to a control reference operation triggered in the document includes:

[0012] In response to a control reference operation triggered in the document, insert a control at the position indicated by the current input content in the document content.

[0013] In a possible implementation manner, the step of forming structured data of the control includes:

[0014] Determine the primary key of the control, and determine the control data of the control as the value corresponding to the primary key to form a key-value pair;

[0015] Determine the key-value pair as the structured data of the control.

[0016] In a possible implementation, after inserting the control into the document, it further includes:

[0017] In response to an input operation triggered in the control, determine the input content as the control content of the control, and display the control content in the control.

[0018] In a possible implementation, the method further includes:

[0019] In response to a format modification operation on the control content in the control, modify the display format of the control content in the control to the target format corresponding to the format modification operation.

[0020] In a possible implementation, after inserting the control into the document, it further includes:

[0021] In response to detecting that the control content of the control in the document is different from the source control content of the control at its publishing source end, modify the control content of the control in the document to the source control content.

[0022] In a possible implementation, the response to detecting that the control content of the control in the document is different from the source control content of the control at its publishing source end and modifying the control content of the control in the document to the source control content includes:

[0023] In response to the triggering of a set event, obtain the source control content of the control at its publishing source end;

[0024] Compare the source control content with the control content of the control in the document;

[0025] In the case where it is compared that the control content of the control in the document is different from the source control content, modify the control content of the control in the document to the source control content.

[0026] In a possible implementation, the response to detecting that the source control content of the control at its publishing source end is different from the control content of the control in the document includes:

[0027] In response to a linkage update instruction for the control from the publishing source end, it is determined that the content of the source-end control of the control on the publishing source end is different from the content of the control in the document, where the linkage update instruction includes the content of the source-end control.

[0028] In a possible implementation, the structured data includes the hash value of the control content in the control; the method further includes:

[0029] Determine the current hash value of the control content in the control, and parse the historical hash value from the structured data of the control;

[0030] Compare the current hash value with the historical hash value;

[0031] In the case where the current hash value and the historical hash value are inconsistent, output a prompt message for indicating that the control content in the control has been modified.

[0032] In a possible implementation, the associatively storing the structured data with the document includes:

[0033] Set permissions for the document, use the permissions to manage the structured data, and associatively store the structured data after permission management with the document.

[0034] In a possible implementation, the method further includes:

[0035] Receive a document retrieval request, where the document retrieval request carries target control information;

[0036] Search the document database according to the target control information to obtain target structured data that matches the target control information;

[0037] Determine the document associated with the target structured data as the target document.

[0038] In a second aspect, the present application provides a document processing device, and the device includes:

[0039] A control reference module, configured to insert a control in the document in response to a control reference operation triggered in the document, where the control is at least used to display document content;

[0040] A structuring module, configured to form the structured data of the control;

[0041] A document storage module, configured to associatively store the structured data with the document.

[0042] In a possible implementation, the control reference module includes:

[0043] A material display unit, configured to display a control material set in response to a control reference operation triggered in the document.

[0044] A reference unit, configured to insert a selected control into the document in response to a selection operation on the control in the control material set.

[0045] In a possible implementation manner, the control reference module is specifically configured to:

[0046] In response to a control reference operation triggered in the document, insert a control at the position indicated by the current input content in the document content.

[0047] In a possible implementation manner, the structuring module is specifically configured to:

[0048] Determine the primary key of the control, and determine the control data of the control as the value corresponding to the primary key, to form a key-value pair;

[0049] Determine the key-value pair as the structured data of the control.

[0050] In a possible implementation manner, it further includes:

[0051] A content input module, configured to, after inserting a control into the document, in response to an input operation triggered in the control, determine the input content as the control content of the control, and display the control content in the control.

[0052] In a possible implementation manner, it further includes:

[0053] A format modification module, configured to, in response to a format modification operation on the control content in the control, modify the display format of the control content in the control to the target format corresponding to the format modification operation.

[0054] In a possible implementation manner, it further includes:

[0055] A linkage update module, configured to, after inserting a control into the document, in response to detecting that the control content of the control in the document is different from the source control content of the control at its publishing source end, modify the control content of the control in the document to the source control content.

[0056] In a possible implementation manner, the linkage update module is specifically configured to:

[0057] In response to the triggering of a set event, obtain the source control content of the control at its publishing source end;

[0058] Compare the content of the source - end control with the content of the control in the document;

[0059] In the case where it is compared that the content of the control in the document is different from the content of the source - end control, modify the content of the control in the document to the content of the source - end control.

[0060] In a possible implementation manner, the linkage update module is specifically configured to:

[0061] In response to a linkage update instruction from the publishing source for the control, when it is determined that the content of the source - end control on the publishing source is different from the content of the control in the document, where the linkage update instruction includes the content of the source - end control.

[0062] In a possible implementation manner, the structured data includes the hash value of the content in the control; the device further includes:

[0063] A hash - value comparison module, configured to determine the current hash value of the content in the control and parse out the historical hash value from the structured data of the control;

[0064] Compare the current hash value and the historical hash value;

[0065] A modification prompt module, configured to output a prompt message indicating that the content in the control has been modified when it is compared that the current hash value and the historical hash value are inconsistent.

[0066] In a possible implementation manner, the document storage module includes:

[0067] A permission management unit, configured to set permissions for the document and perform permission management on the structured data using the permissions;

[0068] A storage unit, configured to associate and store the structured data after permission management with the document.

[0069] In a possible implementation manner, it further includes:

[0070] A document retrieval module, configured to receive a document retrieval request, where the document retrieval request carries target control information;

[0071] Search the document database according to the target control information to obtain target structured data matching the target control information;

[0072] Determine the document associated with the target structured data as the target document.

[0073] In a third aspect, the present application provides an electronic device, including: a processor and a memory, where the processor is configured to execute a document processing program stored in the memory to implement the document processing method according to any one of the first aspect.

[0074] In a fourth aspect, the present application provides a storage medium storing one or more programs, where the one or more programs can be executed by one or more processors to implement the document processing method according to any one of the first aspect.

[0075] The above technical solutions provided by the embodiments of the present application have the following advantages compared with the prior art: In the method provided by the embodiments of the present application, by responding to a control reference operation triggered in a document, a control is inserted into the document to form structured data of the control, and the structured data is associated and stored with the document. Since during the creation and editing of the document, the content in the document is inserted into the document in the form of a control and the structured data of the control is formed, the document content that originally needed to be edited in an unstructured form in the document can be converted into structured data, and structured data can often be efficiently managed, thereby improving the management ability of the document content and enabling users to efficiently manage the document. BRIEF DESCRIPTION OF THE DRAWINGS

[0076] The accompanying drawings herein are incorporated into the specification and constitute a part of this specification, showing embodiments consistent with the present application and used together with the specification to explain the principles of the present application.

[0077] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the accompanying drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0078] One or more embodiments are exemplarily illustrated by the pictures in the corresponding accompanying drawings. These exemplary illustrations do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings are represented as similar elements, unless otherwise stated, and the drawings in the drawings do not constitute a proportional limitation.

[0079] Figure 1 It is a flowchart of an embodiment of a document processing method provided by an embodiment of the present application;

[0080] Figure 2 It is an example of a complex nested control;

[0081] Figure 3 It is a schematic diagram of a control material set management interface;

[0082] Figure 4An example of user operation when inserting a control into a document;

[0083] Figure 5 A flowchart of an embodiment of another document processing method provided by an embodiment of the present application;

[0084] Figure 6 A flowchart of an embodiment of yet another document processing method provided by an embodiment of the present application;

[0085] Figure 7 A block diagram of an embodiment of a document processing apparatus provided by an embodiment of the present application;

[0086] Figure 8 A schematic structural diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners

[0087] To make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Apparently, the described embodiments are some but not all of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.

[0088] The following disclosure provides many different embodiments or examples for implementing different structures of the present application. To simplify the disclosure of the present application, components and settings of specific examples are described below. Of course, they are only examples and are not intended to limit the present application. In addition, the present application may repeat reference numerals and / or letters in different examples. Such repetition is for the purpose of simplification and clarity and does not in itself indicate the relationship between the various embodiments and / or settings discussed.

[0089] To solve the technical problem in the prior art that it is difficult to efficiently manage documents, the present application provides a document processing method, which can perform structural processing on the document content during the creation and editing of the document to form structured data, so that the document can be efficiently managed.

[0090] Figure 1 A flowchart of an embodiment of a document processing method provided by an embodiment of the present application.

[0091] As Figure 1 shown, the method includes the following steps:

[0092] Step 101, in response to a control reference operation triggered in the document, insert a control into the document, where the control is used to display the document content.

[0093] The above-mentioned document can be an online document. That is to say, the execution subject of the embodiments of the present application can be an online document processing application (system). In one embodiment, the online document processing application (system) mentioned here can be further differentiated according to application scenarios. For example, in an office scenario, when it comes to the editing of sales contract documents and personnel contract documents, two online document processing applications (systems) can be designed, namely, the sales contract document processing application (system) and the personnel contract document processing application (system). On this basis, when a user in the sales department edits a sales contract document, they can log in to the sales contract document processing application (system) to edit the sales contract document online. When a user in the personnel department edits a personnel contract document, they can log in to the personnel contract document processing application (system) to edit the personnel contract document online. Of course, in actual applications, the online document processing application (system) may not be differentiated according to application scenarios, that is, the online document processing application (system) can be compatible with document editing in different application scenarios.

[0094] The above-mentioned document can also be an offline document. For an offline document, the execution subject of the embodiments of the present application can be the above-mentioned online document processing application (system), or a document editing client.

[0095] The above-mentioned control is an object for inputting and displaying document content. The document content mentioned here can be pure text, pictures, tables, audio / video, links, and other content. Among them, when the control displays the document content, it can display all or part of it. For example, when the size of the control is not sufficient to display all the document content, part of the document content is displayed according to the size of the control. The types of controls can be text boxes, button controls, drop-down boxes, radio / checkbox controls, date / time controls, picture / file upload controls, etc. Among them, the text box can be further divided into a single-line text box and a multi-line text box.

[0096] In one embodiment, the user can pre-register the above-mentioned controls in the background to form a control material set. Here, the control material set is a collection including multiple controls. Specifically, when the user registers the above-mentioned controls in the background, some fields that can be controlled are accumulated first. The so-called control refers to encapsulation, including the encapsulation of data, and the encapsulation of data and methods. For example, if the cooperation terms can be reused in different contracts, the specific cooperation term data can be encapsulated into a control. Another example is that the supplier field usually appears in the enterprise's procurement contracts, and the supplier involved in a specific procurement contract is usually selected from all the approved suppliers of the enterprise. Then, all the approved supplier data of the enterprise and the radio / checkbox method can be encapsulated into a control.

[0097] The specific implementation of controlling the above fields includes: defining the fields that can be controlled, including determining the field name, data type, data source, format, and linkage rules of each field. Finally, the user designs corresponding controls for each field according to the above definitions. Here, the data type refers to the data type of the content in the control. For example, the purchase amount control only supports numerical input, and the cooperation terms control only supports text input. The data source refers to some types of controls, such as the data source to which the selectable items in the drop-down box control belong. For example, the data source associated with the supplier control is the supplier list, which supports selecting a supplier from the supplier list. The format refers to the display format of the content in the control, such as formats like red font, bold font, etc. Thus, using controls to insert document content is beneficial to standardizing the format and data type of the document content. The linkage rule is used to indicate how the content of the control in the document is linked to the content of the control in the background. As for the specific content and application of the linkage rule, it will be explained below and will not be elaborated here for now.

[0098] For example, the user registers two controls in the background: Control A and Control B. Among them, Control A is used to input the supplier name. Then, when the user registers Control A, the user can set the field name of Control A as the supplier, set the type of Control A as a drop-down box, and set the option list. Control B is used to input the cooperation terms. Then, when the user registers Control B, the user can set the field name of Control B as the cooperation terms, set the type of Control A as a single-line / multi-line text box, and set the specific field value, that is, the specific cooperation terms. Optionally, the user can also set the display format of the content in the control. For example, set the display format of the cooperation terms as red bold font.

[0099] In one embodiment, the user can also register some complex nested controls in the background. Here, a complex nested control refers to a control that nests one or more other controls. For example, referring to Figure 2 , it is an example of a complex nested control. Figure 2 Component 1 in corresponds to the complex nested control mentioned here, and 4 controls are nested in this Component 1. In addition, here, the controls nested in Component 1 can also be complex nested controls, that is to say, the embodiments of the present application support multi-level nested controls.

[0100] As an exemplary application scenario, the complex nested control corresponds to the content that can be reused in the document, such as the tables repeatedly used in the engineering design document, the terms repeatedly used in the contract document, etc. Thus, using complex nested controls can decompose the document content into reusable materials to improve the document editing efficiency and the control ability over the document content.

[0101] Further, when designing controls, users can also design corresponding controls for different application scenarios. Here, the main difference between different application scenarios lies in different fields. For example, in a sales contract document, the fields involved include but are not limited to: Party A, Party B, cooperation terms, suppliers, commodity names, prices, procurement methods, payment methods, etc. fields, while in a personnel contract document, the fields involved include but are not limited to: Party A, Party B, office location, working hours, salary treatment, salary payment method, etc. fields. Based on this, the background can group and manage the control material sets under different application scenarios. For example, see Figure 3 which is a schematic diagram of the management interface for the control material set. Figure 3 The management interface shown includes a contract management control group, an official document control group, an engineering design control group, a medical record control group, and a prospectus control group. Among them, the contract management control group includes a personnel contract group and a sales contract group. Each of the control groups mentioned here is a control material set. Figure 3 It also exemplifies the names (i.e., the above-mentioned field names), types, and statuses of the controls included in the sales contract group. Among them, the status includes two statuses: enabled and disabled. In the enabled status, the control is visible to the document editing user, and in the disabled status, the control is invisible to the document editing user. In addition, as Figure 3 shown, users can also perform editing operations on the registered controls in the background, such as modifying the field name, modifying the control type, modifying the control content, etc.

[0102] In the above embodiments, by designing corresponding controls for different application scenarios respectively, the technical solutions provided by the embodiments of the present application can be applied to the document editing process under multiple application scenarios, thus well meeting the user's needs.

[0103] In the embodiments of the present application, during the process of editing a document, users can reference the registered controls in the background in the document, thereby controlizing the content in the document. Specifically, as described in step 101, the execution subject of the embodiments of the present application inserts a control in the document in response to the control reference operation triggered in the document.

[0104] In one embodiment, the specific implementation of inserting a control in the document in response to the control reference operation triggered in the document includes: in response to the control reference operation triggered in the document, displaying the control material set, and in response to the selection operation for the controls in the control material set, inserting the selected control in the document. By establishing the control material set, users can flexibly select the required controls according to actual needs, which not only meets the user's needs but also is more convenient and flexible.

[0105] Here, when inserting the selected control in the document, the control is inserted at the position indicated by the current input content in the document content.

[0106] Among them, as an optional implementation, refer to Figure 4 For example, during the process of a user editing a document, when the user wants to introduce a control into the document, the user can input a specified character, such as "#". When the execution entity of the embodiment of the present application detects that the user inputs the specified character in the document, it determines that a control reference operation is triggered in the document, and then displays a control material set. Subsequently, the user can select the control to be inserted from the control material set. At this time, the execution entity of the embodiment of the present application responds to the selection operation for the control in the control material set, and inserts the selected control at the position indicated by the current input content in the document content, for example, at the position where the user inputs the specified character.

[0107] As another optional implementation, during the process of a user editing a document, when the user wants to introduce a control into the document, the user can trigger the "Insert" icon in the toolbar provided by the execution entity of the embodiment of the present application, as Figure 4 shown. The toolbar has a "Insert" icon. In response to the "Insert" icon being triggered, a menu list is displayed. The menu list may include control options. At this time, the user can continue to trigger the control options in the menu list. When the execution entity of the embodiment of the present application detects that the user triggers a control option in the above menu list, it determines that a control reference operation is triggered in the document, and then displays a control material set. Subsequently, the user can select the control to be inserted from the control material set. At this time, the execution entity of the embodiment of the present application responds to the selection operation for the control in the control material set, and inserts the selected control at the position indicated by the current input content in the document content, for example, at the position of the cursor, or for example, the current input content indicates to insert the selected control at the position of the existing content (for example, the content ABC in the document is selected, and the position indicated by the current input content is the position where the content ABC is located. The content ABC is used as the object for inserting the selected control. At this time, the user can select to insert multiple controls, and can insert one control for the content A, or two controls for the content A, or one or more controls for the content BC); or for example, the position indicated by the current input content is an arbitrary position in the document; here, the position indicated by the input content can also be to insert a control into an existing control.

[0108] The above implementation methods can all realize the reference of controls in the document through simple operations.

[0109] Here, one more point needs to be explained. As an optional implementation method, since different control material sets can be designed for different application scenarios, during the document editing process, in response to a control reference operation triggered in the document, only the control material set in the corresponding application scenario can be displayed. For example, during the process of editing a sales contract document, in response to a control reference operation triggered in the document, only the sales contract control group is displayed. During the process of editing a personnel contract document, in response to a control reference operation triggered in the document, only the personnel contract control group is displayed. In this way, the selection range of controls for the user can be narrowed, and the operation efficiency when the user inserts a control into the document can be improved. Here, if online document processing applications (systems) are designed separately for different application scenarios, then when the online document processing application (system) loads the control material set that needs to be displayed, it can carry the application (system) ID of the online document processing application (system) in the control material set loading request sent to the background, so that the background can identify the application scenario corresponding to the online document processing application (system) that sends the control material set loading request based on the application (system) ID, and then return the control material set in this application scenario to the online document processing application (system).

[0110] Step 102: Form the structured data of the above-mentioned control, and store the structured data in association with the document.

[0111] Structured data refers to data that follows a certain architecture. It can also be said that structured data all have the same fields or attributes.

[0112] In one embodiment, when inserting a control into a document, control data such as the identifier of the control (i.e., the above-mentioned field name), the control ID, and the application (system) ID are stored in the control group attribute of the document. After that, in response to the save event of the document, the control data of the control inserted into the document is obtained from the control component attribute of the document, the control data is formed into the structured data of the control, and the structured data is stored in association with the document in the document database. Thus, it can be seen that the controls corresponding to different fields have control data with the same architecture, thereby realizing the transformation of the unstructured data in the document into structured data and storing it, which is beneficial to the retrieval and management of the document. Here, the save event of the document includes an automatically triggered save event and a save event manually triggered by the user. Optionally, when storing the structured data of the control in association with the document, the storage method of the general text format field is reused, so that after the document is downloaded, edited and saved with a third-party editor and then returned to the online system, the reference relationship between the document and the control can still be recognized, thereby ensuring format compatibility between the online system and the target mainstream document editing clients (such as WPS Office, MS Office).

[0113] In one embodiment, the specific implementation of forming the structured data of a control includes: determining the primary key of the control, which is the unique identifier of the control, and determining the control data of the control as the value corresponding to the primary key to form a key-value pair, and determining this key-value pair as the structured data of the control. Optionally, the primary key of the control includes: control ID, document ID, document version number, and application (online system) ID.

[0114] In addition, in one embodiment, when storing the structured data of a control, permission management can also be performed on the structured data of the control, and then the structured data after permission management is associated and stored with the document. In an exemplary application scenario, the purpose of performing permission management on the structured data of the control is to ensure cross-application (system) isolation of the control to avoid cross-application (system) leakage of data associated with the application (system) within the control. For example, the supplier list encapsulated in the supplier control belongs to the confidential data in the sales application (system) and is not allowed to be obtained by other applications (systems).

[0115] Among them, performing permission management on the structured data of the control includes: setting permissions for the document and using this permission to perform permission management on the structured data. For example, setting the permission of the document to read-only across applications (systems), correspondingly, the permission of the structured data is also read-only across applications (systems), so as to ensure cross-application (system) isolation of the control and avoid cross-application (system) leakage of data associated with the application (system) within the control.

[0116] As an alternative implementation, the above permission management is achieved through a secret key mechanism. Specifically, obtain a secret key (for convenience of description, called the target secret key), use this target secret key to encrypt the structured data, and finally associate and store the encrypted structured data with the document. Here, the target secret key is the secret key of the online document processing application (system) logged in when editing the document, and different online document processing applications (systems) have different secret keys. On this basis, when opening the document in other applications (systems), since other applications (systems) cannot decrypt the structured data of the control in the document, other applications (systems) can only read the control content displayed by the control in the document and cannot obtain further control data, such as the dropdown option list of the control. For example, for the supplier control, other applications (systems) can only read the control content displayed by the control and cannot obtain the supplier list, so that cross-application (system) leakage of data associated with the application (system) within the control can be avoided, thus ensuring cross-application (system) isolation of the control. In addition, optionally, when editing the document in other applications (systems), the control in it can be deleted.

[0117] The method provided by the embodiment of the present application inserts a control into a document in response to a control reference operation triggered in the document, forms structured data of the control, and stores the structured data in association with the document. Since, during the creation and editing of the document, the content in the document is inserted into the document in the form of a control and the structured data of the control is formed, the content of the document that originally needed to be edited in an unstructured form can be converted into structured data. Structured data can often be efficiently managed, thereby improving the management ability of the document content and enabling users to efficiently manage the document.

[0118] Figure 5 It is a flowchart of an embodiment of another document processing method provided by the embodiment of the present application. The Figure 5 The process shown is based on the process shown above Figure 1 and includes the following steps:

[0119] Step 501: In response to a control reference operation triggered in the document, insert a control into the document, where the control is used to display the document content.

[0120] For a detailed description of step 501, please refer to the relevant description in the process shown above Figure 1 and will not be elaborated here.

[0121] Step 502: In response to an input operation triggered in the control, determine the input content as the control content of the control and display the control content in the control.

[0122] As can be seen from the description in the process shown Figure 1 some controls are not designed with specific control content during registration, and even if specific control content is designed during registration, during the document editing process, users can modify the control content according to actual needs. That is to say, in the technical solution provided by the embodiment of the present application, in response to an input operation triggered in the control, the input content is determined as the control content of the control and the control content is displayed in the control.

[0123] In one embodiment, the document content in the above-described input control is the existing document content in the document. Specifically, when a user is editing a document, the content edited in the document using traditional methods (such as keyboard typing) can be re-control processed. For example, the user can select the document content that needs to be control processed, and then trigger a control reference operation, such as entering "#" or triggering the "Insert" icon in the toolbar to trigger the display of the control material set. Then, the user selects the control to be inserted from the control material set. At this time, the execution entity of the embodiment of the present application responds to the selection operation of the control in the control material set, inserts the selected control at the position of the document content selected by the user, and fills the document content selected by the user in the control.

[0124] It can be seen that when a control is referenced in a document in the embodiments of the present application, it is not only limited to applying the control to subsequent input content, but also supports the control processing of existing document content. This enables users to re-edit existing documents by applying the technical solutions provided in the embodiments of the present application, and there is no need to re-enter the document content during re-editing, which can improve the efficiency of document re-editing.

[0125] In another embodiment, the document content in the input control described above is the content newly input into the control. Specifically, when a user is editing a document, a control reference operation can be triggered at the current editing position to insert a control, and then the user can enter the document content in the control.

[0126] For example, when a user is editing a sales contract document, a control corresponding to the purchase amount field is inserted into the document. After inserting the control, the user can enter the specific purchase amount in it, such as 1 million.

[0127] For another example, when a user is editing a sales contract document, a control corresponding to the cooperation terms field is inserted into the document. After inserting the control, if the user believes that the specific cooperation terms in the control need to be modified, then the user can enter the required cooperation terms content in the control.

[0128] In addition, in one embodiment, in response to a format modification operation on the control content in the control, the display format of the control content in the control is modified to the target format corresponding to the format modification operation. Here, the target format can be completely set by the user according to actual needs and can be different from the formats of other document content in the document. The embodiments of the present application do not limit this. It can be seen that the embodiments of the present application support users to set the format of the control content in the control by themselves, so as to meet the personalized needs of different users.

[0129] Step 503: Form structured data of the control and store the structured data in association with the document.

[0130] Figure 5 In the shown process, after the control is inserted into the document, by responding to the input operation triggered in the control, the input content is determined as the control content of the control and is displayed in the control, so that the user can flexibly input or modify the control content according to actual needs to meet the user's document editing requirements.

[0131] Figure 6 This is a flowchart of an embodiment of another document processing method provided by the embodiments of the present application. The Figure 6 shown process is as described above Figure 1Based on the process shown, it includes the following steps:

[0132] Step 601: In response to a control reference operation triggered in the document, insert a control into the document, where the control is used to display the document content.

[0133] For a detailed description of Step 601, please refer to the relevant description in the Figure 1 process shown above, which will not be elaborated here.

[0134] Step 602: In response to a format modification operation on the control content in the control, modify the display format of the control content in the control to the target format corresponding to the format modification operation.

[0135] Here, modifying the format of the control content in the control can be modifying the format of the control content input by the user, or modifying the format of the control content set when registering the control in the background. Here, format modification includes but is not limited to modifying the font, font size, font color, font background, etc. For example, when registering a cooperation terms control in the background, set the display format of the specific cooperation terms to bold red font, and after inserting the cooperation terms control into the document, the user selects to set the display format of the cooperation terms to bold black font.

[0136] As an optional implementation method, when the user wants to modify the format of the control content in the control, the user can select the control in the document and then perform a trigger operation on the control, such as a right-click operation. In response to performing the trigger operation on the control, a menu list can be popped up, and the menu list includes menu options such as Format and Delete. After that, when the user selects the Format option, a format editing interface can be further popped up, and at this time, the user can perform format modification operations on the format editing interface.

[0137] Step 603: Form the structured data of the control and store the structured data in association with the document.

[0138] Figure 6 In the process shown above, after inserting the control into the document, by responding to the format modification operation on the control content in the control and modifying the display format of the control content in the control to the target format corresponding to the format modification operation, the user can flexibly set or modify the display format of the control content according to actual needs, meeting the user's document editing needs and personalized needs.

[0139] As can be seen from the above description, the user can manage the registered controls in the background. The management here includes modifying the content of the controls. On this basis, the embodiments of the present application provide a solution for realizing the linkage update of the control content between the release source end of the control (i.e., the above-mentioned background) and the document. Specifically, in one embodiment, after inserting a control into the document, in response to detecting that the control content in the document is different from the source control content of the control on its release source end, the control content in the document is modified to the source control content.

[0140] In the above embodiment, as an exemplary application scenario, during the document editing process, it can be detected whether the control content in the control referenced by the document is updated, that is, whether the control content in the document is the same as the source control content of the control on its release source end. When it is determined that the control content in the document is different from the source control content of the control on its release source end, this means that the control content of the control is updated. At this time, the control content in the document can be modified to the latest version.

[0141] To implement this application scenario, as an optional implementation method, in response to the triggering of a set event, the source control content of the control on its release source end is obtained, and the source control content is compared with the control content of the control in the document; when it is compared that the control content in the document is different from the source control content, the control content in the document is modified to the source control content. Here, the set event is a document opening event, that is to say, when opening the document, the controls in the document can be linked and updated to update the control content in the control to the latest version. The set event can also be a timing event, that is to say, during the document editing process, the controls in the document can be linked and updated regularly to update the control content in the control to the latest version. The set event can also be a user-triggered event, that is to say, during the document editing process, the user can independently select to link and update the controls in the document to update the control content in the control to the latest version.

[0142] As another exemplary scenario, all documents that reference the same control can be globally and automatically batch-updated through the linkage update function to achieve rapid update of the document content. For example, when the cooperation terms change, a global batch update of all documents that reference the contract clause fields can be triggered in the background.

[0143] To implement this application scenario, as an optional implementation, in response to a linkage update instruction for a control from the publishing source end, it is determined that the content of the source - end control of the control on the publishing source end is different from the content of the control in the document, where the linkage update instruction includes the content of the source - end control. Here, after the user updates the content of the control in the background, the user can choose to manually trigger or automatically trigger the linkage update of the control. When triggering the linkage update of the control, the background sends a linkage update instruction for the control. The execution entity of the embodiment of this application responds to this linkage update instruction, searches the document database for all documents that reference this control, and then modifies the content of the control in the document to the content of the source - end control carried in the linkage update instruction, so as to achieve rapid update of the document content.

[0144] Furthermore, the embodiment of this application also supports users to customize the linkage update strategy. Here, the linkage update strategy includes no update, prompt update, and automatic update. Among them, prompt update means that when it is detected that the content of the control in the document is different from the content of the source - end control of the control on its publishing source end, a corresponding prompt message is output for the user to trigger the linkage update or choose not to perform the linkage update according to this prompt message. This can meet the document content update requirements in different scenarios and improve the user experience.

[0145] In the actual usage scenario, it also involves the circulation of documents. For example, after user A edits a document and transfers it to user B, user B can perform editing operations on the document. After completing the editing, user B can transfer the document back to user A. Thus, it can be seen that during the document circulation process, it is very likely that the content of the control in the control is modified.

[0146] In the above - mentioned application scenario, in order to enable user A to quickly obtain the modified document content when user B transfers the re - edited document to user A, the embodiment of this application proposes that when storing the control in the document, the hash value of the content of the control is stored together. Then, by comparing the current hash value of the content of the control in the control with the previously stored hash value, it can be determined whether the content of the control has been modified.

[0147] Specifically, when inserting the control into the document, the hash value of the content of the control in the control is also stored in the control group attribute of the document, so that the subsequent formed structured data will also include this hash value.

[0148] When the execution subject of the embodiment of the present application receives the document that has been circulated back, it determines the current hash value of the control content of the control in the document, and parses the hash value (for the convenience of description, referred to as the historical hash value) from the structured data of the control, and then compares the current hash value with the historical hash value. When the comparison shows that the current hash value and the historical hash value are inconsistent, a prompt message indicating that the control content in the control has been modified is output. Optionally, the prompt message can be a background highlight of the control, or a text message displayed on a pop-up window interface. Through this processing, it is possible to efficiently remind the user that the document content has been modified when the document content is modified in the document circulation scenario.

[0149] Document management scenarios often involve document retrieval. In this regard, the present application also provides the following embodiments: receiving a document retrieval request, wherein the document retrieval request carries target control information, searching a document database based on the target control information, obtaining target structured data that matches the target control information, and determining a document associated with the target structured data as a target document.

[0150] The document database includes structured data of documents and controls in the documents that are stored in an associated manner.

[0151] The target control information is, for example, field name, control ID, field value, etc.

[0152] For example, all documents that reference the control corresponding to the control ID can be quickly retrieved through the control ID, thereby improving document retrieval efficiency.

[0153] Furthermore, the retrieved documents can be updated in linkage. For example, when the cooperation terms are changed, by retrieving all documents that reference the cooperation terms control, and then triggering the linkage update of the cooperation terms control in these documents, the documents can be updated globally and automatically in batches, thereby realizing the rapid update of document content.

[0154] In summary, the document processing method provided in the embodiment of the present application provides a solution for structured design of documents, as well as retrieval and management of documents based on the structured design. Compared with the existing technology, this method has the advantages of low retrieval and management costs, and can be applied to multiple application scenarios and multiple fields, and has broad application prospects.

[0155] Figure 7 This is a block diagram of an embodiment of a document processing device provided in an embodiment of the present application. Figure 7 As shown, the device comprises:

[0156] A control reference module 71, configured to insert a control into the document in response to a control reference operation triggered in the document, wherein the control is at least used to display document content;

[0157] A structured module 72 for forming structured data of the control;

[0158] A document storage module 73 for associatively storing the structured data with the document.

[0159] In a possible implementation, the control reference module 71 includes:

[0160] A material display unit for displaying a control material set in response to a control reference operation triggered in the document,

[0161] A reference unit for inserting a selected control into the document in response to a selection operation on a control in the control material set.

[0162] In a possible implementation, the control reference module 71 is specifically configured to:

[0163] In response to a control reference operation triggered in the document, insert a control at a position indicated by the current input content in the document content.

[0164] In a possible implementation, the structured module 72 is specifically configured to:

[0165] Determine the primary key of the control, and determine the control data of the control as the value corresponding to the primary key to form a key-value pair;

[0166] Determine the key-value pair as the structured data of the control.

[0167] In a possible implementation, it further includes:

[0168] A content input module for, after inserting a control into the document, determining the input content as the control content of the control in response to an input operation triggered in the control, and displaying the control content in the control.

[0169] In a possible implementation, it further includes:

[0170] A format modification module for modifying the display format of the control content in the control to a target format corresponding to the format modification operation in response to a format modification operation on the control content in the control.

[0171] In a possible implementation, it further includes:

[0172] The linkage update module is used to, after inserting a control into the document, in response to detecting that the control content of the control in the document is different from the source control content of the control at its release source end, modify the control content of the control in the document to the source control content.

[0173] In a possible implementation manner, the linkage update module is specifically used for:

[0174] In response to the triggering of a set event, obtain the source control content of the control at its release source end;

[0175] Compare the source control content with the control content of the control in the document;

[0176] In the case where it is compared that the control content of the control in the document is different from the source control content, modify the control content of the control in the document to the source control content.

[0177] In a possible implementation manner, the linkage update module is specifically used for:

[0178] In response to a linkage update instruction from the release source end for the control, determine that it is detected that the source control content of the control at the release source end is different from the control content of the control in the document, where the linkage update instruction includes the source control content.

[0179] In a possible implementation manner, the structured data includes the hash value of the control content in the control; the device further includes:

[0180] The hash value comparison module is used to determine the current hash value of the control content in the control and parse out the historical hash value from the structured data of the control;

[0181] Compare the current hash value with the historical hash value;

[0182] The modification prompt module is used to output a prompt message for indicating that the control content in the control has been modified in the case where it is compared that the current hash value and the historical hash value are inconsistent.

[0183] In a possible implementation manner, the document storage module 73 includes:

[0184] The permission management unit is used to set permissions for the document and perform permission management on the structured data using the permissions;

[0185] The storage unit is used to associate and store the structured data after permission management with the document.

[0186] In a possible implementation, it further includes:

[0187] A document retrieval module, configured to receive a document retrieval request, where the document retrieval request carries target control information;

[0188] Search a document database according to the target control information to obtain target structured data that matches the target control information;

[0189] Determine the document associated with the target structured data as the target document.

[0190] As Figure 8 shown, an embodiment of the present application provides an electronic device, including a processor 111, a communication interface 112, a memory 113, and a communication bus 114. Among them, the processor 111, the communication interface 112, and the memory 113 complete mutual communication through the communication bus 114.

[0191] The memory 113 is used to store a computer program;

[0192] In an embodiment of the present application, when the processor 111 is used to execute the program stored on the memory 113, it implements the document processing method provided by any of the foregoing method embodiments, including:

[0193] In response to a control reference operation triggered in the document, insert a control into the document, where the control is used to display document content;

[0194] Form structured data of the control and store the structured data in association with the document.

[0195] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the steps of the document processing method provided by any of the foregoing method embodiments.

[0196] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0197] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the essence of the above technical solution or the part that contributes to the related technology can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0198] It should be understood that the terms used herein are for the purpose of describing specific example embodiments only and are not intended to be limiting. Unless the context clearly indicates otherwise, as used herein, the singular forms "a", "an", and "the" may also include the plural forms. The terms "comprising", "including", "containing", and "having" are inclusive and thus specify the presence of the stated features, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, steps, operations, elements, components, and / or their combinations. The method steps, processes, and operations described herein are not to be construed as necessarily requiring them to be performed in the particular order described or illustrated, unless the order of performance is explicitly stated. It should also be understood that additional or alternative steps may be used.

[0199] The above description is only the specific embodiments of the present application, enabling those skilled in the art to understand or implement the present application. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to these embodiments shown herein, but rather will be accorded the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A document processing method, characterized in that, the method includes: responding to a control reference operation triggered in the document, inserting a control into the document, where the control is used to display document content; forming structured data of the control and associatively storing the structured data with the document.

2. The method according to claim 1, characterized in that, the responding to a control reference operation triggered in the document and inserting a control into the document includes: responding to a control reference operation triggered in the document, displaying a control material set; responding to a selection operation on a control in the control material set, inserting the selected control into the document.

3. The method according to claim 1, characterized in that, the responding to a control reference operation triggered in the document and inserting a control into the document includes: responding to a control reference operation triggered in the document, inserting a control at the position indicated by the current input content in the document content.

4. The method according to claim 1, characterized in that, the forming of the structured data of the control includes: determining a primary key of the control and determining the control data of the control as the value corresponding to the primary key to form a key-value pair; determining the key-value pair as the structured data of the control.

5. The method according to claim 1, characterized in that, after inserting a control into the document, it further includes: responding to an input operation triggered in the control, determining the input content as the control content of the control and displaying the control content in the control.

6. The method according to claim 1 or 5, characterized in that, the method further includes: responding to a format modification operation on the control content in the control, modifying the display format of the control content in the control to the target format corresponding to the format modification operation.

7. The method according to claim 1, characterized in that, after inserting a control into the document, it further includes: responding to the situation that it is detected that the control content of the control in the document is different from the source-end control content of the control at its release source end, modifying the control content of the control in the document to the source-end control content.

8. The method according to claim 7, characterized in that, the responding to the situation that it is detected that the control content of the control in the document is different from the source-end control content of the control at its release source end and modifying the control content of the control in the document to the source-end control content includes: responding to the triggering of a set event, obtaining the source-end control content of the control at its release source end; comparing the source-end control content with the control content of the control in the document; in the case where it is compared that the control content of the control in the document is different from the source-end control content, modifying the control content of the control in the document to the source-end control content.

9. The method according to claim 7, characterized in that, Said in response to detecting that the source - side control content of the control on its release source side is different from the control content of the control in the document, includes: In response to a linkage update instruction for the control from the release source side, it is determined that the source - side control content of the control on the release source side is different from the control content of the control in the document, wherein the linkage update instruction includes the source - side control content.

10. The method according to claim 1, wherein, The structured data includes the hash value of the control content in the control; the method further includes: Determining the current hash value of the control content in the control, and parsing out the historical hash value from the structured data of the control; Comparing the current hash value and the historical hash value; In the case where the current hash value and the historical hash value are compared and found to be inconsistent, outputting a prompt message for indicating that the control content in the control has been modified.

11. The method according to claim 1, wherein, Said associatively storing the structured data with the document includes: Setting permissions for the document, using the permissions to manage the structured data, and associatively storing the structured data after permission management with the document.

12. The method according to claim 1, wherein, The method further includes: Receiving a document retrieval request, wherein the document retrieval request carries target control information; Searching a document database according to the target control information to obtain target structured data that matches the target control information; Determining the document associated with the target structured data as the target document.

13. A document processing device, wherein, The device includes: A control reference module, configured to insert a control in the document in response to a control reference operation triggered in the document, wherein the control is at least used to display document content; A structuring module, configured to form the structured data of the control; A document storage module, configured to associatively store the structured data with the document.

14. An electronic device, wherein, Includes: A processor and a memory, the processor is configured to execute a document processing program stored in the memory to implement the document processing method according to any one of claims 1 to 12.

15. A storage medium, wherein, The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the document processing method according to any one of claims 1 to 12.