CN109766531A - Template generation method, device, computer equipment and storage medium - Google Patents
Template generation method, device, computer equipment and storage medium Download PDFInfo
- Publication number
- CN109766531A CN109766531A CN201811537009.0A CN201811537009A CN109766531A CN 109766531 A CN109766531 A CN 109766531A CN 201811537009 A CN201811537009 A CN 201811537009A CN 109766531 A CN109766531 A CN 109766531A
- Authority
- CN
- China
- Prior art keywords
- template
- comparison result
- information
- comparison
- compared
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 54
- 238000005457 optimization Methods 0.000 claims abstract description 80
- 230000008859 change Effects 0.000 claims description 38
- 230000009471 action Effects 0.000 claims description 16
- 238000004590 computer program Methods 0.000 claims description 10
- 235000013399 edible fruits Nutrition 0.000 claims description 7
- 238000012827 research and development Methods 0.000 abstract 1
- 238000010586 diagram Methods 0.000 description 11
- 230000008569 process Effects 0.000 description 8
- 238000004364 calculation method Methods 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 2
- 239000000463 material Substances 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 238000012216 screening Methods 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000003340 mental effect Effects 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 210000003739 neck Anatomy 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000012800 visualization Methods 0.000 description 1
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
This application involves research and development to manage, a kind of template generation method, device, computer equipment and storage medium are provided, method includes: to obtain information to be compared, information to be compared includes same type of first template and at least one second template, first template includes the first template element information, and the second template includes the second template element information;The comparison model that information input to be compared has been trained is compared, the corresponding comparison result of information to be compared is obtained;The difference character string comparison result in comparison result is obtained, template optimized rule is obtained, target string is determined from difference character string comparison result according to template optimized rule, optimization template is written into target string;The identical characters string comparison result in comparison result is obtained, by the corresponding identical characters string write-in optimization template of identical characters string comparison result, profession and comprehensive template can be generated effective and rapidly online.
Description
Technical field
This application involves field of computer technology, more particularly to a kind of template generation method, device, computer equipment and
Storage medium.
Background technique
With the development of field of computer technology, various types of templates emerge one after another.Different business is needed not
Same template, people need to take a significant amount of time to edit template, while also needing to take a significant amount of time and carrying out material
It collects, the reference between template compares and pay many mental activities.
Traditional template generation method needs user to take considerable time and edits, and editing the template generated may
It is imperfect that there are contents, the problem of professional difference.
Summary of the invention
Based on this, it is necessary in view of the above technical problems, provide a kind of template generation method, device, computer equipment and
Storage medium can generate profession and comprehensive template effective and rapidly online.
A kind of template generation method, which comprises
Information to be compared is obtained, the information to be compared includes same type of first template and at least one second mould
Plate;
The comparison model that the information input to be compared has been trained is compared, it is corresponding to obtain the information to be compared
Comparison result;
The difference character string comparison result in the comparison result is obtained, template optimized rule is obtained, according to the template
The principle of optimality determines target string from the difference character string comparison result, and optimization mould is written in the target string
Plate;
The identical characters string comparison result in the comparison result is obtained, the identical characters string comparison result is corresponding
The optimization template is written in identical characters string.
The comparison model that the information input to be compared has been trained is compared in one of the embodiments,
After the comparison result for obtaining the information to be compared, further includes:
It is obtained according to the comparison result and compares different information;
The comparison different information is protruded and is marked in same type of first template and at least one second template,
Same type of first template and at least one second template are to be displayed side by side;
According to it is described comparison different information obtain terminal send to same type of first template or at least one
The edit operation of second template instructs, and generates corresponding self-defined template according to edit operation instruction.
First template includes the first template element information in one of the embodiments, and second template includes
Second template element information, the comparison model that the information input to be compared has been trained are compared, obtain it is described to
The comparison result of comparison information includes:
The first template element information and the second template element information are inputted into the comparison model trained, the comparison
Model obtains identical characters string according to the first template element information and the second template element information;
The comparison model is according to identical characters string position output phase in a template with character string comparison result;
The comparison model compares the corresponding component attributes of the identical characters string and obtains component attributes comparison result;
The comparison model is according to the difference section of the first template element information and the second template element information
Obtain difference character string comparison result;
It will be described in the write-in of the identical characters string comparison result, component attributes comparison result and difference character string comparison result
In comparison result.
It is described in one of the embodiments, to obtain template optimized rule, according to described template optimized regular from the difference
Determine that target string includes: in different character string comparison result
Obtain stereotype information corresponding with the difference character string comparison result;
Difference character string weight corresponding with the difference character string comparison result is determined according to the stereotype information
Information;
The target string is determined according to the difference character string weight information.
It is described in one of the embodiments, that optimization template is generated according to the template optimized rule and the comparison result
Later, further includes:
Obtain the corresponding keyword of template of different field;
According to the corresponding keyword of template of element information and the different field in the optimization template, described in calculating
Optimize template similarity corresponding with the template of the different field;
The corresponding target domain of the optimization template is obtained according to the similarity;
The optimization template is added to the corresponding template set of the target domain.
It is described in one of the embodiments, that optimization template is generated according to the template optimized rule and the comparison result
Later, further includes:
Obtain optimization template change in factor trigger action;
Corresponding change in factor operation is executed according to the change in factor trigger action;
The corresponding element information of change in factor operation is updated and is saved into the optimization template.
A kind of payment mechanism, described device include:
Data obtaining module, for obtaining information to be compared, the information to be compared includes same type of first template
With at least one the second template;
Information comparison module, the comparison model for having trained the information input to be compared are compared, and obtain institute
State the corresponding comparison result of information to be compared;
First template generation module obtains template for obtaining the difference character string comparison result in the comparison result
The principle of optimality determines target string according to the template optimized rule from the difference character string comparison result, will be described
Target string write-in optimization template;
Second template generation module, for obtaining the identical characters string comparison result in the comparison result, by the phase
The optimization template is written with the corresponding identical characters string of character string comparison result.
Described device in one of the embodiments, further include:
Difference obtains module, compares different information for obtaining according to the comparison result;
Module is highlighted, by the prominent mark of the comparison different information in same type of first template and at least
One the second template, same type of first template and at least one second template are to be displayed side by side;
Self-defined template generation module, for according to it is described comparison different information obtain terminal send to the same class
The edit operation instruction of the first template or at least one the second template of type, it is corresponding certainly according to edit operation instruction generation
Definition template.
A kind of computer equipment can be run on a memory and on a processor including memory, processor and storage
The step of computer program, the processor realizes the above method when executing described program.
A kind of computer readable storage medium, is stored thereon with computer program, realization when which is executed by processor
The step of above method.
Above-mentioned template generation method, device, computer equipment and storage medium, it is to be compared by obtaining information to be compared
Information includes same type of first template and at least one second template, then the comparison mould that information input to be compared has been trained
Type is compared, can the corresponding comparison result of quick obtaining information to be compared, then obtain the difference character string in comparison result
Comparison result determines target string by template optimized rule from difference character string, can filter out professional and comprehensive excellent
Change template element information, the identical characters string comparison result in comparison result is then obtained, by identical characters string comparison result pair
In identical characters string and target string the write-in optimization template answered, it can generate effective and rapidly online professional and comprehensive
Template.
Detailed description of the invention
Fig. 1 is the applied environment figure of template generation method in one embodiment;
Fig. 2 is the method flow diagram of template generation method in one embodiment;
Fig. 3 is the method flow diagram for generating self-defined template in one embodiment in template generation method;
Fig. 4 is the interface schematic diagram for generating self-defined template in one embodiment in template generation method;
Fig. 5 is the method flow diagram for determining target string in one embodiment in template generation method;
Fig. 6 is the interface schematic diagram for generating optimization template in one embodiment in template generation method;
Fig. 7 is the structural schematic diagram of template generation method device in one embodiment;
Fig. 8 is the schematic diagram of internal structure of computer equipment in one embodiment.
Specific embodiment
It is with reference to the accompanying drawings and embodiments, right in order to which the objects, technical solutions and advantages of the application are more clearly understood
The application is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the application, not
For limiting the application.
Template generation method provided in the embodiment of the present invention can be applied in application environment as shown in Figure 1, clothes
Business device 120 is online or obtains information to be compared from terminal 110, and information to be compared includes same type of first template and at least one
A second template, the first template include the first template element information, and the second template includes the second template element information, server
120 the comparison model that information input to be compared has been trained is compared, then obtains the corresponding comparison result of information to be compared, clothes
The difference character string comparison result being engaged in the acquisition comparison result of device 120, then template optimized rule is obtained, server 120 is according to mould
The plate principle of optimality determines target string from difference character string comparison result, then optimization template, clothes are written in target string
Device 120 of being engaged in obtains identical characters string comparison result in comparison result, and last server 120 is by identical characters string comparison result pair
The identical characters string write-in optimization template answered.
Following embodiments are illustrated so that template generation method is applied to the server of Fig. 1 as an example, but need to illustrate
Be, in practical application this method and not only limit be applied to above-mentioned server.
It as shown in Figure 2 and Figure 6, is the boundary of the flow chart of the template generation method in one embodiment and generation optimization template
Face schematic diagram, this method specifically includes the following steps:
Step 202, obtain information to be compared, information to be compared include same type of first template and at least one second
Template, the first template include the first template element information, and the second template includes the second template element information.
Wherein, information to be compared is the information for needing to be compared between template, and information to be compared includes the word in template
Symbol string information, location information and component attributes information, each template being compared are same type template, the first template and the second mould
Plate can be loaning bill template, lease template, house deal template etc..Specifically, the first template and the second template can be by online
It obtains or is uploaded from the self-defined template of terminal.First template element information and the second template element information are composition templates
Content information, element information can be title, catalogue and the notice regulations etc. in template.
Step 204, the comparison model that information input to be compared has been trained is compared, it is corresponding obtains information to be compared
Comparison result.
Wherein, the comparison model trained is the model for each template element information to be compared.By letter to be compared
The comparison model that breath input has been trained is compared to obtain comparison result, and comparison result includes identical characters string comparison result, difference
Different character string comparison result and component attributes comparison result.Identical characters string comparison result includes in each template being compared
Identical element information comparison result and the corresponding position difference comparison result of identical element information, difference character string compare knot
Fruit is the comparison result that element information has differences in each template being compared, and component attributes comparison result is to be compared
Each template in the corresponding attribute information comparison result of identical element information, attribute information is to allow to insert in element information
Number, font size and color setting etc..It is report, visualization that comparison result, which shows that the form to terminal can be, but not limited to,
Datagram etc..
Step 206, the difference character string comparison result in comparison result is obtained, template optimized rule is obtained, according to template
The principle of optimality determines target string from difference character string comparison result, and optimization template is written in target string.
Specifically, judgement is carried out to the difference character string in comparison result according to the principle of optimality and screening obtains target character
String, wherein the process that the difference character string in comparison result is judged and the screened i.e. diversity ratio of difference character string to point
Analysis process, it is common in the template field using the type template according to the difference character string comparison result in comparison result
Element information, a certain more excellent element information obtains target string in optimum selecting comparison template.The principle of optimality is should in industry
Judgement is compared to filter out target word in the element information that template types include and the element information for including in comparison template
The rule for according with string, will be in determining target string write-in optimization template.
Step 208, the identical characters string comparison result in comparison result is obtained, identical characters string comparison result is corresponding
Identical characters string write-in optimization template.
It is understood that the process for obtaining the identical characters string comparison result in comparison result is to obtain identical characters string
The process of identical element information in comparison result, by the corresponding identical characters string of identical characters string comparison result and the mesh determined
Mark character string is written together in optimization template, generates complete optimization template.
In the present embodiment, pass through and obtain information to be compared, wherein information to be compared include the first template and same type at least
One the second template can accurately, professionally obtain corresponding comparison result, then by template optimized regular from difference character
Target string is determined in string, can be filtered out profession and comprehensive optimization template element information, finally be obtained in comparison result
Identical characters string comparison result, by the corresponding identical characters string of identical characters string comparison result and target string write-in optimization mould
In plate, this process removes the editor of traditional online long period from, finds material and inquiry data, being capable of online key generation
Optimize template, improves the efficiency of template generation, therefore this method can generate profession and comprehensive mould effective and rapidly online
Plate.
As shown in Figure 3 and Figure 4, for generated in the template generation method in one embodiment self-defined template flow chart and
Interface schematic diagram, this method specifically includes the following steps:
Step 302, it is obtained according to comparison result and compares different information.
Wherein, the set that different information is each species diversity generated when being compared between template is compared.In comparison result
Storage has identical characters string comparison result, difference character string comparison result and component attributes comparison result.Discrepancy is further
It extracts and then is formed from comparison result and compare different information.
Step 304, comparison different information is protruded and is marked in same type of first template and at least one second template,
Same type of first template and at least one second template are to be displayed side by side.
Wherein, same type of first template and at least one second template are to be displayed side by side, in order to which user is intuitive
Recognize the otherness between template.The prominent mark of the comparison different information that will acquire is in same type of first template and extremely
In few second template, prominent mark is to be labeled discrepancy by obvious mode, and the form of prominent mark can be with
But it is not limited to highlighted mark, underscore mark, color to highlight mark, font increasing overstriking mark and click through difference
Row flashing display etc..
Step 306, according to compare different information obtain terminal send to same type of first template or at least one
The edit operation of second template instructs, and generates corresponding self-defined template according to edit operation instruction.
Specifically, user is for template to the edit operation of same type of first template or at least one the second template
The sequence of operations that middle element information, component attributes or elements position carry out.For example, can be with subscribing the element information in template
For " legal representative ", " Party B/subscriber " and " phone " etc., component attributes then can be the permission of " Party B/subscriber " column
Number, font size and color setting of filling etc., elements position is the position where element, such as " legal representative " element
Position is in the top of " Party B/subscriber " elements position.Specifically, the edit operation of user, which can be, carries out element information
Modification is deleted and is increased, and elements position is pulled, component attributes are further arranged.The editor of user grasps
Make, when template is completed by editor, to generate self-defined template based on wherein any one template compared.
In the present embodiment, different information is compared by obtaining according to comparing result, then the prominent mark of different information will be compared
With same type of first template and at least one second template, the otherness between intuitive indicating template, then root can be understood
The edit operation instruction for obtaining terminal to any one template according to different information is compared, further generates self-defined template, can
Where difference between simple and clear displaying template, the self-defined template for meeting user demand can be easily generated.
In one embodiment, the comparison model that information input to be compared has been trained is compared, obtains letter to be compared
The comparison result of breath includes: that the first template element information and the second template element information are inputted the comparison model trained, than
Identical characters string is obtained according to the first template element information and the second template element information to model, comparison model is according to same word
For the position output phase of symbol string in a template with character string comparison result, comparison model compares the corresponding component attributes of identical characters string
Obtain component attributes comparison result, comparison model is according to the difference section of the first template element information and the second template element information
Difference character string comparison result is obtained, identical characters string comparison result, component attributes comparison result and difference character string are compared
As a result it is written in comparison result.
Wherein, identical characters string comparison result includes identical element information comparison result in each template being compared
The corresponding position difference comparison result with identical element information, difference character string comparison result are each template being compared
The comparison result that middle element information has differences, component attributes comparison result are identical element in each template being compared
The corresponding attribute information comparison result of information, attribute information are number, font size and the color for allowing to insert in element information
Setting etc..
Specifically, the first template element information and the second template element information are inputted the comparison model trained by server
In be compared, comparison model is by extracting all element informations in the first template and the second template, and to the first template and the
All element informations in two templates obtain identical element information comparison result by way of extracting character string, further according to
Identical element information position corresponding in each self-template, obtains elements position different information comparison result, by element position
It sets in different information comparison result and identical element information comparison result write-in identical characters string comparison result.Comparison model root
It carries out obtaining attribute information corresponding to identical element information according to the corresponding element information of identical characters string comparison result and obtain
Component attributes comparison result obtains difference character according to the difference section of the first template element information and the second template element information
String comparison result.
In the present embodiment, by the way that the first template element information and the second template element information are inputted the comparison mould trained
Type is compared, and obtains identical characters string comparison result, and identical characters string comparison result includes that identical element information compares knot
Differential position information comparison corresponding to fruit and identical element information is as a result, it is possible to comprehensively identify element in each template
Otherness obtains component attributes comparison result further according to identical characters string comparison result, further gos deep into, comprehensively obtains template
Between otherness, difference character is finally obtained according to the difference section of the first template element information and the second template element information
String comparison result, identical characters string comparison result, component attributes comparison result and difference character string comparison result are written and compared
As a result in, can comprehensively, profession and where in depth identifying difference between each template, by identifying between each template
Otherness further fast and easily generates optimization template.
As shown in figure 5, for the flow chart for determining target string in the template generation method in one embodiment, this method
Specifically includes the following steps:
Step 402, stereotype information corresponding with difference character string comparison result is obtained.
Wherein, stereotype information is according to the obtained template type of difference character string, and stereotype information can be
Lease template, subscribes template and house deal template etc. at template of borrowing money.
Step 404, difference character string weight corresponding with difference character string comparison result is determined according to stereotype information
Information.
Wherein, difference character string weight information be difference character string in affiliated stereotype a certain character string in the template
The probabilistic information that classification occurs, for example, the character string that loaning bill template often occurs is borrower and loan interest etc..
Step 406, target string is determined according to difference character string weight information.
Specifically, target string is filtered out from difference character string comparison result according to difference character string weight information,
Target string is to select a screening from same type of first template and same type element information at least one second template
String assemble out.For example, the difference character string got compares when the first template and the second template are all to subscribe template
Result may be fax or fax number, Party B/subscriber could fill out a people or Party B/subscriber could fill out more people, according to mould
It is that fax number and Party B/subscriber could fill out more people that the common character string in subscribing template, which can be obtained, in plate classification information, then
Fax number and Party B/subscriber could fill out the height of character string weight shared by more people, and the high character string of difference character string weight is true
It is set to target string, i.e., fax number and Party B/subscriber is could fill out into more people and are determined as target string.
In the present embodiment, by obtaining stereotype information corresponding with difference character string comparison result, further according to template
Classification information determines difference character string weight information corresponding with difference character string comparison result, then by difference character string weight
High character string is determined as target string, being capable of on-line automatic generation profession and comprehensive template.
In one embodiment, it is generated according to template optimized rule and comparison result after optimizing template, further includes: obtain
The corresponding keyword of the template of different field, according to the corresponding key of template of element information and different field in optimization template
Word, calculation optimization template similarity corresponding with the template of different field obtain the corresponding target of optimization template according to similarity
Optimization template is added to the corresponding template set of target domain by field.
Specifically, the corresponding keyword of the template of different field is common element information corresponding with the domain template, root
According to the corresponding common element information of template of element information and different field in optimization template, calculation optimization template and different necks
The corresponding similarity of the template in domain, similarity are the character string information for optimizing all element informations and a certain domain template in template
Coincidence factor, for example, when optimizing the element information occurred in template is " lessor ", " tenantry ", " rent ", it is excellent by calculating
Change template similarity corresponding with the template of different field, it is lease template field that it is highest, which similarity occur, will optimize template
It is matched to the lease template field, then optimization template is added to the corresponding template set in lease template field.
In the present embodiment, by obtaining the corresponding keyword of template of different field, further according to the element in optimization template
The corresponding keyword of the template of information and different field, calculation optimization template similarity corresponding with the template of different field, into
The one step judgement optimization affiliated template field of template obtains the corresponding target domain of optimization template then according to similarity, will optimize
Template is added to the corresponding template set of target domain, optimization template can be divided to corresponding template field, realize optimization
The ordered categorization of template, convenient for subsequent lookup and use to optimization template.
In one embodiment, it is generated according to template optimized rule and comparison result after optimizing template, further includes: obtain
Optimize template change in factor trigger action, corresponding change in factor is executed according to change in factor trigger action and is operated, element is become
The corresponding element information of operation is moved to update and save into optimization template.
Specifically, optimization template change in factor trigger action is the operation of the element relevant information variation of terminal triggering, root
Corresponding change in factor operation is executed according to change in factor trigger action, wherein change in factor operation is element letter in optimization template
Increase, deletion and the moving operation of breath.Terminal can increase a certain element information in optimization template or delete a certain element information,
Also, when element information position is improper, element information position can be changed by way of towing.By change in factor
Operate corresponding element information be updated to optimization template process be by the covering of updated optimization template it is former do not update it is excellent
Change template, and updated optimization template is saved.
In the present embodiment, optimizes template change in factor trigger action by obtaining, held further according to change in factor trigger action
The corresponding change in factor operation of row, is able to achieve the customized editing template of terminal, change in factor is then operated corresponding element and is believed
Breath, which updates, simultaneously to be saved into optimization template, can online editing go out to meet the template of user demand.
As shown in fig. 7, for the schematic diagram of template generation device in an embodiment, which includes:
Data obtaining module 502, for obtaining information to be compared, information to be compared include same type of first template and
At least one second template, the first template include the first template element information, and the second template includes the second template element information;
Information comparison module 504, the comparison model for having trained information input to be compared are compared, obtain to than
Comparison result corresponding to information;
First template generation module obtains template optimized for obtaining the difference character string comparison result in comparison result
Rule determines target string according to template optimized rule from difference character string comparison result, target string is written excellent
Change template;
Second template generation module, for obtaining the identical characters string comparison result in comparison result, by identical characters string
The corresponding identical characters string write-in optimization template of comparison result.
In one embodiment, self-defined template generation module can specifically include:
Difference obtains module, compares different information for obtaining according to comparison result;
Highlight module, will compare the prominent mark of different information in same type of first template and at least one second
Template, same type of first template and at least one second template are to be displayed side by side;
Self-defined template generation module, for according to compare different information obtain terminal send to same type of first
The edit operation of template or at least one the second template instructs, and generates corresponding self-defined template according to edit operation instruction.
In one embodiment, comparison result generation module can specifically include: by the first template element information and second
Template element information inputs the comparison model trained, and comparison model is believed according to the first template element information and the second template element
Breath obtains identical characters string, comparison model according to identical characters string position output phase in a template with character string comparison result,
Comparison model compares the corresponding component attributes of identical characters string and obtains component attributes comparison result, and comparison model is according to the first template
The difference section of element information and the second template element information obtains difference character string comparison result, and identical characters string is compared and is tied
In fruit, component attributes comparison result and difference character string comparison result write-in comparison result.
In one embodiment, target string determining module can specifically include: obtaining and compares knot with difference character string
The corresponding stereotype information of fruit determines difference character string corresponding with difference character string comparison result according to stereotype information
Weight information determines target string according to difference character string weight information.
In one embodiment, optimization template classification module can specifically include: the template for obtaining different field is corresponding
Keyword, according to optimization template in element information and different field the corresponding keyword of template, calculation optimization template with not
The corresponding similarity of the template of same domain obtains the corresponding target domain of optimization template according to similarity, by optimization template addition
To the corresponding template set of target domain.
In one embodiment, change in factor module can specifically include: optimization template change in factor trigger action is obtained,
Corresponding change in factor operation is executed according to change in factor trigger action, change in factor is operated into corresponding element information and is updated simultaneously
It saves into optimization template.
Specific about template generation device limits the restriction that may refer to above for template generation method, herein not
It repeats again.Modules in above-mentioned template generation device can be realized fully or partially through software, hardware and combinations thereof.On
Stating each module can be embedded in the form of hardware or independently of in the processor in computer equipment, can also store in a software form
In memory in computer equipment, the corresponding operation of the above modules is executed in order to which processor calls.The processor
It can be central processing unit (CPU), microprocessor, single-chip microcontroller etc..Above-mentioned template generation device can be implemented as a kind of calculating
The form of machine program.
In one embodiment, a kind of computer equipment is provided, which can be server, be also possible to
Terminal.When the computer equipment is terminal, internal structure chart can be as shown in Figure 8.The computer equipment includes passing through to be
Processor, memory and the network interface of bus of uniting connection.Wherein, the processor of the computer equipment is calculated and is controlled for providing
Ability processed.The memory of the computer equipment includes non-volatile memory medium, built-in storage.The non-volatile memory medium is deposited
Contain operating system and computer program.The built-in storage is operating system and computer program in non-volatile memory medium
Operation provide environment.The network interface of the computer equipment is used to communicate with external terminal by network connection.The calculating
To realize a kind of template generation method when machine program is executed by processor.It will be understood by those skilled in the art that shown in Fig. 8
Structure, only the block diagram of part-structure relevant to application scheme, does not constitute and is applied thereon to application scheme
Computer equipment restriction, specific computer equipment may include than more or fewer components as shown in the figure or group
Certain components are closed, or with different component layouts.
Wherein, it is performed the steps of when processor executes program and obtains information to be compared, information to be compared includes same class
First template of type and at least one second template, the first template include the first template element information, and the second template includes second
The comparison model that information input to be compared has been trained is compared template element information, obtains the corresponding ratio of information to be compared
Pair as a result, obtain comparison result in difference character string comparison result, obtain template optimized rule, according to it is template optimized rule from
Target string is determined in difference character string comparison result, optimization template is written into target string, identical characters string compares knot
The corresponding identical characters string write-in optimization template of fruit.
In one embodiment, it can also be performed the steps of when processor executes program and ratio is obtained according to comparison result
To different information, comparison different information is protruded and is marked in same type of first template and at least one second template, it is same
First template of type and at least one second template are to be displayed side by side, according to comparison different information acquisition terminal transmission to same
The edit operation instruction of the first template or at least one the second template of one type, it is corresponding certainly according to edit operation instruction generation
Definition template.
In one embodiment, it can also perform the steps of when processor executes program by the first template element information
The comparison model trained is inputted with the second template element information, comparison model is according to the first template element information and the second template
Element information obtains identical characters string, and comparison model is compared according to the position output phase of identical characters string in a template with character string
As a result, comparison model, which compares the corresponding component attributes of identical characters string, obtains component attributes comparison result, comparison model is according to the
The difference section of one template element information and the second template element information obtains difference character string comparison result, by identical characters string
In comparison result, component attributes comparison result and difference character string comparison result write-in comparison result.
In one embodiment, acquisition and difference character string ratio can also be performed the steps of when processor executes program
Stereotype information corresponding to result determines difference word corresponding with difference character string comparison result according to stereotype information
Symbol string weight information, determines target string according to difference character string weight information.
In one embodiment, the template for obtaining different field can also be performed the steps of when processor executes program
Corresponding keyword, according to the corresponding keyword of template of element information and different field in optimization template, calculation optimization mould
Plate similarity corresponding with the template of different field obtains the corresponding target domain of optimization template according to similarity, will optimize mould
Plate is added to the corresponding template set of target domain.
In one embodiment, acquisition optimization template element can also be performed the steps of when processor executes program to become
Dynamic trigger action executes corresponding change in factor according to change in factor trigger action and operates, change in factor is operated corresponding want
Prime information is updated and is saved into optimization template.
The above-mentioned restriction for computer equipment may refer to the specific restriction above for template generation method, herein
It repeats no more.
Please continue to refer to Fig. 8, a kind of computer readable storage medium is also provided, is stored thereon with computer program, such as Fig. 8
Shown in non-volatile memory medium, wherein the program performs the steps of when being executed by processor obtains letter to be compared
Breath, information to be compared include same type of first template and at least one second template, and the first template includes that the first template is wanted
Prime information, the second template include the second template element information, and the comparison model that information input to be compared has been trained is compared,
The corresponding comparison result of information to be compared is obtained, the difference character string comparison result in comparison result is taken, obtains template optimized rule
Then, target string is determined from difference character string comparison result according to template optimized rule, target string is written and is optimized
Template, the corresponding identical characters string write-in optimization template of identical characters string comparison result.
In one embodiment, it can also perform the steps of when which is executed by processor and be obtained according to comparison result
Comparison different information is taken, comparison different information is protruded and is marked in same type of first template and at least one second template,
Same type of first template and at least one second template are to be displayed side by side, and obtain what terminal was sent according to different information is compared
Edit operation instruction to same type of first template or at least one the second template, instructs according to edit operation and generates correspondence
Self-defined template.
In one embodiment, it can also be performed the steps of when which is executed by processor by the first template element
Information and the second template element information input the comparison model trained, and comparison model is according to the first template element information and second
Template element information obtains identical characters string, position output phase same character string of the comparison model according to identical characters string in a template
Comparison result, comparison model compare the corresponding component attributes of identical characters string and obtain component attributes comparison result, comparison model root
Difference character string comparison result is obtained according to the difference section of the first template element information and the second template element information, by same word
In symbol string comparison result, component attributes comparison result and difference character string comparison result write-in comparison result.
In one embodiment, acquisition and difference character can also be performed the steps of when which is executed by processor
The corresponding stereotype information of string comparison result determines difference corresponding with difference character string comparison result according to stereotype information
Different character string weight information determines target string according to difference character string weight information.
In one embodiment, it can also be performed the steps of when which is executed by processor and obtain different field
The corresponding keyword of template calculates excellent according to the corresponding keyword of template of element information and different field in optimization template
Change template similarity corresponding with the template of different field, the corresponding target domain of optimization template is obtained according to similarity, it will be excellent
Change template and is added to the corresponding template set of target domain.
In one embodiment, acquisition optimization template can also be performed the steps of when which is executed by processor to want
Element changes trigger action, executes corresponding change in factor according to change in factor trigger action and operates, change in factor is operated and is corresponded to
Element information update and save to optimization template in.
The above-mentioned restriction for computer readable storage medium may refer to above for the specific of template generation method
It limits, details are not described herein.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with
Relevant hardware is instructed to complete by computer program, the program can be stored in a non-volatile computer and can be read
In storage medium, the program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, the storage is situated between
Matter can be magnetic disk, CD, read-only memory (Read-OnlyMemory, ROM) etc..
Each technical characteristic of embodiment described above can be combined arbitrarily, for simplicity of description, not to above-mentioned reality
It applies all possible combination of each technical characteristic in example to be all described, as long as however, the combination of these technical characteristics is not deposited
In contradiction, all should be considered as described in this specification.
The embodiments described above only express several embodiments of the present invention, and the description thereof is more specific and detailed, but simultaneously
It cannot therefore be construed as limiting the scope of the patent.It should be pointed out that coming for those of ordinary skill in the art
It says, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to protection of the invention
Range.Therefore, the scope of protection of the patent of the invention shall be subject to the appended claims.
Claims (10)
1. a kind of template generation method, which comprises
Information to be compared is obtained, the information to be compared includes same type of first template and at least one second template;
The comparison model that the information input to be compared has been trained is compared, the corresponding comparison of the information to be compared is obtained
As a result;
The difference character string comparison result in the comparison result is obtained, template optimized rule is obtained, according to described template optimized
Rule determines target string from the difference character string comparison result, and optimization template is written in the target string;
The identical characters string comparison result in the comparison result is obtained, the identical characters string comparison result is corresponding identical
The optimization template is written in character string.
2. the method according to claim 1, wherein the comparison that the information input to be compared has been trained
Model is compared, after the comparison result for obtaining the information to be compared, further includes:
It is obtained according to the comparison result and compares different information;
It is described by the prominent mark of the comparison different information in same type of first template and at least one second template
Same type of first template and at least one second template are to be displayed side by side;
According to it is described comparison different information obtain terminal send to same type of first template or at least one second
The edit operation of template instructs, and generates corresponding self-defined template according to edit operation instruction.
3. according to the method described in claim 1, first template includes the first template element information, the second template packet
Include the second template element information, which is characterized in that the comparison model for having trained the information input to be compared compares
Right, the comparison result for obtaining the information to be compared includes:
The first template element information and the second template element information are inputted into the comparison model trained, the comparison model
Identical characters string is obtained according to the first template element information and the second template element information;
The comparison model is according to identical characters string position output phase in a template with character string comparison result;
The comparison model compares the corresponding component attributes of the identical characters string and obtains component attributes comparison result;
The comparison model is obtained according to the difference section of the first template element information and the second template element information
Difference character string comparison result;
The comparison is written into the identical characters string comparison result, component attributes comparison result and difference character string comparison result
As a result in.
4. the method according to claim 1, wherein the template optimized rule of acquisition, excellent according to the template
Change rule and determines that target string includes: from the difference character string comparison result
Obtain stereotype information corresponding with the difference character string comparison result;
Difference character string weight information corresponding with the difference character string comparison result is determined according to the stereotype information;
The target string is determined according to the difference character string weight information.
5. the method according to claim 1, wherein described tie according to the template optimized rule and the comparison
Fruit generates after optimization template, further includes:
Obtain the corresponding keyword of template of different field;
According to the corresponding keyword of template of element information and the different field in the optimization template, the optimization is calculated
Template similarity corresponding with the template of the different field;
The corresponding target domain of the optimization template is obtained according to the similarity;
The optimization template is added to the corresponding template set of the target domain.
6. the method according to claim 1, wherein described tie according to the template optimized rule and the comparison
Fruit generates after optimization template, further includes:
Obtain optimization template change in factor trigger action;
Corresponding change in factor operation is executed according to the change in factor trigger action;
The corresponding element information of change in factor operation is updated and is saved into the optimization template.
7. a kind of template generation device, which is characterized in that described device includes:
Data obtaining module, for obtaining information to be compared, the information to be compared includes same type of first template and extremely
Few second template;
Information comparison module, the comparison model for having trained the information input to be compared are compared, obtain it is described to
The corresponding comparison result of comparison information;
First template generation module obtains template optimized for obtaining the difference character string comparison result in the comparison result
Rule determines target string according to the template optimized rule, by the target from the difference character string comparison result
Character string write-in optimization template;
Second template generation module, for obtaining the identical characters string comparison result in the comparison result, by the same word
The optimization template is written in the corresponding identical characters string of symbol string comparison result.
8. device according to claim 7, which is characterized in that described device further include:
Difference obtains module, compares different information for obtaining according to the comparison result;
Module is highlighted, by the prominent mark of the comparison different information in same type of first template and at least one
Second template, same type of first template and at least one second template are to be displayed side by side;
Self-defined template generation module, for according to it is described comparison different information obtain terminal send to described same type of
The edit operation of first template or at least one the second template instructs, and is generated according to edit operation instruction corresponding customized
Template.
9. a kind of computer equipment, including memory and processor, the memory are stored with computer program, feature exists
In the step of processor realizes any one of claims 1 to 6 the method when executing the computer program.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program
The step of any one of claims 1 to 6 the method is realized when being executed by processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811537009.0A CN109766531A (en) | 2018-12-14 | 2018-12-14 | Template generation method, device, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811537009.0A CN109766531A (en) | 2018-12-14 | 2018-12-14 | Template generation method, device, computer equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109766531A true CN109766531A (en) | 2019-05-17 |
Family
ID=66450693
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811537009.0A Pending CN109766531A (en) | 2018-12-14 | 2018-12-14 | Template generation method, device, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109766531A (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2017096967A1 (en) * | 2015-12-10 | 2017-06-15 | 乐视控股(北京)有限公司 | Method and device for self-adaptively displaying web page |
CN108509400A (en) * | 2018-02-07 | 2018-09-07 | 平安普惠企业管理有限公司 | Document template generation method, device, computer equipment and storage medium |
-
2018
- 2018-12-14 CN CN201811537009.0A patent/CN109766531A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2017096967A1 (en) * | 2015-12-10 | 2017-06-15 | 乐视控股(北京)有限公司 | Method and device for self-adaptively displaying web page |
CN108509400A (en) * | 2018-02-07 | 2018-09-07 | 平安普惠企业管理有限公司 | Document template generation method, device, computer equipment and storage medium |
Non-Patent Citations (2)
Title |
---|
JEFFERS, J等: "Entropy of feature point-based retina templates", 《PROCEEDINGS OF THE 2010 20TH INTERNATIONAL CONFERENCE ON PATTERN RECOGNITION》, 31 December 2010 (2010-12-31) * |
林道鸿;吴强;邵雷;万信书;陈中;李东升;: "基于改进编辑距离算法的保护装置测试模板开发", 广东电力, no. 10, 14 November 2018 (2018-11-14) * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9208137B2 (en) | Method to preview an undo/redo list | |
US10067635B2 (en) | Three dimensional conditional formatting | |
US20150277686A1 (en) | Systems and Methods for the Real-Time Modification of Videos and Images Within a Social Network Format | |
CN100492359C (en) | Easy-to-use data context filtering | |
US8135755B2 (en) | Templates in a schema editor | |
CN110958493B (en) | Bullet screen adjusting method and device, electronic equipment and storage medium | |
CN103530114B (en) | Picture managing method and device | |
CN104199858A (en) | Method for retrieving patent documents and visualization patent retrieving system | |
CN112926288A (en) | Business intelligent data visualization method, system, device and readable storage medium | |
CN106599039A (en) | Statistical representation method supporting free combination and nesting of data in relational database | |
US20170140241A1 (en) | Image analysis based color suggestions | |
US10318254B2 (en) | Integrating application features into a platform interface based on application metadata | |
CN112433650B (en) | Project management method, device, equipment and storage medium | |
CN108197203A (en) | A kind of shop front head figure selection method, device, server and storage medium | |
CN107729483A (en) | A kind of classifying indication method, device, terminal and computer-readable recording medium | |
CN110287464A (en) | The methods of exhibiting, device of option data, computer equipment and computer storage medium in list | |
CN116881353A (en) | Financial data display method and device, storage medium and electronic equipment | |
CN113033171B (en) | Template creation method, file generation method, device and computer equipment | |
CN107426595A (en) | Interface navigation data handling system | |
CN109783786A (en) | Input method, mobile terminal and the device with store function of financial affairs receipt | |
CN109766531A (en) | Template generation method, device, computer equipment and storage medium | |
CN106055688A (en) | Search result display method and device and mobile terminal | |
CN116150159A (en) | Method, device, equipment and medium for visualizing enterprise relationship in multiple dimensions | |
CN112732243B (en) | Data processing method and device for generating functional components | |
CN114564197A (en) | Method for distinguishing field authority according to service scene and computer readable storage medium |
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 |