Document editing method and device, equipment, medium and product
By using the binding of placeholder blocks and information fields in the sample document of the project document and combining with the synchronization mechanism of the data source, the automatic filling of project information is realized, solving the large amount of workload caused by manual filling by document editors in the existing technology. The problem of high error rate improves the accuracy and consistency of the document.
Patent Information
- Application Number
- CN202411212617.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2024-11-22
AI Technical Summary
In the prior art, the editors of project documents need to fill in the blanks in the template document one by one, resulting in a large workload and prone to missed or incorrect filling.
By using placeholder blocks in the sample document, binding information fields are bound to automatically fill in project information, and using data sources to save and synchronize project information, realizing linkage control and information filling automation between placeholder blocks.
It greatly reduces the workload of document editors, improves the accuracy and consistency of information filling, reduces the probability of missed or incorrect filling, and improves the style uniformity and content accuracy of the document.
Smart Images

Figure CN119005144A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of software development technology, and in particular to a document editing method, device, equipment, medium and product. Background Art
[0002] In order to ensure the uniformity of the document style and the accuracy of the content, some project documents need to be written based on pre-established template documents. In the template document, the document format, layout, content and other information can be pre-specified, but blank parts will also be reserved. These blank parts can be used to fill in project-related information, such as project name, project code, etc. After completing the blank parts, you can get a project document that matches the project.
[0003] At present, the blank parts in the template documents are filled one by one by the editors of the project documents, which is a heavy workload.
[0004] Therefore, a method that can reduce the workload is urgently needed. Summary of the invention
[0005] In view of this, the embodiments of the present application provide a document editing method, a document editing device, an electronic device, a computer-readable storage medium and a computer program product, which can automatically fill in project information in a template document, greatly reducing the workload.
[0006] On the one hand, the present application provides a document editing method, the method comprising:
[0007] In response to receiving an instruction to create a project document for a target project, obtaining an online template document for creating the project document, wherein the online template document includes a placeholder, and the placeholder represents information to be filled in the online template document;
[0008] For one of the first placeholder blocks in the online template document, when the first placeholder block is bound to an information field representing project information, obtaining one or more target project information of the target project represented by the information field;
[0009] Fill in the target project information in the first placeholder, or fill in information obtained based on the target project information.
[0010] In the technical solutions of some embodiments of the present application, by using placeholders to replace the information to be filled in the online template document, and binding the placeholders to the information fields representing the project information, the project information to be filled in the placeholders can be represented by the information fields bound to the placeholders, and then by obtaining the target project information of the target project represented by the information fields bound to the placeholders, the target project information can be automatically filled in the first placeholder, or the information obtained based on the target project information can be filled in. In this way, at least part of the project information of the target project, or at least part of the information obtained based on the project information, can be filled in by automatic filling, without the need for manual filling by document editors, thereby greatly reducing the workload.
[0011] In some embodiments, the project information of the target project is stored in a data source, the data source includes data source fields, and different data source fields correspond to different project information of the target project;
[0012] The obtaining one or more target project information of the target project represented by the information field includes:
[0013] Determine the target data source field corresponding to the information field according to the preset corresponding relationship;
[0014] The project information of the target project corresponding to the target data source field is used as the target project information represented by the information field.
[0015] In the above embodiment, by establishing a correspondence between information fields and data source fields, the development of the data source and the document editing system can be decoupled, that is, when designing the data source fields corresponding to each project information in the data source, there is no need to consider the information fields in the document editing system, and when designing the information fields in the document editing system, there is no need to consider the data source fields in the data source. In this way, system development is more flexible and more applicable.
[0016] In some embodiments, after filling in the target project information in the first placeholder, the method further includes:
[0017] If the target project information is changed in the online template document, the project information of the target project corresponding to the target data source field is changed in the data source according to the changed target project information.
[0018] When the same project information is filled in multiple placeholders in an online template document, if the project information in one of the placeholders in the online template document is modified, the project information in other placeholders can be modified synchronously by synchronizing the project information modified in the online template document to the data source, thereby ensuring the consistency of the project information in each placeholder in the online template document.
[0019] In some embodiments, the project information of the target project stored in the data source is obtained based on the following method:
[0020] Displaying a registration page for registering project information, and saving the project information of the target project obtained from the registration page to the data source; and / or
[0021] During the creation of the project document, if the information field is bound to the placeholder and the project information of the target project is specified for the information field at the same time, the project information specified for the information field is saved in the data source.
[0022] By saving the project information obtained through the registration page and the project information specified for the information field in the data source at the same time, the comprehensiveness of the project information in the data source can be ensured.
[0023] In some embodiments, after filling in information in the first placeholder, the method further includes:
[0024] Based on the information filled in the first placeholder, a judgment is performed according to a preset first judgment logic to determine a display state of a second placeholder associated with the first placeholder or display content of the second placeholder;
[0025] The preset first judgment logic is associated with the first placeholder; or
[0026] The preset judgment logic is associated with the information field bound to the first placeholder block.
[0027] In this way, linkage control between placeholder blocks can be achieved, further reducing the information that document editors need to fill in or pay attention to in online template documents. At the same time, the information field bound to the first placeholder block is associated with the first judgment logic. In this way, when the information field is bound to any placeholder block, it can bring the first judgment logic, without the need to associate the first judgment logic with each placeholder block, which is effective in improving efficiency.
[0028] In some embodiments, when the first placeholder is not bound to the information field representing the project information, the method further includes:
[0029] Receive information input by an input device, and fill the received information in the first placeholder.
[0030] In combination with an input device, information can be manually filled in the first placeholder to prevent the situation where some project information cannot be filled in by automatic filling, thereby improving the accuracy of the project document.
[0031] In some embodiments, the first placeholder is further used to be associated with a preset second judgment logic; and the method further includes:
[0032] Based on the second judgment logic, it is judged whether information is allowed to be input at the first placeholder block, and when information is allowed to be input at the first placeholder block, the received information is verified.
[0033] In this way, when information is input into the first placeholder through an input device, the accuracy of the input information can be improved, and the document quality of the edited project document can be improved.
[0034] In some embodiments, the first placeholder is further used to be associated with a preset format adjustment logic; and the method further includes:
[0035] Based on the format adjustment logic, the information display format at the first placeholder is adjusted.
[0036] In this way, the problem of incomplete display of information in the first placeholder can be avoided, ensuring the aesthetics of the project document.
[0037] In some embodiments, the online template document is obtained based on the following method:
[0038] Import and parse offline template documents to obtain initial template documents;
[0039] Identifying target content in the initial template document that needs to be replaced with a placeholder block;
[0040] According to the content category of the target content, the target content is replaced with a placeholder corresponding to the content category, and a placeholder attribute of the placeholder is set to obtain the online template document.
[0041] By automatically parsing offline template documents, there is no need to manually configure the table of contents of offline template documents in the document editing system, which greatly reduces the workload.
[0042] In some embodiments, the initial template document includes a tag obtained from the offline template document for identifying the target content;
[0043] The step of identifying target content in the initial template document that needs to be replaced with a placeholder block includes:
[0044] The content marked by the tag in the initial template document is identified, and the identified content is used as the target content.
[0045] The workload can be further reduced by automatically identifying the target content that needs to be replaced with a placeholder block based on a tag approach.
[0046] On the other hand, the present application also provides a document editing device, the device comprising:
[0047] A document acquisition module, configured to, in response to receiving an instruction to create a project document for a target project, acquire an online template document for creating the project document, wherein the online template document includes a placeholder, and the placeholder represents information to be filled in the online template document;
[0048] A project information acquisition module, for obtaining, for one of the first placeholder blocks in the online template document, one or more target project information of the target project represented by the information field when the first placeholder block is bound to the information field representing the project information;
[0049] An information filling module is used to fill in the target project information in the first placeholder, or fill in information obtained based on the target project information.
[0050] On the other hand, the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and when the computer program is executed by a processor, the method described above is implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] The features and advantages of the present application will be more clearly understood by referring to the accompanying drawings, which are schematic and should not be construed as limiting the present application in any way. In the accompanying drawings:
[0052] Figure 1 A partial schematic diagram of a sample document for writing a bidding document provided by some embodiments of the present application is shown;
[0053] Figure 2 A partial schematic diagram of a sample document for writing a bidding document provided by other embodiments of the present application is shown;
[0054] Figure 3 A schematic diagram showing a flow chart of a document editing method provided by some embodiments of the present application;
[0055] Figure 4 An interface diagram of a document editing system provided by some embodiments of the present application is shown;
[0056] Figure 5 Shows from Figure 4 The interface diagram obtained after the interface jumps shown;
[0057] Figure 6 A partial schematic diagram of an online template document provided by some embodiments of the present application is shown;
[0058] Figure 7A partial schematic diagram of a table of contents parsed from an offline template document provided by some embodiments of the present application is shown;
[0059] Figure 8 A schematic diagram of a placeholder block property setting page provided in some embodiments of the present application is shown;
[0060] Fig. 9 A module schematic diagram of a document editing device provided by an embodiment of the present application is shown. DETAILED DESCRIPTION
[0061] In order to make the purpose, 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 in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.
[0062] Project documents that need to be written based on template documents include but are not limited to project bidding documents, tender documents, etc. Figure 1 and Figure 2 , is a partial schematic diagram of a sample document for writing bidding documents provided in some embodiments of the present application. Figure 1 The horizontal line part is used to fill in the project-related information. Figure 2 In the table, the selection list needs to be selected according to the actual situation of the project. The editor of the bidding document can supplement the information in the template document according to the actual situation of the project to obtain the bidding document that matches the project. Figure 1 and Figure 2 It is understandable that the same project information may need to be entered in multiple locations in the template document. For example, Figure 1 In the title and bidding conditions, the project name needs to be entered. In addition, in a template document, there are usually many places that need to be supplemented and filled in, and these places are irregular. If these places that need to fill in project information are filled in manually by document editors, on the one hand, the workload is bound to be large and the work efficiency is low. On the other hand, the error rate of the bidding document is high. For example, the bidding personnel are prone to omissions, resulting in incomplete information in the bidding document, or the bidding personnel are prone to filling in errors, resulting in incorrect information in the bidding document.
[0063] In view of this, the present application provides a document editing method that can solve the above problems. The document editing method can be used in electronic devices. Electronic devices include but are not limited to tablet computers, laptops, desktop computers, etc. In the electronic device, a document editing system for editing project documents can be run. For example, the document editing system may include an online bidding system for editing bidding documents. Specifically, editors can develop template documents based on office software such as word in the electronic device, and then import the developed template documents into the document editing system. The editor of the project document logs in to the document editing system, selects the template document in the document editing system, and completes the writing of the project document in the document editing system. In this application, the template document that has been imported into the document editing system is referred to as an online template document, and the template document developed based on office software such as word that has not been imported into the document editing system is referred to as an offline template document.
[0064] Considering that template documents can be differentiated by project type, region, etc., that is, different types of projects or projects in different regions can have different template documents, multiple online template documents can be saved in the document editing system by project type, region, etc. Document editors can select appropriate online template documents according to their needs.
[0065] In some embodiments of the present application, when an offline template document is imported into a document editing system, some preprocessing may be performed in advance. Specifically, a placeholder may be used to replace the information to be filled in the offline template document, and at least part of the placeholder may be bound to a preset information field, and the information field may be used to represent the project information to be filled in. For ease of understanding, please refer to Figure 3 , which is a flowchart of a document editing method provided in some embodiments of the present application. Figure 3 In the document editing method, the document editing method includes the following steps:
[0066] Step S31, in response to receiving an instruction to create a project document for a target project, obtaining an online template document for creating the project document, wherein the online template document includes a placeholder, and the placeholder represents information to be filled in the online template document.
[0067] The target project refers to a project that needs to edit project documents, such as a project that needs to edit bidding documents or a project that needs to edit tender documents.
[0068] For easier understanding, please refer to Figure 4 and Figure 5 , which is an interface diagram of a document editing system provided in some embodiments of the present application. After a document editor logs into the document editing system, a similar Figure 4 The interface shown. Figure 4In the interface shown, the document editor can enter the project information of the target project, such as the project name, project title, etc. After completing the input of the project information, in response to the button representing the template selection in the interface being triggered (i.e., the selection button), an instruction to create a project document for the target project can be generated. In response to receiving the instruction, the document editing system can display a similar Figure 5 The online template document selection interface shown. Figure 5 In the , you can display multiple pre-imported online template documents. After the document editor selects the appropriate online template document according to actual needs, he can obtain the online template document for creating the project document.
[0069] Online template documents may include placeholders for information to be filled in. Figure 6 , is a partial schematic diagram of an online template document provided for some embodiments of the present application. Figure 6 In the text box, the gray bar with the "Please enter" icon is the placeholder.
[0070] Step S32, for one of the first placeholders in the online template document, when the first placeholder is bound to the information field representing the project information, obtain one or more target project information of the target project represented by the information field.
[0071] Specifically, different information fields can be used to represent different project information, such as information field AA is used to represent the project name, information field BB is used to represent the project code, and information field CC is used to represent the project location. When the first placeholder is bound to information field AA, it means that the project name of the target project needs to be obtained, and when the first placeholder is bound to information field BB, it means that the project code of the target project needs to be obtained.
[0072] The project information of the target project may be pre-stored in a data source (such as a database). The target project information of the target project represented by the information field bound to the first placeholder block may be obtained from the data source.
[0073] Step S33, fill in the target project information in the first placeholder, or fill in the information obtained based on the target project information.
[0074] For easier understanding, please refer to Figure 6. For example, assuming that the first placeholder after "Amount of bid security" is bound to information field CC, and information field CC represents the bid security of the target project, then after executing steps S31 to S33, the bid security of the target project can be automatically filled in after "Amount of bid security", without the need for document editors to fill it in manually. For another example, assuming that the first placeholder after "Whether bidders are required to submit bid security" is bound to information field DD, and information field DD represents that the target project does not require bidders to submit security, then after executing steps S31 to S33, the "No" option can be automatically selected, without the need for document editors to manually select it.
[0075] In this embodiment, the first placeholder block can be associated with the processing logic of the target project information. Based on the processing logic of the target project information, the target project information can be processed. The information obtained after processing the target project information can be filled in the first placeholder. For example, according to the processing logic associated with the first placeholder block, the target project information can be italicized, and then the target project information can be filled in italics in the first placeholder. For another example, assuming that the target project information is the project cycle of the target project expressed in days, according to the processing logic associated with the first placeholder block, the target project information can be converted into a project cycle expressed in hours, and then the project cycle expressed in hours can be filled in the first placeholder.
[0076] In summary, in the technical solutions of some embodiments of the present application, by using placeholders to replace the information to be filled in the online template document, and binding the placeholders to the information fields representing the project information, the project information to be filled in the placeholders can be represented by the information fields bound to the placeholders, and then by obtaining the target project information of the target project represented by the information fields bound to the placeholders, the target project information can be automatically filled in at the first placeholder, or the information obtained based on the target project information can be filled in. In this way, at least part of the project information of the target project, or at least part of the information obtained based on the project information, can be filled in by automatic filling, without the need for manual filling by document editors, thereby greatly reducing the workload. In addition, this method of automatic filling can also effectively avoid problems such as negligence and errors of document editors, and greatly reduce the probability of missing or incorrect filling in online template documents.
[0077] In some embodiments, considering the complexity of the content of the online template document, it may not be possible to complete the filling of all project information through automatic filling. For example, suppose that you need to fill in the project information that does not exist in the data source in the online template document. In this case, the document editor may still need to manually enter the project information in the online template document. Specifically, for one of the first placeholders in the online edited document, if the document editor is required to manually enter the project information at the first placeholder, the first placeholder may not need to be bound to the information field. In the case where the first placeholder is not bound to the information field representing the project information, the method of the present application may also include:
[0078] Receive information input by an input device, and fill the received information in the first placeholder.
[0079] Specifically, the input device includes but is not limited to a mouse, a keyboard, a touch screen, etc. When the cursor on the electronic device screen is positioned at the first placeholder, if information input by the input device is received, it means that the information is the information that needs to be filled in the first placeholder.
[0080] In combination with an input device, information can be manually filled in the first placeholder to prevent the situation where some project information cannot be filled in by automatic filling, thereby improving the accuracy of the project document.
[0081] In order to reduce the workload of automatic filling, in some embodiments, the placeholders can have various forms, including but not limited to text input placeholders, list placeholders, check placeholders, table placeholders, etc. These placeholders can be directly bound to the information fields, and based on the methods of steps S31 to S33, the project information can be automatically filled in. It can also be used in scenarios where project information is manually entered. For example, one or more project information lists can be pre-set in the list placeholders and check placeholders, and the document editor can specify the project information of the target project by selecting the list items. For example Figure 2 In the bid preparation meeting, after the bid preparation meeting, two list items, "Do not hold" and "Hold", can be listed in a list format. If the list item "Do not hold" is selected, it means that the target project does not need to hold a bid preparation meeting; if the list item "Hold" is selected, it means that the target project needs to hold a bid preparation meeting. Document editors can make a choice based on actual conditions.
[0082] By setting various forms of placeholders, on the one hand, it can effectively reduce the workload of document editors when they manually enter project information. For example, taking the above list item selection as an example, document editors only need to perform the selection operation without manually entering text information. On the other hand, it can make the document style of the final edited project document richer and easier to read and understand.
[0083] In some embodiments, considering the diversity of content in online template documents, for one of the first placeholders in the online template document, the information field bound to the first placeholder can also represent other information besides the project information. For example, it can also represent the current time of document editing. In this way, other information besides the project information can also be filled in by automatic filling, reducing the workload of document editors.
[0084] In some embodiments, the data source for storing project information may include a data source field (such as a database field). Different data source fields may correspond to different project information of the target project. In simple terms, the data source field may be understood as a field defined in the data source for corresponding to different project information, and the information field may be understood as a field defined in the document editing system for corresponding to different project information. The data source field may have a corresponding relationship with the information field. The acquisition of one or more target project information of the target project represented by the information field in step S32 may include:
[0085] According to the preset corresponding relationship, determine the target data source field corresponding to the information field;
[0086] The project information of the target project corresponding to the target data source field is used as the target project information represented by the information field.
[0087] For example, suppose that in a document editing system, information field AA is used to represent the project name, and information field BB is used to represent the project code. In the data source, data source field CC is used to correspond to the project name of the target project, and data source field DD is used to correspond to the project code of the target project. Then, information field AA can correspond to data source field CC, and information field BB can correspond to data source field DD. According to the correspondence between information fields and data source fields, assuming that the first placeholder is bound to information field AA, then the target project information represented by information field AA is the project name of the target project corresponding to data source field CC.
[0088] In the above embodiment, by establishing a correspondence between information fields and data source fields, the development of the data source and the document editing system can be decoupled, that is, when designing the data source fields corresponding to each project information in the data source, there is no need to consider the information fields in the document editing system, and when designing the information fields in the document editing system, there is no need to consider the data source fields in the data source. In this way, system development is more flexible and more applicable.
[0089] In some embodiments, after filling in the target project information in the first placeholder, the method of the present application may further include:
[0090] If the target project information is changed in the online template document, the project information of the target project corresponding to the target data source field is changed in the data source according to the changed target project information.
[0091] Simply put, it is to synchronize the changes in the online template document to the data source. After changing the project information of the target project corresponding to the target data source field in the data source, all the placeholders filled with the project information in the online template document can be updated synchronously.
[0092] For example, if the project code is filled in the placeholders A, B, and C in the online template document, and the project code of the project is changed from P001 to P002 in placeholder A, the project code in the data source is also changed to P002. After the project code of the target project is changed from P001 to P002 in the data source, the project code can also be changed from P001 to P002 in the placeholders B and C of the online template document.
[0093] In the above embodiment, when the same project information is filled in multiple placeholders in the online template document, if the project information in one of the placeholders in the online template document is modified, the project information in other placeholders can be modified synchronously by synchronizing the modified project information in the online template document to the data source, thereby ensuring the consistency of the project information in each placeholder in the online template document.
[0094] In some embodiments, for one of the first placeholders in the online template document, a control parameter for whether synchronization modification is required can be set in the placeholder properties of the first placeholder. When the control parameter is the first value, if the target project information in the online template document is changed, the project information of the target project corresponding to the target data source field in the data source needs to be changed synchronously; when the control parameter is the second value, if the target project information in the online template document is changed, the project information of the target project corresponding to the target data source field in the data source does not need to be changed synchronously. In this way, it is convenient for users to make choices according to actual needs.
[0095] In some embodiments, the project information of the target project stored in the data source is obtained based on the following method:
[0096] Displaying a registration page for registering project information, and saving the project information of the target project obtained from the registration page to the data source; and / or
[0097] During the creation of a project document, if, when binding an information field to a placeholder, the project information of the target project is specified for the information field, the project information specified for the information field is saved in the data source.
[0098] Specifically, the registration page can be Figure 4 The page shown. Figure 4 In the page shown, you can obtain basic and general project information and save it to the data source. Under normal circumstances, if the data source includes the project information of the target project that needs to be filled in the online template document, the project information of the target project is obtained directly from the data source. However, if the data source does not include the project information of the target project that needs to be filled in the online template document, when you bind the information field to the placeholder block during the creation of the online template document, you can specify the project information of the target project for the information field at the same time. These specified project information can be saved synchronously to the data source, so that when you need to fill in the project information in the subsequent placeholder block, you can get it directly from the data source without binding again.
[0099] When the project information of the target project specified for the information field is saved to the data source, a new data source field can be created in the data source to correspond to the project information of the newly added target project, and the newly created data source field can be the same as the information field.
[0100] In the above embodiment, the project information obtained through the registration page and the project information specified for the information field are simultaneously saved in the data source, which can ensure the comprehensiveness of the project information in the data source.
[0101] In some embodiments, after filling in the information in the first placeholder, the method of the present application may further include:
[0102] Based on the information filled in the first placeholder, a judgment is performed according to a preset first judgment logic to determine a display state of a second placeholder associated with the first placeholder or display content at the second placeholder;
[0103] The preset first judgment logic is associated with the first placeholder; or
[0104] The preset judgment logic is associated with the information field bound to the first placeholder block.
[0105] For example, refer to Figure 6 , assuming that when the information in the first placeholder after "Whether to require bidders to submit bid security" is set to No, the second placeholder after "Amount of bid security" can be set to a gray state, indicating that information input is not allowed. When the information in the first placeholder after "Whether to require bidders to submit bid security" is set to Yes, the second placeholder after "Amount of bid security" can be set to a non-gray state, indicating that information input is allowed.
[0106] In this way, linkage control between placeholder blocks can be achieved, further reducing the information that document editors need to fill in or pay attention to in online template documents. In the above embodiment, the information field bound to the first placeholder block is associated with the first judgment logic. In this way, when the information field is bound to any placeholder block, it can bring the first judgment logic, and there is no need to associate the first judgment logic with each placeholder block, which is useful for improving efficiency.
[0107] In some embodiments, when the information to be filled in the first placeholder is obtained by interacting with the input device (that is, when the first placeholder is not bound to the information field representing the project information), the first placeholder is also used to be associated with the preset second judgment logic, and the method of the present application further includes:
[0108] Based on the second judgment logic, it is judged whether information is allowed to be input at the first placeholder block, and when information is allowed to be input at the first placeholder block, the received information is verified.
[0109] For example, the second judgment logic may specify that information is allowed to be input at the first placeholder only when a preset condition is met, and when information is allowed to be input at the first placeholder, specify a range of values allowed to be filled in the first placeholder, etc.
[0110] In this way, when information is input into the first placeholder through an input device, the accuracy of the input information can be improved, and the document quality of the edited project document can be improved.
[0111] In some embodiments, the first placeholder block is further used to be associated with a preset format adjustment logic; the method of the present application may further include:
[0112] Based on the format adjustment logic, the information display format at the first placeholder is adjusted.
[0113] Specifically, the format adjustment logic can specify the length, width, color, etc. of the information displayed in the first placeholder block. In this way, problems such as incomplete display of the information in the first placeholder block can be avoided, thereby ensuring the aesthetics of the project document.
[0114] The following describes how to generate an online template document in a document editing system based on an offline template document.
[0115] In some embodiments, the online template document may be obtained based on the following method:
[0116] 1) Import and parse the offline template document to obtain the initial template document.
[0117] Combined with reference Figure 7In the document editing system, a document editor can be integrated, and the chapter directory and the contents of each chapter directory obtained from the offline template document can be displayed in the document editor. These chapter directories and the contents of each chapter directory constitute the initial template document.
[0118] In some embodiments, Figure 7 The table of contents shown is obtained by automatically parsing offline template documents based on text analysis, keyword extraction, and text generation technologies in Natural Language Processing (NLP) combined with the BERT (Bidirectional Encoder Representations from Transformers) model.
[0119] 2) Identify the target content in the initial template document that needs to be replaced with a placeholder block.
[0120] Specifically, the target content corresponds to the information to be filled in the online template document.
[0121] Specifically, in some embodiments, the target content in the offline template document may be marked in advance with a tag. The initial template document may include a tag obtained from the offline template document for identifying the target content. When identifying the target content in the initial template document that needs to be replaced with a placeholder, the content marked by the tag in the initial template document may be identified, and the identified content may be used as the target content.
[0122] 3) According to the content category of the target content, the target content is replaced with a placeholder corresponding to the content category, and the placeholder attributes of the placeholder are set to obtain an online template document.
[0123] Specifically, in this embodiment, different categories of target content can be marked with different tags, and by identifying the tags, the content category to which each target content belongs can be determined. The content category of the target content can correspond to the type of placeholder in the document editing system. For example, when the placeholder in the document editing system includes a text input placeholder, a list placeholder, a check placeholder, and a table placeholder, the targets in the initial template document can be divided into the following categories: text, list, check item, and table.
[0124] In some embodiments, the placeholder block attribute represents the control logic, placeholder block name, placeholder block code, information field, etc. that the placeholder block needs to be associated with. Figure 8 As shown, the placeholder may have a placeholder property setting page. In the placeholder property setting page, the placeholder properties of the placeholder may be set.
[0125] In the above embodiment, by automatically parsing the offline template document, it is not necessary to manually configure the chapter directory of the offline template document in the document editing system, which greatly reduces the workload. At the same time, based on the tag method, the target content that needs to be replaced with the placeholder block can be automatically identified, which can further reduce the workload.
[0126] Of course, it is understandable that the above steps 1) to 3) can also be completed manually. For example, based on the table of contents in the offline template document, manually create a corresponding table of contents in the document editor, and then manually input the contents of each table of contents in the offline template document into the document editor. For another example, the target content in the initial template document that needs to be replaced with a placeholder block can be manually identified. The appropriate method can be selected according to actual needs, and this application does not limit this.
[0127] Reference 9 is a schematic diagram of modules of a document editing device provided in one embodiment of the present application. Fig. 9 In the document editing device, the document editing device includes:
[0128] A document acquisition module, configured to acquire, in response to receiving an instruction to create a project document for a target project, an online template document for creating the project document, wherein the online template document includes a placeholder, and the placeholder represents information to be filled in the online template document;
[0129] A project information acquisition module, for acquiring, for one of the first placeholder blocks in the online template document, one or more target project information of a target project represented by the information field when the first placeholder block is bound to the information field representing the project information;
[0130] The information filling module is used to fill in the target project information in the first placeholder, or fill in the information obtained based on the target project information.
[0131] In some embodiments, the project information of the target project is stored in a data source, the data source includes a data source field, and different data source fields correspond to different project information of the target project; the project information acquisition module is specifically used to:
[0132] According to the preset corresponding relationship, determine the target data source field corresponding to the information field;
[0133] The project information of the target project corresponding to the target data source field is used as the target project information represented by the information field.
[0134] In some embodiments, after filling in the target project information in the first placeholder, the information filling module is further used to:
[0135] If the target project information is changed in the online template document, the project information of the target project corresponding to the target data source field is changed in the data source according to the changed target project information.
[0136] In some embodiments, the information filling module is further used to obtain the project information of the target project stored in the data source based on the following method:
[0137] Displaying a registration page for registering project information, and saving the project information of the target project obtained from the registration page to the data source; and / or
[0138] During the creation of an online template document, if you bind an information field to a placeholder and specify the project information of the target project for the information field, the project information specified for the information field will be saved in the data source.
[0139] In some embodiments, after filling in the information in the first placeholder, the method further includes:
[0140] Based on the information filled in the first placeholder, a judgment is performed according to a preset first judgment logic to determine a display state of a second placeholder associated with the first placeholder or display content at the second placeholder;
[0141] The preset first judgment logic is associated with the first placeholder; or
[0142] The preset judgment logic is associated with the information field bound to the first placeholder block.
[0143] In some embodiments, when the first placeholder is not bound to the information field representing the project information, the project information acquisition module is further configured to:
[0144] Interact with the input device, receive information input by the input device, and fill the received information in the first placeholder.
[0145] In some embodiments, the first placeholder is further used to be associated with a preset second judgment logic; and the information filling module is further used to:
[0146] Based on the second judgment logic, it is judged whether information is allowed to be input at the first placeholder block, and when information is allowed to be input at the first placeholder block, the received information is verified.
[0147] In some embodiments, the first placeholder is further used to be associated with a preset format adjustment logic; and the information filling module is further used to:
[0148] Based on the format adjustment logic, the information display format at the first placeholder is adjusted.
[0149] In some embodiments, the document acquisition module is further used to obtain the online template document based on the following method:
[0150] Import and parse offline template documents to obtain initial template documents;
[0151] Identify the target content in the initial template document that needs to be replaced with a placeholder block;
[0152] According to the content category of the target content, the target content is replaced with a placeholder block corresponding to the content category, and the placeholder block attribute of the placeholder block is set to obtain an online template document.
[0153] In some embodiments, the initial template document includes tags obtained from offline template documents for identifying target content; the document acquisition module is specifically used to:
[0154] Identify the content marked by the label in the initial sample document, and use the identified content as the target content.
[0155] One embodiment of the present application further provides a computer-readable storage medium, which is used to store a computer program. When the computer program is executed by a processor, the above method is implemented.
[0156] Although the embodiments of the present application have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present application, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A document editing method, characterized in that: The method comprises: In response to receiving an instruction to create a project document for a target project, obtaining an online template document for creating the project document, wherein the online template document includes a placeholder, and the placeholder represents information to be filled in the online template document; For one of the first placeholder blocks in the online template document, when the first placeholder block is bound to an information field representing project information, obtaining one or more target project information of the target project represented by the information field; Fill in the target project information in the first placeholder, or fill in information obtained based on the target project information.
2. The method according to claim 1, characterized in that The project information of the target project is stored in a data source, and the data source includes data source fields, and different data source fields correspond to different project information of the target project; The obtaining one or more target project information of the target project represented by the information field includes: Determine the target data source field corresponding to the information field according to the preset corresponding relationship; The project information of the target project corresponding to the target data source field is used as the target project information represented by the information field.
3. The method according to claim 2, characterized in that After filling the target project information in the first placeholder, the method further includes: If the target project information is changed in the online template document, the project information of the target project corresponding to the target data source field is changed in the data source according to the changed target project information.
4. The method according to claim 2, characterized in that The project information of the target project stored in the data source is obtained based on the following method: Displaying a registration page for registering project information, and saving the project information of the target project obtained from the registration page to the data source; and / or During the creation of the project document, if the information field is bound to the placeholder and the project information of the target project is specified for the information field at the same time, the project information specified for the information field is saved in the data source.
5. The method according to claim 1, characterized in that After filling in the information in the first placeholder, the method further includes: Based on the information filled in the first placeholder, a judgment is performed according to a preset first judgment logic to determine a display state of a second placeholder associated with the first placeholder or display content of the second placeholder; The preset first judgment logic is associated with the first placeholder; or The preset judgment logic is associated with the information field bound to the first placeholder block.
6. The method according to claim 1, characterized in that In the case where the first placeholder is not bound to the information field representing the project information, the method further includes: Receive information input by an input device, and fill the received information in the first placeholder.
7. The method according to claim 6, characterized in that The first placeholder is further used to be associated with a preset second judgment logic; the method further includes: Based on the second judgment logic, it is judged whether information is allowed to be input at the first placeholder block, and when information is allowed to be input at the first placeholder block, the received information is verified.
8. The method according to claim 1 or 6, characterized in that: The first placeholder is further used to be associated with a preset format adjustment logic; the method further includes: Based on the format adjustment logic, the information display format at the first placeholder is adjusted.
9. The method according to claim 1, characterized in that The online template document is obtained based on the following method: Import and parse offline template documents to obtain initial template documents; Identifying target content in the initial template document that needs to be replaced with a placeholder block; According to the content category of the target content, the target content is replaced with a placeholder corresponding to the content category, and a placeholder attribute of the placeholder is set to obtain the online template document.
10. The method according to claim 9, characterized in that The initial template document includes a tag obtained from the offline template document for identifying the target content; The step of identifying target content in the initial template document that needs to be replaced with a placeholder block includes: The content marked by the tag in the initial template document is identified, and the identified content is used as the target content.
11. A document editing device, characterized in that: The device comprises: A document acquisition module, configured to, in response to receiving an instruction to create a project document for a target project, acquire an online template document for creating the project document, wherein the online template document includes a placeholder, and the placeholder represents information to be filled in the online template document; A project information acquisition module, for obtaining, for one of the first placeholder blocks in the online template document, one or more target project information of the target project represented by the information field when the first placeholder block is bound to the information field representing the project information; An information filling module is used to fill in the target project information in the first placeholder, or fill in information obtained based on the target project information.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.
Citation Information
Patent Citations
Document editing method and device, server, terminal and storage medium
CN112329419A
Information processing method and device, electronic equipment and storage medium
CN116956846A
Method for generating document based on multi-agent system and large model
CN118551746A
Chaining of file element with corresponding field, inquiry and / or process in data base
CN1527226A
System and method of creating formatted document and computer program
JP2006059371A
