CN110619115A - Template creating method and device, electronic equipment and storage medium - Google Patents

Template creating method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN110619115A
CN110619115A CN201910813708.1A CN201910813708A CN110619115A CN 110619115 A CN110619115 A CN 110619115A CN 201910813708 A CN201910813708 A CN 201910813708A CN 110619115 A CN110619115 A CN 110619115A
Authority
CN
China
Prior art keywords
keywords
target
keyword
files
template
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910813708.1A
Other languages
Chinese (zh)
Other versions
CN110619115B (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.)
OneConnect Smart Technology Co Ltd
Original Assignee
OneConnect Smart 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 OneConnect Smart Technology Co Ltd filed Critical OneConnect Smart Technology Co Ltd
Priority to CN201910813708.1A priority Critical patent/CN110619115B/en
Publication of CN110619115A publication Critical patent/CN110619115A/en
Application granted granted Critical
Publication of CN110619115B publication Critical patent/CN110619115B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the application provides a template creating method, a template creating device, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring at least two files with the same category in a target service scene, wherein each file comprises one or more information groups; identifying a target information group between the at least two files according to a preset identification rule, and recording keywords included by the target information group; filtering the keywords included in the target information group to obtain target keywords; generating an initial file template comprising the target keywords or partial keywords in the target keywords; and typesetting the keywords in the initial file template according to a preset typesetting rule to obtain a standard file template, wherein the standard file template is used for converting the file to be standardized in the target service scene into a standardized file. By the method and the device, the flexibility of the template in different service scenes can be improved, and the expandability of the template is improved.

Description

