CN111414743B - 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 PDF

Info

Publication number
CN111414743B
CN111414743B CN202010196721.XA CN202010196721A CN111414743B CN 111414743 B CN111414743 B CN 111414743B CN 202010196721 A CN202010196721 A CN 202010196721A CN 111414743 B CN111414743 B CN 111414743B
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.)
Active
Application number
CN202010196721.XA
Other languages
Chinese (zh)
Other versions
CN111414743A (en
Inventor
彭源
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202010196721.XA priority Critical patent/CN111414743B/en
Publication of CN111414743A publication Critical patent/CN111414743A/en
Application granted granted Critical
Publication of CN111414743B publication Critical patent/CN111414743B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/90335Query processing
    • G06F16/90344Query processing by using string matching techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • G06F16/9566URL specific, e.g. using aliases, detecting broken or misspelled links
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE 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/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Computational Linguistics (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the disclosure discloses a method, a device, an electronic device and a storage medium for calling a document template, wherein the method comprises the following steps: when the target content is monitored, extracting keywords in the target content to be used 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 the target document template; the target document template is stored to the target location based on the document template storage program. According to the technical scheme, the technical problems that in the prior art, when a user needs to download a plurality of document templates, operations of searching, downloading and changing the document titles need to be repeatedly executed are solved, mechanical, tedious and manpower-wasting are solved, and convenience in acquiring the document templates and technical effects of user experience are improved.

Description

Method and device for calling document template, electronic equipment and storage medium
Technical Field
The embodiment of the disclosure relates to the technical field of computers, in particular to a method and a device for calling a document template, electronic equipment and a storage medium.
Background
In daily work, there are situations where it is necessary to fill in content according to a certain document template, which is often an online document, or other external document, optionally a Google DOC. When a user uses a document template, the user needs to search for the required document template first, then manually copy the document template, and manually change the title information of the document template after storing the copied document template in a target position. When a user needs to download a plurality of document templates, the above operations need to be repeatedly performed, and there are technical problems of mechanical operation, complexity and waste of manpower.
Disclosure of Invention
The embodiment of the disclosure provides a method, a device, electronic equipment and a storage medium for calling a document template, 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, invoking a word segmentation program to extract at least one keyword in the target content 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;
the target document template is stored to a target location based on a document template storage program.
In a second aspect, an embodiment of the present disclosure further provides a device for calling a document template, where the device includes
The keyword acquisition module is used for calling a word segmentation program to extract at least one keyword in the target content when the target content is monitored, and the keyword is used as a target keyword phrase;
the total similarity value determining module is used for calculating the total similarity value between the target keyword group and each preset document template by adopting a keyword 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 a document template storage program.
In a third aspect, embodiments of the present disclosure further provide an electronic device, including:
one or more processors;
storage means for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement a method of invoking a document template as described 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 that, when executed by a computer processor, are used to perform a method of invoking a document template according to any of the disclosed embodiments.
According to the technical scheme, when the target content is monitored, a word segmentation program is called to extract each keyword in the target content, the keywords are used as target keyword phrases, and a keyword matching algorithm is adopted to calculate the total similarity value between the target keyword phrases 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 the target document template; based on a document template storage program, storing a target document template to a target position, solving the problems that in the prior art, a user needs to manually search a required document template, manually copy the target document template when searching the target document template, and paste the target document template to the target storage position; when a user needs to download a plurality of document templates, the above operation needs to be repeatedly executed, so that the technical problems of machinery, complexity and manpower waste are solved, the automatic matching of the target document templates corresponding to target contents is realized, the titles of the target documents are changed into the same format, and meanwhile, the target documents are automatically stored to the target positions, so that the convenience of acquiring the document templates is improved, and the technical effects of user experience are improved.
Drawings
The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. The same or similar reference numbers will be used throughout the drawings to refer to the same or like elements. It should be understood that the figures are schematic and that elements and components are not necessarily drawn to scale.
FIG. 1 is a flowchart of a method for calling a document template according to an embodiment of the present disclosure;
FIG. 2 is a flowchart of another method for calling a document template according to a second embodiment of the present disclosure;
FIG. 3 is another flow chart of a method for calling a document template according to a third embodiment of the present disclosure;
FIG. 4 is another flow chart of a method for calling a document template according to the third embodiment of the present disclosure;
FIG. 5 is another flow chart of a method for calling a document template according to the third embodiment of the present disclosure;
FIG. 6 is a schematic diagram of a document template calling device 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 have been shown in the accompanying 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 are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present 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. Furthermore, 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 "including" and variations thereof as used herein are intended to be 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. Related definitions of other terms will be given in the description below.
It should be noted that the terms "first," "second," and the like in this disclosure are merely used to distinguish between different devices, modules, or units and are not used to define an order or interdependence of functions performed by the devices, modules, or units.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be understood as "one or more" unless the context clearly indicates otherwise.
Example 1
Fig. 1 is a schematic flow chart of a method for calling a document template according to an embodiment of the present disclosure, where the embodiment of the present disclosure may be applicable to a case of automatically obtaining each document template, where the method may be performed by a calling device of the document template, where the device may be implemented in a form of software and/or hardware, and optionally, may be implemented by an electronic device, where the electronic device may be a mobile terminal, a PC end, or the like.
As shown in fig. 1, the method of the present embodiment includes:
s110, when the target content is monitored, invoking a word segmentation program to extract at least one keyword in the target content, and taking the keyword as a target keyword phrase.
It should be noted that, the technical solution of the embodiment of the present disclosure may be executed by an application program that obtains a document template, and optionally, an application program that downloads the document template; program codes for acquiring the document templates can also be set in instant messaging software, and when target content is monitored, the target content is processed to acquire the document templates corresponding to the target content, that is, a message monitor program can be set for receiving target content information.
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 of the acquisition target document. And taking a program for extracting keywords in the target content as a word segmentation program. The number of keywords in the target content may be one, two or more, etc., and a set of keywords extracted from the target content is used as a target keyword phrase. That is, the target keyword group includes at least one keyword, each keyword being extracted from the target content.
Specifically, when the target user inputs the target content, i.e. text information, in the instant messaging software and triggers the message sending control, the server corresponding to the instant messaging software can receive the target content information and can acquire the target user information corresponding to the target content information. After the server receives the target content, the 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.
The method includes the steps that a user inputs target content of a 'score-obtaining ranking template' in instant messaging software, after a message sending control is triggered, a server corresponding to the instant messaging software can receive the target content of the 'score-obtaining ranking template', a word segmentation program is called to segment the 'score-obtaining ranking template', words such as nouns and adjectives in the 'score-obtaining ranking template' are reserved, and the reserved words are used as target keywords. Optionally, the vocabulary reserved in the target content is: the score ranking and the template, namely the keywords extracted from the target content are the score ranking and the template, and the score ranking and the template can be used as target keyword phrases.
S120, calculating the total similarity value between the target keyword phrase and each preset document template by adopting a keyword matching algorithm.
Wherein, an algorithm adopted when determining the similarity value between each keyword and the preset document template is used as a keyword matching algorithm. The preset document templates refer to preset document templates corresponding to different application scenes, and optional achievement ranking templates, work report templates 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, since 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 by calculating the similarity value between each target keyword and the preset document.
Specifically, one of target keywords in target keyword phrases 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 the similarity value between the target keyword and the document template to be determined by adopting a keyword matching algorithm, and similarly, determining the similarity value between each target keyword and the document template to be determined in the target keyword phrase, and accumulating all obtained similarity values to obtain the total similarity value between 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.
The target keyword phrase includes two target keywords, namely A and B, respectively, and the number of the preset document templates is 10, namely C 1 、C 2 、C 3 …C 10 Can preset the document template C 1 As a document template to be determined. Calculating a target keyword A and a document template C to be determined by adopting a keyword matching algorithm 1 Similarity between the two is recorded as M 1 The method comprises the steps of carrying out a first treatment on the surface of the Calculating a target keyword B and a document template C to be determined by adopting a keyword matching algorithm 1 Similarity between the two is recorded as M 2 The method comprises the steps of carrying out a first treatment on the surface of the The total similarity value between the target keyword phrase and the document template to be determined is recorded as MC 1 Then m=m 1 +M 2 . By analogy, C 2 、C 3 …C 10 And respectively serving as a document template 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 acquire the target document template.
The target document template to be processed can be understood as a document template corresponding to the target content. The document template processing program refers to an application program for reprocessing a document template, and optionally adds a title to a target document template to be processed. The document title may be added, or a document template may be stored to a target location as a target document template.
Specifically, after determining the total similarity value between the target keyword phrase and each preset document template, the target preset document template can be selected 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.
S140, storing the target document template to the target position based on the document template storage program.
The document template storage program may be a pre-written program code for storing the target document to a preset location. The target location refers to a storage location corresponding to the target document template.
It should be noted that, the storage paths corresponding to the preset document templates may be predetermined in the server, or, of course, the storage paths corresponding to the preset document templates may not be established, and the user may determine whether to establish the storage paths corresponding to the document templates according to the actual requirements.
Specifically, after determining the target document template, the document template storage program may be invoked to determine whether a storage path corresponding to the target document template exists, if so, store the target document template to a target location according to the storage path, and if not, establish a target folder to store the target document in the target folder.
Optionally, 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, a new folder is established to store the target document template, and a storage path corresponding to the new folder is bound with the target document template, so that when the target document template is called, the target document template is stored to a target position based on a binding relation.
That is, when the target document template is stored by the document template storage program after the document calling module is called to acquire the target document, the document template storage program may determine in advance whether or not there is a storage path corresponding to the target document template. If so, 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 relation.
It can be understood that in this embodiment, according to the target content information, the program may automatically copy the target document template with the highest association degree with the target content information, and automatically store the target document template in the target folder, thereby improving the efficiency of acquiring the target document.
According to the technical scheme, when the target content is monitored, a word segmentation program is called to extract each keyword in the target content, the keywords are used as target keyword phrases, and a keyword matching algorithm is adopted to calculate the total similarity value between the target keyword phrases 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 the target document template; based on a document template storage program, storing a target document template to a target position, solving the problems that in the prior art, a user needs to manually search a required document template, manually copy the target document template when searching the target document template, and paste the target document template to the target storage position; when a user needs to download a plurality of document templates, the above operation needs to be repeatedly executed, so that the technical problems of machinery, complexity and manpower waste are solved, the automatic matching of the target document templates corresponding to target contents is realized, the titles of the target documents are changed into the same format, and the target documents are automatically stored to the target positions, so that the convenience of acquiring the document templates is improved, and the technical effect of user experience is improved.
Example two
On the basis of the technical scheme, before the target document templates corresponding to the target content are acquired, a corresponding relation table corresponding to each preset document template is also required to be established, so that after the target content is received, the target document templates consistent with the target content can be screened out of all the preset document templates based on the pre-established corresponding relation table. Fig. 2 is another flow chart of a document template calling method according to a second embodiment of the disclosure, as shown in fig. 2, the method includes:
s210, acquiring a plurality of preset document templates, and determining URL addresses corresponding to each preset document template.
Wherein the number of the preset document templates may be one, two or more. When the preset document template is a local template, the URL address corresponding to the preset document template can be not determined; if the preset document template is an extranet document, optionally, when the Google document is selected, the URL address corresponding to the preset document needs to be determined. The URL address may be understood as a web address for acquiring a preset document template.
Specifically, a plurality of preset document templates are acquired, and network addresses corresponding to the preset document templates are respectively determined.
S220, acquiring a title of a preset document template, and performing word segmentation on the title to obtain at least one keyword corresponding to the title as a preset keyword corresponding to the preset document template.
The title of the preset document template may be understood as the title name of the document template. When the title of the preset document template is acquired, the necessary fields in the title, optionally, the name and the number, can be determined, and the necessary fields are stored in a database. The preset keywords may be templates for characterizing what the document is in order, and optionally, the preset keywords are score and ranking, and then the preset document templates corresponding to the keywords are templates for ranking the score.
Specifically, the server may obtain a preset document template title corresponding to each URL address by calling an API interface. And calling a word segmentation program to perform word segmentation on the titles of the preset document templates to obtain at least one keyword corresponding to each preset document template, wherein the obtained keywords can be used as preset keywords corresponding to the preset document templates.
S230, establishing a corresponding relation table among the title, the preset keyword and the URL address corresponding to the preset document template, and acquiring a target document template to be processed corresponding to the target keyword phrase based on the corresponding relation table.
Specifically, after determining the title, the preset keyword and the URL address corresponding to the preset document template, a correspondence table among the title, the preset keyword and the URL of the preset document template may be established. Meanwhile, a binding relationship between the necessary fields and each preset document template needs to be established, so that after the preset document template is called, the necessary fields corresponding to the preset document template can be determined.
The establishment of the correspondence table has the advantage that when the target document template to be processed is determined according to the total similarity value, the URL address of the target document template to be processed corresponding to the target keyword phrase can be acquired according to the pre-established correspondence table, so that the target document template to be processed can be acquired according to the URL address.
S240, when the target content is monitored, invoking a word segmentation program to extract at least one keyword in the target content as a target keyword phrase.
Specifically, when 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 can receive the target text information, namely the target content information and the target user information corresponding to the target content information. After the server receives the target content, the word segmentation program can be called to extract target keywords such as nouns, adjectives and the like in the target content, and the extracted keywords are collected to be used as target keyword phrases.
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 term 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 preset keywords corresponding to the same preset document template may be one, two or more. Correspondingly, determining the word similarity value between each target keyword in the target keyword phrase and each preset keyword.
Specifically, a keyword matching algorithm is adopted, and a word similarity value between each target keyword in the target keyword phrase and each preset keyword in the same preset document template is calculated.
Illustratively, the target keyword phrase includes two target keywords, denoted as a and B, respectively. The same preset document template comprises two preset keywords which are respectively marked as E and F. A keyword matching algorithm is adopted, and word similarity values of A and E and word similarity values of A and F are calculated respectively; meanwhile, the word similarity value between B and E and the 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 an editing distance between one target keyword in the target keyword phrase and a current preset keyword corresponding to the same preset document template; the editing distance is the length of the character string edited when the preset keyword is edited as the 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.
The edit distance may be understood as a length of a character string required to be edited by converting the target keyword into the preset keyword. The target string length refers to a string length corresponding to the target keyword. The predetermined string length refers to a string length corresponding to a predetermined keyword. The first to-be-processed value is the sum of the target string length and the string length of the preset string length. And taking the preset keywords used in the process of determining the word similarity value as the current preset keywords.
Specifically, in this embodiment, taking one of the target keywords and the preset keywords as an example, the word similarity between the target keywords and the preset keywords is determined. The method comprises the steps of respectively obtaining the character string length of a target keyword, the character string length of a current preset keyword and the character string length required by the target keyword when the target keyword is edited into the current preset keyword, and taking the character string length determined at the moment as an editing distance. Then, calculating the sum of the length of the target character string and the length of the preset character string to be used as a first value to be processed; calculating a difference value between the first to-be-processed value and the editing distance to obtain an intermediate processing value, and calculating a ratio between the intermediate processing value and the first to-be-processed value to obtain a word similarity value of the target keyword corresponding to the current preset keyword.
It should be noted that, the word similarity value between each target keyword and each preset keyword may be determined by using the method described above.
S260, accumulating the obtained at least one word similarity value to obtain the total similarity value between the target keyword phrase and the preset document template.
After determining the word similarity values between each target keyword in the target keyword phrase and each preset keyword in the same preset document template, all the word similarity values can be accumulated to obtain the total similarity value of the target keyword phrase and the preset document template.
Illustratively, the target keyword phrase includes two target keywords, denoted as a and B, respectively. The same preset document template comprises two preset keywords which are respectively marked as E and F. The word similarity values of A and E are calculated respectively by adopting a keyword matching algorithm,denoted as Q 1 And the word similarity value of A and F is marked as Q 2 The method comprises the steps of carrying out a first treatment on the surface of the Meanwhile, the word similarity value between B and E is calculated and recorded as Q 3 And the word similarity value between B and F, denoted as Q 4 Then the total similarity value between the target keyword phrase and the preset document template is Q=Q 1 +Q 2 +Q 3 +Q 4 . And similarly, determining the total similarity value of the target keyword phrase and each preset document template.
S270, screening out the highest total similarity value from all the total similarity values, determining preset keywords of a preset document template corresponding to the highest total similarity value, determining URL addresses corresponding to the preset keywords based on the corresponding relation table, and acquiring the target document template to be processed based on the URL addresses.
Specifically, after determining the total similarity value of the target keyword phrase corresponding to each preset document template, the corresponding preset document template keyword can be screened out from all the total similarity values when the total similarity value is highest. And determining a URL address corresponding to the preset document template from a pre-established corresponding relation table so as to acquire the target document template to be processed based on the URL address.
S280, acquiring target user information corresponding to 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.
Specifically, when the target document template to be processed is obtained, the document processing program can be called to obtain target user information corresponding to target content, whether necessary field information corresponding to the target document template to be processed exists or not is searched from the target information, and if so, the target user information is updated at the title of the target document template to be processed, so that the target document template is obtained. That is, the title 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 the target document template is stored to the target position, the method further includes: reading title information of a target document template in the target position based on a timing monitoring mechanism; when the change of the target field in the title information is detected, the title information is acquired and stored in a database corresponding to a user, so that the title information of the target document template is automatically updated when the target document template is acquired.
The timing monitoring mechanism can be arranged in the server and used for executing timing detection tasks, and optionally, the monitoring tasks can be executed every twenty-four hours. The target field may be understood as necessary field information corresponding to the target document template, optionally name, number, etc., previously stored in the database.
Specifically, based on the timing monitoring mechanism, whether the necessary fields in the target document header in the target position change or not, i.e., whether the target fields change or not, is read at regular time. If yes, acquiring necessary field information in the title information, binding the necessary fields with the target document template and the target user, and storing the bound necessary fields into a data path so that the title information of the document template can be automatically updated when the target document template is acquired.
That is, when the timing task is set by the timing monitoring mechanism and the title information of the target document template is read, once the target field in the monitored title information changes, the monitored title information can be written back into the corresponding relation table of the database, so that when the title information is updated after the document template is called, the document title can be updated based on the written back data.
According to the technical scheme, when the target content is monitored, a word segmentation program is called to extract each keyword in the target content, the keywords are used as target keyword phrases, and a keyword matching algorithm is adopted to calculate the total similarity value between the target keyword phrases 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 the target document template; based on a document template storage program, storing a target document template to a target position, solving the problems that in the prior art, a user needs to manually search a required document template, manually copy the target document template when searching the target document template, and paste the target document template to the target storage position; when a user needs to download a plurality of document templates, the above operation needs to be repeatedly executed, so that the technical problems of machinery, complexity and manpower waste are solved, the automatic matching of the target document templates corresponding to target contents is realized, the titles of the target documents are changed into the same format, and meanwhile, the target documents are automatically stored to the target positions, so that the convenience of acquiring the document templates is improved, the labor cost is reduced, and the technical effects of user experience are improved.
Example III
As a preferred embodiment of the foregoing embodiments, fig. 3 is another flowchart of a method for calling a document template according to the third embodiment of the present disclosure, as shown in fig. 3, where the method includes:
s310, sending a replication request, wherein the HTTP request comprises a personal identifier and dialogue content.
Before the server analyzes and processes the dialogue content, the server needs to configure information corresponding to each preset document template. Illustratively, as shown in fig. 5, URL addresses of all preset document templates and necessary fields, i.e., necessary fields such as (name, number) must be included in the title of each document template are configured at the server side and stored in the database. The server obtains the document title corresponding to each URL address through the API, establishes a corresponding relation with the URL address, and stores the corresponding relation in the database. Correspondingly, after the title corresponding to each document template is obtained, the title of the preset document template can be segmented based on the segmentation program to obtain keywords corresponding to the preset document template, and the keywords are used as preset keywords to establish the corresponding relation among the preset keywords, the URL address, the document title and the necessary fields and stored in a database so as to obtain the target document template according to the corresponding relation 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 the target user information and session content information, that is, the target content information.
S320, extracting keyword information in the dialogue content as a target keyword phrase.
Specifically, the word segmentation tool or the word segmentation program can be used for word segmentation of the dialogue content, optionally, words such as nouns, adjectives and the like in the dialogue content are reserved, the reserved words are used as target keywords, and a set of all the target keywords is used as target keyword phrases.
In this embodiment, keywords extracted from the dialogue content are used as target keywords.
S330, reading preset keywords corresponding to each preset document template stored in advance in a database.
After the target keyword phrase is obtained, preset keywords corresponding to each preset document template can be sequentially obtained from the corresponding relation table.
S340, calculating a word similarity value between each preset keyword and the target keyword in the preset document template.
Specifically, a keyword matching algorithm is adopted to respectively calculate the word similarity value between each target keyword in the target keyword phrase and each preset keyword in the same preset document template. And repeating the steps to obtain the word similarity value of each target keyword in the target keyword phrase and each preset keyword in the preset document template.
The target keyword phrase includes two keywords, respectively denoted as a and B, and one preset keyword of the preset document template S includes two keywords, denoted as C and D. Respectively calculating word similarity values between A and C, and marking the word similarity values as M 1 And the word similarity value between A and D, denoted as M 2 The method comprises the steps of carrying out a first treatment on the surface of the Then calculate the word similarity value between B and C, record as M 3 And the word similarity value between B and D, denoted as M 4 For M 1 、M 2 、M 3 M is as follows 4 And accumulating the values to obtain the total similarity value of the target keyword phrase and the preset document template C.
Alternatively, the word similarity between the target keyword and the preset keyword, that is, the word similarity value between the target keyword a and the preset keyword C, may be calculated by the following formula. And respectively determining the target character string length of the target keyword A and the preset character string length of the preset keyword C, wherein the word similarity value between A and C is = (the target character string length + the preset character string length-the editing distance)/(the target character string length + the preset character string length), and the editing distance is the required character string length when the target keyword is converted into the preset keyword.
S350, summing the similarity values to obtain a total similarity value, and recording a document template corresponding to the highest total similarity as a document template to be copied as a target document template to be processed.
Specifically, a keyword matching algorithm is adopted to calculate a word similarity value between preset keywords corresponding to each preset document template, and the word similarity values are accumulated to obtain a total similarity value of 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, necessary fields in a title associated with the document are read from a database.
Specifically, the corresponding relation table stored in the database is read, the title corresponding to the target document to be processed is determined, and the necessary fields corresponding to the title are determined, and optionally, the necessary fields are name and class.
S402, splicing the necessary fields and the titles of the document templates together by using connection symbols to obtain new titles.
Specifically, after determining the necessary fields corresponding to the target document template to be processed, the necessary fields and the title of the document template may be spliced together with 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. The original titles are original titles corresponding to the target document templates to be processed in the corresponding relation table.
S403, reading personal information of a target user from a database, judging whether the personal information comprises necessary filling fields, and if so, executing S404; if not, then S405 is performed.
Specifically, after a new title corresponding to the target document template to be processed is generated, whether personal information of the target user exists or not, and optionally, information such as an account number, a login name, a name and the like can be read from a database. Reading whether the personal information includes necessary field, if yes, updating necessary field information in the title, that is, executing S404; if not, an identification of the same format is generated, that is, S405 is performed, which is advantageous in that it is convenient to manage each document template.
S404, changing the value of the necessary field in the title.
That is, when the necessary field is included in the personal information, the value of the necessary field is replaced with information corresponding to the personal information of the user according to the personal information, and optionally, the name of the user, the plum XX is included in the personal information; class 3, then the title may be: plum XX-3 class-original title.
S405, generating titles in the same format.
That is, the personal information does not include necessary fields, and then titles of the same format are generated for unified management by the user. The method has the advantage of avoiding the technical problem of inconvenient management due to non-uniform title information of the finally generated document template.
S406, copying a target document template with 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, S408 is performed.
Specifically, the API interface is called to copy the target document template in the same format, and meanwhile, whether a file storage path corresponding to the target document template exists or not is inquired.
If so, storing the target document template to the target position according to the storage path, namely executing S407; if the storage path corresponding to the target document template does not exist, a new folder is created to store the target document template into the new folder.
S407, creating a folder, and associating 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 created. To facilitate the next invocation, the storage path corresponding to the new folder may be bound to the target document template so that the target document template may be stored according to the storage path when invoked.
S408, storing the document in a corresponding folder, transferring ownership of the document to a user, and associating the user with the copied document.
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 the next invocation.
S409, reading the title of the copied document at fixed time, detecting whether the character segment to be filled in the title is changed, if so, executing S410; if not, S411 is performed.
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, for timing monitoring whether the copied document title has changed. If a change occurs, then S410 is performed; if not, S411 is performed.
The method has the advantages that the necessary field information filled in by the user can be read, the necessary field information is stored in the database, and when the downloaded document template needs to be filled in, automatic filling can be realized.
S410, reading the value of the necessary 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 may be read and bound to the target user, so that the title of the target document template may be automatically updated after the target document template is next called.
The advantage of this arrangement is that the document template can be automatically copied, the personal information can be directly obtained when the user fills in the sequential personal information and later invokes, and the title of the document template can be automatically updated when the document template is downloaded.
S411, ending.
That is, after the target document is obtained, the task execution to acquire the target document ends.
According to the technical scheme, when the target content is monitored, a word segmentation program is called to extract each keyword in the target content, the keywords are used as target keyword phrases, and a keyword matching algorithm is adopted to calculate the total similarity value between the target keyword phrases 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 the target document template; based on a document template storage program, storing a target document template to a target position, solving the problems that in the prior art, a user needs to manually search a required document template, manually copy the target document template when searching the target document template, and paste the target document template to the target storage position; when a user needs to download a plurality of document templates, the above operation needs to be repeatedly executed, so that the technical problems of machinery, complexity and manpower waste are solved, the automatic matching of the target document templates corresponding to target contents is realized, the titles of the target documents are changed into the same format, and the target documents are automatically stored to the target positions, so that the convenience of acquiring the document templates is improved, and the technical effect of user experience is improved.
Example IV
Fig. 6 is a schematic structural diagram of a document template calling device according to a fourth embodiment of the present disclosure, as shown in fig. 6, where 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 obtaining module 610 is configured to, when the target content is monitored, invoke a word segmentation program to extract at least one keyword in the target content, and use the extracted keyword as a target keyword phrase; the total similarity value determining module 620 is configured to calculate a total similarity value between the target keyword group and each preset document template by using a keyword matching algorithm; the target document template determining module 630 is configured to obtain a target document template to be processed based on the total similarity value, and call a document template processing program to process the target document template to be processed to obtain a target document template; a target document template storage module 640 for storing the target document template to a target location based on a document template storage program.
On the basis of the technical scheme, the device further comprises: a preset document template acquisition unit, a preset keyword acquisition unit and a corresponding relation table determination unit;
The preset document template acquisition unit is used for acquiring a plurality of preset document templates and determining URL addresses corresponding to each preset document template;
a preset keyword obtaining unit, configured to obtain a title of the preset document template, and perform word segmentation processing on the title to obtain at least one keyword corresponding to the title, where the at least one 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, the preset keyword and the URL address corresponding to the preset document template so as to acquire the target document template to be processed corresponding to the target keyword phrase based on the corresponding relation table.
Based on 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 preset keyword corresponding to the same preset document template by adopting a keyword matching algorithm;
and the total similarity value accumulating unit is used for accumulating the obtained at least one word similarity value to obtain the 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 an editing distance between one target keyword in the target keyword phrase and a 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. On the basis of the technical schemes, the target document template determining module is further used for screening out the highest total similarity value from all the total similarity values, determining preset keywords of a preset document template corresponding to the highest total similarity value, determining URL addresses corresponding to the preset keywords based on the corresponding relation table, and acquiring the target document template to be processed based on the URL addresses.
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 schemes, the target document template storage module is also used for calling the document calling module to call the target document template and determining whether a storage path corresponding to the target document template exists or not 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, a new folder is established to store the target document template, and a storage path corresponding to the new folder is bound with the target document template, so that when the target document is called, the target document template is stored to a target position based on a binding relation.
On the basis of the technical schemes, the device further comprises:
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 the change of the target field in the title information is detected, 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, when the target content is monitored, a word segmentation program is called to extract each keyword in the target content, the keywords are used as target keyword phrases, and a keyword matching algorithm is adopted to calculate the total similarity value between the target keyword phrases 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 the target document template; based on a document template storage program, storing a target document template to a target position, solving the problems that in the prior art, a user needs to manually search a required document template, manually copy the target document template when searching the target document template, and paste the target document template to the target storage position; when a user needs to download a plurality of document templates, the above operation needs to be repeatedly executed, so that the technical problems of machinery, complexity and manpower waste are solved, the automatic matching of the target document templates corresponding to target contents is realized, the titles of the target documents are changed into the same format, and the target documents are automatically stored to the target positions, so that the convenience of acquiring the document templates 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 modules and beneficial effects of the executing method.
It should be noted that each unit and module included in the above apparatus are only divided according to the functional logic, but not limited to the above division, so long as the corresponding functions can be implemented; in addition, the specific names of the functional units are also only for convenience of distinguishing from each other, and are not used to limit 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., a terminal device or server in fig. 7) 70 suitable for use in implementing embodiments of the present disclosure is shown. The terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 7 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
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, which may perform various appropriate actions and processes according to 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 device 70 are also stored. The processing device 701, the ROM 702, and the RAM 703 are connected to each other through a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
In general, the following devices may be connected to the I/O interface 705: input devices 706 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, and the like; an output device 707 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 706 including, for example, magnetic tape, hard disk, etc.; and a communication device 709. The communication means 709 may allow the electronic device 70 to communicate wirelessly or by wire with other devices to exchange data. While fig. 7 shows an electronic device 70 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a non-transitory computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via communication device 709, or installed from storage 706, or installed from ROM 702. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing device 701.
The terminal provided by the embodiment of the present disclosure and the method for calling the document template provided by the above embodiment belong to the same inventive concept, technical details which are not described in detail in the embodiment of the present disclosure can be seen in the above embodiment, and the embodiment of the present disclosure has the same beneficial effects as the above embodiment.
Example seven
The embodiment of the present disclosure provides a computer storage medium having stored thereon a computer program which, when executed by a processor, implements the method for calling a document template provided by the above embodiment.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any 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 context of this 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 the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. 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, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
In some implementations, 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 communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("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 contained in the electronic device; or may exist alone without being incorporated 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, invoking a word segmentation program to extract at least one keyword in the target content 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;
the target document template is stored to a target location based on a document template storage program.
If the sub-scope container exists in the sub-page service, returning to the sub-page service 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 conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts 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 involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. The name of the unit is not limited to the unit itself in some cases, and for example, the presentation module may be also described as a "material display module".
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
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. The 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, there is provided a method of invoking a document template, the method comprising:
when target content is monitored, invoking a word segmentation program to extract at least one keyword in the target content 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;
the target document template is stored to a target location based on a document template storage program.
According to one or more embodiments of the present disclosure, there is provided a document template calling method, further including:
optionally, when the target content is monitored, invoking the word segmentation program to extract at least one keyword in the target content, and before the keyword is used as a target keyword phrase, further including:
acquiring a plurality of preset document templates, and determining URL addresses corresponding to each preset document template;
acquiring a title of the preset document template, and performing word segmentation on the title to obtain at least one keyword corresponding to the title as a preset keyword corresponding to the preset document template;
And establishing a corresponding relation table among the title, the preset keyword and the URL address corresponding to the preset document, so as to acquire 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, there is provided a document template calling method [ example three ], further including:
optionally, calculating the total similarity value between the target keyword phrase and each preset document template by using a keyword matching algorithm 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 the total similarity value between the target keyword phrase and the preset document template.
According to one or more embodiments of the present disclosure, there is provided a document template calling method [ example four ], further including:
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 an editing distance between one target keyword in the target keyword phrase and a 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, there is provided a document template calling method [ example five ], further including:
optionally, the obtaining the target document template to be processed based on the total similarity value and a pre-established correspondence table includes:
and 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 URL address corresponding to the preset keyword based on the corresponding relation table, and acquiring the target document template to be processed based on the URL address.
According to one or more embodiments of the present disclosure, there is provided a document template calling method [ example six ], further including:
optionally, the calling 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, there is provided a document template calling method [ example seventh ], further including:
optionally, the storing the target document template to a target location based on a document template storage program includes:
invoking a document invoking module to invoke 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, a new folder is established to store the target document template, and a storage path corresponding to the new folder is bound with the target document template, so that when the target document is called, the target document template is stored to a target position based on a binding relation.
According to one or more embodiments of the present disclosure, there is provided a document template calling method, further including:
optionally, after storing the target document template to the target location, the method further includes:
reading title information of a target document template in the target position based on a timing monitoring mechanism;
when the change of the target field in the title information is detected, the title information is acquired and stored in a database corresponding to a user, so that the title information of the target document template is automatically updated when the target document template is acquired.
According to one or more embodiments of the present disclosure, there is provided a document template invoking apparatus, the apparatus including
The keyword acquisition module is used for calling a word segmentation program to extract at least one keyword in the target content when the target content is monitored, and the keyword is used as a target keyword phrase;
the total similarity value determining module is used for calculating the total similarity value between the target keyword group and each preset document template by adopting a keyword 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 a document template storage program.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by persons skilled in the art that the scope of the disclosure referred to in this disclosure is not limited to the specific combinations of features described above, but also covers other embodiments which may be formed by any combination of features described above or equivalents thereof without departing from the spirit of the disclosure. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).
Moreover, although 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. In 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 limiting the scope of the present 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 example forms of implementing the claims.

Claims (10)

1. A method for invoking a document template, comprising:
when target content is monitored, invoking a word segmentation program to extract at least one keyword in the target content 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;
based on the total similarity value, acquiring a target document template to be processed, and calling a document template processing program to process the target document template to be processed to acquire a target document template;
storing the target document template to a target location based on a document template storage program;
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, further comprising:
Acquiring a plurality of preset document templates, and determining URL addresses corresponding to each preset document template;
acquiring a title of the preset document template, and performing word segmentation on the title to obtain at least one keyword corresponding to the title as a preset keyword corresponding to the preset document template;
and establishing a corresponding relation table among the title, the preset keyword and the URL address corresponding to the preset document template, so as to acquire a target document template to be processed corresponding to the target keyword phrase based on the corresponding relation table.
2. The method of claim 1, wherein calculating the total similarity value between the target keyword phrase and each preset document template 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 the total similarity value between the target keyword phrase and the preset document template.
3. The method according to claim 2, wherein the calculating, by using a keyword matching algorithm, a word similarity value between each of the target keywords in the target keyword group and each of the preset keywords corresponding to the same preset document template includes:
calculating an editing distance between one target keyword in the target keyword phrase and a 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.
4. The method according to claim 1, wherein the obtaining the target document template to be processed based on the total similarity value and a pre-established correspondence table includes:
And 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 URL address corresponding to the preset keyword based on the corresponding relation table, and acquiring the target document template to be processed based on the URL address.
5. The method of claim 1, wherein the calling a document template handler to process the target document template to be processed to obtain a target document template comprises:
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.
6. The method of claim 1, wherein the storing the target document template to a target location based on a document template storage program comprises:
invoking a document invoking module to invoke 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, a new folder is established to store the target document template, and a storage path corresponding to the new folder is bound with the target document template, so that when the target document template is called, the target document template is stored to a target position based on a binding relation.
7. The method of claim 1, further comprising, after depositing the target document template to a target location:
reading title information of a target document template in the target position based on a timing monitoring mechanism;
when the change of the target field in the title information is detected, the title information is acquired and stored in a database corresponding to a user, so that the title information of the target document template is automatically updated when the target document template is acquired.
8. A document template calling device 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 when the target content is monitored, and the keyword is used as a target keyword phrase; the total similarity value determining module is used for calculating the total similarity value between the target keyword group and each preset document template by adopting a keyword 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;
a target document template storage module for storing the target document template to a target location based on a document template storage program;
the apparatus further comprises:
a preset document template acquisition unit for acquiring a plurality of preset document templates and determining URL addresses corresponding to each preset document template;
a preset keyword obtaining unit, configured to obtain a title of the preset document template, and perform word segmentation processing on the title to obtain at least one keyword corresponding to the title, where the at least one 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, the preset keyword and the URL address corresponding to the preset document template so as to acquire the target document template to be processed corresponding to the target keyword phrase based on the corresponding relation table.
9. An electronic device, the electronic device comprising:
One or more processors;
storage means for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of invoking a document template as recited in any of claims 1-7.
10. A storage medium containing computer executable instructions which, when executed by a computer processor, are for performing the method of invoking the document template of any of claims 1-7.
CN202010196721.XA 2020-03-19 2020-03-19 Method and device for calling document template, electronic equipment and storage medium Active CN111414743B (en)

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 CN111414743A (en) 2020-07-14
CN111414743B true 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)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112199933A (en) * 2020-10-27 2021-01-08 冠群信息技术(南京)有限公司 License template-based format conversion method
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
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

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (3)

