CN108170656A - Template establishment method, document creating method, rendering intent and device - Google Patents

Template establishment method, document creating method, rendering intent and device Download PDF

Info

Publication number
CN108170656A
CN108170656A CN201711455865.7A CN201711455865A CN108170656A CN 108170656 A CN108170656 A CN 108170656A CN 201711455865 A CN201711455865 A CN 201711455865A CN 108170656 A CN108170656 A CN 108170656A
Authority
CN
China
Prior art keywords
paragraph
default
document
template
model
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
CN201711455865.7A
Other languages
Chinese (zh)
Other versions
CN108170656B (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.)
Advanced Nova Technology Singapore Holdings Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201711455865.7A priority Critical patent/CN108170656B/en
Publication of CN108170656A publication Critical patent/CN108170656A/en
Application granted granted Critical
Publication of CN108170656B publication Critical patent/CN108170656B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/186Templates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Computational Linguistics (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Software Systems (AREA)
  • Human Computer Interaction (AREA)
  • Document Processing Apparatus (AREA)

Abstract

This application discloses a kind of document creating method, including:It determines to create template based on document, template identification is included in template;According to template identification, determine with the corresponding default paragraph model of template, preset in paragraph model comprising multiple default paragraphs, pass through the hierarchical relationship between the default paragraph of correspondence reflection between the first paragraph mark of default paragraph;Hierarchical relationship according to being preset in default paragraph model between paragraph creates document, and establish the first incidence relation between the document identification of document and the template identification of template.Disclosed herein as well is template establishment methods and document rendering intent and corresponding device.Using technical solution provided by the embodiments of the present application, when the default paragraph model in document template is adjusted, when creating document according to the template or render the document created according to the template, the hierarchical relationship of each paragraph also can be adjusted dynamically therewith in document, so as to meet the use demand of user.

Description

Template establishment method, document creating method, rendering intent and device
Technical field
This application involves field of computer technology more particularly to template establishment method, document creating method, rendering intent and Device.
Background technology
With the development of computer technology, people more and more rely on document files into row information record with share. In routine work and life, people usually need to create or safeguard the document of some to seek unification form or unified shaders, It may be simply referred to as format file below.For convenience of format file is efficiently created, the lattice of document can be cured with design documentation template Formula so that the format file created by document template disclosure satisfy that unified call format.
After establishment and the editor of format file is completed by document template, people may be as needed to document template It is adjusted, such as the structure of additions and deletions document, changes form of document etc., and it is desirable that used the form that the document template creates Document can be adjusted automatically with the adjustment of document template.
Therefore, there is an urgent need for a kind of template establishment method, document creating method and wash with watercolours that can be adjusted with document template dynamic Dyeing method, to meet the use demand of user.
Invention content
The embodiment of the present application provides template establishment method, document creating method, rendering intent and corresponding device, it is intended to The establishment of document and rendering with the adjustment of document template are dynamically adjusted, meet the use demand of user.
The embodiment of the present application uses following technical proposals:
In a first aspect, the embodiment of the present application provides a kind of document creating method, including:
It determines to create template based on document, template identification is included in the template;
According to the template identification, determine and the corresponding default paragraph model of the template, the default paragraph model In comprising multiple default paragraphs, the correspondence passed through between the first paragraph mark of the default paragraph reflects the default section Hierarchical relationship between falling;
The hierarchical relationship preset according to the default paragraph model between paragraph creates the document, and establish institute State the first incidence relation between the document identification of document and the template identification of the template.
Preferably, in the document creating method that the embodiment of the present application first aspect provides, according to the default paragraph model Described in the hierarchical relationship preset between paragraph create the document, including:
By the default paragraph in the default paragraph model, the paragraph being determined as in the document;By the default paragraph Between hierarchical relationship, be determined as the hierarchical relationship between paragraph in the document.
Preferably, in the document creating method that the embodiment of the present application first aspect provides, according to the default paragraph mould The hierarchical relationship preset described in type between paragraph creates the document, and establishes the document identification of the document and the template Template identification between the first incidence relation after, the method further includes:
When needing to the paragraph content of target paragraph into edlin, establish the target paragraph the second paragraph mark with The second incidence relation between the first paragraph mark of the corresponding default paragraph, and establish the second of the target paragraph Paragraph identifies the third incidence relation between the document identification of the document;Wherein, the target paragraph is in the document With the default corresponding any one of paragraph;
The paragraph content of the target paragraph into edlin and is preserved.
Preferably, in the document creating method that the embodiment of the present application first aspect provides, when in the default paragraph model Default paragraph when being fallen for subsegment, the subsegment, which is fallen, further includes third paragraph mark;The third paragraph is identified as the subsegment The first paragraph mark of the father's paragraph fallen, third paragraph mark is for reflecting layer that the subsegment is fallen between his father's paragraph Secondary relationship.
Second aspect, the embodiment of the present application provide a kind of template establishment method, including:
Generate the default paragraph model in template;Comprising multiple default paragraphs in the default paragraph model, by described Correspondence between the first paragraph mark of default paragraph reflects the hierarchical relationship between the default paragraph;
Establish the correspondence between the template identification of the template and the default paragraph model.
The third aspect, the embodiment of the present application provide a kind of document rendering intent, including:
Determine the document identification of document to be rendered;
According to the document identification, determine and the corresponding template of document to be rendered;The template identification of the template There are the first incidence relations between the document identification of the document to be rendered;
According to the template identification, determine and the corresponding default paragraph model of the template;The default paragraph model In comprising multiple default paragraphs, the correspondence passed through between the first paragraph mark of the default paragraph reflects the default section Hierarchical relationship between falling;
The paragraph content of each paragraph in the document to be rendered is obtained, and according to each described pre- in the default paragraph model If the hierarchical relationship between paragraph renders the document to be rendered.
Preferably, it in the document rendering intent that the embodiment of the present application third aspect provides, obtains in the document to be rendered The paragraph content of each paragraph, including:
Following operation is performed to any default paragraph in the default paragraph model, until traversing the default paragraph mould Each default paragraph in type:
It judges whether and the default corresponding target paragraph of paragraph;The second paragraph mark of the target paragraph There are the second incidence relations between the first paragraph mark of the default paragraph;
When there is target paragraph corresponding with the default paragraph, using the paragraph content of the target paragraph as institute State the paragraph content of document to be rendered.
Preferably, the embodiment of the present application third aspect provide document rendering intent in, judge whether with it is described pre- If the corresponding target paragraph of paragraph, including:
It is identified according to the first paragraph of the default paragraph, it is determined whether there is the second paragraph mark for meeting preset condition Know;The preset condition is, the second paragraph mark established with first paragraph mark have the second incidence relation and with The document identification foundation of the document to be rendered has third incidence relation;
When there is the second paragraph for meeting preset condition mark, determined according to second paragraph mark described to be rendered Target paragraph in document, and judge to exist corresponding by the target paragraph with the default paragraph.
Preferably, it in the document rendering intent that the embodiment of the present application third aspect provides, obtains in the document to be rendered The paragraph content of each paragraph, further includes:
Following operation is performed to any default paragraph in the default paragraph model, until traversing the default paragraph mould Each default paragraph in type:
It judges whether and the default corresponding target paragraph of paragraph;The second paragraph mark of the target paragraph There are the second incidence relations between the first paragraph mark of the default paragraph;
When there is no during target paragraph corresponding with the default paragraph, using the paragraph content of the default paragraph as The paragraph content of the document to be rendered.
Fourth aspect, the embodiment of the present application provide a kind of corresponding document of document creating method provided with first aspect Creating device, including:
Template determining module determines to create template based on document, template identification is included in the template;
Paragraph model determining module, according to the template identification, determine with the corresponding default paragraph model of the template, Comprising multiple default paragraphs in the default paragraph model, pass through the corresponding pass between the first paragraph mark of the default paragraph The hierarchical relationship between the default paragraph is reflected in system;
Document creation module is preset according to the default paragraph model described in the hierarchical relationship establishment between paragraph Document, and establish the first incidence relation between the document identification of the document and the template identification of the template.
5th aspect, the embodiment of the present application provide a kind of corresponding template of template establishment method provided with second aspect Creating device, including:
Paragraph model generation module generates the default paragraph model in template;Comprising multiple in the default paragraph model Default paragraph reflects the layer between the default paragraph by the correspondence between the first paragraph mark of the default paragraph Secondary relationship;
Corresponding relation building module establishes the corresponding pass between the template identification of the template and the default paragraph model System.
6th aspect, the embodiment of the present application provide a kind of corresponding document of document rendering intent provided with the third aspect Rendering device, including:
Document identification determining module determines the document identification of document to be rendered;
Template determining module is rendered, according to the document identification, is determined and the corresponding template of document to be rendered;Institute State between the template identification of template and the document identification of the document to be rendered that there are the first incidence relations;
Paragraph model determining module according to the template identification, determines and the corresponding default paragraph model of the template; Comprising multiple default paragraphs in the default paragraph model, pass through the corresponding pass between the first paragraph mark of the default paragraph The hierarchical relationship between the default paragraph is reflected in system;
Paragraph content rendering module obtains the paragraph content of each paragraph in the document to be rendered, and according to described default Hierarchical relationship in paragraph model between each default paragraph renders the document to be rendered.
7th aspect, the embodiment of the present application provide a kind of corresponding electronics of document creating method provided with first aspect Equipment, including:
Processor;And
The memory of storage computer executable instructions is arranged to, the executable instruction makes the place when executed It manages device and performs following operate:
It determines to create template based on document, template identification is included in the template;
According to the template identification, determine and the corresponding default paragraph model of the template, the default paragraph model In comprising multiple default paragraphs, the correspondence passed through between the first paragraph mark of the default paragraph reflects the default section Hierarchical relationship between falling;
The hierarchical relationship preset according to the default paragraph model between paragraph creates the document, and establish institute State the first incidence relation between the document identification of document and the template identification of the template.
Eighth aspect, the embodiment of the present application provide a kind of corresponding one kind of template establishment method provided with second aspect Electronic equipment, including:
Processor;And
The memory of storage computer executable instructions is arranged to, the executable instruction makes the place when executed It manages device and performs following operate:
Generate the default paragraph model in template;Comprising multiple default paragraphs in the default paragraph model, by described Correspondence between the first paragraph mark of default paragraph reflects the hierarchical relationship between the default paragraph;
Establish the correspondence between the template identification of the template and the default paragraph model.
9th aspect, the embodiment of the present application provide a kind of corresponding electronics of document rendering intent provided with the third aspect Equipment, including:
Processor;And
The memory of storage computer executable instructions is arranged to, the executable instruction makes the place when executed It manages device and performs following operate:
Determine the document identification of document to be rendered;
According to the document identification, determine and the corresponding template of document to be rendered;The template identification of the template There are the first incidence relations between the document identification of the document to be rendered;
According to the template identification, determine and the corresponding default paragraph model of the template;The default paragraph model In comprising multiple default paragraphs, the correspondence passed through between the first paragraph mark of the default paragraph reflects the default section Hierarchical relationship between falling;
The paragraph content of each paragraph in the document to be rendered is obtained, and according to each described pre- in the default paragraph model If the hierarchical relationship between paragraph renders the document to be rendered.
Tenth aspect, the embodiment of the present application provide a kind of computer readable storage medium, the computer-readable storage medium The one or more programs of matter storage, one or more of programs when being performed by the electronic equipment including multiple application programs, So that the electronic equipment performs following operate:
It determines to create template based on document, template identification is included in the template;
According to the template identification, determine and the corresponding default paragraph model of the template, the default paragraph model In comprising multiple default paragraphs, the correspondence passed through between the first paragraph mark of the default paragraph reflects the default section Hierarchical relationship between falling;
The hierarchical relationship preset according to the default paragraph model between paragraph creates the document, and establish institute State the first incidence relation between the document identification of document and the template identification of the template.
Tenth on the one hand, and the embodiment of the present application provides a kind of computer readable storage medium, the computer-readable storage Media storage one or more program, one or more of programs are performed when by the electronic equipment including multiple application programs When so that the electronic equipment performs following operate:
Generate the default paragraph model in template;Comprising multiple default paragraphs in the default paragraph model, by described Correspondence between the first paragraph mark of default paragraph reflects the hierarchical relationship between the default paragraph;
Establish the correspondence between the template identification of the template and the default paragraph model.
12nd aspect, the embodiment of the present application provide a kind of computer readable storage medium, the computer-readable storage Media storage one or more program, one or more of programs are performed when by the electronic equipment including multiple application programs When so that the electronic equipment performs following operate:
Determine the document identification of document to be rendered;
According to the document identification, determine and the corresponding template of document to be rendered;The template identification of the template There are the first incidence relations between the document identification of the document to be rendered;
According to the template identification, determine and the corresponding default paragraph model of the template;The default paragraph model In comprising multiple default paragraphs, the correspondence passed through between the first paragraph mark of the default paragraph reflects the default section Hierarchical relationship between falling;
The paragraph content of each paragraph in the document to be rendered is obtained, and according to each described pre- in the default paragraph model If the hierarchical relationship between paragraph renders the document to be rendered.
Above-mentioned at least one technical solution that the embodiment of the present application uses can reach following advantageous effect:
In technical solution provided by the embodiments of the present application, the template for document creates corresponding default paragraph model, Multiple default paragraphs are designed in default paragraph model, and anti-by presetting the correspondence between the first paragraph mark of paragraph Reflect the hierarchical relationship between default paragraph.Then when being created according to this template, editing or render document, it can pass through document First paragraph mark location of middle paragraph, and can be pre- with other by the specific paragraph to the specific paragraph in default paragraph model If the correspondence between the first paragraph mark of paragraph determines the hierarchical relationship in document between each paragraph.
Therefore, using technical solution provided by the embodiments of the present application, when the default paragraph model in document template is adjusted When whole, when creating document according to the template or render the document created according to the template, the level of each paragraph closes in document System also can dynamically adjust therewith, so as to meet the use demand of user.
Description of the drawings
Attached drawing described herein is used for providing further understanding of the present application, forms the part of the application, this Shen Illustrative embodiments and their description please do not form the improper restriction to the application for explaining the application.In the accompanying drawings:
Fig. 1 is the flow diagram of template establishment method provided by the embodiments of the present application;
Fig. 2 is the flow diagram of document creating method provided by the embodiments of the present application;
Fig. 3 is the flow diagram of document rendering intent provided by the embodiments of the present application;
Fig. 4 is the structure diagram of template creating device provided by the embodiments of the present application;
Fig. 5 is the structure diagram of document creation device provided by the embodiments of the present application;
Fig. 6 is the structure diagram of document rendering device provided by the embodiments of the present application;
Fig. 7 is the structure diagram of a kind of electronic equipment provided by the embodiments of the present application;
Fig. 8 is the structure diagram of second of electronic equipment provided by the embodiments of the present application;
Fig. 9 is the structure diagram of the third electronic equipment provided by the embodiments of the present application.
Specific embodiment
Purpose, technical scheme and advantage to make the application are clearer, below in conjunction with the application specific embodiment and Technical scheme is clearly and completely described in corresponding attached drawing.Obviously, described embodiment is only the application one Section Example, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art are not doing Go out all other embodiments obtained under the premise of creative work, shall fall in the protection scope of this application.
The method that the embodiment of the present application provides template establishment, document creation and editor and document renders three phases With corresponding device.It should be noted that the document that the embodiment of the present application is applicable in, including text document, code document, configuration The various information carrier files that can use structuring or the storage of unstructured technology such as document.It is used in the embodiment of the present application The template arrived is mainly used for the form of the above-mentioned document of unified standard, is mainly concerned with to the paragraph structure in unified document, may be used also To preset the paragraph content in the specific paragraph of certain in document.Wherein, the paragraph structure in document, is mainly reflected in document Hierarchical relationship between each paragraph.
Below with reference to attached drawing, the technical solution that each embodiment of the application provides is described in detail.
It is understood that before document creation is carried out according to template, need to establish template based on establishment document. When it is implemented, drawing template establishment with create document executive agent all can be computer or other have setting for this function It is standby;It physically may be the same or different, the embodiment of the present application does not limit this.
Specifically, the exemplary method drawing template establishments of Fig. 1 may be used, which may particularly include:
S101:Generate the default paragraph model in template;Comprising multiple default paragraphs in default paragraph model, by default The hierarchical relationship between the default paragraph of correspondence reflection between the first paragraph mark of paragraph;
S103:Establish the correspondence between the template identification of template and default paragraph model.
According to the needs of user, when creating new template, it is possible, firstly, to which the template for establishment is named, and a mould is distributed Panel sign for identifying the uniqueness of the template, also serves as calling the foundation of the template.Show for example, following table 1 may be used The relevant information of each template that the template table record of example creates, the data combination of data structure shown in a plurality of table 1 can be formed 2 exemplary template list of table selects template for user when creating document.
1 template table of table
Field name Type Whether can be empty Annotation
id Varchar(32) It is no Major key id, that is, template identification
name Varchar(216) It is no The title of template
create_time Timestamp It is no The data creation time
modified_time Timestamp It is no Data last newest time
2 template list of table
On this basis, you can further perform step S101, design the paragraph model in the template.It is wrapped in paragraph model Containing multiple default paragraphs, each default paragraph has the first paragraph mark for indicating its uniqueness.It should be noted that here " uniqueness " can refer to the default uniqueness of the paragraph in the corresponding template of affiliated paragraph model, at this point, to search or Call the default paragraph, it is also necessary to reference to the template identification of its corresponding template." uniqueness " of default paragraph, can also refer to this Default uniqueness of the paragraph in all templates if then need to search or call the default paragraph, directly presets paragraph according to this First paragraph identifies.
It is also default by indicating in addition to the default paragraph that the paragraph model need to include is preset in design segments stamping die type The first paragraph mark of paragraph uniqueness establishes the correspondence between different default paragraphs, that is, establishes different default sections Correspondence between the first paragraph mark fallen, so as to reflect the hierarchical relationship between default paragraph.
Specifically, the hierarchical relationship presented between tree, default paragraph with paragraph model be embodied as level-one or For multistage set membership, when certain default paragraph in default paragraph model is fallen for subsegment, also design can be fallen for the subsegment Third paragraph identifies;Third paragraph mark is taken as the first paragraph mark for father's paragraph that the subsegment is fallen, and third paragraph mark is used for Reflect the hierarchical relationship that the subsegment is fallen between his father's paragraph.
Further, to each default paragraph in paragraph model, the template segment of example as shown in table 3 below can be built Table is fallen, for establishing the correspondence of default paragraph template corresponding with affiliated paragraph model (by field " id " and field The corresponding of " template_id " is realized), and establish default correspondence between paragraph and his father's paragraph (if there is) and (pass through Field " id " is realized with field " parent_id ").In addition to this it is possible to it is preset in design template for default paragraph Paragraph content (content in field " content " namely in table 3), the format text provided as template.It is establishing When similar to the document for needing to have unified content this mode may be used, by specific provision content in standard contract template It is placed in template in the form of presetting the paragraph content of paragraph, is used for user when creating document.
3 template paragraph table of table
It is understood that by 3 exemplary template paragraph table of table, it can be identified and determined by the first paragraph of father's paragraph The first paragraph mark that all subsegments below father's paragraph are fallen can also be identified (namely by the third paragraph that subsegment is fallen Field " parent_id ", be substantially still his father's paragraph the first paragraph mark) navigate to the subsegment fall belonging to father section It falls, so as to reflect the hierarchical relationship between default paragraph.
It, can be specific by taking entitled " Hetong ", template identification is the paragraph models corresponding to the template of " MB-01 " as an example It is presented as the template paragraph catalogue exemplified by table 4.It is understood that the first paragraph is identified as the default paragraph of " DL-01 ", section It falls entitled " TK-01 ", preset paragraph content is " content 1 ", belongs to the template that template identification is " MB-01 ", the paragraph " DL-01 " has no father's paragraph.First paragraph is identified as the default paragraph of " DL-03 ", and paragraph is entitled " TK-02-1 ", presets Paragraph content for " content 3 ", belong to the template that template identification is " MB-01 ", father's paragraph of the paragraph is the first paragraph mark Default paragraph for " DL-02 ".
4 template paragraph catalogue of table
id name content parent_id template_id create_time modified_time
DL-01 TK-01 Content 1 (sky) MB-01 Timestamp 5 Timestamp 6
DL-02 TK-02 Content 2 (sky) MB-01 Timestamp 7 Timestamp 8
DL-03 TK-02-1 Content 3 DL-02 MB-01 Timestamp 9 Timestamp 10
··· ··· ··· ··· ··· ··· ···
It can be seen that in the default paragraph model of the template paragraph tabular form exemplified by table 4, template is also established Correspondence between template identification and default paragraph model.
In the embodiment of the present application, by the way of above example, structuring processing is carried out to preset template so that text The template of shelves and the default paragraph model foundation correspondence of structuring, pass through the multiple default sections in default paragraph model Fall and by default paragraph the first paragraph mark establish paragraph between hierarchical relationship so that according to the template institute into Capable document creation, editor and rendering can be carried out as unit of paragraph.It is created compared to template will be based in related technology Document establishment, editor and the rendering of content are carried out as entirety for, mode provided by the embodiments of the present application is cleverer It is living, by adjusting default paragraph and its hierarchical relationship in a template, you can the paragraph structure to the document created according to the template It realizes that dynamic adjusts, meets the use demand of user.
It is understood that the adjustment that the default paragraph corresponding to template carries out, can increase new default paragraph, delete Except existing default paragraph, change the paragraph content of default paragraph or the field of father's paragraph id is represented by modification Hierarchical relationship between the default paragraph of " parent_id " modification etc..When needing that a certain default paragraph is migrated or copied to another During new template, also need to only change the information for the field " template_id " for representing template identification can establish the default paragraph with The incidence relation of new template.
It should be added that the paragraph for being in same level, it can be in such as 3 exemplary template paragraph table of table Increase by one for representing the field of paragraph sequence, it can also be according to the field " create_time " corresponding to each default paragraph (representing the time that the default paragraph is created) determines the sequence of paragraph.It is believed that creation time earlier lean on by paragraph sequence Before, the later paragraph sequence of creation time is rearward.
On the basis of establishment has template, the establishment that the method exemplified by Fig. 2 carries out document may be used, this method can have Body includes:
S201:It determines to create template based on document, template identification is included in template;
S203:According to template identification, the determining and corresponding default paragraph model of template is preset in paragraph model comprising more A default paragraph is closed by presetting the level between the default paragraph of correspondence reflection between the first paragraph mark of paragraph System;
S205:Hierarchical relationship according to being preset in default paragraph model between paragraph creates document, and establish the text of document The first incidence relation between shelves mark and the template identification of template.
Using the embodiment of the present application method carry out document creation when, first carry out step S201 determine create document institute according to According to template, so as to obtain the template identification information of the template (the specific letter of exemplary field " id " in namely aforementioned table 2 Breath, for example, MB-01 or MB-02).
Perform step S203 on this basis, according to template identification, determine with the corresponding default paragraph model of template, in advance It is if default by presetting the correspondence reflection between the first paragraph mark of paragraph comprising multiple default paragraphs in paragraph model Hierarchical relationship between paragraph.With reference to the process of previous embodiment drawing template establishment, step S203 is performed it is to be understood that in table 4 The value of Lookup Field " template_id " is consistent with the template identification determined in exemplified template paragraph catalogue owns Default paragraph, then, according to these preset paragraph first paragraphs mark (value that field " id " is embodied as in table 4) and Third paragraph identifies (value that field " parent_id " is embodied as in table 4), determines each default section in the paragraph model Hierarchical relationship between falling.And then step S205 can be performed on this basis according between paragraph default in default paragraph model Hierarchical relationship create document.
It should be noted that establish the first incidence relation between the document identification of document and the template identification of template, Above-mentioned first incidence relation of data structure records of the document table of example as shown in the following Table 5 may be used.It is understood that when wound When having multiple documents, the lists of documents exemplified by table 6 can be used and record incidence relation of multiple documents with corresponding template.
5 document table of table
Field name Type Whether can be empty Annotation
id Varchar(32) It is no Major key id, that is, the document identification of document
name Varchar(216) It is no The title of document
template_id Varchar(32) It is no The template identification of template corresponding to current document
create_time Timestamp It is no The data creation time
modified_time Timestamp It is no Data last newest time
6 lists of documents of table
Step S205 is being performed, it, can when creating document according to the hierarchical relationship preset in default paragraph model between paragraph It is the default paragraph in default paragraph model to be determined directly as to the paragraph in document, the hierarchical relationship between default paragraph is straight Connect the hierarchical relationship being determined as in document between paragraph.
On the basis of having template using previous embodiment establishment, the paragraph content that paragraph is preset in template is if desired changed (for example, the content of " paragraph content " this field does not meet user and needs for empty or particular content in original template), also Be established when needing to the paragraph content of target paragraph into edlin the second paragraph mark of target paragraph with it is corresponding default The second incidence relation between the first paragraph mark of paragraph, and establish the second paragraph mark of target paragraph and the document of document Third incidence relation between mark;Wherein, target paragraph in document with the corresponding any one of default paragraph;Then, The paragraph content of target paragraph into edlin and is preserved.
If it is understood that is carried out during creating and editing document to presetting preset paragraph content in paragraph Modification, then can be associated with according to above-mentioned second incidence relation of data structure records of 7 exemplary document segment table of table with third System.If being edited to the paragraph content in multiple paragraphs (namely target paragraph), text as exemplified in table 8 can be formed Shelves paragraph catalogue.
7 document segment table of table
8 document segment list of table
id name content info_id parent_id template_unit_id create_time modified_time
DD-01 M-01 Content 4 WD-01 (sky) DL-01 Timestamp 15 Timestamp 16
DD-02 M-02 Content 5 WD-01 (sky) DL-02 Timestamp 17 Timestamp 18
DD-03 M-02-1 Content 6 WD-01 DL-02 DL-03 Timestamp 19 Timestamp 20
··· ··· ··· ··· ··· ··· ···
It is understood that in the document segment list presented in table 8, the first paragraph is identified as in default paragraph model The paragraph content of the default paragraph of " DL-01 ", " DL-02 " and " DL-03 ", in document of the document identification for " WD-01 " Modification, particular content are changed respectively " content 4 ", " content 5 " and " content 6 ", the second paragraph mark of modified target paragraph Know is respectively " DD-01 ", " DD-02 " and " DD-03 ".The incidence relation preserved from table 8 can be seen that the second of target paragraph Paragraph is identified between " DD-01 " and the first paragraph mark " DL-01 " of corresponding default paragraph there are the second incidence relation, and Third incidence relation between the document identification " WD-01 " of document, and so on.At the same time, it presets corresponding to paragraph The target paragraph that the paragraph mark of father's paragraph is similarly preset with this corresponding to paragraph establishes incidence relation, so as to repair While changing specific paragraph content in paragraph, still retain the layer between the paragraph established in the paragraph model corresponding to template Secondary relationship realizes the consistency of paragraph structure, meets the use demand of user.
It should be noted that during creating and editing document, it is right that template institute can be traversed in a certain order Each paragraph in the paragraph model answered, for example, according to the tree structure of paragraph model, using the strategy progress time of depth-first It goes through, the target paragraph for needing to carry out Edition Contains can also be chosen according to specific needs by user.The embodiment of the present application to this not It limits.
The embodiment of the present application additionally provides a kind of document rendering intent, shown in Figure 3, including:
S301:Determine the document identification of document to be rendered;
S303:According to document identification, determine and the corresponding template of document to be rendered;The template identification of template with it is to be rendered There are the first incidence relations between the document identification of document;
S305:According to template identification, determine and the corresponding default paragraph model of template;Comprising more in default paragraph model A default paragraph is closed by presetting the level between the default paragraph of correspondence reflection between the first paragraph mark of paragraph System;
S307:The paragraph content of each paragraph in document to be rendered is obtained, and according to default paragraph each in default paragraph model Between hierarchical relationship render document to be rendered.
It is understood that when needing to carry out document rendering, for document to be rendered, can be first carried out step S301 with Obtain its document identification.As in the embodiments above, document identification and template identification are preserved in 6 exemplary lists of documents of table The first incidence relation, therefore, can further perform step S303, according to document identification, determine opposite with document to be rendered The template answered.
On this basis, due to preserving template identification and default paragraph model (tool in 4 exemplary template paragraph catalogue of table Body be presented as default paragraph the first paragraph mark and its third paragraph mark) between correspondence, therefore, step can be performed Rapid S305, according to template identification, the determining and corresponding default paragraph model of template, so as to be included according in default paragraph model Multiple default paragraphs between hierarchical relationship.
It further, can be to default in the paragraph content of each paragraph in performing step S307 acquisitions document to be rendered Any default paragraph in paragraph model performs following operation, until each default paragraph in the default paragraph model of traversal:
Judge whether with the corresponding target paragraph of default paragraph, wherein, the second paragraph of target paragraph mark with There are the second incidence relations between the first paragraph mark of default paragraph;
When there is target paragraph corresponding with default paragraph, using the paragraph content of target paragraph as document to be rendered Paragraph content.
In addition to this, when there is no during target paragraph corresponding with default paragraph, the paragraph content of default paragraph is made Paragraph content for document to be rendered.
To the traversal of each default paragraph in default paragraph model during execution step S307, it can be understood as, according to treating The associated template identification of document identification of rendering document is preset used by the document is determined after paragraph model, you can root It determines to preset the layer between paragraph and each default paragraph included in document to be rendered according to 4 exemplary template paragraph catalogue of table Secondary relationship.It is repaiied since the paragraph content in paragraph can be preset to certain during creating according to template and editing document Change, preset the corresponding target paragraph of paragraph with this so as to be formed, and generate one in the document segment list exemplified by table 8 Data, therefore, can be with the document exemplified by inquiry table 8 when judging whether target paragraph corresponding with default paragraph In the following manner specifically may be used in paragraph catalogue:
(value that can be embodied as field " id " in table 4) is identified according to the first paragraph of default paragraph, it is determined whether exist Meet the second paragraph mark (value that field " id " in table 8 can be embodied as) of preset condition;Preset condition is the second paragraph mark Knowing to establish with the first paragraph mark has the second incidence relation (can be embodied as the value and field of the field " id " in table 8 The value of " template_unit_id " is corresponding, and essence is it is to be understood that in table 8 in field " template_unit_id " In the presence of the key assignments consistent with the value of field " id " in table 4) and (can be embodied as in table 8 with the document identification of document to be rendered The value of field " info_id ") establish have third incidence relation;
When there is the second paragraph for meeting preset condition mark, word in table 8 (can be embodied as according to the second paragraph mark The value of section " id ") determine target paragraph in document to be rendered, and judge to exist corresponding by target phase with default paragraph It falls.On this basis, you can the second paragraph for meeting preset condition with this further is identified corresponding paragraph content (can have Body turns to the value of field " content " in table 8) as the paragraph content in document to be rendered.
It is understood that according to the inquiry to table 4 and table 8 and traversal, it is determined that the section of each paragraph in document to be rendered It falls after content, you can text to be rendered is further rendered according to the hierarchical relationship between each default paragraph in default paragraph model Shelves.
In technical solution provided by the embodiments of the present application, the template for document creates corresponding default paragraph model, Multiple default paragraphs are designed in default paragraph model, and anti-by presetting the correspondence between the first paragraph mark of paragraph Reflect the hierarchical relationship between default paragraph.Then when being created according to this template, editing or render document, it can pass through document First paragraph mark location of middle paragraph, and can be pre- with other by the specific paragraph to the specific paragraph in default paragraph model If the correspondence between the first paragraph mark of paragraph determines the hierarchical relationship in document between each paragraph.
Therefore, using technical solution provided by the embodiments of the present application, when the default paragraph model in document template is adjusted When whole, when creating document according to the template or render the document created according to the template, the level of each paragraph closes in document System also can dynamically adjust therewith, so as to meet the use demand of user.
Shown in Figure 4, the embodiment of the present application also provides a kind of template wound corresponding with template establishment method shown in Fig. 1 Device is built, including:
Paragraph model generation module 101 generates the default paragraph model in template;Comprising multiple pre- in default paragraph model If paragraph, by presetting the hierarchical relationship between the default paragraph of correspondence reflection between the first paragraph mark of paragraph;
Corresponding relation building module 103 establishes the correspondence between the template identification of template and default paragraph model.
Shown in Figure 5, the embodiment of the present application also provides a kind of document wound corresponding with document creating method shown in Fig. 2 Device is built, including:
Template determining module 201 determines to create template based on document, template identification is included in template;
Paragraph model determining module 203, according to template identification, the determining and corresponding default paragraph model of template is preset Comprising multiple default paragraphs in paragraph model, by presetting the default section of correspondence reflection between the first paragraph mark of paragraph Hierarchical relationship between falling;
Document creation module 205 creates document, and build according to the hierarchical relationship preset in default paragraph model between paragraph The first incidence relation between the document identification of vertical document and the template identification of template.
Shown in Figure 6, the embodiment of the present application also provides the corresponding document wash with watercolours of document rendering intent shown in a kind of and Fig. 3 Device is contaminated, including:
Document identification determining module 301 determines the document identification of document to be rendered;
Template determining module 303 is rendered, according to document identification, is determined and the corresponding template of document to be rendered;Template There are the first incidence relations between template identification and the document identification of document to be rendered;
Paragraph model determining module 305 according to template identification, determines and the corresponding default paragraph model of template;It is default Comprising multiple default paragraphs in paragraph model, by presetting the default section of correspondence reflection between the first paragraph mark of paragraph Hierarchical relationship between falling;
Paragraph content rendering module 307 obtains the paragraph content of each paragraph in document to be rendered, and according to default paragraph mould Hierarchical relationship in type between each default paragraph renders document to be rendered.
It is understood that being suitable for device embodiment to all explainations of embodiment of the method above, details are not described herein again.
Fig. 7 is the structure diagram of one embodiment electronic equipment of the application.Fig. 7 is please referred to, in hardware view, the electricity Sub- equipment includes processor, optionally further includes internal bus, network interface, memory.Wherein, memory may include interior It deposits, such as high-speed random access memory (Random-AccessMemory, RAM), it is also possible to further include nonvolatile memory (non-volatile memory), for example, at least 1 magnetic disk storage etc..Certainly, which is also possible that other industry It is engaged in required hardware.
Processor, network interface and memory can be connected with each other by internal bus, which can be ISA (Industry Standard Architecture, industry standard architecture) bus, PCI (Peripheral Component Interconnect, Peripheral Component Interconnect standard) bus or EISA (Extended Industry Standard Architecture, expanding the industrial standard structure) bus etc..The bus can be divided into address bus, data/address bus, control always Line etc..For ease of representing, only represented in Fig. 7 with a four-headed arrow, it is not intended that an only bus or a type of Bus.
Memory, for storing program.Specifically, program can include program code, and said program code includes calculating Machine operational order.Memory can include memory and nonvolatile memory, and provide instruction and data to processor.
Processor reads in corresponding computer program to memory and then is run from nonvolatile memory, in logical layer Template creating device is formed on face.Processor performs the program that memory is stored, and specifically for performing following operate:
Generate the default paragraph model in template;Comprising multiple default paragraphs in the default paragraph model, by described Correspondence between the first paragraph mark of default paragraph reflects the hierarchical relationship between the default paragraph;
Establish the correspondence between the template identification of the template and the default paragraph model.
The method that template creating device disclosed in the above-mentioned embodiment illustrated in fig. 1 such as the application performs can be applied to processor In or realized by processor.Processor may be a kind of IC chip, have the processing capacity of signal.It was realizing Cheng Zhong, each step of the above method can be complete by the integrated logic circuit of the hardware in processor or the instruction of software form Into.Above-mentioned processor can be general processor, including central processing unit (Central Processing Unit, CPU), Network processing unit (Network Processor, NP) etc.;It can also be digital signal processor (Digital Signal Processor, DSP), it is application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), existing Field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device are divided Vertical door or transistor logic, discrete hardware components.It can realize or perform and is in the embodiment of the present application disclosed each Method, step and logic diagram.General processor can be microprocessor or the processor can also be any conventional place Manage device etc..The step of method with reference to disclosed in the embodiment of the present application, can be embodied directly in hardware decoding processor and perform Completion is performed into or with hardware in decoding processor and software module combination.Software module can be located at random access memory, This fields such as flash memory, read-only memory, programmable read only memory or electrically erasable programmable memory, register maturation In storage medium.The storage medium is located at memory, and processor reads the information in memory, and above-mentioned side is completed with reference to its hardware The step of method.
The electronic equipment can also carry out the method that template creating device performs in Fig. 1, and realize template creating device in Fig. 1 The function of illustrated embodiment, details are not described herein for the embodiment of the present application.
The embodiment of the present application also proposed a kind of computer readable storage medium, the computer-readable recording medium storage one A or multiple programs, the one or more program include instruction, which works as is held by the electronic equipment including multiple application programs During row, the electronic equipment can be made to perform the method that template creating device performs in embodiment illustrated in fig. 1, and specifically for holding Row:
Generate the default paragraph model in template;Comprising multiple default paragraphs in the default paragraph model, by described Correspondence between the first paragraph mark of default paragraph reflects the hierarchical relationship between the default paragraph;
Establish the correspondence between the template identification of the template and the default paragraph model.
Fig. 8 is the structure diagram of one embodiment electronic equipment of the application.Fig. 8 is please referred to, in hardware view, the electricity Sub- equipment includes processor, optionally further includes internal bus, network interface, memory.Wherein, memory may include interior It deposits, such as high-speed random access memory (Random-Access Memory, RAM), it is also possible to further include non-volatile memories Device (non-volatile memory), for example, at least 1 magnetic disk storage etc..Certainly, which is also possible that other The required hardware of business.
Processor, network interface and memory can be connected with each other by internal bus, which can be ISA (Industry Standard Architecture, industry standard architecture) bus, PCI (Peripheral Component Interconnect, Peripheral Component Interconnect standard) bus or EISA (Extended Industry Standard Architecture, expanding the industrial standard structure) bus etc..The bus can be divided into address bus, data/address bus, control always Line etc..For ease of representing, only represented in Fig. 8 with a four-headed arrow, it is not intended that an only bus or a type of Bus.
Memory, for storing program.Specifically, program can include program code, and said program code includes calculating Machine operational order.Memory can include memory and nonvolatile memory, and provide instruction and data to processor.
Processor reads in corresponding computer program to memory and then is run from nonvolatile memory, in logical layer Document creation device is formed on face.Processor performs the program that memory is stored, and specifically for performing following operate:
It determines to create template based on document, template identification is included in the template;
According to the template identification, determine and the corresponding default paragraph model of the template, the default paragraph model In comprising multiple default paragraphs, the correspondence passed through between the first paragraph mark of the default paragraph reflects the default section Hierarchical relationship between falling;
The hierarchical relationship preset according to the default paragraph model between paragraph creates the document, and establish institute State the first incidence relation between the document identification of document and the template identification of the template.
The method that document creation device disclosed in the above-mentioned embodiment illustrated in fig. 2 such as the application performs can be applied to processor In or realized by processor.Processor may be a kind of IC chip, have the processing capacity of signal.It was realizing Cheng Zhong, each step of the above method can be complete by the integrated logic circuit of the hardware in processor or the instruction of software form Into.Above-mentioned processor can be general processor, including central processing unit (Central Processing Unit, CPU), Network processing unit (Network Processor, NP) etc.;It can also be digital signal processor (Digital Signal Processor, DSP), it is application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), existing Field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device are divided Vertical door or transistor logic, discrete hardware components.It can realize or perform and is in the embodiment of the present application disclosed each Method, step and logic diagram.General processor can be microprocessor or the processor can also be any conventional place Manage device etc..The step of method with reference to disclosed in the embodiment of the present application, can be embodied directly in hardware decoding processor and perform Completion is performed into or with hardware in decoding processor and software module combination.Software module can be located at random access memory, This fields such as flash memory, read-only memory, programmable read only memory or electrically erasable programmable memory, register maturation In storage medium.The storage medium is located at memory, and processor reads the information in memory, and above-mentioned side is completed with reference to its hardware The step of method.
The electronic equipment can also carry out the method that document creating device performs in Fig. 2, and realize document creation device in Fig. 2 The function of illustrated embodiment, details are not described herein for the embodiment of the present application.
The embodiment of the present application also proposed a kind of computer readable storage medium, the computer-readable recording medium storage one A or multiple programs, the one or more program include instruction, which works as is held by the electronic equipment including multiple application programs During row, the electronic equipment can be made to perform the method that document creating device performs in embodiment illustrated in fig. 2, and specifically for holding Row:
It determines to create template based on document, template identification is included in the template;
According to the template identification, determine and the corresponding default paragraph model of the template, the default paragraph model In comprising multiple default paragraphs, the correspondence passed through between the first paragraph mark of the default paragraph reflects the default section Hierarchical relationship between falling;
The hierarchical relationship preset according to the default paragraph model between paragraph creates the document, and establish institute State the first incidence relation between the document identification of document and the template identification of the template.
Fig. 9 is the structure diagram of one embodiment electronic equipment of the application.Fig. 9 is please referred to, in hardware view, the electricity Sub- equipment includes processor, optionally further includes internal bus, network interface, memory.Wherein, memory may include interior It deposits, such as high-speed random access memory (Random-Access Memory, RAM), it is also possible to further include non-volatile memories Device (non-volatile memory), for example, at least 1 magnetic disk storage etc..Certainly, which is also possible that other The required hardware of business.
Processor, network interface and memory can be connected with each other by internal bus, which can be ISA (Industry Standard Architecture, industry standard architecture) bus, PCI (Peripheral Component Interconnect, Peripheral Component Interconnect standard) bus or EISA (Extended Industry Standard Architecture, expanding the industrial standard structure) bus etc..The bus can be divided into address bus, data/address bus, control always Line etc..For ease of representing, only represented in Fig. 9 with a four-headed arrow, it is not intended that an only bus or a type of Bus.
Memory, for storing program.Specifically, program can include program code, and said program code includes calculating Machine operational order.Memory can include memory and nonvolatile memory, and provide instruction and data to processor.
Processor reads in corresponding computer program to memory and then is run from nonvolatile memory, in logical layer Document rendering device is formed on face.Processor performs the program that memory is stored, and specifically for performing following operate:
Determine the document identification of document to be rendered;
According to the document identification, determine and the corresponding template of document to be rendered;The template identification of the template There are the first incidence relations between the document identification of the document to be rendered;
According to the template identification, determine and the corresponding default paragraph model of the template;The default paragraph model In comprising multiple default paragraphs, the correspondence passed through between the first paragraph mark of the default paragraph reflects the default section Hierarchical relationship between falling;
The paragraph content of each paragraph in the document to be rendered is obtained, and according to each described pre- in the default paragraph model If the hierarchical relationship between paragraph renders the document to be rendered.
The method that document rendering device disclosed in the above-mentioned embodiment illustrated in fig. 3 such as the application performs can be applied to processor In or realized by processor.Processor may be a kind of IC chip, have the processing capacity of signal.It was realizing Cheng Zhong, each step of the above method can be complete by the integrated logic circuit of the hardware in processor or the instruction of software form Into.Above-mentioned processor can be general processor, including central processing unit (Central Processing Unit, CPU), Network processing unit (Network Processor, NP) etc.;It can also be digital signal processor (Digital Signal Processor, DSP), it is application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), existing Field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device are divided Vertical door or transistor logic, discrete hardware components.It can realize or perform and is in the embodiment of the present application disclosed each Method, step and logic diagram.General processor can be microprocessor or the processor can also be any conventional place Manage device etc..The step of method with reference to disclosed in the embodiment of the present application, can be embodied directly in hardware decoding processor and perform Completion is performed into or with hardware in decoding processor and software module combination.Software module can be located at random access memory, This fields such as flash memory, read-only memory, programmable read only memory or electrically erasable programmable memory, register maturation In storage medium.The storage medium is located at memory, and processor reads the information in memory, and above-mentioned side is completed with reference to its hardware The step of method.
The electronic equipment can also carry out the method that document rendering device performs in Fig. 3, and realize document rendering device in Fig. 3 The function of illustrated embodiment, details are not described herein for the embodiment of the present application.
The embodiment of the present application also proposed a kind of computer readable storage medium, the computer-readable recording medium storage one A or multiple programs, the one or more program include instruction, which works as is held by the electronic equipment including multiple application programs During row, the electronic equipment can be made to perform the method that document rendering device performs in embodiment illustrated in fig. 3, and specifically for holding Row:
Determine the document identification of document to be rendered;
According to the document identification, determine and the corresponding template of document to be rendered;The template identification of the template There are the first incidence relations between the document identification of the document to be rendered;
According to the template identification, determine and the corresponding default paragraph model of the template;The default paragraph model In comprising multiple default paragraphs, the correspondence passed through between the first paragraph mark of the default paragraph reflects the default section Hierarchical relationship between falling;
The paragraph content of each paragraph in the document to be rendered is obtained, and according to each described pre- in the default paragraph model If the hierarchical relationship between paragraph renders the document to be rendered.
It should be understood by those skilled in the art that, the embodiment of the present invention can be provided as method, system or computer program Product.Therefore, the reality in terms of complete hardware embodiment, complete software embodiment or combination software and hardware can be used in the present invention Apply the form of example.Moreover, the computer for wherein including computer usable program code in one or more can be used in the present invention The computer program production that usable storage medium is implemented on (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) The form of product.
The present invention be with reference to according to the method for the embodiment of the present invention, the flow of equipment (system) and computer program product Figure and/or block diagram describe.It should be understood that it can be realized by computer program instructions every first-class in flowchart and/or the block diagram The combination of flow and/or box in journey and/or box and flowchart and/or the block diagram.These computer programs can be provided The processor of all-purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices is instructed to produce A raw machine so that the instruction performed by computer or the processor of other programmable data processing devices is generated for real The device of function specified in present one flow of flow chart or one box of multiple flows and/or block diagram or multiple boxes.
These computer program instructions, which may also be stored in, can guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works so that the instruction generation being stored in the computer-readable memory includes referring to Enable the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one box of block diagram or The function of being specified in multiple boxes.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that counted Series of operation steps are performed on calculation machine or other programmable devices to generate computer implemented processing, so as in computer or The instruction offer performed on other programmable devices is used to implement in one flow of flow chart or multiple flows and/or block diagram one The step of function of being specified in a box or multiple boxes.
In a typical configuration, computing device includes one or more processors (CPU), input/output interface, net Network interface and memory.
Memory may include computer-readable medium in volatile memory, random access memory (RAM) and/or The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable medium Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method Or technology come realize information store.Information can be computer-readable instruction, data structure, the module of program or other data. The example of the storage medium of computer includes, but are not limited to phase transition internal memory (PRAM), static RAM (SRAM), moves State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable Programmable read only memory (EEPROM), fast flash memory bank or other memory techniques, CD-ROM read-only memory (CD-ROM), Digital versatile disc (DVD) or other optical storages, magnetic tape cassette, the storage of tape magnetic rigid disk or other magnetic storage apparatus Or any other non-transmission medium, available for storing the information that can be accessed by a computing device.It defines, calculates according to herein Machine readable medium does not include temporary computer readable media (transitory media), such as data-signal and carrier wave of modulation.
It should also be noted that, term " comprising ", "comprising" or its any other variant are intended to nonexcludability Comprising so that process, method, commodity or equipment including a series of elements are not only including those elements, but also wrap Include other elements that are not explicitly listed or further include for this process, method, commodity or equipment it is intrinsic will Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that wanted including described Also there are other identical elements in the process of element, method, commodity or equipment.
It will be understood by those skilled in the art that embodiments herein can be provided as method, system or computer program product. Therefore, complete hardware embodiment, complete software embodiment or the embodiment in terms of combining software and hardware can be used in the application Form.It is deposited moreover, the application can be used to can be used in one or more computers for wherein including computer usable program code The shape of computer program product that storage media is implemented on (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) Formula.
The foregoing is merely embodiments herein, are not limited to the application.For those skilled in the art For, the application can have various modifications and variations.All any modifications made within spirit herein and principle are equal Replace, improve etc., it should be included within the scope of claims hereof.

Claims (18)

1. a kind of document creating method, including:
It determines to create template based on document, template identification is included in the template;
According to the template identification, determine with the corresponding default paragraph model of the template, wrap in the default paragraph model Containing multiple default paragraphs, by the correspondence between the first paragraph mark of the default paragraph reflect the default paragraph it Between hierarchical relationship;
The hierarchical relationship preset according to the default paragraph model between paragraph creates the document, and establish the text The first incidence relation between the document identification of shelves and the template identification of the template.
2. method according to claim 1 presets the hierarchical relationship between paragraph according to the default paragraph model The document is created, including:
By the default paragraph in the default paragraph model, the paragraph being determined as in the document;It will be between the default paragraph Hierarchical relationship, be determined as the hierarchical relationship between paragraph in the document.
3. method according to claim 2 is closed in the level preset according to the default paragraph model between paragraph System creates the document, and establishes the first incidence relation between the document identification of the document and the template identification of the template Later, the method further includes:
When needing to the paragraph content of target paragraph into edlin, establish the second paragraph mark of the target paragraph with it is opposite The second incidence relation between the first paragraph mark for the default paragraph answered, and establish the second paragraph of the target paragraph Third incidence relation between mark and the document identification of the document;Wherein, the target paragraph in the document with institute State the corresponding any one of default paragraph;
The paragraph content of the target paragraph into edlin and is preserved.
4. according to any the method for claims 1 to 3, when the default paragraph in the default paragraph model is fallen for subsegment When, the subsegment, which is fallen, further includes third paragraph mark;The third paragraph is identified as the first segment of father's paragraph that the subsegment is fallen Fall mark, the third paragraph mark is for reflecting hierarchical relationship that the subsegment is fallen between his father's paragraph.
5. a kind of template establishment method, including:
Generate the default paragraph model in template;Comprising multiple default paragraphs in the default paragraph model, by described default Correspondence between the first paragraph mark of paragraph reflects the hierarchical relationship between the default paragraph;
Establish the correspondence between the template identification of the template and the default paragraph model.
6. a kind of document rendering intent, including:
Determine the document identification of document to be rendered;
According to the document identification, determine and the corresponding template of document to be rendered;The template identification of the template and institute State between the document identification of document to be rendered that there are the first incidence relations;
According to the template identification, determine and the corresponding default paragraph model of the template;It is wrapped in the default paragraph model Containing multiple default paragraphs, by the correspondence between the first paragraph mark of the default paragraph reflect the default paragraph it Between hierarchical relationship;
The paragraph content of each paragraph in the document to be rendered is obtained, and according to the default section each in the default paragraph model Hierarchical relationship between falling renders the document to be rendered.
7. method according to claim 6 obtains the paragraph content of each paragraph in the document to be rendered, including:
Following operation is performed to any default paragraph in the default paragraph model, until traversing in the default paragraph model Each default paragraph:
It judges whether and the default corresponding target paragraph of paragraph;The second paragraph mark of the target paragraph and institute State default paragraph the first paragraph mark between there are the second incidence relations;
When there is target paragraph corresponding with the default paragraph, the paragraph content of the target paragraph is treated as described in Render the paragraph content of document.
8. method according to claim 7, judge whether with the default corresponding target paragraph of paragraph, including:
It is identified according to the first paragraph of the default paragraph, it is determined whether there is the second paragraph mark for meeting preset condition;Institute Stating preset condition is, second paragraph mark and first paragraph mark foundation have the second incidence relation and with it is described The document identification foundation of document to be rendered has third incidence relation;
When there is the second paragraph for meeting preset condition mark, being identified according to second paragraph and determining the document to be rendered In target paragraph, and judge exist with the default paragraph it is corresponding by the target paragraph.
9. method according to claim 7 obtains the paragraph content of each paragraph in the document to be rendered, further includes:
Following operation is performed to any default paragraph in the default paragraph model, until traversing in the default paragraph model Each default paragraph:
It judges whether and the default corresponding target paragraph of paragraph;The second paragraph mark of the target paragraph and institute State default paragraph the first paragraph mark between there are the second incidence relations;
When there is no during target paragraph corresponding with the default paragraph, using the paragraph content of the default paragraph as described in The paragraph content of document to be rendered.
10. a kind of document creation device, including:
Template determining module determines to create template based on document, template identification is included in the template;
Paragraph model determining module, according to the template identification, the determining and corresponding default paragraph model of the template is described It is anti-by the correspondence between the first paragraph mark of the default paragraph comprising multiple default paragraphs in default paragraph model Reflect the hierarchical relationship between the default paragraph;
Document creation module, the hierarchical relationship preset according to the default paragraph model between paragraph create the text Shelves, and establish the first incidence relation between the document identification of the document and the template identification of the template.
11. a kind of template creating device, including:
Paragraph model generation module generates the default paragraph model in template;Comprising multiple default in the default paragraph model Paragraph, the level reflected between the default paragraph by the correspondence between the first paragraph mark of the default paragraph close System;
Corresponding relation building module establishes the correspondence between the template identification of the template and the default paragraph model.
12. a kind of document rendering device, including:
Document identification determining module determines the document identification of document to be rendered;
Template determining module is rendered, according to the document identification, is determined and the corresponding template of document to be rendered;The mould There are the first incidence relations between the template identification of plate and the document identification of the document to be rendered;
Paragraph model determining module according to the template identification, determines and the corresponding default paragraph model of the template;It is described It is anti-by the correspondence between the first paragraph mark of the default paragraph comprising multiple default paragraphs in default paragraph model Reflect the hierarchical relationship between the default paragraph;
Paragraph content rendering module obtains the paragraph content of each paragraph in the document to be rendered, and according to the default paragraph Hierarchical relationship in model between each default paragraph renders the document to be rendered.
13. a kind of electronic equipment, including:
Processor;And
The memory of storage computer executable instructions is arranged to, the executable instruction makes the processor when executed Perform following operate:
It determines to create template based on document, template identification is included in the template;
According to the template identification, determine with the corresponding default paragraph model of the template, wrap in the default paragraph model Containing multiple default paragraphs, by the correspondence between the first paragraph mark of the default paragraph reflect the default paragraph it Between hierarchical relationship;
The hierarchical relationship preset according to the default paragraph model between paragraph creates the document, and establish the text The first incidence relation between the document identification of shelves and the template identification of the template.
14. a kind of electronic equipment, including:
Processor;And
The memory of storage computer executable instructions is arranged to, the executable instruction makes the processor when executed Perform following operate:
Generate the default paragraph model in template;Comprising multiple default paragraphs in the default paragraph model, by described default Correspondence between the first paragraph mark of paragraph reflects the hierarchical relationship between the default paragraph;
Establish the correspondence between the template identification of the template and the default paragraph model.
15. a kind of electronic equipment, including:
Processor;And
The memory of storage computer executable instructions is arranged to, the executable instruction makes the processor when executed Perform following operate:
Determine the document identification of document to be rendered;
According to the document identification, determine and the corresponding template of document to be rendered;The template identification of the template and institute State between the document identification of document to be rendered that there are the first incidence relations;
According to the template identification, determine and the corresponding default paragraph model of the template;It is wrapped in the default paragraph model Containing multiple default paragraphs, by the correspondence between the first paragraph mark of the default paragraph reflect the default paragraph it Between hierarchical relationship;
The paragraph content of each paragraph in the document to be rendered is obtained, and according to the default section each in the default paragraph model Hierarchical relationship between falling renders the document to be rendered.
16. a kind of computer readable storage medium, the computer-readable recording medium storage one or more program, described one A or multiple programs by the electronic equipment including multiple application programs when being performed so that the electronic equipment performs following grasp Make:
It determines to create template based on document, template identification is included in the template;
According to the template identification, determine with the corresponding default paragraph model of the template, wrap in the default paragraph model Containing multiple default paragraphs, by the correspondence between the first paragraph mark of the default paragraph reflect the default paragraph it Between hierarchical relationship;
The hierarchical relationship preset according to the default paragraph model between paragraph creates the document, and establish the text The first incidence relation between the document identification of shelves and the template identification of the template.
17. a kind of computer readable storage medium, the computer-readable recording medium storage one or more program, described one A or multiple programs by the electronic equipment including multiple application programs when being performed so that the electronic equipment performs following grasp Make:
Generate the default paragraph model in template;Comprising multiple default paragraphs in the default paragraph model, by described default Correspondence between the first paragraph mark of paragraph reflects the hierarchical relationship between the default paragraph;
Establish the correspondence between the template identification of the template and the default paragraph model.
18. a kind of computer readable storage medium, the computer-readable recording medium storage one or more program, described one A or multiple programs by the electronic equipment including multiple application programs when being performed so that the electronic equipment performs following grasp Make:
Determine the document identification of document to be rendered;
According to the document identification, determine and the corresponding template of document to be rendered;The template identification of the template and institute State between the document identification of document to be rendered that there are the first incidence relations;
According to the template identification, determine and the corresponding default paragraph model of the template;It is wrapped in the default paragraph model Containing multiple default paragraphs, by the correspondence between the first paragraph mark of the default paragraph reflect the default paragraph it Between hierarchical relationship;
The paragraph content of each paragraph in the document to be rendered is obtained, and according to the default section each in the default paragraph model Hierarchical relationship between falling renders the document to be rendered.
CN201711455865.7A 2017-12-28 2017-12-28 Template creating method, document creating method, rendering method and rendering device Active CN108170656B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711455865.7A CN108170656B (en) 2017-12-28 2017-12-28 Template creating method, document creating method, rendering method and rendering device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711455865.7A CN108170656B (en) 2017-12-28 2017-12-28 Template creating method, document creating method, rendering method and rendering device

