CN111414743A - Method and device for calling document template, electronic equipment and storage medium - Google Patents
Method and device for calling document template, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN111414743A CN111414743A CN202010196721.XA CN202010196721A CN111414743A CN 111414743 A CN111414743 A CN 111414743A CN 202010196721 A CN202010196721 A CN 202010196721A CN 111414743 A CN111414743 A CN 111414743A
- Authority
- CN
- China
- Prior art keywords
- target
- document template
- keyword
- preset
- template
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/903—Querying
- G06F16/90335—Query processing
- G06F16/90344—Query processing by using string matching techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/955—Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
- G06F16/9566—URL specific, e.g. using aliases, detecting broken or misspelled links
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/22—Matching criteria, e.g. proximity measures
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Evolutionary Computation (AREA)
- Evolutionary Biology (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Bioinformatics & Computational Biology (AREA)
- Artificial Intelligence (AREA)
- Life Sciences & Earth Sciences (AREA)
- Computational Linguistics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The embodiment of the disclosure discloses a method and a device for calling a document template, electronic equipment and a storage medium, wherein the method comprises the following steps: when the target content is monitored, extracting keywords in the target content to serve as target keyword phrases; calculating the total similarity value between the target keyword phrase and each preset document template by adopting a keyword matching algorithm; acquiring a target document template to be processed based on the total similarity value, and calling a document template processing program to process the target document template to be processed to obtain a target document template; and storing the target document template to the target position based on the document template storage program. According to the technical scheme of the embodiment, the technical problems that in the prior art, when a user needs to download a plurality of document templates, the operation of searching, downloading and changing document titles needs to be repeatedly executed, the operation is mechanical, complicated and manpower is wasted are solved, the convenience for obtaining the document templates is improved, and the technical effect of user experience is achieved.
Description
Technical Field
The embodiment of the disclosure relates to the technical field of computers, and in particular relates to a method and a device for calling a document template, an electronic device and a storage medium.
Background
In daily work, there are situations where content filling is required according to a certain document template, and this document is often an online document, or other external document, optionally Google DOC. When a user uses a document template, the user needs to search for the required document template, then manually copy the document template, store the copied document template to a target position, and manually change the title information of the document template. When a user needs to download a plurality of document templates, the operation needs to be repeatedly executed, and the technical problems of mechanical operation, complexity and manpower waste exist.
Disclosure of Invention
The embodiment of the disclosure provides a method and a device for calling a document template, electronic equipment and a storage medium, so as to realize the technical effect of quickly and conveniently calling a target document template.
In a first aspect, an embodiment of the present disclosure provides a method for calling a document template, where the method includes:
when target content is monitored, calling a word segmentation program to extract at least one keyword in the target content to serve as a target keyword phrase;
calculating the total similarity value between the target keyword phrase and each preset document template by adopting a keyword matching algorithm;
acquiring a target document template to be processed based on the total similarity value, and calling a document template processing program to process the target document template to be processed to obtain a target document template;
and storing the target document template to a target position based on a document template storage program.
In a second aspect, an embodiment of the present disclosure further provides an apparatus for invoking a document template, where the apparatus includes
The keyword acquisition module is used for calling a word segmentation program to extract at least one keyword in the target content as a target keyword phrase when the target content is monitored;
the total similarity value determining module is used for calculating the total similarity value between the target key phrase and each preset document template by adopting a key word matching algorithm;
the target document template determining module is used for obtaining a target document template to be processed based on the total similarity value, and calling a document template processing program to process the target document template to be processed to obtain a target document template;
and the target document template storage module is used for storing the target document template to a target position based on the document template storage program.
In a third aspect, an embodiment of the present disclosure further provides an electronic device, where the electronic device includes:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a method for invoking a document template as in any of the embodiments of the present disclosure.
In a fourth aspect, the disclosed embodiments also provide a storage medium containing computer-executable instructions, which when executed by a computer processor, are used to perform the method for invoking a document template according to any one of the disclosed embodiments.
According to the technical scheme of the embodiment, when the target content is monitored, a word segmentation program is called to extract each keyword in the target content to serve as a target keyword phrase, and a keyword matching algorithm is adopted to calculate the total similarity value between the target keyword phrase and each preset document template; acquiring a target document template to be processed based on the total similarity value, and calling a document template processing program to process the target document template to be processed to obtain a target document template; the target document template is stored to the target position based on the document template storage program, so that the problems that in the prior art, a user needs to manually search the required document template, manually copy the target document template when finding the target document template, and paste the target document template to the target storage position are solved; when a user needs to download a plurality of document templates, the operation needs to be repeatedly executed, the technical problems of machinery, complexity and manpower waste exist, the target document template corresponding to the target content is automatically matched, the title of the target document is changed into the same format, and the target document template is automatically stored to the target position, so that the convenience of obtaining the document template is improved, and the technical effect of user experience is improved.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale.
FIG. 1 is a flowchart illustrating a method for calling a document template according to an embodiment of the present disclosure;
fig. 2 is another schematic flow chart of a method for calling a document template according to a second embodiment of the present disclosure;
fig. 3 is another schematic flow chart of a method for calling a document template according to a third embodiment of the present disclosure;
fig. 4 is another schematic flowchart of a method for calling a document template according to a third embodiment of the present disclosure;
fig. 5 is another schematic flow chart of a method for calling a document template according to a third embodiment of the present disclosure;
FIG. 6 is a schematic structural diagram of an invoking device for a document template according to a fourth embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of an electronic device according to a fifth embodiment of the disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
Example one
Fig. 1 is a flowchart illustrating a document template calling method according to a first embodiment of the present disclosure, where the method may be applied to a situation where each document template is automatically obtained, and the method may be executed by a document template calling apparatus, where the apparatus may be implemented in a form of software and/or hardware, and optionally, implemented by an electronic device, where the electronic device may be a mobile terminal, a PC terminal, or the like.
As shown in fig. 1, the method of the present embodiment includes:
s110, when the target content is monitored, calling a word segmentation program to extract at least one keyword in the target content to serve as a target keyword phrase.
It should be noted that, the technical solution of the embodiment of the present disclosure may be executed by obtaining an application program of a document template, and optionally, downloading the application program of the document template; the method may further include setting a program code for acquiring the document template in the instant messaging software, and processing the target content when the target content is monitored to acquire the document template corresponding to the target content, that is, setting a message monitoring program for receiving information of the target content.
The target content may be text information input by the target user in the instant messaging software, or text content corresponding to the voice information. The target content may be information for acquiring the target document. And taking a program for extracting the keywords in the target content as a word segmentation program. The number of the keywords in the target content may be one, two or more, and the set of the keywords extracted from the target content is used as the target keyword phrase. That is, the target keyword phrase includes at least one keyword, and each keyword is extracted from the target content.
Specifically, after the target user inputs the target content, i.e., the text information, in the instant messaging software and triggers the message sending control, the server corresponding to the instant messaging software may receive the target content information and may obtain the target user information corresponding to the target content information. After the server receives the target content, a word segmentation program is called to extract nouns, adjectives and the like in the target content as target keywords, and a set containing all the target keywords is used as a target keyword phrase.
Illustratively, the target content input by the user in the instant messaging software is a "template for obtaining score ranking", after the control is triggered to send a message, the server corresponding to the instant messaging software can receive the target content of the "template for obtaining score ranking", a word segmentation program is called to segment the "template for obtaining score ranking", words such as nouns and adjectives in the "template for obtaining score ranking" are reserved, and the reserved words are used as target keywords. Optionally, the vocabulary reserved in the target content is: score ranking and template, namely, the keyword extracted from the target content is the score ranking and template, and the score ranking and template can be used as a target keyword phrase.
And S120, calculating the total similarity value between the target keyword phrase and each preset document template by adopting a keyword matching algorithm.
And determining a similarity value between each keyword and a preset document template by using an algorithm adopted when the similarity value is determined as a keyword matching algorithm. The preset document template refers to a preset document template corresponding to different application scenes, and optionally, a score ranking template, a work report template and the like. The total similarity value refers to the similarity value between the target keyword phrase and each preset document.
It should be noted that, because the target keyword phrase includes at least one target keyword, the total similarity value between the target keyword phrase and each preset document is determined, and the total similarity value can be determined by calculating the similarity value between each target keyword and each preset document.
Specifically, one target keyword in the target keyword phrase is extracted, and a document template is obtained from a preset document template and is used as a document template to be determined. And calculating similarity values between the target keywords and the document template to be determined by adopting a keyword matching algorithm, determining the similarity values of all the target keywords and the document template to be determined in the target keyword phrase by analogy, and accumulating all the obtained similarity values to obtain the total similarity value of the target keyword phrase and the document template to be determined. By adopting the method, the total similarity value between the target keyword phrase and each preset document template is respectively determined.
Illustratively, the target keyword phrase includes two target keywords, which are respectively marked as a and B, the number of the preset document templates is 10, which can be respectively marked as C1、C2、C3…C10The preset document template C can be used1As a document template to be determined. Calculating a target keyword A and a document template C to be determined by adopting a keyword matching algorithm1The similarity value between them is recorded as M1(ii) a Using keyword matchingCalculating target key words B and document template C to be determined by matching algorithm1The similarity value between them is recorded as M2(ii) a The total similarity value between the target keyword phrase and the document template to be determined is recorded as MC1Then M ═ M1+M2. By analogy, C2、C3…C10And respectively serving as the document templates to be determined, and calculating the total similarity value between each preset document template and the target keyword phrase.
S130, acquiring a target document template to be processed based on the total similarity value, and calling a document template processing program to process the target document template to be processed to obtain the target document template.
Wherein, the target document template to be processed can be understood as the document template corresponding to the target content. The document template processing program refers to an application program for performing the re-processing on the document template, and optionally, a title is added to the target document template to be processed. A document template to which a document title is added or which can be stored to a target position may be used as the target document template.
Specifically, after the total similarity value between the target keyword phrase and each preset document template is determined, the target preset document template can be screened out from all preset document templates according to the total similarity value and used as the target document template to be processed. And calling a document template processing program to process the title of the target document template to be processed, and taking the processed document template as the target document template.
And S140, storing the target document template to a target position based on the document template storage program.
The document template storage program may be a pre-programmed program code for storing the target document to a preset position. The target location refers to a storage location corresponding to the target document template.
It should be noted that, the server may determine the storage path corresponding to each preset document template in advance, and certainly, the user may determine whether to establish the storage path corresponding to each document template according to actual requirements without establishing the storage path corresponding to each preset document template.
Specifically, after the target document template is determined, a document template storage program may be called to determine whether a storage path corresponding to the target document template exists, if so, the target document template is stored to a target position according to the storage path, and if not, a target folder is established to store the target document to the target folder.
Optionally, the target document template is called by a calling document calling module, and whether a storage path corresponding to the target document template exists is determined based on the document template storage program;
if yes, storing the target document template to a target position according to the storage path;
if not, establishing a new folder to store the target document template, and binding a storage path corresponding to the new folder with the target document template, so that the target document template is stored to a target position based on a binding relation when the target document template is called.
That is, when the target document template is stored by the document template storage program after the target document is acquired by the calling document calling module, the document template storage program may determine in advance whether or not a storage path corresponding to the target document template exists. If the target document template exists, the document template storage program can store the target document template to the target position according to the storage path; if the storage path corresponding to the target document template does not exist, a new folder can be established and bound with the target document and the target user, so that when the target document template is called again, the target document can be stored to the target position according to the bound storage path based on the binding relationship.
It can be understood that, in the embodiment, according to the target content information, the program can automatically copy the target document template with the highest degree of association with the target content information and automatically store the target document template in the target folder, thereby improving the acquisition efficiency of the target document.
According to the technical scheme of the embodiment, when the target content is monitored, a word segmentation program is called to extract each keyword in the target content to serve as a target keyword phrase, and a keyword matching algorithm is adopted to calculate the total similarity value between the target keyword phrase and each preset document template; acquiring a target document template to be processed based on the total similarity value, and calling a document template processing program to process the target document template to be processed to obtain a target document template; the target document template is stored to the target position based on the document template storage program, so that the problems that in the prior art, a user needs to manually search the required document template, manually copy the target document template when finding the target document template, and paste the target document template to the target storage position are solved; when a user needs to download a plurality of document templates, the operation needs to be repeatedly executed, the technical problems of machinery, complexity and manpower waste exist, the target document template corresponding to the target content is automatically matched, the title of the target document is changed into the same format, and the target document template is automatically stored to the target position, so that the convenience of obtaining the document template is improved, and the technical effect of user experience is improved.
Example two
On the basis of the technical scheme, before the target document template corresponding to the target content is obtained, the corresponding relation table corresponding to each preset document template is required to be established, so that after the target content is received, the target document template consistent with the target content can be screened from all the preset document templates on the basis of the pre-established corresponding relation table. Fig. 2 is another schematic flow diagram of a document template invoking method provided in a second embodiment of the present disclosure, and as shown in fig. 2, the method includes:
s210, acquiring a plurality of preset document templates, and determining UR L addresses corresponding to the preset document templates.
When the preset document template is a local template, the UR L address corresponding to the preset document template does not need to be determined, and if the preset document template is an extranet document, and optionally a Google document, the UR L address corresponding to the preset document needs to be determined, and the UR L address can be understood as a website for acquiring the preset document template.
Specifically, a plurality of preset document templates are obtained, and network addresses corresponding to the preset document templates are respectively determined.
S220, obtaining a title of the preset document template, and performing word segmentation processing on the title to obtain at least one keyword corresponding to the title, wherein the keyword is used as a preset keyword corresponding to the preset document template.
Wherein, the title of the preset document template can be understood as the title name of the document template. When the title of the preset document template is obtained, necessary fields, optionally name and number, in the title can be determined, and the necessary fields are stored in the database. The preset keyword may be a template representing what the document is sorted, and optionally, the preset keyword is a score and a rank, and then the preset document template corresponding to the keyword is a template for ranking the score.
Specifically, the server may obtain a preset document template title corresponding to each UR L address by calling the API interface, and call a segmentation program to perform segmentation processing on the title of each preset document template to obtain at least one keyword corresponding to each preset document template, respectively, where the obtained keyword may be used as the preset keyword corresponding to the preset document template.
And S230, establishing a corresponding relation table among the title corresponding to the preset document template, the preset keyword and the UR L address so as to obtain the target document template to be processed corresponding to the target keyword phrase based on the corresponding relation table.
Specifically, after determining the title corresponding to the preset document template, the preset keyword, and the UR L address corresponding to the preset document template, a corresponding relationship table among the preset document template title, the preset keyword, and the UR L may be established.
The establishment of the correspondence table has an advantage that, when the target document template to be processed is determined according to the total similarity value, the UR L address of the target document template to be processed corresponding to the target keyword phrase can be obtained according to the correspondence table established in advance, so that the target document template to be processed can be obtained according to the UR L address.
S240, when the target content is monitored, calling a word segmentation program to extract at least one keyword in the target content to serve as a target keyword phrase.
Specifically, after the target user inputs the target text information in the instant messaging software and triggers the message sending control, the server corresponding to the instant messaging software may receive the target text information, that is, the target content information, and the target user information corresponding to the target content information. After the server receives the target content, a word segmentation program can be called to extract target keywords such as nouns and adjectives in the target content, and a set of the extracted keywords is used as a target keyword phrase.
And S250, calculating word similarity values between each target keyword in the target keyword phrase and each preset keyword corresponding to the same preset document template by adopting a keyword matching algorithm.
The word similarity value may be understood as a similarity value between a target keyword in the target keyword phrase and a preset keyword. And taking each keyword in the target keyword phrase as a target keyword. It should be noted that the number of the preset keywords corresponding to the same preset document template may be one, two or more. Correspondingly, word similarity values between each target keyword in the target keyword phrase and each preset keyword are required to be determined.
Specifically, a keyword matching algorithm is adopted to calculate word similarity values between each target keyword in the target keyword phrase and each preset keyword in the same preset document template.
Illustratively, the target keyword phrase includes two target keywords, which are denoted as a and B, respectively. The same preset document template comprises two preset keywords which are respectively marked as E and F. Respectively calculating the word similarity values of A and E and the word similarity values of A and F by adopting a keyword matching algorithm; meanwhile, a word similarity value between B and E, and a word similarity value between B and F also need to be calculated.
In this embodiment, the word similarity value calculated by using the keyword matching algorithm may be: calculating the editing distance between one target keyword in the target keyword phrase and the current preset keyword corresponding to the same preset document template; the editing distance is the length of a character string edited when a preset keyword is edited into a target keyword; determining a target character string length of a target keyword and a preset character string length of a current preset keyword, and obtaining a first value to be processed based on the target character string length and the preset character string length; and obtaining a word similarity value between the target keyword and the preset keyword based on the first value to be processed and the editing distance.
Wherein, the editing distance can be understood as the length of the character string to be edited when the target keyword is converted into the preset keyword. The target string length is a string length corresponding to the target keyword. The preset character string length refers to a character string length corresponding to a preset keyword. The first value to be processed is the sum of the target string length and the string length of the preset string length. And taking the preset keywords used when the word similarity value is determined as the current preset keywords.
Specifically, in this embodiment, one of the target keywords and the preset keyword is taken as an example to determine the word similarity between the target keyword and the preset keyword. Respectively obtaining the character string length of the target keyword, the character string length of the current preset keyword, and the character string length required when the target keyword is edited into the current preset keyword, and taking the character string length determined at the moment as the editing distance. Then, calculating the sum of the length of the target character string and the length of a preset character string as a first value to be processed; and calculating a difference value between the first value to be processed and the editing distance to obtain an intermediate processing value, and calculating a ratio between the intermediate processing value and the first value to be processed to obtain a word similarity value corresponding to the target keyword and the current preset keyword.
It should be noted that, the word similarity value between each target keyword and each preset keyword may be determined one by using the above method.
And S260, accumulating the obtained at least one word similarity value to obtain a total similarity value between the target keyword phrase and the preset document template.
After word similarity values between each target keyword in the target keyword phrase and each preset keyword in the same preset document template are respectively determined, all the word similarity values can be accumulated to obtain a total similarity value corresponding to the target keyword phrase and the preset document template.
Illustratively, the target keyword phrase includes two target keywords, which are denoted as a and B, respectively. The same preset document template comprises two preset keywords which are respectively marked as E and F. Respectively calculating the word similarity values of A and E by adopting a keyword matching algorithm, and recording as Q1And the word similarity value of A and F, denoted as Q2(ii) a Meanwhile, the word similarity value between B and E needs to be calculated and is marked as Q3And the word similarity value between B and F, denoted as Q4Then, the total similarity value between the target keyword phrase and the preset document template is Q ═ Q1+Q2+Q3+Q4. And determining the total similarity value of the target keyword phrase and each preset document template by analogy.
S270, screening out the highest total similarity value from all the total similarity values, determining a preset keyword of a preset document template corresponding to the highest total similarity value, determining a UR L address corresponding to the preset keyword based on the corresponding relation table, and acquiring a target document template to be processed based on the UR L address.
Specifically, after the total similarity values corresponding to the target keyword phrases and the preset document templates are determined, when the total similarity value is the highest, the corresponding preset document template keyword can be screened from all the total similarity values, and the UR L address corresponding to the preset document template is determined from the pre-established corresponding relation table, so that the target document template to be processed is obtained based on the UR L address.
S280, acquiring target user information corresponding to the target content by calling the document template processing program, and updating the title of the target document template to be processed based on the target user information to obtain the target document template.
Specifically, when the target document template to be processed is obtained, the document processing program may be invoked to obtain target user information corresponding to the target content, and whether necessary field information corresponding to the target document template to be processed exists is searched for from the target information, and if the necessary field information exists, the target user information is updated at the title of the target document template to be processed, so as to obtain the target document template. That is, the header information of the target document template to be processed can be automatically updated according to the target user personal information.
On the basis of the above technical solution, it should be further noted that after storing the target document template to the target position, the method further includes: reading the title information of the target document template in the target position based on a timing monitoring mechanism; when the change of the target field in the header information is monitored, the header information is obtained and stored in a database corresponding to a user, so that the header information of the target document template is automatically updated when the target document template is obtained.
The server may be provided with a timing monitoring mechanism for executing a timing detection task, and optionally, the timing monitoring mechanism executes the monitoring task every twenty-four hours. The target field may be understood as necessary field information, optionally name, number, etc., corresponding to the target document template, which is stored in advance in the database.
Specifically, based on the timing monitoring mechanism, whether necessary fields in the target document header in the target position are changed or not is read regularly, that is, whether the target fields are changed or not is determined. If yes, acquiring necessary field information in the header information, binding the necessary field information with the target document template and the target user, and storing the bound necessary field information in the data path, so that the header information of the document template can be automatically updated when the target document template is acquired.
That is, when the timing monitoring mechanism sets the timing task, and when the header information of the target document template is read, once the target field in the header information is monitored to be changed, the header information can be written back to the corresponding relation table of the database, so that when the header information is updated after the document template is called, the document header can be updated based on the written-back data.
According to the technical scheme of the embodiment, when the target content is monitored, a word segmentation program is called to extract each keyword in the target content to serve as a target keyword phrase, and a keyword matching algorithm is adopted to calculate the total similarity value between the target keyword phrase and each preset document template; acquiring a target document template to be processed based on the total similarity value, and calling a document template processing program to process the target document template to be processed to obtain a target document template; the target document template is stored to the target position based on the document template storage program, so that the problems that in the prior art, a user needs to manually search the required document template, manually copy the target document template when finding the target document template, and paste the target document template to the target storage position are solved; when a user needs to download a plurality of document templates, the operation needs to be repeatedly executed, the technical problems of machinery, complexity and manpower waste exist, the target document template corresponding to the target content is automatically matched, the title of the target document is changed into the same format, and the target document template is automatically stored to the target position, so that the convenience of obtaining the document template is improved, the labor cost is reduced, and the technical effect of user experience is improved.
EXAMPLE III
As a preferred embodiment of the foregoing embodiment, fig. 3 is another schematic flow chart of a method for calling a document template provided in a third embodiment of the present disclosure, and as shown in fig. 3, the method includes:
and S310, sending a copy request, wherein the HTTP request comprises the personal identification and the conversation content.
For example, as shown in fig. 5, UR L addresses of all preset document templates and fields that must be included in each document template title, that is, necessary fields, such as (name, school number) are configured at the server, and are stored in the database, the server obtains a document title corresponding to each UR L address through an API, and stores the document title in the database after establishing a corresponding relationship with the UR L address, and accordingly, after obtaining a title corresponding to each document template, the server may perform word segmentation on the title of the preset document template based on a word segmentation program to obtain a keyword corresponding to the preset document template, and as the preset keyword, establish a corresponding relationship among the preset keyword, the UR L address, the document title, and the necessary fields, and store the keyword in the database, so as to obtain a target document template according to the corresponding relationship table.
Specifically, after the target user inputs the target content in the instant messaging software and triggers the message sending control, the server may receive HTTP request information, where the request information may include target user information and session content information, that is, target content information.
And S320, extracting the keyword information in the conversation content to be used as a target keyword phrase.
Specifically, a word segmentation tool or a word segmentation program may be used to segment words of the dialog content, optionally, words such as nouns and adjectives in the dialog content are reserved, the reserved words are used as target keywords, and a set of all the target keywords is used as a target keyword phrase.
In this embodiment, a keyword extracted from the dialogue content is used as the target keyword.
S330, reading preset keywords which are stored in the database in advance and correspond to each preset document template.
After the target keyword phrases are obtained, preset keywords corresponding to the preset document templates can be sequentially obtained from the corresponding relation table.
S340, calculating a word similarity value between each preset keyword in the preset document template and the target keyword.
Specifically, a keyword matching algorithm is adopted to calculate word similarity values between each target keyword in the target keyword phrase and each preset keyword in the same preset document template. Repeating the steps can obtain the word similarity value of each target keyword in the target keyword phrase and each preset keyword in the preset document template.
Illustratively, the target keyword phrase includes two keywords, which are denoted as a and B, respectively, and the preset keywords of one preset document template S include two keywords, which are denoted as C and D. Respectively calculating the word similarity value between A and C, and recording as M1And the word similarity value between A and D, denoted as M2(ii) a Then, the word similarity value between B and C is calculated and is marked as M3And the word similarity value between B and D, denoted as M4To M1、M2、M3And M4And accumulating the values to obtain the total similarity value of the target keyword phrase and the preset document template C.
Optionally, the word similarity between the target keyword and the preset keyword is calculated, that is, the word similarity between the target keyword a and the preset keyword C is calculated by using the following formula. Respectively determining the target character string length of the target keyword a and the preset character string length of the preset keyword C, wherein at this time, the word similarity value between a and C is (target character string length + preset character string length-edit distance)/(target character string length + preset character string length), and the edit distance is the required character string length when the target keyword is converted into the preset keyword.
And S350, summing the similarity values to obtain a total similarity value, taking the corresponding document template with the highest total similarity as a document template to be copied, and recording as a target document template to be processed.
Specifically, a keyword matching algorithm is adopted to calculate a target keyword phrase, word similarity values between preset keywords corresponding to all preset document templates are calculated, and the word similarity values are accumulated to obtain a total similarity value between the target keyword phrase and each preset document template. And taking the preset document template with the highest total similarity value as a document template to be copied, namely taking the document template corresponding to the highest total similarity value as a target document template to be processed.
After determining the document template to be copied, the document template needs to be stored to the target location.
As shown in fig. 4, the method includes:
s401, reading necessary fields in a title associated with the document from a database.
Specifically, the correspondence table stored in the database is read, the title corresponding to the target document to be processed is determined, and necessary fields corresponding to the title are determined, and optionally, the necessary fields are the name and the class.
S402, splicing the necessary fields and the titles of the document templates together by using the connection symbols to obtain new titles.
Specifically, after the necessary field corresponding to the target document template to be processed is determined, the necessary field and the title of the document template may be spliced together by using a connection symbol to obtain a new title. For example, the necessary fields are name and class, then the new title generated is: name-class-original title. And the original title is the original title corresponding to the target document template to be processed in the corresponding relation table.
S403, reading personal information of a target user from the database, judging whether the personal information comprises a mandatory field, and executing S404 if the personal information comprises the mandatory field; if not, go to S405.
Specifically, after a new title corresponding to the target document template to be processed is generated, whether the personal information of the target user exists or not, optionally, information such as an account number, a login name, and a name, may be read from the database. Reading whether the personal information comprises the necessary field, if so, updating the necessary field information in the header, namely executing S404; if not, the same format of identifier is generated, i.e., S405 is executed, which is beneficial in facilitating management of each document template.
And S404, changing the value of the necessary field in the header.
That is, when the necessary field is included in the personal information, the value of the necessary field is changed to information corresponding to the personal information of the user according to the personal information, optionally, the name of the user, lie XX is included in the personal information; the class is 3 classes, then the title may be: plum XX-3 class-original title.
S405, generating the title in the same format.
That is, the personal information does not include necessary fields, and then the same format of title is generated for the user to uniformly manage. The method has the advantage of avoiding the technical problem of inconvenient management due to non-uniform title information of the document template generated at last.
S406, copying a target document template in the same title format, inquiring whether a file storage path corresponding to the document template exists or not, and if so, executing S407; if not, go to step S408.
Specifically, an API interface is called to copy a target document template in the same format, and whether a file storage path corresponding to the target document template exists is inquired.
If yes, storing the target document template to a target position according to the storage path, namely executing S407; and if the storage path corresponding to the target document template does not exist, creating a new folder so as to store the target document template into the new folder.
And S407, creating a new folder, and associating the new folder with the document template.
Specifically, when a storage path corresponding to the target document template does not exist in the database, a new folder may be established. For the convenience of next calling, a storage path corresponding to the new folder can be bound with the target document template, so that the target document template can be stored according to the storage path when being called.
S408, storing the file in a corresponding folder, transferring the ownership of the file to the user, and associating the user with the copied file.
Specifically, the target document template is stored in the target folder, and ownership of the document is transferred to the user, that is, the user can edit the document template in the folder.
To facilitate invocation of the target document template, the target document template may be bound to the target user for subsequent invocation.
S409, regularly reading the title of the copied document, detecting whether the mandatory fields in the title change, and if so, executing S410; if not, S411 is executed.
It should be noted that, in order to further improve the calling efficiency of the document template, a timing monitoring mechanism may be set in the server, and is used for periodically monitoring whether the copied document title changes. If the change occurs, executing S410; if not, S411 is executed.
The advantage of establishing the timing task is that the necessary field information filled by the user can be read and stored in the database, and when the downloaded document template needs to be filled with the necessary field information, automatic filling can be realized.
And S410, reading the value of the mandatory field, and associating the field value with the user.
That is, if the title of the target document template in the target folder is changed, the necessary field information can be read and bound with the target user, so that the title of the target document template can be automatically updated after the target document template is called next time.
The method has the advantages that the document template can be automatically copied, after the user fills in the personal information in sequence, the personal information can be directly acquired during subsequent calling, and the title of the document template is automatically updated during downloading of the document template.
And S411, ending.
Namely, after the target document is obtained, the task execution of acquiring the target document is finished.
According to the technical scheme of the embodiment, when the target content is monitored, a word segmentation program is called to extract each keyword in the target content to serve as a target keyword phrase, and a keyword matching algorithm is adopted to calculate the total similarity value between the target keyword phrase and each preset document template; acquiring a target document template to be processed based on the total similarity value, and calling a document template processing program to process the target document template to be processed to obtain a target document template; the target document template is stored to the target position based on the document template storage program, so that the problems that in the prior art, a user needs to manually search the required document template, manually copy the target document template when finding the target document template, and paste the target document template to the target storage position are solved; when a user needs to download a plurality of document templates, the operation needs to be repeatedly executed, the technical problems of machinery, complexity and manpower waste exist, the target document template corresponding to the target content is automatically matched, the title of the target document is changed into the same format, and the target document template is automatically stored to the target position, so that the convenience of obtaining the document template is improved, and the technical effect of user experience is improved.
Example four
Fig. 6 is a schematic structural diagram of a document template invoking device according to a fourth embodiment of the present disclosure, and as shown in fig. 6, the device includes: a keyword acquisition module 610, a total similarity value determination module 620, a target document template determination module 630 and a target document template storage module 640;
the keyword acquisition module 610 is configured to, when target content is monitored, invoke a word segmentation program to extract at least one keyword in the target content, where the keyword is used as a target keyword phrase; a total similarity value determining module 620, configured to calculate a total similarity value between the target keyword group and each preset document template by using a keyword matching algorithm; a target document template determining module 630, configured to obtain a target document template to be processed based on the total similarity value, and invoke a document template processing program to process the target document template to be processed, so as to obtain a target document template; and the target document template storage module 640 is used for storing the target document template to a target position based on the document template storage program.
On the basis of the above technical solution, the apparatus further includes: a preset document template obtaining unit, a preset keyword obtaining unit and a corresponding relation table determining unit;
the preset document template acquisition unit is used for acquiring a plurality of preset document templates and determining a UR L address corresponding to each preset document template;
the preset keyword acquisition unit is used for acquiring a title of the preset document template and performing word segmentation processing on the title to obtain at least one keyword corresponding to the title, and the keyword is used as a preset keyword corresponding to the preset document template;
and the corresponding relation table determining unit is used for establishing a corresponding relation table among the title corresponding to the preset document template, the preset keyword and the UR L address so as to obtain the target document template to be processed corresponding to the target keyword phrase based on the corresponding relation table.
On the basis of the above technical solutions, the total similarity value determining module includes:
the word similarity value determining unit is used for calculating the word similarity value between each target keyword in the target keyword phrase and each preset keyword corresponding to the same preset document template by adopting a keyword matching algorithm;
and the total similarity value accumulation unit is used for accumulating the obtained at least one word similarity value to obtain a total similarity value between the target keyword phrase and the preset document template.
On the basis of the above technical solutions, the word similarity determining unit is further configured to:
calculating the editing distance between one target keyword in the target keyword phrase and the current preset keyword corresponding to the same preset document template; the editing distance is the length of a character string edited when the preset keyword is edited into the target keyword;
determining a target character string length of the target keyword and a preset character string length of the current preset keyword, and obtaining a first value to be processed based on the target character string length and the preset character string length;
on the basis of the technical solutions, the target document template determining module is further configured to screen out a highest total similarity value from all total similarity values, determine a preset keyword of a preset document template corresponding to the highest total similarity value, determine a UR L address corresponding to the preset keyword based on the correspondence table, and obtain the target document template to be processed based on the UR L address.
On the basis of the above technical solutions, the target document template determining module is further configured to:
and acquiring target user information corresponding to the target content by calling a document template processing program, and updating the title of the target document template to be processed based on the target user information to obtain the target document template.
On the basis of the technical solutions, the target document template storage module is further configured to invoke a document invoking module to invoke the target document template, and determine whether a storage path corresponding to the target document template exists based on the document template storage program;
if yes, storing the target document template to a target position according to the storage path;
if not, establishing a new folder to store the target document template, and binding a storage path corresponding to the new folder with the target document template, so that the target document template is stored to a target position based on a binding relation when the target document is called.
On the basis of the above technical solutions, the apparatus further includes:
the timing detection unit is used for reading the title information of the target document template in the target position based on a timing monitoring mechanism;
and the title updating unit is used for acquiring the title information and storing the title information into a database corresponding to a user when monitoring that the target field in the title information changes, so that the title information of the target document template is automatically updated when the target document template is acquired.
According to the technical scheme of the embodiment, when the target content is monitored, a word segmentation program is called to extract each keyword in the target content to serve as a target keyword phrase, and a keyword matching algorithm is adopted to calculate the total similarity value between the target keyword phrase and each preset document template; acquiring a target document template to be processed based on the total similarity value, and calling a document template processing program to process the target document template to be processed to obtain a target document template; the target document template is stored to the target position based on the document template storage program, so that the problems that in the prior art, a user needs to manually search the required document template, manually copy the target document template when finding the target document template, and paste the target document template to the target storage position are solved; when a user needs to download a plurality of document templates, the operation needs to be repeatedly executed, the technical problems of machinery, complexity and manpower waste exist, the target document template corresponding to the target content is automatically matched, the title of the target document is changed into the same format, and the target document template is automatically stored to the target position, so that the convenience of obtaining the document template is improved, and the technical effect of user experience is improved.
The calling device of the document template provided by the embodiment of the disclosure can execute the calling method of the document template provided by any embodiment of the disclosure, and has the corresponding functional module and the beneficial effect of the execution method.
It should be noted that, the units and modules included in the apparatus are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only used for distinguishing one functional unit from another, and are not used for limiting the protection scope of the embodiments of the present disclosure.
EXAMPLE five
Referring now to fig. 7, a schematic diagram of an electronic device (e.g., the terminal device or server of fig. 7) 70 suitable for implementing embodiments of the present disclosure is shown. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 7 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 7, the electronic device 70 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 701 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)702 or a program loaded from a storage means 706 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data necessary for the operation of the electronic apparatus 70 are also stored. The processing device 701, the ROM 702, and the RAM 703 are connected to each other by a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
In general, input devices 706 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc., output devices 707 including, for example, a liquid crystal display (L CD), speaker, vibrator, etc., storage devices 706 including, for example, magnetic tape, hard disk, etc., and communication devices 709. communication devices 709 may allow electronic device 70 to communicate wirelessly or wiredly with other devices to exchange data.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 709, or may be installed from the storage means 706, or may be installed from the ROM 702. The computer program, when executed by the processing device 701, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
The terminal provided by the embodiment of the present disclosure and the method for calling the document template provided by the embodiment belong to the same inventive concept, and technical details that are not described in detail in the embodiment of the present disclosure may refer to the embodiment, and the embodiment of the present disclosure have the same beneficial effects.
EXAMPLE seven
The embodiment of the disclosure provides a computer storage medium, on which a computer program is stored, and the program is executed by a processor to realize the method for calling the document template provided by the embodiment.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText transfer protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communications network). examples of communications networks include local area networks ("L AN"), wide area networks ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to:
when target content is monitored, calling a word segmentation program to extract at least one keyword in the target content to serve as a target keyword phrase;
calculating the total similarity value between the target keyword phrase and each preset document template by adopting a keyword matching algorithm;
acquiring a target document template to be processed based on the total similarity value, and calling a document template processing program to process the target document template to be processed to obtain a target document template;
and storing the target document template to a target position based on a document template storage program.
If the sub-page services are present in the sub-scope container, then returning the sub-page services may write computer program code for performing the operations of the present disclosure in one or more programming languages, including but not limited to AN object oriented programming language such as Java, Smalltalk, C + +, and also conventional procedural programming languages, such as the "C" or similar programming languages.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of a unit does not in some cases constitute a limitation on the unit itself, for example, the presentation module may also be described as a "material display module".
For example, without limitation, exemplary types of hardware logic that may be used include Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), complex programmable logic devices (CP L D), and so forth.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
According to one or more embodiments of the present disclosure, [ example one ] there is provided a method of calling a document template, the method comprising:
when target content is monitored, calling a word segmentation program to extract at least one keyword in the target content to serve as a target keyword phrase;
calculating the total similarity value between the target keyword phrase and each preset document template by adopting a keyword matching algorithm;
acquiring a target document template to be processed based on the total similarity value, and calling a document template processing program to process the target document template to be processed to obtain a target document template;
and storing the target document template to a target position based on a document template storage program.
According to one or more embodiments of the present disclosure, [ example two ] there is provided a method of calling a document template, further comprising:
optionally, when the target content is monitored, invoking a word segmentation program to extract at least one keyword in the target content, and before the keyword is used as a target keyword phrase, the method further includes:
acquiring a plurality of preset document templates, and determining a UR L address corresponding to each preset document template;
acquiring a title of the preset document template, and performing word segmentation processing on the title to obtain at least one keyword corresponding to the title, wherein the keyword is used as a preset keyword corresponding to the preset document template;
and establishing a corresponding relation table among the title, the preset keyword and the UR L address corresponding to the preset document so as to obtain a target document template to be processed corresponding to the target keyword phrase based on the corresponding relation table.
According to one or more embodiments of the present disclosure, [ example three ] there is provided a method of calling a document template, further comprising:
optionally, the calculating, by using a keyword matching algorithm, a total similarity value between the target keyword phrase and each preset document template includes:
calculating word similarity values between each target keyword in the target keyword phrase and each preset keyword corresponding to the same preset document template by adopting a keyword matching algorithm;
and accumulating the obtained at least one word similarity value to obtain a total similarity value between the target keyword phrase and the preset document template.
According to one or more embodiments of the present disclosure, [ example four ] there is provided a method of calling a document template, further comprising:
optionally, the calculating, by using a keyword matching algorithm, a word similarity value between each target keyword in the target keyword phrase and each preset keyword corresponding to the same preset document template includes:
calculating the editing distance between one target keyword in the target keyword phrase and the current preset keyword corresponding to the same preset document template; the editing distance is the length of a character string edited when the preset keyword is edited into the target keyword;
determining a target character string length of the target keyword and a preset character string length of the current preset keyword, and obtaining a first value to be processed based on the target character string length and the preset character string length;
and obtaining a word similarity value between the target keyword and the preset keyword based on the first value to be processed and the editing distance.
According to one or more embodiments of the present disclosure, [ example five ] there is provided a method of calling a document template, further comprising:
optionally, obtaining the target document template to be processed based on the total similarity value and a pre-established correspondence table includes:
screening out the highest total similarity value from all the total similarity values, determining a preset keyword of a preset document template corresponding to the highest total similarity value, determining a UR L address corresponding to the preset keyword based on the corresponding relation table, and acquiring the target document template to be processed based on the UR L address.
According to one or more embodiments of the present disclosure, [ example six ] there is provided a method of calling a document template, further comprising:
optionally, the invoking the document template processing program to process the target document template to be processed to obtain the target document template includes:
and acquiring target user information corresponding to the target content by calling a document template processing program, and updating the title of the target document template to be processed based on the target user information to obtain the target document template.
According to one or more embodiments of the present disclosure, [ example seven ] there is provided a method of calling a document template, further comprising:
optionally, the storing the target document template to the target location based on the document template storage program includes:
calling a document calling module to call the target document template, and determining whether a storage path corresponding to the target document template exists based on the document template storage program;
if yes, storing the target document template to a target position according to the storage path;
if not, establishing a new folder to store the target document template, and binding a storage path corresponding to the new folder with the target document template, so that the target document template is stored to a target position based on a binding relation when the target document is called.
According to one or more embodiments of the present disclosure, [ example eight ] there is provided a method of calling a document template, further comprising:
optionally, after storing the target document template to the target location, the method further includes:
reading the title information of the target document template in the target position based on a timing monitoring mechanism;
when the change of the target field in the header information is monitored, the header information is obtained and stored in a database corresponding to a user, so that the header information of the target document template is automatically updated when the target document template is obtained.
According to one or more embodiments of the present disclosure, [ example nine ] there is provided an invoking device of a document template, the device comprising
The keyword acquisition module is used for calling a word segmentation program to extract at least one keyword in the target content as a target keyword phrase when the target content is monitored;
the total similarity value determining module is used for calculating the total similarity value between the target key phrase and each preset document template by adopting a key word matching algorithm;
the target document template determining module is used for obtaining a target document template to be processed based on the total similarity value, and calling a document template processing program to process the target document template to be processed to obtain a target document template;
and the target document template storage module is used for storing the target document template to a target position based on the document template storage program.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.
Claims (11)
1. A method for calling a document template is characterized by comprising the following steps:
when target content is monitored, calling a word segmentation program to extract at least one keyword in the target content to serve as a target keyword phrase;
calculating the total similarity value between the target keyword phrase and each preset document template by adopting a keyword matching algorithm;
acquiring a target document template to be processed based on the total similarity value, and calling a document template processing program to process the target document template to be processed to obtain a target document template;
and storing the target document template to a target position based on a document template storage program.
2. The method of claim 1, wherein when the target content is monitored, a word segmentation program is invoked to extract at least one keyword in the target content, and before the keyword is used as a target keyword phrase, the method further comprises:
acquiring a plurality of preset document templates, and determining a UR L address corresponding to each preset document template;
acquiring a title of the preset document template, and performing word segmentation processing on the title to obtain at least one keyword corresponding to the title, wherein the keyword is used as a preset keyword corresponding to the preset document template;
and establishing a corresponding relation table among the title corresponding to the preset document template, the preset keyword and the UR L address so as to obtain a target document template to be processed corresponding to the target keyword phrase based on the corresponding relation table.
3. The method according to claim 1, wherein said calculating a total similarity value between said target keyword phrase and each preset document template by using a keyword matching algorithm comprises:
calculating word similarity values between each target keyword in the target keyword phrase and each preset keyword corresponding to the same preset document template by adopting a keyword matching algorithm;
and accumulating the obtained at least one word similarity value to obtain a total similarity value between the target keyword phrase and the preset document template.
4. The method according to claim 3, wherein said calculating a word similarity value between each target keyword in the target keyword phrase and each preset keyword corresponding to the same preset document template by using a keyword matching algorithm comprises:
calculating the editing distance between one target keyword in the target keyword phrase and the current preset keyword corresponding to the same preset document template; the editing distance is the length of a character string edited when the preset keyword is edited into the target keyword;
determining a target character string length of the target keyword and a preset character string length of the current preset keyword, and obtaining a first value to be processed based on the target character string length and the preset character string length;
and obtaining a word similarity value between the target keyword and the preset keyword based on the first value to be processed and the editing distance.
5. The method according to claim 2, wherein obtaining the target document template to be processed based on the total similarity value and a pre-established correspondence table comprises:
screening out the highest total similarity value from all the total similarity values, determining a preset keyword of a preset document template corresponding to the highest total similarity value, determining a UR L address corresponding to the preset keyword based on the corresponding relation table, and acquiring the target document template to be processed based on the UR L address.
6. The method according to claim 1, wherein the invoking document template handler processes the target document template to be processed to obtain a target document template, comprising:
and acquiring target user information corresponding to the target content by calling a document template processing program, and updating the title of the target document template to be processed based on the target user information to obtain the target document template.
7. The method of claim 1, wherein storing the target document template to a target location based on a document template storage program comprises:
calling a document calling module to call the target document template, and determining whether a storage path corresponding to the target document template exists based on the document template storage program;
if yes, storing the target document template to a target position according to the storage path;
if not, establishing a new folder to store the target document template, and binding a storage path corresponding to the new folder with the target document template, so that the target document template is stored to a target position based on a binding relation when the target document template is called.
8. The method of claim 1, further comprising, after depositing the target document template to a target location:
reading the title information of the target document template in the target position based on a timing monitoring mechanism;
when the change of the target field in the header information is monitored, the header information is obtained and stored in a database corresponding to a user, so that the header information of the target document template is automatically updated when the target document template is obtained.
9. A device for calling a document template is characterized by comprising
The keyword acquisition module is used for calling a word segmentation program to extract at least one keyword in the target content as a target keyword phrase when the target content is monitored; the total similarity value determining module is used for calculating the total similarity value between the target key phrase and each preset document template by adopting a key word matching algorithm;
the target document template determining module is used for obtaining a target document template to be processed based on the total similarity value, and calling a document template processing program to process the target document template to be processed to obtain a target document template;
and the target document template storage module is used for storing the target document template to a target position based on the document template storage program.
10. An electronic device, characterized in that the electronic device comprises:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a method of calling a document template as recited in any of claims 1-8.
11. A storage medium containing computer-executable instructions for performing the method of calling a document template as recited in any one of claims 1-8 when executed by a computer processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010196721.XA CN111414743B (en) | 2020-03-19 | 2020-03-19 | Method and device for calling document template, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010196721.XA CN111414743B (en) | 2020-03-19 | 2020-03-19 | Method and device for calling document template, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111414743A true CN111414743A (en) | 2020-07-14 |
CN111414743B CN111414743B (en) | 2023-09-05 |
Family
ID=71491240
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010196721.XA Active CN111414743B (en) | 2020-03-19 | 2020-03-19 | Method and device for calling document template, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111414743B (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112199933A (en) * | 2020-10-27 | 2021-01-08 | 冠群信息技术(南京)有限公司 | License template-based format conversion method |
CN112711937A (en) * | 2021-01-18 | 2021-04-27 | 腾讯科技(深圳)有限公司 | Template recommendation method, device, equipment and storage medium |
CN114118973A (en) * | 2021-12-01 | 2022-03-01 | 中国建设银行股份有限公司 | Creative template generation method and device |
CN116804691A (en) * | 2023-06-28 | 2023-09-26 | 国网安徽省电力有限公司青阳县供电公司 | Fault monitoring method for dispatching automation equipment of power system |
CN117151051A (en) * | 2023-09-18 | 2023-12-01 | 上海鸿翼软件技术股份有限公司 | Document processing method, device, equipment and medium |
CN117829116A (en) * | 2023-12-27 | 2024-04-05 | 青矩技术股份有限公司 | Document adjustment method, device, equipment and storage medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120051657A1 (en) * | 2010-08-30 | 2012-03-01 | Microsoft Corporation | Containment coefficient for identifying textual subsets |
CN104679742A (en) * | 2013-11-26 | 2015-06-03 | 富士通株式会社 | Information processing method and device |
CN107728995A (en) * | 2017-11-28 | 2018-02-23 | 北京洪泰同创信息技术有限公司 | A kind of technical documentation auxiliary writing system and method |
CN109190111A (en) * | 2018-08-07 | 2019-01-11 | 北京奇艺世纪科技有限公司 | A kind of document text keyword extracting method and device |
CN110377558A (en) * | 2019-06-14 | 2019-10-25 | 平安科技(深圳)有限公司 | Document searching method, device, computer equipment and storage medium |
CN110674627A (en) * | 2019-08-30 | 2020-01-10 | 深圳壹账通智能科技有限公司 | Document generation method, device, equipment and storage medium |
US20200074169A1 (en) * | 2018-08-31 | 2020-03-05 | Accenture Global Solutions Limited | System And Method For Extracting Structured Information From Image Documents |
-
2020
- 2020-03-19 CN CN202010196721.XA patent/CN111414743B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120051657A1 (en) * | 2010-08-30 | 2012-03-01 | Microsoft Corporation | Containment coefficient for identifying textual subsets |
CN104679742A (en) * | 2013-11-26 | 2015-06-03 | 富士通株式会社 | Information processing method and device |
CN107728995A (en) * | 2017-11-28 | 2018-02-23 | 北京洪泰同创信息技术有限公司 | A kind of technical documentation auxiliary writing system and method |
CN109190111A (en) * | 2018-08-07 | 2019-01-11 | 北京奇艺世纪科技有限公司 | A kind of document text keyword extracting method and device |
US20200074169A1 (en) * | 2018-08-31 | 2020-03-05 | Accenture Global Solutions Limited | System And Method For Extracting Structured Information From Image Documents |
CN110377558A (en) * | 2019-06-14 | 2019-10-25 | 平安科技(深圳)有限公司 | Document searching method, device, computer equipment and storage medium |
CN110674627A (en) * | 2019-08-30 | 2020-01-10 | 深圳壹账通智能科技有限公司 | Document generation method, device, equipment and storage medium |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112199933A (en) * | 2020-10-27 | 2021-01-08 | 冠群信息技术(南京)有限公司 | License template-based format conversion method |
CN112711937A (en) * | 2021-01-18 | 2021-04-27 | 腾讯科技(深圳)有限公司 | Template recommendation method, device, equipment and storage medium |
CN112711937B (en) * | 2021-01-18 | 2022-06-24 | 腾讯科技(深圳)有限公司 | Template recommendation method, device, equipment and storage medium |
CN114118973A (en) * | 2021-12-01 | 2022-03-01 | 中国建设银行股份有限公司 | Creative template generation method and device |
CN116804691A (en) * | 2023-06-28 | 2023-09-26 | 国网安徽省电力有限公司青阳县供电公司 | Fault monitoring method for dispatching automation equipment of power system |
CN116804691B (en) * | 2023-06-28 | 2024-02-13 | 国网安徽省电力有限公司青阳县供电公司 | Fault monitoring method for dispatching automation equipment of power system |
CN117151051A (en) * | 2023-09-18 | 2023-12-01 | 上海鸿翼软件技术股份有限公司 | Document processing method, device, equipment and medium |
CN117829116A (en) * | 2023-12-27 | 2024-04-05 | 青矩技术股份有限公司 | Document adjustment method, device, equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN111414743B (en) | 2023-09-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111414743A (en) | Method and device for calling document template, electronic equipment and storage medium | |
CN110941708B (en) | Intelligent question and answer library establishing method, intelligent question and answer method and device and computer equipment | |
CN111400625B (en) | Page processing method and device, electronic equipment and computer readable storage medium | |
CA3061623C (en) | File sending in instant messaging applications | |
US20240004917A1 (en) | Data processing method and device, terminal, and storage medium | |
CN111857720B (en) | User interface state information generation method and device, electronic equipment and medium | |
CN112257478A (en) | Code scanning method, device, terminal and storage medium | |
CN114995691B (en) | Document processing method, device, equipment and medium | |
CN111382365B (en) | Method and device for outputting information | |
CN114997114A (en) | Document updating method, device, equipment and medium | |
CN111797353A (en) | Information pushing method and device and electronic equipment | |
CN110704050A (en) | Module initialization method, device, electronic equipment and computer readable storage medium | |
CN107291864B (en) | Searching method and device and electronic equipment | |
WO2022184037A1 (en) | Document processing method, apparatus and device, and medium | |
CN115017110A (en) | Information processing method, device, terminal and storage medium | |
CN114239501A (en) | Contract generation method, apparatus, device and medium | |
CN113360704A (en) | Voice playing method and device and electronic equipment | |
CN113807056A (en) | Method, device and equipment for correcting error of document name sequence number | |
CN111488495A (en) | Information processing method and device | |
CN111581930A (en) | Online form data processing method and device, electronic equipment and readable medium | |
CN111783440A (en) | Intention recognition method and device, readable medium and electronic equipment | |
CN111753238A (en) | Data mapping method and device and electronic equipment | |
CN111399902A (en) | Client source file processing method and device, readable medium and electronic equipment | |
CN111787043A (en) | Data request method and device | |
CN115208960B (en) | Protocol switching method and related equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |