CN108647305A - document format conversion method and device - Google Patents

document format conversion method and device Download PDF

Info

Publication number
CN108647305A
CN108647305A CN201810437386.0A CN201810437386A CN108647305A CN 108647305 A CN108647305 A CN 108647305A CN 201810437386 A CN201810437386 A CN 201810437386A CN 108647305 A CN108647305 A CN 108647305A
Authority
CN
China
Prior art keywords
document
attribute
format
text
format conversion
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
CN201810437386.0A
Other languages
Chinese (zh)
Other versions
CN108647305B (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.)
Tianjin ByteDance Technology Co Ltd
Original Assignee
Tianjin ByteDance Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tianjin ByteDance Technology Co Ltd filed Critical Tianjin ByteDance Technology Co Ltd
Priority to CN201810437386.0A priority Critical patent/CN108647305B/en
Publication of CN108647305A publication Critical patent/CN108647305A/en
Priority to PCT/CN2018/113420 priority patent/WO2019214182A1/en
Application granted granted Critical
Publication of CN108647305B publication Critical patent/CN108647305B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/93Document management systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Document Processing Apparatus (AREA)

Abstract

The application proposes a kind of document format conversion method and device, wherein method includes:Obtain the first document that document format is the first format;First document is identified, determines the first attribute of each element in the first document;According to preset element property transformation rule, the second attribute corresponding with the first attribute of each element is determined;According to corresponding second attribute of each element, the first document is converted into the second document that document format is the second format;Wherein, the first document is one kind in text document or mind map, and the second document is another.This method passes through the attribute according to each element in document in documents in various formats, attribute of an element in document is converted, to realize conversion of the document content between different-format, saved user edit, modification, reading documents time, improve user experience.

Description

Document format conversion method and device
Technical field
This application involves Internet technical field more particularly to a kind of conversion of document format and devices.
Background technology
With popularizing for computer technology, more and more users use computer document record work and life things. The format of the common computer document of user mainly have text (Text, abbreviation TXT), document (Document, abbreviation doc), can Transplant document format (Portable Document Format, abbreviation PDF) etc., and user can by " saving as ", " lead Go out " etc. modes, realize conversion of the document between different each formats.
Currently, with the demand of working efficiency, mind map is gradually answered because of its power with human thinking Every field is used.The skill that mind map is laid equal stress on picture and text, the relationships of themes at different levels be mutually subordinate to it is relevant Stratal diagram shows, and the foundation such as subject key words and image, color memory is linked.In the related technology, user can also use Related software, directly by the file of mind map " saving as " other formats.
It has been found that the mode that document is converted between various formats at present, is generally only by the corresponding " file of document Type " is converted, for example doc format files are converted to PDF format document, can be beaten with PDF softwares thereby using family Document is opened, or mind map is converted to the picture of doc formats, doc softwares can be used to open mind map thereby using family Etc..But the conversion method of above-mentioned document format, it is only capable of the type of convert documents entirety, and document content is cannot achieve not With the conversion between format.
Invention content
The embodiment of the present application is intended to solve at least some of the technical problems in related technologies.
For this purpose, the embodiment of the present application proposes a kind of document format conversion method, to realize by according to each element in document Attribute in documents in various formats converts attribute of an element in document, to realize document content in not apposition Conversion between formula, saved user edit, modification, reading documents time, user experience is improved, for solving the prior art In be only capable of the type of convert documents entirety, and the technical issues of cannot achieve conversion of the document content between different-format.
The embodiment of the present application proposes a kind of document format conversion equipment.
The embodiment of the present application proposes a kind of electronic equipment.
The embodiment of the present application proposes a kind of non-transient computer readable storage medium.
The embodiment of the present application one side embodiment proposes a kind of document format conversion method, including:
Obtain the first document that document format is the first format;
First document is identified, determines the first attribute of each element in first document;
According to preset element property transformation rule, the second attribute corresponding with the first attribute of each element is determined;
According to corresponding second attribute of each element, it is the second format that first document, which is converted to document format, Second document;
Wherein, first document is one kind in text document or mind map, and the second document is another.
The document format conversion method of the embodiment of the present application, by obtaining the first document that document format is the first format, First document is identified, determines the first attribute of each element in the first document, according to preset element property transformation rule, It determines the second attribute corresponding with the first attribute of each element, according to corresponding second attribute of each element, the first document is converted For the second document that document format is the second format.Pass through the category according to each element in document in documents in various formats as a result, Property, attribute of an element in document is converted, to realize conversion of the document content between different-format, has saved user Editor changes, the time of reading documents, improves user experience.
The another aspect embodiment of the embodiment of the present application proposes a kind of document format conversion equipment, including:
Acquisition module, for obtaining the first document that document format is the first format;
Identification module determines that first of each element in first document belongs to for first document to be identified Property;
Determining module, for according to preset element property transformation rule, determining the first attribute pair with each element The second attribute answered;
Conversion module, for according to corresponding second attribute of each element, first document to be converted to document lattice Formula is the second document of the second format;
Wherein, first document is one kind in text document or mind map, and second document is another.
The document format conversion equipment of the embodiment of the present application, by obtaining the first document that document format is the first format, First document is identified, determines the first attribute of each element in the first document, according to preset element property transformation rule, It determines the second attribute corresponding with the first attribute of each element, according to corresponding second attribute of each element, the first document is converted For the second document that document format is the second format.Pass through the category according to each element in document in documents in various formats as a result, Property, attribute of an element in document is converted, to realize conversion of the document content between different-format, has saved user Editor changes, the time of reading documents, improves user experience.
The another aspect embodiment of the embodiment of the present application proposes a kind of electronic equipment, including:Memory, processor and storage On a memory and the computer program that can run on a processor, when the processor executes described program, such as this Shen is realized Document format conversion method that please be described in previous embodiment.
The another aspect embodiment of the embodiment of the present application proposes a kind of non-transient computer readable storage medium, stores thereon There is computer program, which is characterized in that the document as described in the application previous embodiment is realized when the program is executed by processor Format conversion method.
The additional aspect of the embodiment of the present application and advantage will be set forth in part in the description, and will partly be retouched from following Become apparent in stating, or recognize by the practice of the application.
Description of the drawings
The embodiment of the present application is above-mentioned and/or additional aspect and advantage from the following description of the accompanying drawings of embodiments It will be apparent and be readily appreciated that, wherein:
The flow diagram for the document format conversion method that Fig. 1 is provided by the embodiment of the present application one;
Fig. 2 is mind map schematic diagram one in the embodiment of the present application;
The flow diagram for the document format conversion method that Fig. 3 is provided by the embodiment of the present application two;
Fig. 4 is mind map schematic diagram two in the embodiment of the present application;
The flow diagram for the document format conversion method that Fig. 5 is provided by the embodiment of the present application three;
The flow diagram for the document format conversion method that Fig. 6 is provided by the embodiment of the present application four;
Fig. 7 is mind map schematic diagram three in the embodiment of the present application;
Fig. 8 is the displaying pattern diagram of mind map in the embodiment of the present application;
The structural schematic diagram for the document format conversion equipment that Fig. 9 is provided by the embodiment of the present application five;
The structural schematic diagram for the document format conversion equipment that Figure 10 is provided by the embodiment of the present application six;
Figure 11 is the hardware architecture diagram for illustrating the electronic equipment according to the embodiment of the present application;
Figure 12 is the schematic diagram for illustrating non-transient computer readable storage medium according to an embodiment of the present application.
Specific implementation mode
Embodiments herein is described below in detail, examples of the embodiments are shown in the accompanying drawings, wherein from beginning to end Same or similar label indicates same or similar element or element with the same or similar functions.Below with reference to attached The embodiment of figure description is exemplary, it is intended to for explaining the application, and should not be understood as the limitation to the application.
Below with reference to the accompanying drawings the document format conversion method and device of the embodiment of the present application are described.
The flow diagram for the document format conversion method that Fig. 1 is provided by the embodiment of the present application one.
As shown in Figure 1, the document format conversion method includes the following steps:
Step 101, the first document that document format is the first format is obtained.
Document format conversion method provided by the embodiments of the present application can be turned by document format provided by the embodiments of the present application Changing device realizes that the device can be configured in any electronic equipment, so that document format may be implemented in the electronic equipment Conversion function.
In the embodiment of the present application, the first document can be text document, and the format of text document can be TXT formats, doc Format, PDF format, rich text format (Rich Text Field, abbreviation RTF) etc..Alternatively, the first document, or thinking Lead figure.For convenience of description, the following embodiment of the application is illustrated so that the first document is text document as an example.
Specifically, the first document that the first format can be chosen by user, for example, user can be with the first lattice of download online First document of formula, alternatively, user can select a document as the first document, not to this from the data being locally stored It is restricted.
Step 102, the first document is identified, determines the first attribute of each element in the first document.
May include Document Title member when the first document is text document, in first document in the embodiment of the present application Element, level-one title element, two level title element, three-level title element, ordered list element, unordered list element, task list Element, table element, paragraph element etc., therefore, attribute of an element can be Document Title, level-one title, two in the first document Grade title, three-level title, ordered list, unordered list, task list, table, paragraph etc..
In a kind of possible way of realization, document format conversion equipment can be according to first document for text document The format of middle each element and the corresponding fixed style set of first document, determine the first attribute of each element.
Wherein, fixed style set includes the correspondence of each element attribute and format.First attribute of each element, refers to this The corresponding head level of element, list type or form types etc..In general, attribute of an element includes in text document:Text Shelves title, level-one title, two level title, three-level title, unordered list, ordered list, task list, table, paragraph etc..
For example, for the document of doc formats, the format of " Document Title " is that " first trip is contracted in fixed style set Into:0 character, line-spacing:Single-spaced allows punctuate to overflow boundary ", then document format conversion equipment, to the first document into When row identification, however, it is determined that the format of a certain element is that " first trip is retracted:0 character, line-spacing:Single-spaced allows punctuate bleeding edge Boundary " then can determine that the element is Document Title.
In alternatively possible way of realization, if the first document of the first format without fixed style set or this first First document of format is in editor, not using the format editing each element in fixed style set, then document format converting means It sets, can also determine the first attribute of each element according to the location information of each element, font size information and/or pitch information.
Wherein, the location information of each element includes the position of each element in a document, for example, X row Y row;Font size is believed Breath may include font type, font size size, font etc.;Pitch information refers to the direct spacing of each element, such as line space, word Spacing etc..
Generally, due in text document, the formats such as the position of the elements such as title at different levels, paragraph and font size have fixed rule Rule, such as Document Title, the font size for being usually located at the first trip of document and Document Title are bigger than the font size of level-one title;Level-one mark The font size of topic is bigger than two level title font size;Title font size is bigger etc. than paragraph font size.Therefore, it in the embodiment of the present application, can be based on Above-mentioned rule determines each element in conjunction with the location information of each element, font size information and/or pitch information in text document The first attribute.
If for example, after the identification of the first document of document format conversion equipment pair, determine in the first document, element " document format The corresponding location information of conversion method " is:It is the first row, placed in the middle;Corresponding font size information is:The Song typeface, No. two, overstriking, then can be true Corresponding first attribute of the fixed element is " Document Title ".
Alternatively, after the identification of the first document of document format conversion equipment pair, determine in the first document, between the continuous element in part Change in location rule, and font size information is consistent, then can then determine that the first attribute of the continuous element in the part is " table member Element " etc..
Step 103, according to preset element property transformation rule, determine that corresponding with the first attribute of each element second belongs to Property.
Wherein, preset element property transformation rule can be document format conversion equipment, according to the document of various formats Middle attribute of an element and meaning, automatically generate, or can also be the specified determination according to user, the present embodiment to this not It limits.
Transformation rule that can be between element property preset first in the embodiment of the present application, in document format conversion equipment, it Afterwards, after the first document for getting the first format to be converted, you can according to the first attribute of each element in the first document, really Determine position and appearance form of each element in the second document of the second format.Wherein, the second document can be mind map.
Optionally, preset element property transformation rule can be as shown in table 1, for Document Title element, in thinking It can only be root node to lead the position in figure, and does not have the brother of node, also without superior node, be inserted into the acquiescence member of downstream site Element is level-one title, and for level-one title element, the position in mind map is first layer, and it cannot be inserted into root Node, the default element for being inserted into downstream site is two level title, and the default element for being inserted into the brother of node is level-one title, similarly, It can obtain position of the other elements in mind map.
Step 104, according to corresponding second attribute of each element, it is the second format that the first document, which is converted to document format, Second document.
In the embodiment of the present application, when the first attribute according to preset element property transformation rule and each element, determine each Behind position and appearance form of the element in the second document, according to position of each element in the second document and shape can be presented First document is converted to the second document that document format is the second format by formula.
It should be noted that for Document Title element, the node in mind map can only be root node, and inevitable In the presence of node of level-one title (H1) element in mind map is the leaf node of root node, and two level title (H2) element exists Node in mind map is the leaf node of H1, and node of the three-level title (H3) in mind map is the leaf node of H2; The node of table element, paragraph element in mind map can only be leaf node;For unordered list element, ordered list member Element, task list element, can be mapped to corresponding node in mind map according to the hierarchical relationship of list itself;The section of missing It puts and does not show, the position that can be left some space, and node and the brother of node alignment display occurred.
1 element property transformation rule of table
For example, when there is no level-one title (H1) element and two level title (H2) element in the first document, H1 and H2 Corresponding position is blank in mind map, can be existed in a manner of horizontal line, and three-level title (H3) element is in thinking The position led in figure is aligned display with a nearest H3.
The word for being included by Document Title element, level-one title element, two level title element, three-level title element Number is less, therefore when being presented in mind map, can by the respective nodes of word that element is included in mind map into Row is completely presented;For ordered list element, unordered list element, task list element and table element, it can incite somebody to action The title of list element or table element, the respective nodes in mind map are presented;And for paragraph element, In general, the word that paragraph element is included is longer, therefore, paragraph element can be parsed, determine paragraph element Abstract, the appearance form by abstract as paragraph element in mind map, alternatively, since the importance of words is as it is in text Therefore the directly proportional increase of number occurred in shelves can parse paragraph element, determine the appearance that paragraph element includes Frequency is more than the word of threshold value, using including the frequency of occurrences be more than the word of threshold value and in mind map be in as paragraph element Existing form.
As an example, it is mind map schematic diagram one in the embodiment of the present application referring to Fig. 2, Fig. 2.As shown in Fig. 2, the One document is text document, and the second document is mind map, display interface can be divided into two, text document is located at right side region Domain 21, mind map are located at left area 22, and Document Title is:<Personality classification MBTI>, level-one is entitled:<INJT types>With <Other>, two level is entitled<Auxiliary>With<Miscellaneous function:Flare is thought deeply>.After text document is converted to mind map,<Personality Classify MBTI>For root node,<INJT types>With<Other>For<Personality classification MBTI>Leaf node,<Auxiliary>With<Auxiliary Function:Flare is thought deeply>For<Other>Leaf node.
It should be noted that the above embodiments of the present application are saying of being carried out so that text document is converted to mind map as an example It is bright, in actual use, mind map can also be converted into text document according to attribute transformation rule.
It as seen from Figure 2, can be according to document content by using document format conversion method provided by the present application Attribute converts document content between different-format, so that user can be led when editing document by thinking Figure, mind map can be converted to text by the thinking and train of thought of rapid build document later to save the time of user Document, then specifically edited.And in modification document, for example when adjustment title sequence, then it can directly adjust mind map The position of interior joint, you can realize the adjustment of corresponding caption position in text document.
The document format conversion method of the present embodiment, by obtaining the first document that document format is the first format, to the One document is identified, and determines the first attribute of each element in the first document, according to preset element property transformation rule, determines First document is converted to text by the second attribute corresponding with the first attribute of each element according to corresponding second attribute of each element Shelves format is the second document of the second format.It, will as a result, by the attribute according to each element in document in documents in various formats Attribute of an element is converted in document, to realize conversion of the document content between different-format, saved user edit, It changes, the time of reading documents, improves user experience.
It will be literary since the content that each node can be presented in mind map is limited as a kind of possible realization method When this document is converted to mind map, the paragraph in text document usually can not be all shown in mind map, at this time in order to It is corresponding with paragraph in mind map when the user clicks convenient for the content of user's quick obtaining text document under mind map pattern Element when, the corresponding content of text of the element can be shown together with mind map.With reference to Fig. 3, to above-mentioned Process is described in detail.
The flow diagram for the document format conversion method that Fig. 3 is provided by the embodiment of the present application two.
As shown in figure 3, the basis of embodiment shown in Fig. 1, after step 104, the document format conversion method is also It may comprise steps of:
Step 201, it when determining the first element that current focus is located in the second document, obtains corresponding with the first element Content of text.
For example, when user carries out document format conversion using PC (Personal Computer, abbreviation PC), Current focus can be located at the first element in the second document, alternatively, when user uses electronic equipment by clicking mouse Current focus when carrying out document format conversion, can be located at by (such as smart mobile phone, pad etc.) by clicking tangible screen The first element in second document.When determining the first element that current focus is located in the second document, can obtain and first The corresponding content of text of element.
Step 202, the display text content in the form of preset.
As a kind of possible realization method, can in the form of floating window display text content.
As alternatively possible realization method, can in the form of scroll bar display text content.
, can be in the form of multi-section display as another possible realization method, display text content.
As an example, it is mind map schematic diagram two in the embodiment of the present application referring to Fig. 4, Fig. 4.When user will be current Focus is located in mind map<INTJ types>When, display interface can be divided into two, left side displayed thinking leads figure, right side Display<INTJ types>Corresponding content of text.
The document format conversion method of the present embodiment, by the first element for determining that current focus is located in the second document When, obtain content of text corresponding with the first element;The display text content in the form of preset, as a result, user can pass through Two documents quickly understand the structure of the first document, while can also be refined to each element in the second document, one by one portion Divide and read, to help user to clear knowledge point, promotes absorptivity of the user to knowledge point.
As a kind of possible realization method, after the first document is converted to the second document, user can also be to second Some node in document, such as mind map is denoted as second element in the embodiment of the present application and carries out priority assignation, only passes through The user of verification just can show second element in the second document.Specifically, with reference to Fig. 5, the above process is carried out detailed It describes in detail bright.
The flow diagram for the document format conversion method that Fig. 5 is provided by the embodiment of the present application three.
As shown in figure 5, on the basis of Fig. 1 and embodiment illustrated in fig. 3, the document format conversion method can also include with Lower step:
Step 301, priority assignation order is received, priority assignation order includes the mark and authority information of second element.
In the application example, priority assignation order is user's triggering, and priority assignation order is used to carry out second element Priority assignation, priority assignation order include the mark and authority information of second element.
Wherein, the mark of second element is for the unique mark second element, such as the mark of second element can be the Position of the Was Used in the second document, or be the information of other any unique mark second elements, this is not restricted. Authority information may include user identifier and/or encrypted message, and user identifier can be user's head portrait, address etc., encrypted message It can be numerical ciphers and/or biological characteristic password, this is not restricted.
Step 302, according to authority information, to the permission of second element corresponding with the mark of second element in the second document It is configured.
It specifically, can be according to the authority information in priority assignation order, to the when user triggers priority assignation order The permission of second element corresponding with the mark of second element is configured in two documents.
Step 303, it receives the second document and opens request, it includes verification information to open request.
Optionally, when user wants to open the second document, user can send the second document and open request, for example, with Family can by triggering the second document, into verification the page, then user can by verify the page, validation information, After user has inputted verification information, the second document can be generated and open request.
Step 304, according to authority information, judge whether verification information is legal, if so, executing step 305, otherwise, execute Step 306.
Step 305, the corresponding element of the mark of second element is shown in the second document.
According to authority information, when judging that verification information is legal, at this point, showing that the user has the power for opening the second document Limit, therefore, can show the corresponding element of the mark of second element in the second document.
Step 306, without any processing.
According to authority information, when judging that verification information is illegal, at this point, showing that the user does not have opens the second document Permission therefore can be without any processing.
It should be noted that when user wants to open the second document, user can send the second document and open request, when After receiving opening request, in the embodiment of the present application, the second document can also be directly opened, at this point, since user is not to the Other elements in two documents in addition to second element carry out priority assignation, therefore, can be shown in the second document and remove second Other elements except element.If user wants to show second element in the second document, user can pass through triggering the Was Used, into the verification page, then user can be by verifying page validation information, then can be according to authority information Judge whether verification information is legal, if legal, the corresponding element of the mark of second element can be shown in the second document.
The document format conversion method of the present embodiment, by receiving priority assignation order, priority assignation order includes the The mark and authority information of Was Used;According to authority information, to second yuan corresponding with the mark of second element in the second document The permission of element is configured, and is received the second document and is opened request, and it includes verification information to open request, when according to authority information, When judging that verification information is legal, the corresponding element of the mark of second element is shown in the second document.In the present embodiment, Yong Huke Member can be just shown in the second document only by the user of verification to carry out priority assignation to the element in the second document Element, thus, it is possible to promote the safety of the second document.
In the prior art, when user wants in document when somewhere modifying, user needs to open document, into Enter the correspondingly page to modify, it is complex for operation step.
And in the embodiment of the present application, user can directly utilize the second document, be updated to the first document, for example, can To modify to the title in the first document, modify to the file structure of the first document, simple operation.With reference to Above process process is described in detail in Fig. 6.
The flow diagram for the document format conversion method that Fig. 6 is provided by the embodiment of the present application four.
As shown in fig. 6, on the basis of Fig. 1 and embodiment illustrated in fig. 3, the document format conversion method can also include with Lower step:
Step 401, update request is obtained, update request includes third element mark and information to be updated.
In the embodiment of the present application, the mark of the mark of third element for the unique mark third element, such as third element It is position of the third element in the second document to know, or is the information of other any unique mark third elements, right This is not restricted.
Information to be updated may include content to be updated, such as title etc., or can also include to be updated Position, such as adjustment chapters and sections etc..
Step 402, object element corresponding with third element mark in the first document is determined.
Optionally, after determining third element mark, it may be determined that mesh corresponding with third element mark in the first document Mark element.
Step 403, according to information to be updated, object element in the first document is updated.
Optionally, after determining object element, the information to be updated in being asked according to update, in the first document Object element is updated.
As an example, it is mind map schematic diagram three in the embodiment of the present application referring to Fig. 7, Fig. 7.As shown in fig. 7, with It family can be by a certain element in right click mind map, for example, the element that user selects is two level title<Miscellaneous function:Outside Incline thinking>, which by clicking H1, can be adjusted to level-one title with the right click element by user.
The document format conversion method of the present embodiment, by obtaining update request, the update request includes third member Element mark and information to be updated;Determine object element corresponding with third element mark in the first document;According to described Information to be updated is updated object element described in the first document.User can directly utilize the second document as a result, First document is updated, simple operation.
As a kind of possible realization method, can be automatically generated according to the structure of the second document in the displaying of the first document Appearance and displaying sequence, alternatively, the displaying content and displaying sequence of the first document can be set by user in the second document, to Promote the flexibility and applicability of this method.It, can as a result, when the first document is text document, and the second document is mind map Text document is shown by mind map with realizing.
As an example, it is the displaying pattern diagram of mind map in the embodiment of the present application referring to Fig. 8, Fig. 8.Such as figure Shown in 8, user can be arranged the node that first is shown and be<Auxiliary>, second node being shown be<IBTJ classes Type>, the node that third is shown is<Other>.
In order to realize that above-described embodiment, the application also propose a kind of document format conversion equipment.
The structural schematic diagram for the document format conversion equipment that Fig. 9 is provided by the embodiment of the present application five.
As shown in figure 9, the document format conversion apparatus 100 includes:Acquisition module 101, identification module 102, determining module 103 and conversion module 104.Wherein,
Acquisition module 101, for obtaining the first document that document format is the first format.
Identification module 102 determines the first attribute of each element in the first document for the first document to be identified.
As a kind of possible realization method, the first document is text document, identification module 102, is specifically used for according to the The format of each element in one document and the corresponding fixed style set of the first document, determine the first attribute of each element;Alternatively, root According to the location information of each element, font size information and/or pitch information in the first document, the first attribute of each element is determined.
Determining module 103, for according to preset element property transformation rule, determination to be corresponding with the first attribute of each element The second attribute.
As a kind of possible realization method, determining module 103 is specifically used for according to preset element property transformation rule And the first attribute of each element, determine position and appearance form of each element in the second document.
As alternatively possible realization method, the first document includes paragraph element, and determining module 103 is specifically used for Paragraph element is parsed, determines that the frequency of occurrences that the abstract of paragraph element or paragraph element include is more than threshold value Word;According to the abstract of paragraph element, or including the frequency of occurrences be more than threshold value word, determine that paragraph element is led in thinking Appearance form in figure.
Conversion module 104, for according to corresponding second attribute of each element, it is that the first document, which is converted to document format, Second document of two formats.
Wherein, the first document is one kind in text document or mind map, and the second document is another.
Further, in a kind of possible realization method of the embodiment of the present application, referring to Figure 10, implementation shown in Fig. 9 On the basis of example, the document format conversion apparatus 100 can also include:
Display module 105, for after the first document is converted to the second document, determining current focus positioned at second When the first element in document, content of text corresponding with the first element, and the display text content in the form of preset are obtained.
As a kind of possible realization method, display module 105 is specifically used for the display text content in the form of floating window; Alternatively, in the form of multi-section display, display text content.
As a kind of possible realization method, the first document is text document, and the second document is mind map document.
First receiving module 106, for after the first document is converted to the second document, receiving priority assignation order, Priority assignation order includes the mark and authority information of second element.
Setup module 107 is used for according to authority information, to second yuan corresponding with the mark of second element in the second document The permission of element is configured.
Second receiving module 108 opens request for receiving the second document, and it includes verification information to open request.
Judgment module 109, for according to authority information, judging whether verification information is legal.
Processing module 110, for if so, showing the corresponding element of the mark of second element in the second document.
Update module 111, for after the first document is converted to the second document, obtaining update request, update request Include third element mark and information to be updated, determine object element corresponding with third element mark in the first document, And according to information to be updated, object element in the first document is updated.
It should be noted that the aforementioned explanation to document format conversion method embodiment is also applied for the embodiment Document format conversion equipment 100, details are not described herein again.
The document format conversion equipment of the present embodiment, by obtaining the first document that document format is the first format, to the One document is identified, and determines the first attribute of each element in the first document, according to preset element property transformation rule, determines First document is converted to text by the second attribute corresponding with the first attribute of each element according to corresponding second attribute of each element Shelves format is the second document of the second format.It, will as a result, by the attribute according to each element in document in documents in various formats Attribute of an element is converted in document, to realize conversion of the document content between different-format, saved user edit, It changes, the time of reading documents, improves user experience.
In order to realize that above-described embodiment, the application also propose a kind of electronic equipment.
Figure 11 is the hardware architecture diagram for illustrating the electronic equipment according to the embodiment of the present application.
Electronic equipment can be implemented in a variety of manners, and the electronic equipment in the application can include but is not limited to such as move Mobile phone, smart phone, laptop, digit broadcasting receiver, PDA (personal digital assistant), PAD (tablet computer), PMP (portable media player), navigation device, vehicle electronic device, vehicle-mounted display terminal, vehicle electronics rearview mirror etc. The stationary electronic devices of mobile electronic device and such as number TV, desktop computer etc..
As shown in figure 11, electronic equipment 1100 may include wireless communication unit 1110, A/V (audio/video) input lists Member 1120, user input unit 1130, sensing unit 1140, output unit 1150, memory 1160, interface unit 1170, control Device 1180 and power supply unit 1190 processed etc..Figure 11 shows the electronic equipment with various assemblies, it should be understood that simultaneously All components shown realistic are not applied.More or fewer components can alternatively be implemented.
Wherein, wireless communication unit 1110 allows the radio between electronic equipment 1100 and wireless communication system or network Communication.A/V input units 1120 are for receiving audio or video signal.User input unit 1130 can be according to input by user Order generates key input data with the various operations of control electronics.Sensing unit 1140 detects the current of electronic equipment 1100 State, the position of electronic equipment 1100, user take the presence or absence of touch input of electronic equipment 1100, electronic equipment 1100 Acceleration or deceleration to, electronic equipment 1100 is mobile and direction etc., and generates the operation for control electronics 1100 Order or signal.Interface unit 1170 be used as at least one external device (ED) connect with electronic equipment 1100 can by connect Mouthful.Output unit 1150 is configured to provide output signal with vision, audio and/or tactile manner.Memory 1160 can be deposited The software program etc. of processing and control operation that storage is executed by controller 1180, or can temporarily store oneself through output or The data that will be exported.Memory 1160 may include the storage medium of at least one type.Moreover, electronic equipment 1100 can be with It cooperates with the network storage device for the store function for executing memory 1160 by network connection.The usually control electricity of controller 1180 The overall operation of sub- equipment.In addition, controller 1180 may include for reproducing or the multi-media module of multimedia playback data. The handwriting input executed on the touchscreen or picture can be drawn input and known by controller 1180 with execution pattern identifying processing It Wei not character or image.Power supply unit 1190 receives external power or internal power and is provided under the control of controller 1180 Operate the electric power appropriate needed for each element and component.
The various embodiments for the document format conversion method that the application proposes can be to use such as computer software, hard Part or any combination thereof computer-readable medium implement.Hardware is implemented, the document format conversion side that the application proposes The various embodiments of method can be believed by using application-specific IC (ASIC), digital signal processor (DSP), number It is number processing unit (DSPD), programmable logic device (PLD), field programmable gate array (FPGA), processor, controller, micro- Controller, microprocessor is designed to execute at least one of electronic unit of function described herein to implement, at some In the case of, the various embodiments for the document format conversion method that the application proposes can be implemented in controller 1180.For Software implementation, the application propose document format conversion method various embodiments can with allow to execute at least one function Or the individual software module of operation is implemented.Software code can be by the software application write with any programming language appropriate Program (or program) is implemented, and software code can be stored in memory 1160 and be executed by controller 1180.
In order to realize that above-described embodiment, the application also propose a kind of non-transient computer readable storage medium.
Figure 12 is the schematic diagram for illustrating non-transient computer readable storage medium according to an embodiment of the present application.
As shown in figure 12, according to the computer readable storage medium of the embodiment of the present application 200, it is stored thereon with non-transitory Computer-readable instruction 201.When the non-transitory computer-readable instruction 201 is run by processor, this Shen above-mentioned is executed Please each embodiment document format conversion method all or part of step.
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show The description of example " or " some examples " etc. means specific features, structure, material or spy described in conjunction with this embodiment or example Point is contained at least one embodiment or example of the application.In the present specification, schematic expression of the above terms are not It must be directed to identical embodiment or example.Moreover, particular features, structures, materials, or characteristics described can be in office It can be combined in any suitable manner in one or more embodiments or example.In addition, without conflicting with each other, the skill of this field Art personnel can tie the feature of different embodiments or examples described in this specification and different embodiments or examples It closes and combines.
In addition, term " first ", " second " are used for description purposes only, it is not understood to indicate or imply relative importance Or implicitly indicate the quantity of indicated technical characteristic.Define " first " as a result, the feature of " second " can be expressed or Implicitly include at least one this feature.In the description of the present application, the meaning of " plurality " is at least two, such as two, three It is a etc., unless otherwise specifically defined.
Any process described otherwise above or method description are construed as in flow chart or herein, and expression includes It is one or more for realizing custom logic function or process the step of executable instruction code module, segment or portion Point, and the range of the preferred embodiment of the application includes other realization, wherein can not press shown or discuss suitable Sequence, include according to involved function by it is basic simultaneously in the way of or in the opposite order, to execute function, this should be by the application Embodiment person of ordinary skill in the field understood.
Expression or logic and/or step described otherwise above herein in flow charts, for example, being considered use In the order list for the executable instruction for realizing logic function, may be embodied in any computer-readable medium, for Instruction execution system, device or equipment (system of such as computer based system including processor or other can be held from instruction The instruction fetch of row system, device or equipment and the system executed instruction) it uses, or combine these instruction execution systems, device or set It is standby and use.For the purpose of this specification, " computer-readable medium " can any can be included, store, communicating, propagating or passing Defeated program is for instruction execution system, device or equipment or the dress used in conjunction with these instruction execution systems, device or equipment It sets.The more specific example (non-exhaustive list) of computer-readable medium includes following:Electricity with one or more wiring Interconnecting piece (electronic device), portable computer diskette box (magnetic device), random access memory (RAM), read-only memory (ROM), erasable edit read-only storage (EPROM or flash memory), fiber device and portable optic disk is read-only deposits Reservoir (CDROM).In addition, computer-readable medium can even is that the paper that can print described program on it or other are suitable Medium, because can be for example by carrying out optical scanner to paper or other media, then into edlin, interpretation or when necessary with it His suitable method is handled electronically to obtain described program, is then stored in computer storage.
It should be appreciated that each section of the application can be realized with hardware, software, firmware or combination thereof.Above-mentioned In embodiment, software that multiple steps or method can in memory and by suitable instruction execution system be executed with storage Or firmware is realized.Such as, if realized in another embodiment with hardware, following skill well known in the art can be used Any one of art or their combination are realized:With for data-signal realize logic function logic gates from Logic circuit is dissipated, the application-specific integrated circuit with suitable combinational logic gate circuit, programmable gate array (PGA), scene can compile Journey gate array (FPGA) etc..
Those skilled in the art are appreciated that realize all or part of step that above-described embodiment method carries Suddenly it is that relevant hardware can be instructed to complete by program, the program can be stored in a kind of computer-readable storage medium In matter, which includes the steps that one or a combination set of embodiment of the method when being executed.
In addition, each functional unit in each embodiment of the application can be integrated in a processing module, it can also That each unit physically exists alone, can also two or more units be integrated in a module.Above-mentioned integrated mould The form that hardware had both may be used in block is realized, can also be realized in the form of software function module.The integrated module is such as Fruit is realized in the form of software function module and when sold or used as an independent product, can also be stored in a computer In read/write memory medium.
Storage medium mentioned above can be read-only memory, disk or CD etc..Although having been shown and retouching above Embodiments herein is stated, it is to be understood that above-described embodiment is exemplary, and should not be understood as the limit to the application System, those skilled in the art can be changed above-described embodiment, change, replace and become within the scope of application Type.

