Template recommendation method, device, equipment and storage medium

文档序号:661716 发布日期:2021-04-27 浏览:3次 中文

阅读说明:本技术 一种模板推荐方法、装置、设备及存储介质 (Template recommendation method, device, equipment and storage medium ) 是由 陈松 于 2021-01-18 设计创作,主要内容包括:本申请实施例提供了一种模板推荐方法、装置、设备及存储介质,涉及人工智能技术领域,具体为:终端设备响应于在文档应用中触发的编辑目标文档的操作,从目标文档中获取目标文本内容,然后从目标文本内容中提取关键信息,将关键信息发送给服务器。服务器基于关键信息从文档模板库中确定匹配的至少一个文档处理模板,将至少一个文档处理模板的标识信息发送给终端设备。终端设备在显示界面中,展示至少一个文档处理模板的标识信息。基于用户在文档中编辑的关键信息为用户推荐相应的文档处理模板并展示给用户,故用户不需要手动从文档模板库中查询所需的文档处理模板,减少了用户查询文档处理模板所花的时间,提高了模板使用率,进而提升了用户体验。(The embodiment of the application provides a template recommendation method, a template recommendation device and a template recommendation storage medium, relates to the technical field of artificial intelligence, and specifically comprises the following steps: the terminal equipment responds to the operation of editing the target document triggered in the document application, acquires the target text content from the target document, extracts key information from the target text content and sends the key information to the server. The server determines at least one matched document processing template from the document template library based on the key information, and sends the identification information of the at least one document processing template to the terminal equipment. And the terminal equipment displays the identification information of at least one document processing template in a display interface. The corresponding document processing template is recommended for the user based on the key information edited by the user in the document and displayed to the user, so that the user does not need to manually query the required document processing template from the document template library, the time spent by the user in querying the document processing template is reduced, the template utilization rate is improved, and the user experience is further improved.)

1. A template recommendation method, comprising:

acquiring target text content from a target document in response to an operation for editing the target document triggered in a document application;

extracting key information from the target text content;

sending the key information to a server, so that the server determines at least one matched document processing template from a document template library based on the key information, and sending the identification information of the at least one document processing template to the terminal equipment;

and displaying the identification information of the at least one document processing template in a display interface.

2. The method of claim 1, wherein after presenting the identifying information of the at least one document processing template in the display interface, further comprising:

in response to a template selection operation triggered on the display interface, determining a selected target document processing template in the at least one document processing template;

sending a template acquisition request to the server, wherein the template acquisition request carries identification information of the target document processing template, so that the server returns the target document processing template;

and replacing the target document with the target document processing template, and displaying the target document processing template in the display interface.

3. The method of claim 2, wherein replacing the target document with the target document processing template and prior to exposing the target document processing template in the display interface, further comprises:

and if the text data volume in the target document meets a preset condition, adding the text content in the target document into the target document processing template, and processing the text content in the target document by adopting the target document processing template to obtain a processing result.

4. The method of claim 1, wherein after presenting the identifying information of the at least one document processing template in the display interface, further comprising:

and in response to the operation of canceling the template recommendation triggered in the display interface, hiding the identification information of the at least one document processing template in the display interface.

5. The method of any of claims 1 to 4, wherein the key information comprises at least one keyword;

extracting key information from the target text content, including:

performing word segmentation processing on the target text content to obtain at least one candidate word segmentation;

and selecting at least one candidate participle matched with the preset text attribute from the at least one candidate participle as a keyword.

6. A template recommendation method, comprising:

receiving key information sent by terminal equipment, wherein the key information is extracted from target text content acquired from a target document by the terminal equipment in response to an operation for editing the target document triggered in a document application;

determining at least one matching document processing template from a document template library based on the key information;

and sending the identification information of the at least one document processing template to the terminal equipment so that the terminal equipment displays the identification information of the at least one document processing template in a display interface.

7. The method of claim 6, wherein before receiving the key information sent by the terminal device, the method further comprises:

respectively executing the following steps for each document processing template in the document template library:

and aiming at one document processing template, extracting at least one template tag corresponding to the document processing template, and storing the association of the document processing template and the at least one template tag in the document template library.

8. The method of claim 7, wherein the template tags include at least a title tag, a content tag, and a type tag;

the extracting at least one template tag corresponding to the document processing template includes:

extracting at least one title tag from a document title of the one document processing template;

extracting at least one content tag from the document content of the one document processing template;

and determining at least one type tag corresponding to the document processing template based on the document type of the document processing template.

9. The method of claim 7 or 8, wherein the server determines at least one document processing template that matches from a library of document templates based on the key information, comprising:

and aiming at any one document processing template in the document template library, when the number of target template tags matched with the key information in at least one template tag corresponding to the document processing template is determined to meet a preset condition, taking the document processing template as a matched document processing template.

10. A template recommendation apparatus, comprising:

the system comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for responding to an operation triggered in a document application and used for editing a target document and acquiring target text content from the target document;

the extraction module is used for extracting key information from the target text content;

the first sending module is used for sending the key information to a server so that the server determines at least one matched document processing template from a document template library based on the key information and sends the identification information of the at least one document processing template to the terminal equipment;

and the display template is used for displaying the identification information of the at least one document processing template in a display interface.

11. A template recommendation apparatus, comprising:

the system comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving key information sent by a terminal device, and the key information is extracted from target text content acquired from a target document by the terminal device in response to an operation for editing the target document triggered in a document application;

a matching module for determining at least one matching document processing template from a document template library based on the key information;

and the second sending module is used for sending the identification information of the at least one document processing template to the terminal equipment so that the terminal equipment displays the identification information of the at least one document processing template in a display interface.

12. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the steps of the method of any one of claims 1 to 5 are performed by the processor when the program is executed by the processor, or the steps of the method of any one of claims 6 to 9 are performed by the processor.

13. A computer-readable storage medium, storing a computer program executable by a computer device, the program, when executed on the computer device, causing the computer device to perform the steps of the method of any one of claims 1 to 5 or the steps of the method of any one of claims 6 to 9.

Technical Field

The embodiment of the invention relates to the technical field of artificial intelligence, in particular to a template recommendation method, a template recommendation device, template recommendation equipment and a storage medium.

Background

The template is a special document, provides basic tools and texts of the appearance of the final document, and can effectively improve the efficiency of generating the final document. The document application generally corresponds to a document template library, and if a user wants to create a document by using a template, the user needs to manually search for the corresponding template from the document template library, which is not convenient for the user to operate, and meanwhile, the user needs to spend a long time to search for a required template in the document template library, thereby affecting the user experience.

Disclosure of Invention

The embodiment of the application provides a template recommendation method, a template recommendation device and a template recommendation storage medium, which are used for improving the convenience of a user in using a template and improving the experience of the user in using the template.

On one hand, the embodiment of the application provides a template recommendation method, which specifically comprises the following steps:

acquiring target text content from a target document in response to an operation for editing the target document triggered in a document application;

extracting key information from the target text content;

sending the key information to a server, so that the server determines at least one matched document processing template from a document template library based on the key information, and sending the identification information of the at least one document processing template to the terminal equipment;

and displaying the identification information of the at least one document processing template in a display interface.

On one hand, the embodiment of the application provides a template recommendation method, which specifically comprises the following steps:

receiving key information sent by terminal equipment, wherein the key information is extracted from target text content acquired from a target document by the terminal equipment in response to an operation for editing the target document triggered in a document application;

determining at least one matching document processing template from a document template library based on the key information;

and sending the identification information of the at least one document processing template to the terminal equipment so that the terminal equipment displays the identification information of the at least one document processing template in a display interface.

In one aspect, an embodiment of the present application provides a template recommendation device, which specifically includes:

the system comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for responding to an operation triggered in a document application and used for editing a target document and acquiring target text content from the target document;

the extraction module is used for extracting key information from the target text content;

the first sending module is used for sending the key information to a server so that the server determines at least one matched document processing template from a document template library based on the key information and sends the identification information of the at least one document processing template to the terminal equipment;

and the display template is used for displaying the identification information of the at least one document processing template in a display interface.

Optionally, after the display module displays the identification information of the at least one document processing template in the display interface, the obtaining module is further configured to determine, in response to a template selection operation triggered on the display interface, a selected target document processing template in the at least one document processing template;

the first sending module is further configured to send a template obtaining request to the server, where the template obtaining request carries identification information of the target document processing template, so that the server returns the target document processing template;

the display module is further configured to replace the target document with the target document processing template, and display the target document processing template in the display interface.

Optionally, the display module is further configured to:

replacing the target document with the target document processing template, adding the text content in the target document to the target document processing template if the text data volume in the target document meets a preset condition before the target document processing template is displayed in the display interface, and processing the text content in the target document by adopting the target document processing template to obtain a processing result.

Optionally, the display module is further configured to:

after the identification information of the at least one document processing template is displayed in a display interface, in response to an operation of canceling the template recommendation triggered in the display interface, the identification information of the at least one document processing template is hidden in the display interface.

Optionally, the key information includes at least one keyword;

the extraction module is specifically configured to:

extracting key information from the target text content, including:

performing word segmentation processing on the target text content to obtain at least one candidate word segmentation;

and selecting at least one candidate participle matched with the preset text attribute from the at least one candidate participle as a keyword.

In one aspect, an embodiment of the present application provides a template recommendation device, which specifically includes:

the system comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving key information sent by a terminal device, and the key information is extracted from target text content acquired from a target document by the terminal device in response to an operation for editing the target document triggered in a document application;

a matching module for determining at least one matching document processing template from a document template library based on the key information;

and the second sending module is used for sending the identification information of the at least one document processing template to the terminal equipment so that the terminal equipment displays the identification information of the at least one document processing template in a display interface.

Optionally, the system further comprises a template library construction module;

the template library construction module is specifically configured to:

before the receiving module receives the key information sent by the terminal equipment, aiming at each document processing template in the document template library, the following steps are respectively executed:

and aiming at one document processing template, extracting at least one template tag corresponding to the document processing template, and storing the association of the document processing template and the at least one template tag in the document template library.

Optionally, the template tag at least comprises a title tag, a content tag and a type tag;

the template library construction module is specifically configured to:

extracting at least one title tag from a document title of the one document processing template;

extracting at least one content tag from the document content of the one document processing template;

and determining at least one type tag corresponding to the document processing template based on the document type of the document processing template.

The matching module is specifically configured to:

and aiming at any one document processing template in the document template library, when the number of target template tags matched with the key information in at least one template tag corresponding to the document processing template is determined to meet a preset condition, taking the document processing template as a matched document processing template.

In one aspect, an embodiment of the present application provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the template recommendation method when executing the program.

In one aspect, embodiments of the present application provide a computer-readable storage medium, which stores a computer program executable by a computer device, and when the program runs on the computer device, the computer device is caused to execute the steps of the template recommendation method.

In the embodiment of the application, the terminal device responds to the operation of editing the target document, extracts the key information from the target text content in the target document, acquires the identification information of the matched at least one document processing template from the server based on the key information and displays the identification information to the user, so that the user can directly select the required document processing template from the displayed document processing templates without manually inquiring the required document processing template from the document template library, the operation of the user is simplified, the time spent by the user for inquiring the document processing template is reduced, the template utilization rate is improved, and further the user experience is improved.