Template creating method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a template creation method and apparatus, an electronic device, and a storage medium.
Background
The template generation tool on the market can provide several fixed templates for the user to select, and can generate the desired file for the user according to the template selected by the user. For example, some resume tools provided by the recruitment platform may provide a resume generation template that is configured in the background by the relevant personnel and that the user can import his or her resume to generate a standard resume. However, the template has poor flexibility in different service scenarios and low expandability.
Disclosure of Invention
The embodiment of the application provides a template creating method and device, an electronic device and a storage medium, which can improve the flexibility of a template in different service scenes and improve the expandability of the template.
In a first aspect, an embodiment of the present application provides a template creating method, including:
acquiring at least two files with the same category in a target service scene, wherein each file comprises one or more information groups, and each information group comprises at least one keyword and a content item corresponding to each keyword;
identifying a target information group between the at least two files according to a preset identification rule, and recording keywords included by the target information group; the target information group is an information group where the same target keywords in the at least two files are located;
filtering keywords included in the target information group to obtain target keywords;
generating an initial file template comprising the target keywords or partial keywords in the target keywords;
and typesetting the keywords in the initial file template according to a preset typesetting rule to obtain a standard file template, wherein the standard file template is used for converting the file to be standardized in the target service scene into a standardized file.
Optionally, the identifying, according to a preset identification rule, a target information group between the at least two files includes:
comparing the at least two files, and identifying a plurality of identical keywords between the at least two files;
when determining that content items corresponding to the same target keywords in the at least two files are different or the similarity between the content items is less than or equal to a preset similarity, determining an information group in which the same target keywords are located as a target information group between the at least two files; wherein the target identical keyword is any one of a plurality of identical keywords between the at least two files.
Optionally, the comparing the at least two files includes any one of the following operations:
comparing the at least two files line by line from the initial positions or other positions of the at least two files;
and comparing every other multiple rows of the at least two files from the starting positions or other positions of the at least two files.
Optionally, the filtering the keywords included in the target information group to obtain the target keywords includes:
carrying out validity check on each keyword in the keywords included in the target information group; the legality checking mode comprises sensitive content identification and/or illegal keyword library query; the illegal keyword library comprises one or more illegal keywords;
and determining the keywords passing the validity check in the keywords included in the target information group as the target keywords.
Optionally, the method for obtaining a standard document template by typesetting the keywords in the initial document template according to a preset typesetting rule includes:
acquiring a keyword position information record table, wherein the keyword position information record table comprises position information of each keyword in the target keywords; the position information of each keyword is determined according to the position information of the keyword in the at least two files;
adjusting the position of each keyword in the initial file template according to the position information of each keyword, and obtaining the adjusted initial file template;
and determining the adjusted initial file template as a standard file template.
Optionally, the position information includes coordinate information, the coordinate information includes an abscissa and an ordinate, and the adjusting the position of each keyword in the initial file template according to the position information of each keyword includes:
aligning each keyword in the initial file template according to a vertical coordinate according to the coordinate information of each keyword to obtain each keyword aligned according to the vertical coordinate;
and aligning each keyword aligned according to the ordinate according to the abscissa to obtain each keyword aligned according to the abscissa and aligned according to the ordinate.
Optionally, the method further comprises:
matching a target content item from a file to be standardized by using the standard file template, wherein the target content item is a content item corresponding to a keyword included in the standard file template;
filling the target content items in the standard file template to obtain the filled standard file template;
and determining the standard file template after filling as a standardized file of the file to be standardized.
In a second aspect, an embodiment of the present application provides a template creating apparatus, including:
the system comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring at least two files with the same category in a target service scene, each file comprises one or more information groups, and each information group comprises at least one keyword and a content item corresponding to each keyword;
the first processing module is used for identifying a target information group between the at least two files according to a preset identification rule and recording keywords included by the target information group; the target information group is an information group where the same target keywords in the at least two files are located;
the filtering module is used for filtering the keywords included in the target information group to obtain target keywords;
and the second processing module is used for generating an initial file template comprising the target keywords or part of the keywords in the target keywords, and typesetting the keywords in the initial file template according to a preset typesetting rule to obtain a standard file template, wherein the standard file template is used for converting the file to be standardized in the target service scene into a standardized file.
In a third aspect, an embodiment of the present application provides an electronic device, including a processor and a memory, where the processor and the memory are connected to each other, where the memory is used to store a computer program, and the computer program includes program instructions, and the processor is configured to call the program instructions to execute the method according to the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium, which stores a computer program, where the computer program is executed by a processor to implement the method according to the first aspect.
In summary, the electronic device may obtain at least two files with the same category in a target service scene, identify a target information group between the at least two files according to a preset identification rule, and record keywords included in the target information group; the electronic equipment can also filter the keywords included in the target information group to obtain target keywords, and generate an initial file template by using the target keywords, so that the keywords in the initial file template are typeset according to a preset typesetting rule to obtain a standard file template, the flexibility of the template in different service scenes is improved, and the expandability of the template is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart illustrating a template creating method according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating another template creation method according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of a template creation apparatus according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
Please refer to fig. 1, which is a flowchart illustrating a template creating method according to an embodiment of the present application. The method can be applied to electronic equipment, and the electronic equipment can be a terminal or a server. Specifically, the method may comprise the steps of:
s101, at least two files with the same category in a target service scene are obtained.
In the embodiment of the application, the electronic equipment can acquire at least two files with the same category in a target service scene. The target service scenario may be any service scenario.
For example, the target traffic scenario is an arbitration scenario. The electronic device can acquire at least two files of which the categories are arbitration books under an arbitration scene. Or, the electronic device may acquire at least two files of which the categories are labor arbitration books in the arbitration scene. Or, the electronic device may acquire at least two files of which the categories are business arbitrage books in an arbitration scenario. Or, the electronic device may obtain at least two files of which the categories are arbitration application forms in the arbitration scenario. Or, the electronic device may obtain at least two files of which the categories are labor arbitration application forms in the arbitration scene. Or, the electronic device may acquire at least two files of which the categories are business arbitrage books in an arbitration scenario.
Wherein each of the at least two files may include one or more information groups, each information group may include a keyword and a content item corresponding to the keyword. Keywords include, but are not limited to, words, or sentences. For example, the electronic device obtains an arbitration book 1 and an arbitration book 2, of which the categories are arbitration books in an arbitration scenario. The arbitration book 1 includes the information group 1, and the arbitration book 2 includes the information group 1. The information set 1 of the arbitration book 1 may include the keywords: the complaint party and the content item corresponding to the complaint party are as follows: prescription A. The information set 1 of the arbitration book 2 may include the keywords: the complaint party and the content item corresponding to the complaint party are as follows: and B, preparing the second prescription.
In one embodiment, the obtaining, by the electronic device, at least two files of the same category in the target service scenario may include: the electronic equipment acquires a plurality of files in a target service scene, and determines at least two files with the same category from the plurality of files.
In one embodiment, the determining, by the electronic device, at least two files of the same category from the plurality of files may include: the electronic equipment calls a preset file classification model to classify and identify the files to obtain the classes of the files; the electronic equipment determines at least two files with the same category from the plurality of files according to the categories of the plurality of files. The file classification model can be obtained by training deep learning models such as a convolutional neural network model and a decision tree model by adopting a large number of training files, or can be obtained by training deep learning models such as a convolutional neural network model by adopting a large number of training files under the target service scene.
For example, the plurality of files include file 1, file 2, file 3, and file 4, and the electronic device may call a preset text classification model to classify and identify the 4 files, so as to obtain a category of file 1: category 1, category of space 2: category, 1, category of file 3: category 2, category of file 4: and in the category 2, the electronic device can determine the files 1 and 2 with the same category or determine the files 3 and 4 with the same category according to the categories of the 4 files.
In one embodiment, the obtaining, by the electronic device, at least two files of the same category in the target service scenario may include: the electronic equipment acquires at least two files of preset categories in a target service scene. Correspondingly, the determining, by the electronic device, at least two files with the same category from the plurality of files according to the category of each file in the plurality of files may be: the electronic equipment determines at least two files which are in preset categories from the plurality of files according to the category of each file in the plurality of files. By acquiring at least two files of a preset category in a target service scene, a standard file template corresponding to the preset category can be generated in a targeted manner.
In an embodiment, in addition to obtaining at least two files with the same category in the target service scene by using the deep learning method, at least two files with the same category in the target scene may also be obtained by using a clustering method, which is not described herein again in this embodiment of the present application.
In one embodiment, the at least two files may be files that satisfy a predetermined condition determined from a group of files having the same category. Or, the at least two files may also be files that satisfy a preset condition determined from a file group that is a preset category. Wherein, satisfying the preset condition comprises at least one of the following: the reading number is greater than or equal to a preset reading number, the score is greater than or equal to a preset score, and the number of praise is greater than or equal to a preset number of praise.
In an embodiment, the electronic device obtains a plurality of files in a target service scenario, and may query the plurality of files in the target service scenario from the plurality of files in the plurality of service scenarios for the electronic device.
In one embodiment, the electronic device may obtain the plurality of files under the plurality of service scenarios from a local or database, or may also obtain the plurality of files under the plurality of service scenarios from other devices. The method and the device for acquiring the plurality of files in the target service scene are not limited.
S102, identifying a target information group between the at least two files according to a preset identification rule, and recording keywords included in the target information group.
The target information group may be an information group in which the target identical keywords in the at least two files are located. The target identical keyword may be any one of a plurality of identical keywords between the at least two files.
In an embodiment, the target information group may also be an information group in which the target identical keyword is located when it is determined that content items corresponding to the target identical keyword in the at least two files are different or that a similarity between the content items is less than or equal to a preset similarity.
In one embodiment, the identifying, by the electronic device, the target information group between the at least two files according to a preset identification rule may include: the electronic equipment compares the at least two files and identifies a plurality of identical keywords between the at least two files; when it is determined that content items corresponding to the same target keyword in the at least two files are different or the similarity between the content items is less than or equal to a preset similarity, the electronic equipment determines an information group in which the same target keyword is located as a target information group between the at least two files. According to the method, the target information group is accurately identified, and the corresponding keywords are recorded.
For example, the electronic device obtains an arbitration book 1 and an arbitration book 2, of which the categories are arbitration books in an arbitration scenario. The arbitration book 1 includes the information group 1, and the arbitration book 2 includes the information group 1. The information set 1 of the arbitration book 1 may include the keywords: the complaint party and the content item corresponding to the complaint party are as follows: prescription A. The information set 1 of the arbitration book 2 may include the keywords: the complaint party and the content item corresponding to the complaint party are as follows: and B, preparing the second prescription. The arbitration book 1 further comprises an information group 2, the arbitration book 2 further comprises an information group 2, and the information group 2 of the arbitration book 1 may comprise keywords: the appealing party and the content item corresponding to the appealing party: and 3, a third prescription. The information group 2 of the arbitration book 2 may include the keywords: the appealing party and the content item corresponding to the appealing party: and D, preparing the powder. The electronic device compares the arbitration book 1 with the arbitration book 2, and identifies a plurality of identical keywords between the two arbitration books, such as a claiming party and a resorting party. The electronic device may determine that the content items corresponding to the claiming party and the content items corresponding to the claiming party in the two files are different, and at this time, the electronic device may determine an information group 1 (which may include the information group 1 of the at least one arbitration book) where the claiming party is located and an information group 2 (which may include the information group 2 of the at least one arbitration book) where the claiming party is located as the target information group between the two files.
In one embodiment, the electronic device may compare the content items corresponding to the target identical keyword in the at least two files to determine whether the content items corresponding to the target identical keyword in the at least files are identical. The electronic device may further calculate a similarity between content items corresponding to the target identical keyword in the at least one file to determine whether the similarity between the content items corresponding to the target identical keyword in the at least one file is less than or equal to a preset similarity.
In an embodiment, since content items with the same keyword need to be compared to accurately determine the target information group, the electronic device may further obtain content within a preset position range after the target with the same keyword in the at least two files, and determine the content within the preset position range as the content item corresponding to the target keyword. In one embodiment, the preset position range corresponding to each identical keyword may also be different according to the difference of the identical keywords. For example, the preset position range corresponding to each identical keyword may be determined according to the counted length of the content item corresponding to the identical keyword. For example, the corresponding preset position range of the complaint party is the position range 1, the corresponding preset position range is the position range 2, and the range of the position range 1 is smaller than the range of the position range 2.
In one embodiment, the electronic device compares the at least two files, and the method includes any one of the following operations: the electronic equipment compares the at least two files line by line from the initial positions or other positions of the at least two files; the electronic equipment compares the at least two files in every other multiple rows from the starting positions or other positions of the at least two files. By comparing line by line, the requirement for the recognition precision of the same keyword can be met. By comparing every other multiple lines, the recognition efficiency of the same keyword can be improved.
In one embodiment, the electronic device compares the at least two files line by line starting from the start positions or other positions of the at least two files, and may compare the at least two files with the same number of lines starting from the start positions or other positions of the at least two files. For example, the first line of file 1 is compared with the first line of file 2, and the second line of file 1 is compared with the second line of file 2. The method can be suitable for comparing at least two files with the standard, such as a table file or a document file with a set or specified format, so that the comparison time is saved, and the identification efficiency is improved.
In one embodiment, the electronic device compares the at least two files line by line starting from the start position or other positions of the at least two files, and may also compare each line of any one of the at least two files with all lines of other files of the at least two files starting from the start position or other positions of the any one file. For example, the first line of document 1 is compared with all the lines of document 2, and the second line of document 1 is compared with all the lines of document 2. By the method, at least two files which are not normal, such as table files or document files with large format differences, can be compared, so that the same keywords in parts are avoided being omitted, and the identification accuracy is improved.
In one embodiment, the electronic device compares every other multiple rows of the at least two files starting from the start positions or other positions of the at least two files, and may compare multiple rows having the same range of rows between the at least two files starting from the start positions or other positions of the at least two files. For example, the first line-third line of file 1 is compared with the first line-third line of file 2, and the fourth line-sixth line of file 1 is compared with the fourth line-sixth line of file 2. Or, the electronic device may compare every other plurality of rows of the at least two files starting from the start position or other positions of the at least two files, or may compare every other plurality of rows of any one file of the at least two files starting from the start position or other positions of the any file with all rows of other files of the at least two files. For example, the first line-third line of document 1 is compared with all the lines of document 2.
In one embodiment, the plurality of lines is determined according to the categories of the at least two files and the corresponding relationship between the preset line number and the categories of the files. The comparison line number is determined according to the mode, so that the comparison efficiency can be improved, and meanwhile, certain identification precision is guaranteed for files of different types.
In one embodiment, the plurality of lines may also be determined according to the number of lines occupied by each information group included in each file. For example, the number of rows may be the smallest number of rows occupied by each information group. The comparison line number is determined according to the mode, so that the comparison efficiency can be improved, and meanwhile, certain identification precision is guaranteed for files of different types.
S103, filtering the keywords included in the target information group to obtain target keywords.
Considering that there may be illegal or invalid keywords in the keywords obtained in step S102, in the embodiment of the present application, by performing filtering processing on the keywords included in the target information group, the validity and validity of the obtained target keywords can be ensured, and further, the reliability of the finally generated standard file template is ensured.
In an embodiment, the filtering, by the electronic device, the keywords corresponding to the different points to obtain the target keyword may include: the electronic equipment carries out validity check on each keyword in the keywords included in the target information group; the legality checking mode comprises sensitive content identification and/or illegal keyword library query; the illegal keyword library comprises one or more illegal keywords; and the electronic equipment determines the keywords passing the validity check in the keywords included in the target information group as the target keywords. For example, the target information group includes keyword 1, keyword 2, keyword 3, and keyword 4, and the electronic device may perform validity check on each keyword included in the target information group. The electronic device may determine, as the target keyword, a keyword 1, a keyword 2, and a keyword 3 that pass the validity check among the keywords included in the target information group. The method is adopted to determine the final target keyword, and the legality and validity of the target keyword can be effectively guaranteed.
In one embodiment, the validity checking mode includes sensitive content identification, and the validity checking on each keyword in the keywords included in the target information group includes: identifying whether each keyword in the keywords included in the target information group includes sensitive content; and determining the keywords which are not sensitive contents or do not contain sensitive contents in the keywords corresponding to the different points as the keywords which pass the validity check. Such sensitive content includes, but is not limited to, abusive, illegal, gambling, politically sensitive content, and the like.
In one embodiment, the validity checking manner includes an illegal keyword library query, and the electronic device performs validity checking on each keyword in the keywords included in the target information group, including: and the electronic equipment inquires the keywords which are not in the illegal keyword library in the keywords included in the target information group and determines the keywords as the keywords passing the validity check. For example, the target information group includes keyword 1, keyword 2, keyword 3, and keyword 4, and it can be determined that keyword 1, keyword 2, and keyword 3 are not in the illegal keyword library by an illegal keyword library query, and thus keyword 1, keyword 2, and keyword 3 can be determined as keywords that pass the validity check.
In one embodiment, in order to filter out unnecessary stop words, the electronic device may further perform stop word removal processing on a keyword that passes validity check in the keywords included in the target information group, to obtain at least one processed keyword; and determining the processed at least one keyword as a target keyword. Wherein the stop word may include any one of: the moods help words, adverbs, prepositions and conjunctions.
And S104, generating an initial file template comprising the target keywords or partial keywords in the target keywords.
In an embodiment of the present application, the electronic device may generate an initial document template including the target keyword or a part of the target keyword.
In one embodiment, the electronic device generating an initial file template including the target keyword or a partial keyword of the target keyword may include: the electronic equipment generates a keyword list according to the target keyword, and the electronic equipment generates an initial file template including the keyword list or including the edited keyword list. In one embodiment, the keyword list may include the target keywords, or may include the target keywords sorted by priority. The priority may be determined based on the length of the key (e.g., the longer the length of the key, the higher the priority), and the location of the key in any of the at least two files (e.g., the higher the priority the earlier the location).
In one embodiment, the electronic device may present the keyword list or send the keyword list to a corresponding terminal for presentation.
In one embodiment, the electronic device may receive an editing operation on the keyword list, and edit the keyword list according to the editing operation, such as adding a keyword to the keyword list or deleting a keyword in the target keyword, to obtain an edited keyword list. Wherein, the second keyword is any keyword in the target keywords. By displaying the keyword list, the user can flexibly configure the initial file template.
In one embodiment, the electronic device may receive an edited keyword list transmitted by a corresponding terminal.
And S105, typesetting the keywords in the initial file template according to a preset typesetting rule to obtain a standard file template, wherein the standard file template is used for converting the file to be standardized in the target service scene into a standardized file.
In the embodiment of the application, the electronic device may perform typesetting on the keywords in the initial document template according to a preset typesetting rule to obtain a standard document template. In one embodiment, the keywords in the initial file may also include other keywords. The other keywords may be keywords added in the process of generating the initial template. Accordingly, the preset composition rule may include a composition rule set for the position information of the target keyword, and may further include a composition rule set for the position information of other keywords. The position information may be coordinate information, for example, coordinate information of the keyword with respect to any one of the at least two files, and the coordinate information may be represented by a coordinate system (x, y), where x may be an abscissa and y may be an ordinate.
In an embodiment, the keywords in the initial document template include the target keywords, and the electronic device performs composition on the keywords in the initial document template according to a preset composition rule to obtain a standard document template, which may include: the electronic equipment acquires a keyword position information record table, wherein the keyword position information record table comprises position information of each keyword in the target keywords; the position information of each keyword is determined according to the position information of the keyword in the at least two files; the electronic equipment adjusts the position of each keyword in the initial file template according to the position information of each keyword, and obtains the adjusted initial file template; and the electronic equipment determines the adjusted initial file template as a standard file template. In one embodiment, the location information of each keyword may be the location information of the keyword in any one of the at least two files. In one embodiment, the location information of the any file may be compared to the location information of the upper left corner of the any file.
In one embodiment, the electronic device adjusting the position of each keyword in the initial document template may include: and the electronic equipment arranges each keyword in the initial file template in sequence according to a preset sorting algorithm. For example, the sorting algorithm may be a bubble sorting algorithm or the like.
In one embodiment, the adjusting, by the electronic device, the position of each keyword in the initial file template according to the position information of each keyword may include: the electronic equipment aligns each keyword in the initial file template according to the ordinate according to the coordinate information of each keyword to obtain each keyword aligned according to the ordinate; and the electronic equipment aligns each keyword aligned according to the ordinate according to the abscissa to obtain each keyword aligned according to the abscissa and aligned according to the ordinate. Through twice sequencing alignment, the typesetting mode is more automatic and intelligent. The alignment according to the ordinate can be from small to large or from large to small according to the ordinate. The alignment according to the abscissa can be from small to large or from large to small according to the abscissa. In one embodiment, the predetermined sorting algorithm described above may be used with the ordinate aligned and the abscissa aligned, for example, a bubble sorting algorithm may be used with the ordinate aligned small to large and with the abscissa aligned small to large.
In one embodiment, in addition to the above-mentioned manner of aligning the ordinate first and then aligning the abscissa, the electronic device may also align the abscissa first and then align the ordinate. Specifically, the electronic device may also align each keyword in the initial file template according to an abscissa according to the coordinate information of each keyword, so as to obtain each keyword aligned according to the abscissa; and the electronic equipment aligns each keyword aligned according to the abscissa according to the ordinate to obtain each keyword aligned according to the ordinate and aligned according to the abscissa.
Or, the keywords in the initial document template include part of the keywords in the target keywords, and the electronic device typesets the keywords in the initial document template according to a preset typesetting rule to obtain a standard document template, which may include: the electronic equipment acquires a keyword position information record table, wherein the keyword position information record table comprises position information of partial keywords in the target keywords; the position information of the partial keywords is determined according to the position information of the partial keywords in the at least two files; the electronic equipment adjusts the position of each keyword in the initial file template according to the position information of the partial keywords and obtains the adjusted initial file template; and the electronic equipment determines the adjusted initial file template as a standard file template.
In an embodiment, the keywords in the initial file template may further include other keywords, the electronic device may further obtain location information set for the other keywords, and the electronic device adjusts locations of the other keywords in the initial file template according to the location information of the other keywords, and obtains the adjusted initial file template.
In an embodiment, the electronic device may further respond to a layout operation on the keywords in the initial document template, and adjust the positions of the target keywords, or adjust the positions of some of the keywords in the target keywords, and/or adjust the positions of other keywords according to the layout operation, so as to obtain an adjusted initial document template.
In an embodiment, the electronic device may further adjust the keywords in the standard file template according to a preset display rule. For example, the keywords in the standard file template may be bolded, the font of the keywords in the standard file template may be adjusted to be a preset font or a preset model, the line number between the keywords in the standard file template may be adjusted to be a preset line number, and the line spacing of the standard file template may be adjusted to be a preset line spacing. In an embodiment, the preset font, the preset model, the preset line number, and the preset line spacing may all be display rules adopted by any one of the at least two recorded files, that is, the preset font model is a model of a keyword of any one of the at least two recorded files, and the line number between the keywords is a line number between keywords of any one of the at least two recorded files.
As can be seen, in the embodiment shown in fig. 1, the electronic device may obtain at least two files with the same category in a target service scene, identify a target information group between the at least two files according to a preset identification rule, and record keywords included in the target information group; the electronic equipment can also filter the keywords included in the target information group to obtain target keywords, and generate an initial file template by using the target keywords, so that the keywords in the initial file template are typeset according to a preset typesetting rule to obtain a standard file template, the flexibility of the template in different service scenes is improved, and the expandability of the template is improved.
Please refer to fig. 2, which is a flowchart illustrating another template creation method according to an embodiment of the present application. Wherein the method can be applied to electronic devices. Specifically, the method may comprise the steps of:
s201, acquiring at least two files with the same category in a target service scene, wherein each file comprises one or more information groups, and each information group comprises at least one keyword and a content item corresponding to each keyword;
s202, identifying a target information group between the at least two files according to a preset identification rule, and recording keywords included in the target information group;
s203, filtering keywords included in the target information group to obtain target keywords;
s204, generating an initial file template comprising the target keywords or part of the keywords in the target keywords;
s205, typesetting the keywords in the initial file template according to a preset typesetting rule to obtain a standard file template, wherein the standard file template is used for converting the file to be standardized in the target service scene into a standardized file.
Steps S201 to S205 can refer to steps S101 to S105 in the embodiment of fig. 1, and the embodiments of the present application are not described herein again.
S206, matching a target content item from the file to be standardized by using the standard file template, wherein the target content item is a content item corresponding to the keyword included in the standard file template.
In order to be able to forward the file to be standardized to a standardized file, the electronic device may match the target content item from the file to be standardized using the standard file template.
For example, the standard document template is a standard document template corresponding to the arbitration book. The keywords in the standard file template comprise a complainer, a complainer and a case manager. The document to be standardized is a written arbitration book for the relevant person. The document to be standardized includes a complainer: zhangqi and the loved one: lie and table are as follows: xx disputes. The electronic equipment can match Zhangyi, Lijiang and Tujing from the file to be standardized.
In one embodiment, the matching, by the electronic device, the target content item from the file to be standardized using the standard file template may include: the electronic equipment searches keywords included in the standard file template in the files to be standardized in a global mode, and records content items corresponding to the keywords included in the standard file template.
In one embodiment, the electronic device may record the content item after the first occurrence position of the keyword, based on the first occurrence position of each keyword in the keywords included in the standard file template.
And S207, filling the content items corresponding to the target keywords in the standard file template to obtain the filled standard file template.
S208, determining the filled standard file template as a standardized file of the file to be standardized.
For example, the electronic device may open a file, leave a file, and post-office, sequentially fill the standard document template to obtain the filled standard document template, and determine the filled standard document template as the standardized file of the file to be standardized.
In one embodiment, the electronic device populating the target content item in the standard file template may include: and the electronic equipment fills the corresponding content items in the appointed position range behind the keywords included in the standard file template in sequence. Wherein, the designated position range corresponding to each keyword can be different. In one embodiment, the designated position range may be the aforementioned preset position range.
For example, the electronic device may be behind a complainer who fills the standard document template, and behind a case that xx disputes fill the standard document template.
In one embodiment, the electronic device may further respond to an editing operation on the standardized file, and edit the standardized file according to the editing operation, so as to obtain a file desired by a user. The expected file can be understood as the file finally needed by the user, and the user experience can be effectively improved.
As can be seen, in the embodiment shown in fig. 2, the electronic device may convert the file to be standardized in the target service scene into the standardized file by using the standard file template, so as to improve the conversion efficiency of the file to be standardized in the target service scene.
Please refer to fig. 3, which is a schematic structural diagram of a template creating apparatus according to an embodiment of the present application. The template creation means may be applied to an electronic device. Specifically, the template creation means may include:
an obtaining module 301, configured to obtain at least two files with the same category in a target service scenario, where each file includes one or more information groups, and each information group includes at least one keyword and a content item corresponding to each keyword;
a first processing module 302, configured to identify a target information group between the at least two files according to a preset identification rule, and record a keyword included in the target information group; the target information group is an information group where the same target keywords in the at least two files are located;
a filtering module 303, configured to filter keywords included in the target information group to obtain target keywords;
the second processing module 304 is configured to generate an initial file template including the target keywords or part of the keywords in the target keywords, and perform typesetting on the keywords in the initial file template according to a preset typesetting rule to obtain a standard file template, where the standard file template is used to convert a file to be standardized in the target service scene into a standardized file.
In an optional implementation manner, the first processing module 302 is specifically configured to compare the at least two files, and identify a plurality of identical keywords between the at least two files; when determining that content items corresponding to the same target keywords in the at least two files are different or the similarity between the content items is less than or equal to a preset similarity, determining an information group in which the same target keywords are located as a target information group between the at least two files; wherein the target identical keyword is any one of a plurality of identical keywords between the at least two files.
In an optional implementation manner, the first processing module 302 compares the at least two files, specifically, any one of the following operations: comparing the at least two files line by line from the initial positions or other positions of the at least two files; and comparing every other multiple rows of the at least two files from the starting positions or other positions of the at least two files.
In an optional implementation manner, the filtering module 303 is specifically configured to perform validity check on each keyword in the keywords included in the target information group; the legality checking mode comprises sensitive content identification and/or illegal keyword library query; the illegal keyword library comprises one or more illegal keywords; and determining the keywords passing the validity check in the keywords included in the target information group as the target keywords.
In an optional implementation manner, the second processing module 304 is specifically configured to obtain a keyword location information record table, where the keyword location information record table includes location information of each keyword in the target keyword; the position information of each keyword is determined according to the position information of the keyword in the at least two files; adjusting the position of each keyword in the initial file template according to the position information of each keyword, and obtaining the adjusted initial file template; and determining the adjusted initial file template as a standard file template.
In an alternative embodiment, the position information includes coordinate information including an abscissa and an ordinate. The second processing module 304 adjusts the position of each keyword in the initial file template according to the position information of each keyword, specifically, aligns each keyword in the initial file template according to a vertical coordinate according to the coordinate information of each keyword, and obtains each keyword aligned according to the vertical coordinate; and aligning each keyword aligned according to the ordinate according to the abscissa to obtain each keyword aligned according to the abscissa and aligned according to the ordinate.
In an optional implementation manner, the second processing module 304 is further configured to match a target content item from a file to be normalized by using the standard file template, where the target content item is a content item corresponding to a keyword included in the standard file template; filling the target content items in the standard file template to obtain the filled standard file template; and determining the standard file template after filling as a standardized file of the file to be standardized.
As can be seen, in the embodiment shown in fig. 3, the electronic device may obtain at least two files with the same category in a target service scene, identify a target information group between the at least two files according to a preset identification rule, and record keywords included in the target information group; the electronic equipment can also filter the keywords included in the target information group to obtain target keywords, and generate an initial file template by using the target keywords, so that the keywords in the initial file template are typeset according to a preset typesetting rule to obtain a standard file template, the flexibility of the template in different service scenes is improved, and the expandability of the template is improved.
Please refer to fig. 4, which is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. The electronic device described in this embodiment may include: a processor 1000 and a memory 2000. The processor 1000 and the memory 2000 may be connected by a bus or other means as shown in fig. 4. In one embodiment, referring to fig. 4, the electronic device may also include one or more input devices 3000, one or more output devices 4000. The processor 1000, memory 2000, one or more input devices 3000, and one or more output devices 4000 may be connected by a bus or other means. In one embodiment, input device 3000 includes, but is not limited to, a touch screen, a sound recorder, a sensor, and the like. Output devices 4000 include, but are not limited to, a display screen, speakers, etc. Optionally, the touch screen and the display screen may also be touch display screens. The input device 3000 and the output device 4000 may include standard wired or wireless communication interfaces.
The Processor 1000 may be a Central Processing Unit (CPU), and may be other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 2000 may be a high-speed RAM memory or a non-volatile memory (e.g., a disk memory). The memory 2000 is used to store a set of program codes, and the processor 1000, the input device 3000, and the output device 4000 may call the program codes stored in the memory 2000. Specifically, the method comprises the following steps:
the processor 1000 is configured to acquire at least two files with the same category in a target service scenario, where each file includes one or more information groups, and each information group includes at least one keyword and a content item corresponding to each keyword; identifying a target information group between the at least two files according to a preset identification rule, and recording keywords included by the target information group; the target information group is an information group where the same target keywords in the at least two files are located; filtering keywords included in the target information group to obtain target keywords; generating an initial file template comprising the target keywords or partial keywords in the target keywords; and typesetting the keywords in the initial file template according to a preset typesetting rule to obtain a standard file template, wherein the standard file template is used for converting the file to be standardized in the target service scene into a standardized file.
Optionally, the processor 1000 identifies a target information group between the at least two files according to a preset identification rule, specifically, compares the at least two files, and identifies a plurality of identical keywords between the at least two files; when determining that content items corresponding to the same target keywords in the at least two files are different or the similarity between the content items is less than or equal to a preset similarity, determining an information group in which the same target keywords are located as a target information group between the at least two files; wherein the target identical keyword is any one of a plurality of identical keywords between the at least two files.
Optionally, the processor 1000 compares the at least two files, specifically, any one of the following operations: comparing the at least two files line by line from the initial positions or other positions of the at least two files; and comparing every other multiple rows of the at least two files from the starting positions or other positions of the at least two files.
Optionally, the processor 1000 performs filtering processing on the keywords included in the target information group to obtain target keywords, specifically performs validity check on each keyword in the keywords included in the target information group; the legality checking mode comprises sensitive content identification and/or illegal keyword library query; the illegal keyword library comprises one or more illegal keywords; and determining the keywords passing the validity check in the keywords included in the target information group as the target keywords.
Optionally, the keywords in the initial document template include the target keywords, and the processor 1000 performs typesetting on the keywords in the initial document template according to a preset typesetting rule to obtain a standard document template, specifically, to obtain a keyword position information record table, where the keyword position information record table includes position information of each keyword in the target keywords; the position information of each keyword is determined according to the position information of the keyword in the at least two files; adjusting the position of each keyword in the initial file template according to the position information of each keyword, and obtaining the adjusted initial file template; and determining the adjusted initial file template as a standard file template.
Optionally, the position information includes coordinate information, the coordinate information includes an abscissa and an ordinate, and the processor 1000 adjusts the position of each keyword in the initial file template according to the position information of each keyword, specifically, aligns each keyword in the initial file template according to the ordinate according to the coordinate information of each keyword, to obtain each keyword aligned according to the ordinate; and aligning each keyword aligned according to the ordinate according to the abscissa to obtain each keyword aligned according to the abscissa and aligned according to the ordinate.
Optionally, the processor 1000 is further configured to match a target content item from a file to be normalized by using the standard file template, where the target content item is a content item corresponding to a keyword included in the standard file template; filling the target content items in the standard file template to obtain the filled standard file template; and determining the standard file template after filling as a standardized file of the file to be standardized.
In a specific implementation, the processor 1000, the input device 3000, and the output device 4000 described in this embodiment of the present application may perform the implementation described in the embodiment of fig. 1 and fig. 2, or may perform the implementation described in this embodiment of the present application, and are not described herein again.
The functional modules in the embodiments of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a form of sampling hardware, and can also be realized in a form of sampling software functional modules.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The medium is a computer-readable storage medium, which may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
While the invention has been described with reference to a preferred embodiment, it will be understood by those skilled in the art that various changes in form and detail may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. A template creation method, comprising:
acquiring at least two files with the same category in a target service scene, wherein each file comprises one or more information groups, and each information group comprises at least one keyword and a content item corresponding to each keyword;
identifying a target information group between the at least two files according to a preset identification rule, and recording keywords included by the target information group; the target information group is an information group where the same target keywords in the at least two files are located;
filtering keywords included in the target information group to obtain target keywords;
generating an initial file template comprising the target keywords or partial keywords in the target keywords;
and typesetting the keywords in the initial file template according to a preset typesetting rule to obtain a standard file template, wherein the standard file template is used for converting the file to be standardized in the target service scene into a standardized file.
2. The method according to claim 1, wherein the identifying the target information group between the at least two files according to a preset identification rule comprises:
comparing the at least two files, and identifying a plurality of identical keywords between the at least two files;
when determining that content items corresponding to the same target keywords in the at least two files are different or the similarity between the content items is less than or equal to a preset similarity, determining an information group in which the same target keywords are located as a target information group between the at least two files; wherein the target identical keyword is any one of a plurality of identical keywords between the at least two files.
3. The method of claim 2, wherein the comparing the at least two files comprises any one of:
comparing the at least two files line by line from the initial positions or other positions of the at least two files;
and comparing every other multiple rows of the at least two files from the starting positions or other positions of the at least two files.
4. The method according to claim 1, wherein the filtering the keywords included in the target information group to obtain the target keywords comprises:
carrying out validity check on each keyword in the keywords included in the target information group; the legality checking mode comprises sensitive content identification and/or illegal keyword library query; the illegal keyword library comprises one or more illegal keywords;
and determining the keywords passing the validity check in the keywords included in the target information group as the target keywords.
5. The method according to claim 1, wherein the keywords in the initial document template include the target keywords, and the typesetting of the keywords in the initial document template according to the preset typesetting rule to obtain a standard document template comprises:
acquiring a keyword position information record table, wherein the keyword position information record table comprises position information of each keyword in the target keywords; the position information of each keyword is determined according to the position information of the keyword in the at least two files;
adjusting the position of each keyword in the initial file template according to the position information of each keyword, and obtaining the adjusted initial file template;
and determining the adjusted initial file template as a standard file template.
6. The method of claim 5, wherein the location information comprises coordinate information, the coordinate information comprises an abscissa and an ordinate, and the adjusting the location of each keyword in the initial document template according to the location information of each keyword comprises:
aligning each keyword in the initial file template according to a vertical coordinate according to the coordinate information of each keyword to obtain each keyword aligned according to the vertical coordinate;
and aligning each keyword aligned according to the ordinate according to the abscissa to obtain each keyword aligned according to the abscissa and aligned according to the ordinate.
7. The method according to any one of claims 1-6, further comprising:
matching a target content item from a file to be standardized by using the standard file template, wherein the target content item is a content item corresponding to a keyword included in the standard file template;
filling the target content items in the standard file template to obtain the filled standard file template;
and determining the standard file template after filling as a standardized file of the file to be standardized.
8. A template creation apparatus, characterized by comprising:
the system comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring at least two files with the same category in a target service scene, each file comprises one or more information groups, and each information group comprises at least one keyword and a content item corresponding to each keyword;
the first processing module is used for identifying a target information group between the at least two files according to a preset identification rule and recording keywords included by the target information group; the target information group is an information group where the same target keywords in the at least two files are located;
the filtering module is used for filtering the keywords included in the target information group to obtain target keywords;
and the second processing module is used for generating an initial file template comprising the target keywords or part of the keywords in the target keywords, and typesetting the keywords in the initial file template according to a preset typesetting rule to obtain a standard file template, wherein the standard file template is used for converting the file to be standardized in the target service scene into a standardized file.
9. An electronic device, comprising a processor and a memory, the processor and the memory being interconnected, wherein the memory is configured to store a computer program comprising program instructions, the processor being configured to invoke the program instructions to perform the method of any one of claims 1-7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which is executed by a processor to implement the method according to any one of claims 1-7.
CN201910813708.1A 2019-08-30 2019-08-30 Template creating method and device, electronic equipment and storage medium Active CN110619115B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910813708.1A CN110619115B (en) 2019-08-30 2019-08-30 Template creating method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910813708.1A CN110619115B (en) 2019-08-30 2019-08-30 Template creating method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110619115A true CN110619115A (en) 2019-12-27
CN110619115B CN110619115B (en) 2022-08-02

Family

ID=68922633

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910813708.1A Active CN110619115B (en) 2019-08-30 2019-08-30 Template creating method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110619115B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111221777A (en) * 2020-01-02 2020-06-02 中国银行股份有限公司 Data record matching method and device
CN111325014A (en) * 2020-02-28 2020-06-23 维沃移动通信有限公司 Report content generation method and electronic equipment
CN111400246A (en) * 2020-03-26 2020-07-10 广州酷旅旅行社有限公司 Asynchronous file importing method and device, computer equipment and storage medium
CN111898355A (en) * 2020-07-08 2020-11-06 中国南方电网有限责任公司 Design method for general model of process layer network equipment of intelligent substation
CN112667767A (en) * 2020-12-31 2021-04-16 北京百炼智能科技有限公司 Information processing method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104933077A (en) * 2014-03-20 2015-09-23 上海宝信软件股份有限公司 Rule-based multi-file information analysis method
CN106447295A (en) * 2016-09-29 2017-02-22 广州鹤互联网科技有限公司 Sign-off file template generation method and apparatus thereof
US20170212729A1 (en) * 2016-01-22 2017-07-27 Wipro Limited Methods for generating smart archtecture templates and devices thereof
CN109800404A (en) * 2019-01-03 2019-05-24 深圳壹账通智能科技有限公司 Electronic contract template generation method, device, computer equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104933077A (en) * 2014-03-20 2015-09-23 上海宝信软件股份有限公司 Rule-based multi-file information analysis method
US20170212729A1 (en) * 2016-01-22 2017-07-27 Wipro Limited Methods for generating smart archtecture templates and devices thereof
CN106447295A (en) * 2016-09-29 2017-02-22 广州鹤互联网科技有限公司 Sign-off file template generation method and apparatus thereof
CN109800404A (en) * 2019-01-03 2019-05-24 深圳壹账通智能科技有限公司 Electronic contract template generation method, device, computer equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
QIANG SIMA ET AL.: "Keyword Query Approach over RDF Data Based on Tree Template", 《2016 IEEE INTERNATIONAL CONFERENCE ON BIG DATA ANALYSIS (ICBDA)》 *
刘伟成 等: "专题文献过滤系统中的用户模板构建技术研究", 《情报理论与实践》 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111221777A (en) * 2020-01-02 2020-06-02 中国银行股份有限公司 Data record matching method and device
CN111221777B (en) * 2020-01-02 2024-01-30 中国银行股份有限公司 Data record matching method and device
CN111325014A (en) * 2020-02-28 2020-06-23 维沃移动通信有限公司 Report content generation method and electronic equipment
CN111400246A (en) * 2020-03-26 2020-07-10 广州酷旅旅行社有限公司 Asynchronous file importing method and device, computer equipment and storage medium
CN111400246B (en) * 2020-03-26 2023-12-19 广州酷旅旅行社有限公司 Asynchronous file import method, device, computer equipment and storage medium
CN111898355A (en) * 2020-07-08 2020-11-06 中国南方电网有限责任公司 Design method for general model of process layer network equipment of intelligent substation
CN111898355B (en) * 2020-07-08 2024-02-13 中国南方电网有限责任公司 Intelligent substation process layer network equipment general model design method
CN112667767A (en) * 2020-12-31 2021-04-16 北京百炼智能科技有限公司 Information processing method and device

Also Published As

Publication number Publication date
CN110619115B (en) 2022-08-02

Similar Documents

Publication Publication Date Title
CN110619115B (en) Template creating method and device, electronic equipment and storage medium
CN109360550B (en) Testing method, device, equipment and storage medium of voice interaction system
JP6799574B2 (en) Method and device for determining satisfaction with voice dialogue
WO2021151270A1 (en) Method and apparatus for extracting structured data from image, and device and storage medium
US20180341741A1 (en) Method for performing netlist comparison based on pin connection relationship of components
US11423232B2 (en) Systems and methods for deploying computerized conversational agents
CN112579733B (en) Rule matching method, rule matching device, storage medium and electronic equipment
CN112783825B (en) Data archiving method, device, computer device and storage medium
CN114040012B (en) Information query pushing method and device and computer equipment
CN109726290B (en) Complaint classification model determination method and device and computer-readable storage medium
CN112149708A (en) Data model selection optimization method and device, computer device and storage medium
KR102280490B1 (en) Training data construction method for automatically generating training data for artificial intelligence model for counseling intention classification
CN114186059A (en) Article classification method and device
CN115544214B (en) Event processing method, device and computer readable storage medium
CN111369294A (en) Software cost estimation method and device
KR20180061876A (en) An E-book Production System Using Automatic Placement Of Illustration And Text
WO2023236257A1 (en) Document search platform, search method and apparatus, electronic device, and storage medium
CN115422125A (en) Electronic document automatic filing method and system based on intelligent algorithm
CN115269910A (en) Audio and video auditing method and system
CN111243351B (en) Foreign language spoken language training system based on word segmentation technology, client and server
CN114780712A (en) Quality evaluation-based news topic generation method and device
CN114141235A (en) Voice corpus generation method and device, computer equipment and storage medium
CN112631920A (en) Test method, test device, electronic equipment and readable storage medium
CN112307295A (en) Corpus generalization method and apparatus combining RPA and AI, and electronic device
JP2009205259A (en) Method for designing layout of semiconductor integrated circuit

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