Publications (2)

Publication Number Publication Date
CN108170656A true CN108170656A (en) 2018-06-15
CN108170656B CN108170656B (en) 2021-09-07

Family

ID=62519163

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711455865.7A Active CN108170656B (en) 2017-12-28 2017-12-28 Template creating method, document creating method, rendering method and rendering device

Country Status (1)

Country Link
CN (1) CN108170656B (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108965021A (en) * 2018-07-26 2018-12-07 平安科技(深圳)有限公司 The creation method and device of virtual rehearsal network
CN110046637A (en) * 2018-12-25 2019-07-23 阿里巴巴集团控股有限公司 A kind of training method, device and the equipment of contract paragraph marking model
CN110738035A (en) * 2019-09-18 2020-01-31 平安科技(深圳)有限公司 document template generation method and device
CN111046645A (en) * 2019-12-11 2020-04-21 浙江大搜车软件技术有限公司 Method and device for generating article, computer equipment and storage medium
CN111273572A (en) * 2018-12-04 2020-06-12 北京猎户星空科技有限公司 Method, device, equipment and storage medium for creating action molecule template
CN111382621A (en) * 2018-12-28 2020-07-07 北大方正集团有限公司 Parameter adjusting method and device
CN112749536A (en) * 2019-10-31 2021-05-04 北京国双科技有限公司 Document generation method, device and equipment
CN113393201A (en) * 2020-03-12 2021-09-14 阿里巴巴集团控股有限公司 Contract processing system and method and electronic equipment
CN113760248A (en) * 2020-07-08 2021-12-07 北京沃东天骏信息技术有限公司 Method and device for generating application program
CN115904572A (en) * 2022-10-26 2023-04-04 北京力控元通科技有限公司 Template creating method, template calling method, program product, template system and template device

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102103574A (en) * 2009-12-17 2011-06-22 北大方正集团有限公司 Book sample file content formatting output method and system
US20110282649A1 (en) * 2010-05-13 2011-11-17 Rene Waksberg Systems and methods for automated content generation
CN102479248A (en) * 2011-05-30 2012-05-30 北京中科希望软件股份有限公司 Method and system for carrying out structured processing on electronic document
CN102982010A (en) * 2011-09-02 2013-03-20 北大方正集团有限公司 Method and device for abstracting document structure
CN104572744A (en) * 2013-10-23 2015-04-29 北大方正集团有限公司 Structured document generating method and device
CN104572594A (en) * 2015-01-27 2015-04-29 中復保有限公司 Real-time generation method of dynamic PDF (portable document format) documents
CN104598636A (en) * 2015-02-06 2015-05-06 无锡江南计算技术研究所 Complex document separating and organizing method and complex document automatic generating method
CN104866598A (en) * 2015-06-01 2015-08-26 北京理工大学 Heterogeneous database integrating method based on configurable templates
CN105740217A (en) * 2014-12-08 2016-07-06 珠海金山办公软件有限公司 Document generation method and device based on document template
CN106610929A (en) * 2015-10-26 2017-05-03 北大方正集团有限公司 Method and device for typesetting digital publishing structured content file

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102103574A (en) * 2009-12-17 2011-06-22 北大方正集团有限公司 Book sample file content formatting output method and system
US20110282649A1 (en) * 2010-05-13 2011-11-17 Rene Waksberg Systems and methods for automated content generation
CN102479248A (en) * 2011-05-30 2012-05-30 北京中科希望软件股份有限公司 Method and system for carrying out structured processing on electronic document
CN102982010A (en) * 2011-09-02 2013-03-20 北大方正集团有限公司 Method and device for abstracting document structure
CN104572744A (en) * 2013-10-23 2015-04-29 北大方正集团有限公司 Structured document generating method and device
CN105740217A (en) * 2014-12-08 2016-07-06 珠海金山办公软件有限公司 Document generation method and device based on document template
CN104572594A (en) * 2015-01-27 2015-04-29 中復保有限公司 Real-time generation method of dynamic PDF (portable document format) documents
CN104598636A (en) * 2015-02-06 2015-05-06 无锡江南计算技术研究所 Complex document separating and organizing method and complex document automatic generating method
CN104866598A (en) * 2015-06-01 2015-08-26 北京理工大学 Heterogeneous database integrating method based on configurable templates
CN106610929A (en) * 2015-10-26 2017-05-03 北大方正集团有限公司 Method and device for typesetting digital publishing structured content file

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
赵林: "基于有向图的流式文档逻辑结构重构方法", 《计算机工程与设计》 *

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108965021A (en) * 2018-07-26 2018-12-07 平安科技(深圳)有限公司 The creation method and device of virtual rehearsal network
CN111273572A (en) * 2018-12-04 2020-06-12 北京猎户星空科技有限公司 Method, device, equipment and storage medium for creating action molecule template
CN110046637A (en) * 2018-12-25 2019-07-23 阿里巴巴集团控股有限公司 A kind of training method, device and the equipment of contract paragraph marking model
CN110046637B (en) * 2018-12-25 2023-08-08 创新先进技术有限公司 Training method, device and equipment for contract paragraph annotation model
CN111382621A (en) * 2018-12-28 2020-07-07 北大方正集团有限公司 Parameter adjusting method and device
CN110738035A (en) * 2019-09-18 2020-01-31 平安科技(深圳)有限公司 document template generation method and device
CN112749536A (en) * 2019-10-31 2021-05-04 北京国双科技有限公司 Document generation method, device and equipment
CN111046645A (en) * 2019-12-11 2020-04-21 浙江大搜车软件技术有限公司 Method and device for generating article, computer equipment and storage medium
CN113393201A (en) * 2020-03-12 2021-09-14 阿里巴巴集团控股有限公司 Contract processing system and method and electronic equipment
CN113760248A (en) * 2020-07-08 2021-12-07 北京沃东天骏信息技术有限公司 Method and device for generating application program
CN115904572A (en) * 2022-10-26 2023-04-04 北京力控元通科技有限公司 Template creating method, template calling method, program product, template system and template device

Also Published As

Publication number Publication date
CN108170656B (en) 2021-09-07

Similar Documents

Publication Publication Date Title
CN108170656A (en) Template establishment method, document creating method, rendering intent and device
CN112036736B (en) Workflow creation method and device
CN110058856A (en) Page configuration method and device
US8689176B2 (en) Management of template versions
CN107644286A (en) Workflow processing method and device
CN106886406A (en) The generation method and device of exploitation code or document
EP3667493B1 (en) A method for a software development system
Hasic et al. Towards assessing the theoretical complexity of the decision model and notation (DMN)
CN104254846B (en) For the navigation based on content of electronic equipment
CN112905624B (en) Database extension method and device of low-code development platform
CN109214193B (en) Data encryption and machine learning model training method and device and electronic equipment
CN106844369B (en) Objectification SQL sentence construction method and apparatus
US20080228799A1 (en) System and Method for Performing an Inverse Schema Mapping
CN109241026A (en) The method, apparatus and system of data management
CN109033365B (en) Data processing method and related equipment
CN113672204A (en) Interface document generation method, system, electronic equipment and storage medium
CN105843618A (en) Desktop system with custom theme edition function
CN109445778A (en) A kind of method and apparatus that the interface auxiliary based on SVG file generates
CN108874379B (en) Page processing method and device
CN113535817B (en) Feature broad table generation and service processing model training method and device
CN113110843B (en) Contract generation model training method, contract generation method and electronic equipment
CN106970758A (en) Electronic document operation processing method, device and electronic equipment
CN102171696B (en) The generation method and apparatus of customization data
CN110989999A (en) Code generation method and device, electronic equipment and medium
CN108509773A (en) A kind of source code reinforcement means and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20200925

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman, British Islands

Applicant after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman, British Islands

Applicant before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20200925

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman, British Islands

Applicant after: Advanced innovation technology Co.,Ltd.

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Applicant before: Alibaba Group Holding Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20240219

Address after: Guohao Times City # 20-01, 128 Meizhi Road, Singapore

Patentee after: Advanced Nova Technology (Singapore) Holdings Ltd.

Country or region after: Singapore

Address before: Ky1-9008 business centre, 27 Hospital Road, Georgetown, grand caiman, UK

Patentee before: Innovative advanced technology Co.,Ltd.

Country or region before: Cayman Islands

TR01 Transfer of patent right