Drawings

In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.

Fig. 1 is a schematic diagram of a system architecture according to an embodiment of the present application;

fig. 2 is a flowchart illustrating a template recommendation method according to an embodiment of the present application;

FIG. 3 is a diagram illustrating a document application home page according to an embodiment of the present application;

FIG. 4 is a diagram illustrating a document application home page according to an embodiment of the present application;

FIG. 5 is a diagram illustrating a document application home page according to an embodiment of the present application;

FIG. 6 is a diagram illustrating a document editing page of a document application according to an embodiment of the present application;

FIG. 7 is a diagram illustrating a document editing page of a document application according to an embodiment of the present application;

FIG. 8 is a diagram illustrating a document application home page according to an embodiment of the present application;

FIG. 9 is a diagram illustrating a document application home page according to an embodiment of the present application;

FIG. 10 is a diagram illustrating a document application home page according to an embodiment of the present application;

FIG. 11 is a diagram illustrating a document editing page of a document application according to an embodiment of the present application;

FIG. 12 is a diagram illustrating a document editing page of a document application according to an embodiment of the present application;

FIG. 13 provides a diagram illustrating a segmentation process according to an embodiment of the present application;

FIG. 14 is a schematic diagram of a template recommendation interface provided in an embodiment of the present application;

FIG. 15 is a schematic diagram of a template recommendation interface provided in an embodiment of the present application;

FIG. 16 is a schematic diagram of a document processing template interface provided in an embodiment of the present application;

FIG. 17 is a schematic diagram of a document processing template interface provided in an embodiment of the present application;

FIG. 18 is a diagram illustrating classification of a document processing template according to an embodiment of the present application;

FIG. 19 provides a schematic illustration of a template tag according to an embodiment of the present application;

fig. 20 is a flowchart illustrating a template recommendation method according to an embodiment of the present application;

fig. 21 is a schematic structural diagram of a template recommendation device according to an embodiment of the present application;

fig. 22 is a schematic structural diagram of a template recommendation device according to an embodiment of the present application;

fig. 23 is a schematic structural diagram of a computer device according to an embodiment of the present application.

Detailed Description

In order to make the objects, technical solutions and advantages of the present invention more clearly apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

For convenience of understanding, terms referred to in the embodiments of the present invention are explained below.

Artificial Intelligence (AI) is a theory, method, technique and application system that uses a digital computer or a machine controlled by a digital computer to simulate, extend and expand human Intelligence, perceive the environment, acquire knowledge and use the knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technique of computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can react in a manner similar to human intelligence. Artificial intelligence is the research of the design principle and the realization method of various intelligent machines, so that the machines have the functions of perception, reasoning and decision making.

The artificial intelligence technology is a comprehensive subject and relates to the field of extensive technology, namely the technology of a hardware level and the technology of a software level. The artificial intelligence infrastructure generally includes technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and the like.

Natural Language Processing (NLP) is an important direction in the fields of computer science and artificial intelligence. It studies various theories and methods that enable efficient communication between humans and computers using natural language. Natural language processing is a science integrating linguistics, computer science and mathematics. Therefore, the research in this field will involve natural language, i.e. the language that people use everyday, so it is closely related to the research of linguistics. Natural language processing techniques typically include text processing, semantic understanding, machine translation, robotic question and answer, knowledge mapping, and the like. For example, in the embodiment of the application, a natural language processing technology is adopted to perform word segmentation processing on target text content in a target document, extract keywords in the target text content, and then obtain a document processing template recommended to a user from a document template library based on the keywords.

Online documentation: the Document can be edited by multiple persons at the same time, and various types such as online Word/Excel/PPT (powerPoint, presentation)/PDF (Portable Document Format)/collection table and the like are supported. The document can be checked and modified at any time and any place on various devices such as a computer side (personal computer (PC) client side, an online document webpage version), a mobile side (online document Application (App), an online document applet) and a notebook computer. The webpage can be viewed and edited by opening the webpage, the cloud end can be stored in real time, and the authority is safe and controllable.

Document processing template: a document with pre-made style, page layout, etc. elements.

Template labeling: tags for characterizing a document processing template, the template tags including at least a title tag, a content tag, and a type tag.

The following is a description of the design concept of the embodiments of the present application.

The document application generally corresponds to a document template library, and if a user wants to create a document by using a template, the user needs to manually search for the corresponding template from the document template library, which is not convenient for the user to operate, and meanwhile, the user needs to spend a long time to search for a required template in the document template library, thereby affecting the user experience.

Considering that if a document processing template matched with the text content is recommended for the user based on the text content edited by the user in the document when the user edits the document, the user can directly select the required document processing template from the recommended document processing templates without searching the required document processing template from the document template library, so that the time spent by the user in searching the document processing template can be greatly reduced, the operation process of the user is simplified, and the user experience is improved.

In view of this, an embodiment of the present application provides a template recommendation method, which specifically includes the following steps: the terminal equipment responds to an operation for editing the target document triggered in the document application, acquires target text content from the target document, extracts key information from the target text content, and sends the key information to the server. The server determines at least one matched document processing template from the document template library based on the key information, and sends the identification information of the at least one document processing template to the terminal equipment. And the terminal equipment displays the identification information of at least one document processing template in a display interface.

In the embodiment of the application, the terminal device responds to the operation of editing the target document, extracts the key information from the target text content in the target document, acquires the identification information of the matched at least one document processing template from the server based on the key information and displays the identification information to the user, so that the user can directly select the required document processing template from the displayed document processing templates without manually inquiring the required document processing template from the document template library, the operation of the user is simplified, the time spent by the user for inquiring the document processing template is reduced, the template utilization rate is improved, and further the user experience is improved.

Referring to fig. 1, a system architecture diagram applicable to the embodiment of the present application is shown, and the system architecture includes at least a terminal device 101, a server 102, and a document template library 103.

The terminal apparatus 101 installs a document application in advance, and the document application may be a client application, a web page version application, an applet, or the like installed in advance. Terminal device 101 may include, among other things, one or more processors 1011, memory 1012, I/O interface 1013 to interact with server 102, and display panel 1014. The terminal device 101 may be, but is not limited to, a smart tv, a smart phone, a tablet computer, a notebook computer, a desktop computer, and the like.

The server 102 is a background server corresponding to the document application and provides a service for the document application. The server 102 may include one or more processors 1021, memory 1022, and an I/O interface 1023 to interact with the terminal device 101, among other things. In addition, server 102 may also configure database 1024. The server 102 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a Network service, cloud communication, a middleware service, a domain name service, a security service, a Content Delivery Network (CDN), a big data and artificial intelligence platform, and the like. The terminal device 101 and the server 102 may be directly or indirectly connected through wired or wireless communication, and the application is not limited herein.

The document template library 103 may be a database separate from the server 102 or may be a database located within the server 102. When the document template library 103 is a database independent of the server 102, the document template library 103 and the server 102 may be directly or indirectly connected through wired or wireless communication, and the present application is not limited thereto.

The terminal apparatus 101 acquires target text content from a target document in response to an operation for editing the target document triggered in a document application, then extracts key information from the target text content, and then sends the key information to the server 102. The server 102 determines at least one document processing template matching from the document template library 103 based on the key information, and transmits identification information of the at least one document processing template to the terminal device 101. The terminal device 101 presents the identification information of at least one document processing template in the display interface.

Based on the system architecture diagram shown in fig. 1, an embodiment of the present application provides a flow of a template recommendation method, as shown in fig. 2, the flow of the method is interactively executed by a terminal device 101 and a server 102, and includes the following steps:

in step S201, the terminal device acquires target text content from a target document in response to an operation for editing the target document triggered in the document application.

In particular, the document application may be a pre-installed client application, a web page version application, an applet, or the like. The target document may be an online document or an offline document, wherein the online document includes an online word, an online table, an online slide, an online collection table, and the like. The target text content may be a document title in the target document, a document content in the target document, all text contents in the target document, or a specified sentence or paragraph in the target document, and the like, which is not limited in this application. The operation of editing the target document includes opening the target document, creating the target document, editing text content in the target document, and the like.

Illustratively, it is assumed that a user starts a web page version of a document application on a Personal Computer (PC) side, and the PC side displays a top page of the document application, as shown in fig. 3. The home page of the document application includes a "newly built" button, a search box, a home page identification, a my document identification, a recycle bin identification.

The user clicks the home page identifier, the PC displays the description information of each document browsed most recently, the description information of the document includes a name, a source, and a last open time, as shown in fig. 4, the user browses two documents most recently, the names of the two documents are document 1 and document 2, and document 1 and document 2 are both created by the user. Document 1 was last opened at 17 of 12 months and 6 days: 50 cents, the last time that document 2 was opened was 13 on 12 months and 7 days: and 50 minutes.

The user clicks the "new" button 301, and the home page of the document application displays a menu interface of the new document, as shown in fig. 5, where the menu interface includes an online word icon, an online table icon, an online slide icon, an online collection table icon, a folder icon, and an import local file icon.

When the user clicks on the online word icon in the menu interface, the document application jumps from the home page to the edit page of the new word document, which includes an edit toolbar 601 and a text edit area 602, as shown in fig. 6. After a user inputs 'I want to write an office log' in a text editing area, a PC (personal computer) end obtains target text content 'I want to write an office log' from a newly built word document.

When the user clicks the import local file icon in the menu interface and selects the imported document 3, the document application jumps from the first page to the editing page of the document 3, as shown in fig. 7, the editing page of the document 3 includes an editing toolbar 601 and a text editing area 602, the text editing area displays the text content existing in the document 3, and the text content in the first line of the document 3 is "mathematical performance statistics". The PC side acquires the target text content "math achievement statistics" from the document 3.

Illustratively, the user is set to start a pre-installed document application client on the mobile device side, and the mobile device side displays the top page of the document application client, as shown in fig. 8. The home page of the document application client comprises a 'newly built' button, a search box, a home page icon and a document icon.

The user clicks the home page identifier, the home page of the document application client displays description information of each document browsed in the last week, the description information of the document comprises a name, a source, a viewing permission and the latest opening time, as shown in fig. 9, the user browses two documents in the last week, the names of the two documents are respectively document 1 and document 2, the document 1 and the document 2 are both created by me, and the viewing permission is that only me can view. Document 1 was last opened at 17 of 12 months and 6 days: 50 cents, the last time that document 2 was opened was 13 on 12 months and 7 days: and 50 minutes.

The user clicks the "newly built" button, and the home page of the document application client displays a menu interface of the newly built document, as shown in fig. 10, where the menu interface includes an online word icon, an online table icon, an online slide icon, an online collection table icon, a folder icon, and an import local file icon.

When the user clicks the online word icon in the menu interface, the document application jumps from the home page to the edit page of the new word document, as shown in fig. 11, where the edit page of the new word document includes a text edit area. When a user inputs 'i want to write an office log' in a text editing area, the mobile device side acquires a target text content 'i want to write an office log' from a newly built word document.

When the user clicks the import local file icon in the menu interface and selects the import document 3, the document application jumps from the first page to the edit page of the document 3, as shown in fig. 12, the edit page of the document 3 includes a text edit area, the text content existing in the document 3 is displayed in the text edit area, and the text content in the first line of the document 3 is "mathematical achievement statistics". The mobile device side acquires the target text content 'math achievement statistics' from the document 3.

In step S202, the terminal device extracts key information from the target text content.

Specifically, the key information may be a keyword, a key sentence, a key paragraph, or the like.

Optionally, the key information includes at least one keyword, the terminal device performs word segmentation processing on the target text content to obtain at least one candidate word segmentation, and then selects at least one candidate word segmentation matched with a preset text attribute from the at least one candidate word segmentation as the keyword.

In specific implementation, the preset text attribute is any one or a combination of the following attributes: subject, verb, object, and final phrase.

Illustratively, the target text content is "i want to write an office log", and the target text content is subjected to word segmentation processing, and the obtained candidate word segmentation includes i, want to write, one, office and log, as shown in fig. 13, where the candidate word segmentation "i" is a subject, the candidate word segmentation "want to write" is a verb, the candidate word segmentation "one" is a fixed language, the candidate word segmentation "office" is an object, and the candidate word segmentation "log" is an object.

When the preset text attribute is set as a verb and an object, the candidate participles matched with the preset text number attribute are 'to write', 'office' and 'log', and then the candidate participles are 'to write', 'office' and 'log' as the keywords in the target text content.

When the preset text attribute is set as the object, the candidate participles matched with the preset text number attribute are 'office' and 'log', and the candidate participles are 'office' and 'log' as the keywords in the target text content.

Step S203, the terminal device sends the key information to the server.

In step S204, the server determines at least one matching document processing template from the document template library based on the key information.

Specifically, the document template library includes a plurality of types of document processing templates, each document processing template corresponds to one or more template tags, and the server obtains at least one matched document processing template by comparing the key information with the template tags of the document processing templates in the document template library. The document template library can be a document template library of a document application background, and can also be a third-party document template library.

In step S205, the server transmits the identification information of the at least one document processing template to the terminal device.

Step S206, the terminal device displays the identification information of at least one document processing template in the display interface.

Specifically, the identification information of the document processing template may be a thumbnail, a name, a brief introduction, or the like of the document processing template.

Illustratively, a user is set to start a webpage version document application at a PC side, and a server obtains 4 matched document processing templates, namely an office log template A, an office log template B, an office log template C and an office log template D, based on key information in a target text content 'i want to write an office log' in a newly-built word document. And then the names and the thumbnails of the 4 matched document processing templates are sent to the PC terminal. As shown in fig. 14, a template recommendation area 1401 is displayed in the edit page of the new word document, wherein the template recommendation area is located on the right side of the text edit area 601 of the new word document, and the names and thumbnails of 4 matched document processing templates are displayed in the template recommendation area 1401.

Illustratively, a user is set to start a pre-installed document application client at a mobile device, and a server obtains 3 matched document processing templates, namely a score counting template L, a score counting template M and a score counting template N, based on key information in a target text content "mathematical score counting" in a document 3. And then the names and the thumbnails of the 3 matched document processing templates are sent to the mobile equipment terminal. As shown in fig. 15, a template recommendation area is displayed in the editing page on the mobile device side, where the template recommendation area is located in the text editing area of the document 3. The names and thumbnails of the 3 matching document processing templates are displayed in the template recommendation area.

In the embodiment of the application, the terminal device responds to the operation of editing the target document, extracts the key information from the target text content in the target document, acquires the identification information of the matched at least one document processing template from the server based on the key information and displays the identification information to the user, so that the user can directly select the required document processing template from the displayed document processing templates, the user is helped to find the appropriate document processing template more conveniently, the document using link of the user is optimized, the operation of the user is simplified, and the user experience is improved.

Optionally, after presenting the identification information of the at least one document processing template in the display interface, the terminal device determines a selected target document processing template in the at least one document processing template in response to a template selection operation triggered in the display interface. And then sending a template acquisition request to the server, wherein the template acquisition request carries the identification information of the target document processing template. The server returns the target document processing template. And the terminal equipment replaces the target document with the target document processing template and displays the target document processing template in the display interface.

Specifically, the template selecting operation may be an operation of clicking identification information of the document processing template, for example, clicking a thumbnail of the document processing template displayed by the terminal device, or an operation of long-pressing the identification information of the document processing template, for example, long-pressing the thumbnail of the document processing template displayed by the terminal device, or other preset operations, which is not limited in this application. And after receiving the target document processing template returned by the server, the terminal refreshes the currently displayed target document into the document processing template. Subsequent users may edit in the document processing template.

Illustratively, as shown in fig. 16, when the user clicks on the thumbnail of the office log template a shown in fig. 14, the PC side replaces the newly created word document with the office log template a, and then displays the office log template a in the text editing area 601, and the user can edit the text in the office log template a to obtain the office log document.

Illustratively, as shown in fig. 17, when the user clicks the thumbnail of the achievement statistics template N shown in fig. 15, the mobile device side replaces the document 3 with the achievement statistics template N, and displays the achievement statistics template N in the text editing area. The user can edit the mathematic scores of the students in the score counting template N, and then the scores are automatically counted by the score counting template N.

The corresponding document processing template is recommended for the user based on the content edited by the user in the document and displayed to the user, so that the user can directly obtain the required template from the recommended document processing template, the user operation is simplified, and meanwhile, when the user edits the text content by using the document processing template, the processing efficiency and the quality of the obtained document are improved.

When the amount of text data in the target document is small, for example, the target document is a new document, and the user only edits a sentence "i want to write an office log" in the new document, at this time, the target document does not have the specific content of the office log, so that after the user selects the target document processing template from the recommended templates, the terminal device directly replaces the target document with the target document processing template selected by the user, then displays the target document processing template selected by the user, and the subsequent user edits the specific content of the office log in the selected target document processing template.