* Cited by examiner, † Cited by third party
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
US10853638B2 (en) * 2018-08-31 2020-12-01 Accenture Global Solutions Limited System and method for extracting structured information from image documents

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Also Published As

Publication number Publication date
CN111414743A (en) 2020-07-14

Similar Documents

Publication Publication Date Title
CN111414743B (en) Method and device for calling document template, electronic equipment and storage medium
CN111581563B (en) Page response method and device, storage medium and electronic equipment
CN111291103B (en) Interface data analysis method and device, electronic equipment and storage medium
CN109492210A (en) A kind of online document content displaying method, device, storage medium and electronic equipment
CN111400625B (en) Page processing method and device, electronic equipment and computer readable storage medium
CN112183045B (en) Online document processing method and device and electronic equipment
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
CN112487331A (en) Page generation method and device, storage medium and electronic equipment
CN115017110A (en) Information processing method, device, terminal and storage medium
CN114995691B (en) Document processing method, device, equipment and medium
CN111382365B (en) Method and device for outputting information
CN110704050B (en) Module initializing method and device, electronic equipment and computer readable storage medium
CN112035256A (en) Resource allocation method, device, electronic equipment and medium
WO2022184037A1 (en) Document processing method, apparatus and device, and medium
CN115061601B (en) Electronic document processing method, device, terminal and storage medium
CN111399902B (en) Client source file processing method and device, readable medium and electronic equipment
CN112307723B (en) Method and device for generating code document and electronic equipment
CN111460769B (en) Article issuing method and device, storage medium and electronic equipment
CN114239501A (en) Contract generation method, apparatus, device and medium
CN113360704A (en) Voice playing method and device and electronic equipment
CN115080521A (en) Information display method and device, electronic equipment and storage medium
CN111488495A (en) Information processing method and device
CN111753238A (en) Data mapping method and device and electronic equipment
CN112905164A (en) Project code processing method and device

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