Claims (12)

1. a kind of document format conversion method, which is characterized in that including:
Obtain the first document that document format is the first format;
First document is identified, determines the first attribute of each element in first document;
According to preset element property transformation rule, the second attribute corresponding with the first attribute of each element is determined;
According to corresponding second attribute of each element, first document is converted into document format as the second of the second format Document;
Wherein, first document is one kind in text document or mind map, and second document is another.
2. document format conversion method as described in claim 1, which is characterized in that described to be converted according to preset element property Rule determines the second attribute corresponding with the first attribute of each element, including:
According to preset element property transformation rule and the first attribute of each element, determine each element in second document Position and appearance form.
3. document format conversion method as claimed in claim 2, which is characterized in that first document includes paragraph member Element;
Position and appearance form of the determining each element in second document, including:
The paragraph element is parsed, determines that the abstract of the paragraph element or the paragraph element included goes out Existing frequency is more than the word of threshold value;
According to the abstract of the paragraph element, or including the frequency of occurrences be more than threshold value word, determine the paragraph element Appearance form in mind map.
4. document format conversion method as described in claim 1, which is characterized in that first document is text document;
First attribute of each element in determination first document, including:
According to the format of each element in first document and the corresponding fixed style set of first document, determine described each First attribute of element;
Alternatively, according to the location information of each element, font size information and/or pitch information in first document, determine described each First attribute of element.
5. document format conversion method as claimed in claim 4, which is characterized in that described that first document is converted to After two documents, further include:
When determining the first element that current focus is located in second document, text corresponding with first element is obtained Content;
The content of text is shown in the form of preset.
6. document format conversion method as claimed in claim 5, which is characterized in that described to show the text in the form of preset This content, including:
The content of text is shown in the form of floating window;
Alternatively,
In the form of multi-section display, the content of text is shown.
7. the document format conversion method as described in claim 1-6 is any, which is characterized in that first document is text text Shelves, second document are mind map document;
It is described first document is converted into the second document after, further include:
Priority assignation order is received, the priority assignation order includes the mark and authority information of second element;
According to the authority information, to the permission of second element corresponding with the mark of the second element in second document It is configured.
8. document format conversion method as claimed in claim 7, which is characterized in that it is described in second document with it is described After the permission of the corresponding second element of mark of second element is configured, further include:
It receives the second document and opens request, the opening request includes verification information;
According to the authority information, judge whether the verification information is legal;
If so, showing the corresponding element of the mark of the second element in second document.
9. the document format conversion method as described in claim 1-6 is any, which is characterized in that first document is text text Shelves, second document are mind map document;
It is described first document is converted into the second document after, further include:
Update request is obtained, the update request includes third element mark and information to be updated;
Determine object element corresponding with third element mark in first document;
According to the information to be updated, object element described in first document is updated.
10. a kind of document format conversion equipment, which is characterized in that including:
Acquisition module, for obtaining the first document that document format is the first format;
Identification module determines the first attribute of each element in first document for first document to be identified;
Determining module, for according to preset element property transformation rule, determination to be corresponding with the first attribute of each element Second attribute;
Conversion module, for according to corresponding second attribute of each element, first document, which is converted to document format, to be Second document of the second format;
Wherein, first document is one kind in text document or mind map, and second document is another.
11. a kind of electronic equipment, which is characterized in that including:Memory, processor and storage are on a memory and can be in processor The computer program of upper operation when the processor executes described program, realizes the document as described in any in claim 1-9 Format conversion method.
12. a kind of non-transient computer readable storage medium, is stored thereon with computer program, which is characterized in that the program quilt The document format conversion method as described in any in claim 1-9 is realized when processor executes.
CN201810437386.0A 2018-05-09 2018-05-09 Document format conversion method and device Active CN108647305B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201810437386.0A CN108647305B (en) 2018-05-09 2018-05-09 Document format conversion method and device
PCT/CN2018/113420 WO2019214182A1 (en) 2018-05-09 2018-11-01 Document format conversion method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810437386.0A CN108647305B (en) 2018-05-09 2018-05-09 Document format conversion method and device