When the text data amount in the target document is large, for example, the target document is a history document, and the target document includes all math achievements of classmates in a class. If the user selects the target document processing template from the recommended templates, the mathematical scores contained in the target document are added to the target document processing template, then the target document processing template is adopted to count the mathematical scores contained in the target document, and the statistical result of the mathematical scores is obtained, so that the user does not need to input the mathematical scores of all students in a class in the target document processing template again, and the data processing efficiency can be effectively improved. In view of this, the embodiments of the present application provide the following alternative implementations:

the terminal device replaces the target document with the target document processing template, and before the target document processing template is displayed in the display interface, if the text data amount in the target document meets a preset condition, the text content in the target document is added into the target document processing template, and the target document processing template is adopted to process the text content in the target document, so that a processing result is obtained.

In a specific implementation, the text data amount may be a number of words, a number of lines, a number of paragraphs, and the like of the text, and the meeting of the preset condition may be greater than a preset threshold, or within a preset range, and the like. When the text content in the target document is added into the target document processing template, extracting corresponding text content from the target document according to the format of the target document processing template, and then adding the extracted text content to the corresponding position of the target document processing template. The processing functions corresponding to different document processing templates are different, for example, the document processing template related to statistics performs statistics on the text content in the target document to obtain a statistical result. And classifying the text content in the target document by the document processing template related to classification to obtain a classification result.

In the embodiment of the application, when the text data amount in the target document meets the preset condition, the text content in the target document is added into the target document processing template, the text content in the target document is processed by adopting the target document processing template to obtain a processing result, and then the target document is replaced by adopting the target document processing template and displayed, so that a user does not need to re-edit the content in the target document processing template, the data processing efficiency is improved, and the time of the user is saved.

Optionally, after the terminal device displays the identification information of the at least one document processing template in the display interface, in response to an operation of canceling the template recommendation triggered in the display interface, the identification information of the at least one document processing template is hidden in the display interface.

Specifically, the operation of canceling the template recommendation may be a preset operation of clicking a close button of the template recommendation area, double-clicking the template recommendation area, sliding the template recommendation area, or the like.

Illustratively, a template recommendation area is displayed in an editing page of the new word document, wherein the template recommendation area is positioned at the right side of the text editing area of the new word document, and the template recommendation area comprises a close button. And displaying names and thumbnails of 4 matched document processing templates in the template recommendation area, wherein the 4 matched document processing templates are an office log template A, an office log template B, an office log template C and an office log template D respectively. And clicking a closing button by the user, and hiding the template recommendation area in the display interface.

The method comprises the steps that corresponding document processing templates are recommended for users based on contents edited in documents by the users and displayed to the users, the users can select needed document processing templates from the recommended document processing templates and also can select not to use the document processing templates, and experience of the users in using the templates is improved by giving more choices to the users.

Optionally, in step S204, before the server receives the key information sent by the terminal device, the following steps are respectively executed for each document processing template in the document template library:

and extracting at least one template tag corresponding to one document processing template aiming at one document processing template, and storing the association of the document processing template and the at least one template tag in a document template library.

Specifically, the template tag is a tag used for representing the characteristics of the document processing template, and at least one document processing template recommended to the user is obtained by matching the key information of the target text content with the template tag of the document processing template.

The template tags at least comprise title tags, content tags and type tags, and specifically when at least one template tag corresponding to one document processing template is extracted, at least one title tag is extracted from a document title of the document processing template, at least one content tag is extracted from document content of the document processing template, and at least one type tag corresponding to the document processing template is determined based on a document type of the document processing template.

In a specific implementation, when a title tag is extracted from a document title of one document processing template, the document title of the document processing template is subjected to word segmentation processing, the document title of the document processing template is divided into a plurality of title words, and one or more title words are selected from the plurality of title words to serve as the title tag of the document processing template.

When extracting content tags from the document content of one document processing template, performing word segmentation processing on the document content of the document processing template, dividing the document content of the document processing template into a plurality of document content words, and selecting one or more document content words from the plurality of document content words as the content tags of the document processing template.

Different type tags are preset for different document types, when the type tag corresponding to one document processing template in a document search library is determined, the target document type of the document processing template is determined, and then one or more type tags are selected from the type tags corresponding to the target document type to serve as the type tag of the document processing template.

Illustratively, as shown in fig. 18, the document processing templates in the document search library are divided into four document types of online word, online table, online slide, online collection table in advance, and then the online word is divided into a plurality of document subtypes, namely education, teleworking, administration, resume, life, and contract. The online form is divided into a plurality of document subtypes, namely education, teleworking, administration, market, finance and life. The online slide is divided into a plurality of document subtypes which are respectively education and teaching, learning and academic, graduation and debate, innovation and creation, work reporting and popularization planning. The online collection table is divided into a plurality of document subtypes which are respectively used for home-school communication, daily office work, information registration and activity registration. One or more type tags are then set for each document sub-type, e.g., multiple type tags for summaries, questions, solutions, discussions, etc. may be set for telecommuting in online word documents.

The following describes, by way of example, a process of extracting at least one template tag corresponding to one document processing template, where specific content of the office log template a is shown in fig. 16, a document title of the office log template a is a team remote office log, and the document content of the office log template a includes team leader, department, time, event, priority, start-stop time, progress, and the like.

The document title of the office log template A is subjected to word segmentation processing to obtain the heading words of team, remote, office and log, and the team, remote, office and log are used as the title label of the office log template A. The document content of the office log template a is subjected to word segmentation processing, document content words such as "team", "person in charge", "department", "time", "matter", "priority", "start-stop time", "progress" and the like are obtained, and the document content words such as "person in charge", "department", "time", "matter" and the like are used as content tags of the office log template a. The document type of the document processing template is teleworking in the online word document, and a type label corresponding to the teleworking in the online word document is as follows: the summary, question, solution, and discussion are type labels of the office log template a, and each template label of the office log template a is specifically shown in fig. 19.

In the embodiment of the application, the template tags corresponding to the document processing templates in the document search library are extracted in advance, so that the key information edited by a user can be matched with the template tags of the document processing templates in the document search library conveniently, the document processing templates recommended to the user are obtained, and the template recommendation efficiency is improved.

Optionally, in step S204, when the server determines at least one matching document processing template from the document template library based on the key information, the embodiments of the present application provide at least the following embodiments:

in the first embodiment, when it is determined that the number of target template tags matched with the key information in at least one template tag corresponding to one document processing template satisfies a preset condition, one document processing template is used as a matched document processing template for any document processing template in the document template library.

Specifically, the key information includes at least one keyword, and for each template tag of at least one template tag corresponding to the document processing template, the following steps are respectively performed: and comparing the template label with each keyword respectively aiming at one template label, and determining the template label as a target template label when the keyword matched with the template label exists in each keyword. The number of the target template tags meeting the preset condition may be that the number of the target template tags is greater than a preset threshold, or that the number of the target template tags is within a preset range.

Illustratively, setting the number of target template tags to satisfy the preset condition is that the number of target template tags is greater than or equal to 1. Setting the target text content as 'I want to write an office log', extracting keywords from the target text content, wherein the keywords are respectively as follows: "office" and "journal". In each template tag corresponding to the office log template a shown in fig. 19, the title tags "office" and "log" are matched with the keywords "office" and "log", that is, two target template tags exist in each template tag corresponding to the office log template a, and if the number of the target template tags is greater than a preset threshold value, the text processing template a is determined to be the matched text processing template.

And determining the number of target template tags matched with the key information in at least one template tag corresponding to one document processing template aiming at any document processing template in the document template library. And sequencing the text processing templates in the document template library according to the number of the target template tags, and determining the document processing templates arranged at the top N, wherein N is a preset threshold value. And taking the document processing template with the top N bits as a matched document processing template.

Exemplarily, setting N to be 2, setting the target text content to be "math achievement statistics", extracting keywords from the target text content, and respectively: "mathematics", "achievements" and "statistics". In each template tag corresponding to the document processing template X, two target template tags matched with the keywords exist, namely 'achievement' and 'statistics'; in each template tag corresponding to the document processing template Y, 1 target template tag matching the keyword exists, specifically, "statistics"; in each template tag corresponding to the document processing template Z, there are three target template tags matching the keyword, which are "mathematics", "achievement", and "statistics", respectively. And sequencing the document processing template X, the document processing template Y and the document processing template Z according to the sequence of the number of the target template tags from large to small, and obtaining sequencing results of the document processing template Z, the document processing template X and the document processing template Y. And taking the document processing template with the first two digits as a matched document processing template, namely taking the document processing template Z and the document processing template X as matched document processing templates.

In the embodiment of the application, the matched document processing template is obtained from the server based on the key information, and the identification information of the matched document processing template is displayed on the terminal device, so that a user can directly select the required document processing template from the displayed document processing templates without manually inquiring the required document processing template from the document template library, the operation of the user is simplified, the time spent by the user for inquiring the document processing template is reduced, and the user experience is improved.

In order to better explain the embodiment of the present application, the following describes a flow of a template recommendation method provided by the embodiment of the present application with reference to a specific implementation scenario, where the method is interactively executed by a terminal device, a server, and a document template library, as shown in fig. 20, and includes the following steps:

in step S2001, the terminal device starts a document application client installed in advance in response to the start operation.

In step S2002, the terminal device responds to the document new creation operation to create a blank document in the document application client.

In step S2003, the terminal device acquires target text content edited in the blank document by the user in response to the document editing operation.

In step S2004, the terminal device divides the target text content into a plurality of candidate participles.

In step S2005, the terminal device removes modifiers such as a subject, a quantifier, and an adverb from the plurality of candidate participles, and obtains keywords from the plurality of candidate participles.

The terminal device sends the keyword to the server.

In step S2006, the server determines whether the keyword matches a document processing template in the document template library, if so, step S2007 is executed, otherwise, step S2010 is executed.

Aiming at each template label corresponding to the document processing template, respectively executing the following steps: and comparing the template label with each keyword respectively aiming at one template label, and determining the template label as a target template label when the keyword matched with the template label exists in each keyword. And when at least one template tag exists in the template tags corresponding to the document processing template as a target template tag, determining that the document processing template is matched with the keyword, otherwise, determining that the document processing template is not matched with the keyword.

In step S2007, the server acquires identification information of the matched document processing template from the document template library.

In step S2008, the terminal device receives the identification information of the matched document processing template sent by the server.

And step S2009, the terminal device displays the identification information of the matched document processing template according to the display rule of the display interface.

In step S2010, the server does not process.

In the embodiment of the application, the terminal device responds to the operation of editing the target document, extracts the key information from the target text content in the target document, acquires the identification information of the matched at least one document processing template from the server based on the key information and displays the identification information to the user, so that the user can directly select the required document processing template from the displayed document processing templates, the user is helped to find the appropriate document processing template more conveniently, the document using link of the user is optimized, the operation of the user is simplified, the user experience is improved, and the public praise is won for document application.

Based on the same technical concept, an embodiment of the present application provides a template recommendation apparatus, as shown in fig. 21, the apparatus 2100 includes:

an obtaining module 2101, configured to obtain target text content from a target document in response to an operation triggered in a document application for editing the target document;

an extraction module 2102 configured to extract key information from the target text content;

a first sending module 2103, configured to send the key information to a server, so that the server determines, based on the key information, at least one matched document processing template from a document template library, and sends identification information of the at least one document processing template to the terminal device;

a display template 2104 for displaying the identification information of the at least one document processing template in a display interface.

Optionally, after the display module 2104 displays the identification information of the at least one document processing template in a display interface, the obtaining module 2101 is further configured to determine a selected target document processing template in the at least one document processing template in response to a template selection operation triggered on the display interface;

the first sending module 2103 is further configured to send a template obtaining request to the server, where the template obtaining request carries identification information of the target document processing template, so that the server returns the target document processing template;

the display module 2104 is further configured to replace the target document with the target document processing template, and display the target document processing template in the display interface.

Optionally, the display module 2104 is further configured to:

replacing the target document with the target document processing template, adding the text content in the target document to the target document processing template if the text data volume in the target document meets a preset condition before the target document processing template is displayed in the display interface, and processing the text content in the target document by adopting the target document processing template to obtain a processing result.

Optionally, the display module 2104 is further configured to:

after the identification information of the at least one document processing template is displayed in a display interface, in response to an operation of canceling the template recommendation triggered in the display interface, the identification information of the at least one document processing template is hidden in the display interface.

Optionally, the key information includes at least one keyword;

the extraction module 2102 is specifically configured to:

extracting key information from the target text content, including:

performing word segmentation processing on the target text content to obtain at least one candidate word segmentation;

and selecting at least one candidate participle matched with the preset text attribute from the at least one candidate participle as a keyword.

Based on the same technical concept, an embodiment of the present application provides a template recommendation apparatus, as shown in fig. 22, where the apparatus 2200 includes:

a receiving module 2201, configured to receive key information sent by a terminal device, where the key information is extracted from target text content acquired from a target document by the terminal device in response to an operation for editing the target document triggered in a document application;

a matching module 2202 for determining at least one document processing template that matches from a library of document templates based on the key information;

a second sending module 2203, configured to send the identification information of the at least one document processing template to the terminal device, so that the terminal device displays the identification information of the at least one document processing template in a display interface.

Optionally, a template library construction module 2204 is further included;

the template library construction module 2204 is specifically configured to:

before the receiving module receives the key information sent by the terminal equipment, aiming at each document processing template in the document template library, the following steps are respectively executed:

and aiming at one document processing template, extracting at least one template tag corresponding to the document processing template, and storing the association of the document processing template and the at least one template tag in the document template library.

Optionally, the template tag at least comprises a title tag, a content tag and a type tag;

the template library construction module 2204 is specifically configured to:

extracting at least one title tag from a document title of the one document processing template;

extracting at least one content tag from the document content of the one document processing template;

and determining at least one type tag corresponding to the document processing template based on the document type of the document processing template.

The matching module 2202 is specifically configured to:

and aiming at any one document processing template in the document template library, when the number of target template tags matched with the key information in at least one template tag corresponding to the document processing template is determined to meet a preset condition, taking the document processing template as a matched document processing template.

Based on the same technical concept, the embodiment of the present application provides a computer device, as shown in fig. 23, including at least one processor 2301 and a memory 2302 connected with the at least one processor, where the specific connection medium between the processor 2301 and the memory 2302 is not limited in this embodiment, and the processor 2301 and the memory 2302 are connected through a bus in fig. 23 as an example. The bus may be divided into an address bus, a data bus, a control bus, etc.

In the embodiment of the present application, the memory 2302 stores instructions executable by the at least one processor 2301, and the at least one processor 2301 can execute the steps of the template recommendation method by executing the instructions stored in the memory 2302.

The processor 2301 is a control center of a computer device, and may connect various parts of the computer device using various interfaces and lines to recommend a document processing template by executing or executing instructions stored in the memory 2302 and calling data stored in the memory 2302. Alternatively, the processor 2301 may include one or more processing units, and the processor 2301 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, and the like, and a modem processor, which mainly handles wireless communications. It is to be appreciated that the modem processor described above may not be integrated into the processor 2301. In some embodiments, the processor 2301 and the memory 2302 may be implemented on the same chip, or in some embodiments, they may be implemented separately on separate chips.

The processor 2301 may be a general-purpose processor such as a Central Processing Unit (CPU), a digital signal processor, an Application Specific Integrated Circuit (ASIC), a field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof, that may implement or perform the methods, steps, and logic blocks disclosed in the embodiments of the present Application. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of a method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware processor, or may be implemented by a combination of hardware and software modules in a processor.

The memory 2302 is one type of non-volatile computer-readable storage medium that may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The Memory 2302 may include at least one type of storage medium, and may include, for example, a flash Memory, a hard disk, a multimedia card, a card-type Memory, a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Programmable Read Only Memory (PROM), a Read Only Memory (ROM), a charged Erasable Programmable Read Only Memory (EEPROM), a magnetic Memory, a magnetic disk, an optical disk, and the like. The memory 2302 is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited thereto. The memory 2302 in the embodiments of the present application may also be a circuit or any other device capable of implementing a storage function, and may be used for storing program instructions and/or data.

Based on the same inventive concept, embodiments of the present application provide a computer-readable storage medium storing a computer program executable by a computer device, which, when the program is run on the computer device, causes the computer device to execute the steps of the template recommendation method described above.

It should be apparent to those skilled in the art that embodiments of the present invention may be provided as a method, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.

The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.

These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.

These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.

While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.

It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

38页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种阅读理解模型构建方法、装置、电子设备及存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!