Publications (2)

Publication Number Publication Date
CN108647305A true CN108647305A (en) 2018-10-12
CN108647305B CN108647305B (en) 2021-07-20

Family

ID=63754002

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810437386.0A Active CN108647305B (en) 2018-05-09 2018-05-09 Document format conversion method and device

Country Status (2)

Country Link
CN (1) CN108647305B (en)
WO (1) WO2019214182A1 (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109582934A (en) * 2018-12-04 2019-04-05 万兴科技股份有限公司 The conversion method and device of format document
CN109933766A (en) * 2019-03-13 2019-06-25 腾讯科技(深圳)有限公司 Document generating method, device and storage medium
CN109993152A (en) * 2019-04-15 2019-07-09 武汉轻工大学 Mode conversion method, equipment, storage medium and the device of coordinate curve integral
WO2019214182A1 (en) * 2018-05-09 2019-11-14 天津字节跳动科技有限公司 Document format conversion method and apparatus
CN110991144A (en) * 2019-12-03 2020-04-10 盛科网络(苏州)有限公司 Maintenance method and maintenance system for fixed format document
CN111104786A (en) * 2018-10-26 2020-05-05 北京金山办公软件股份有限公司 Document tracking method and device, computer storage medium and terminal
CN111832261A (en) * 2019-03-29 2020-10-27 珠海金山办公软件有限公司 Document style selection method and device and electronic equipment
CN111865437A (en) * 2020-06-24 2020-10-30 紫光展讯通信(惠州)有限公司 Digital conversion method and device
CN112001150A (en) * 2019-05-27 2020-11-27 珠海金山办公软件有限公司 Document format conversion method and device, computer storage medium and terminal
CN112232032A (en) * 2020-09-04 2021-01-15 科航(苏州)信息科技有限公司 Method for automatically converting content style of docx document
CN113177390A (en) * 2021-05-07 2021-07-27 深圳市欧瑞博科技股份有限公司 Intelligent document processing method and device, computer readable medium and electronic equipment
CN113704214A (en) * 2021-08-27 2021-11-26 北京市律典通科技有限公司 Electronic file type conversion method and device and computer equipment
WO2024093572A1 (en) * 2022-10-31 2024-05-10 北京字跳网络技术有限公司 Method and apparatus for presenting document, and device and storage medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112861481B (en) * 2021-01-29 2024-01-30 北京尚医智信健康管理有限公司 Paging processing method, paging processing device, electronic equipment and computer readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20140008185A (en) * 2012-07-11 2014-01-21 정영교 Real-time interlock method, apparutus and computer readable recording medium for creating mind-map with creating document
US8949670B1 (en) * 2012-09-26 2015-02-03 Emc Corporation Method and system for translating mind maps to test management utility test cases
CN104850591A (en) * 2015-04-24 2015-08-19 百度在线网络技术(北京)有限公司 Data conversion storage method and device
CN105893254A (en) * 2016-03-29 2016-08-24 乐视控股(北京)有限公司 Test case input method and device
CN107885713A (en) * 2017-11-28 2018-04-06 广州视源电子科技股份有限公司 File layout change-over method, device, equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8103703B1 (en) * 2006-06-29 2012-01-24 Mindjet Llc System and method for providing content-specific topics in a mind mapping system
CN108647305B (en) * 2018-05-09 2021-07-20 天津字节跳动科技有限公司 Document format conversion method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20140008185A (en) * 2012-07-11 2014-01-21 정영교 Real-time interlock method, apparutus and computer readable recording medium for creating mind-map with creating document
US8949670B1 (en) * 2012-09-26 2015-02-03 Emc Corporation Method and system for translating mind maps to test management utility test cases
CN104850591A (en) * 2015-04-24 2015-08-19 百度在线网络技术(北京)有限公司 Data conversion storage method and device
CN105893254A (en) * 2016-03-29 2016-08-24 乐视控股(北京)有限公司 Test case input method and device
CN107885713A (en) * 2017-11-28 2018-04-06 广州视源电子科技股份有限公司 File layout change-over method, device, equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
穆洪星: "MindManager使用说明", 《HTTPS://WWW.CNBLOGS.COM/MUHONGXING/ARCHIVE/2009/12/29/1635104.HTML》 *

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019214182A1 (en) * 2018-05-09 2019-11-14 天津字节跳动科技有限公司 Document format conversion method and apparatus
CN111104786A (en) * 2018-10-26 2020-05-05 北京金山办公软件股份有限公司 Document tracking method and device, computer storage medium and terminal
CN109582934B (en) * 2018-12-04 2023-02-10 万兴科技股份有限公司 Format document conversion method and device
CN109582934A (en) * 2018-12-04 2019-04-05 万兴科技股份有限公司 The conversion method and device of format document
CN109933766A (en) * 2019-03-13 2019-06-25 腾讯科技(深圳)有限公司 Document generating method, device and storage medium
CN109933766B (en) * 2019-03-13 2023-07-28 腾讯科技(深圳)有限公司 File generation method, device and storage medium
CN111832261A (en) * 2019-03-29 2020-10-27 珠海金山办公软件有限公司 Document style selection method and device and electronic equipment
CN109993152A (en) * 2019-04-15 2019-07-09 武汉轻工大学 Mode conversion method, equipment, storage medium and the device of coordinate curve integral
CN112001150A (en) * 2019-05-27 2020-11-27 珠海金山办公软件有限公司 Document format conversion method and device, computer storage medium and terminal
CN110991144A (en) * 2019-12-03 2020-04-10 盛科网络(苏州)有限公司 Maintenance method and maintenance system for fixed format document
CN111865437B (en) * 2020-06-24 2022-07-19 紫光展讯通信(惠州)有限公司 Digital conversion method and device
CN111865437A (en) * 2020-06-24 2020-10-30 紫光展讯通信(惠州)有限公司 Digital conversion method and device
CN112232032A (en) * 2020-09-04 2021-01-15 科航(苏州)信息科技有限公司 Method for automatically converting content style of docx document
CN112232032B (en) * 2020-09-04 2023-08-18 科航(苏州)信息科技有限公司 Automatic conversion method for content style of docx document
CN113177390A (en) * 2021-05-07 2021-07-27 深圳市欧瑞博科技股份有限公司 Intelligent document processing method and device, computer readable medium and electronic equipment
CN113704214A (en) * 2021-08-27 2021-11-26 北京市律典通科技有限公司 Electronic file type conversion method and device and computer equipment
WO2024093572A1 (en) * 2022-10-31 2024-05-10 北京字跳网络技术有限公司 Method and apparatus for presenting document, and device and storage medium

Also Published As

Publication number Publication date
WO2019214182A1 (en) 2019-11-14
CN108647305B (en) 2021-07-20

Similar Documents

Publication Publication Date Title
CN108647305A (en) document format conversion method and device
JP5221757B2 (en) Presenting non-authoring features through document status information in an outspace user interface
JP5266384B2 (en) Communication between in-space user interface and out-space user interface in document editor
CN101048773B (en) Document analysis system and method
CN108549623A (en) Collaborative document editing control method, device, electronic equipment and storage medium
US7200803B2 (en) System and method for visually categorizing electronic notes
KR101143191B1 (en) Aligned behavior in templated lists
US8612845B2 (en) Method and apparatus for facilitating directed reading of document portions based on information-sharing relevance
JP4821539B2 (en) Information processing system and information processing program
WO2018102020A1 (en) Systems and methods for applying layout to documents
Lambert et al. Microsoft Office 2019 Step by Step
CN108139794A (en) Browser is can customize for computer file system and Email
CN109271075A (en) Page elements autoplacement method and device
CN108595646A (en) The comment method and apparatus of online document
CN105843787B (en) A kind of RichText Edition method and system
CN104461545B (en) Content in mobile terminal is provided to the method and device of user
CN109119079A (en) voice input processing method and device
CN106681698A (en) Dynamic list generating method and device
US20150111189A1 (en) System and method for browsing multimedia file
CN101315627B (en) Data entry method and system
Grossman et al. Adaptation in visual culture: Images, texts, and their multiple worlds
JP2002236679A (en) Document processor
CN105787079A (en) We-media information editing method and device based on artificial intelligence
CN104850316A (en) Method and device for adjusting fonts of electronic books
JP2010026766A (en) Information processing apparatus, information processing method and program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant