Document processing method and device, electronic equipment and storage medium

Through user marking and text feature extraction methods, the problem of misunderstanding of the existing document processing method in the standard document is solved, and the identification efficiency and accuracy are improved.

CN119377348APending Publication Date: 2025-01-28BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411514202.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-28
Publication Date
2025-01-28

AI Technical Summary

Technical Problem

Existing document processing methods are prone to misidentifying content when processing standardized documents, resulting in a decrease in recognition efficiency and accuracy.

Method used

Through the user, mark some of the contents of the target document, extract the text characteristics of these contents, and mark the content with these characteristics as the same type in the document, and then identify and process it.

Benefits of technology

Improved the identification efficiency and accuracy of the first type of content in the document, especially when processing the specification document, reducing the misunderstanding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119377348A_ABST
    Figure CN119377348A_ABST
Patent Text Reader

Abstract

The invention provides a document processing method and device, electronic equipment and a storage medium. The document processing method comprises the steps of obtaining a to-be-processed target document; in response to a first marking operation of a user on one or more first contents in the target document, marking the first contents as first type contents; obtaining the text feature of the first content, marking the content with the text feature in the rest content of the target document as the first type content, and performing identification processing on the target document based on the marking result. According to the embodiment of the invention, the efficiency and accuracy of document recognition processing are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a document processing method, device, electronic device and storage medium. Background Art

[0002] Intelligent document processing is the process of using artificial intelligence technology to extract key data from unstructured, semi-structured and other documents and convert them into structured data. The processing process includes document content structuring, element extraction, document hierarchy restoration, etc. Document chapter segmentation is a subtask of intelligent document processing. It can enhance the algorithm's understanding of the document structure, integrate documents into corresponding knowledge units according to chapters, support the completion of complex knowledge base question and answer, and is widely used in many fields. Summary of the invention

[0003] The present disclosure provides a document processing method, device, electronic device and storage medium.

[0004] The present disclosure adopts the following technical solutions.

[0005] In some embodiments, the present disclosure provides a document processing method, including:

[0006] Get the target document to be processed;

[0007] In response to a first marking operation of a user on one or more first contents in the target document, marking the first contents as first type contents;

[0008] Acquire a text feature of the first content, and mark the content having the text feature in the remaining content of the target document as a first type of content;

[0009] Based on the marking result, the target document is identified.

[0010] In some embodiments, the present disclosure provides a document processing device, comprising:

[0011] An acquisition unit, used for acquiring a target document to be processed;

[0012] a control unit, configured to mark the first content as a first type of content in response to a first marking operation of a user on one or more first contents in the target document;

[0013] The control unit is further configured to obtain a text feature of the first content, and mark the content having the text feature in the remaining content of the target document as a first type of content;

[0014] The control unit is further configured to perform recognition processing on the target document based on the marking result.

[0015] In some embodiments, the present disclosure provides an electronic device, comprising: at least one memory and at least one processor;

[0016] The memory is used to store program codes, and the processor is used to call the program codes stored in the memory to execute the above method.

[0017] In some embodiments, the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store program code, and when the program code is executed by a processor, the processor is prompted to perform the above method.

[0018] The document processing method provided by the embodiment of the present disclosure includes: obtaining a target document to be processed; in response to a user's first marking operation on one or more first contents in the target document, marking the first contents as first-type contents; obtaining text features of the first contents, marking the contents with the text features in the remaining contents of the target document as first-type contents, and performing recognition processing on the target document based on the marking results. The embodiment of the present disclosure improves the efficiency and accuracy of the recognition of the first-type contents, thereby improving the efficiency and accuracy of the recognition processing of the target document, especially when the target document is a standard document. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.

[0020] Figure 1 It is a flowchart of the document processing method of the embodiment of the present disclosure.

[0021] Figures 2 to 4 It is a schematic diagram of a target document according to an embodiment of the present disclosure.

[0022] Figure 5 It is a structural relationship diagram of the first type of content in an embodiment of the present disclosure.

[0023] Figure 6 It is a schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0024] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0025] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0026] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0027] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0028] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.

[0029] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0030] It should be understood that the various steps described in the method embodiments of the present disclosure can be performed in sequence and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0031] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0032] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0033] It should be noted that the modification of “one” mentioned in the present disclosure is illustrative rather than restrictive, and those skilled in the art should understand that it should be understood as “one or more” unless otherwise clearly indicated in the context.

[0034] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0035] The solution provided by the embodiment of the present disclosure will be described in detail below with reference to the accompanying drawings.

[0036] In the related art, in order to adapt to unstructured and semi-structured documents, general document processing methods need to be compatible with documents of various custom layouts, because most documents do not adopt standard general layouts. This approach results in poor processing effects of general document processing methods on documents with clear styles and fixed formats. When automatically parsing documents, it is easy to mistakenly identify non-titles as titles. For example, there is a period after the first two words in a line of content under a certain title. In fact, this is the end of the previous sentence falling to the beginning of this line. General document processing methods are prone to misidentification of the two words before the period as a title. This is because general document processing methods need to be compatible with documents of various custom layouts, so they are easily mistaken for the user's custom layout. General document processing methods are prone to misidentification when processing standard documents.

[0037] like Figure 1 As shown, Figure 1 It is a flowchart of the document processing method of the embodiment of the present disclosure, which includes the following steps.

[0038] S11. Obtain the target document to be processed.

[0039] In some embodiments, the target document may be a document in a format such as pdf or word. In some embodiments, the target document may be a standard document, and the layout format of the standard document has a standard, for example, the styles of its various types of content are fixed, and the styles of the same type of content are the same. For example, the style of the title in a standard document is different from the style of the non-title content, the style of the title at any title level is fixed, and the styles of the titles at different title levels are different. The target document is a document that needs to be processed, for example, the target document needs to be processed intelligently, its structure needs to be parsed, and a tree structure diagram of its document chapter content needs to be established.

[0040] S12: In response to a first marking operation performed by the user on one or more first contents in the target document, mark the first contents as first type contents.

[0041] In some embodiments, the first marking operation may include one or more operations. For example, the first marking operation may be an operation of selecting the first content and adding a first-type content tag to it. The first content may be marked as the first-type content by adding the first-type content tag to the first content. It should be noted that there may be multiple first contents, that is, the user may perform the first marking operation on multiple contents, thereby marking the multiple contents as the first-type content. The first-type content may be, for example, a title in a document. For example, the user may select Figure 2 The first marking operation is performed on the experimental steps and experimental results in the experiment. When there are multiple first contents, the first marking operation may be performed on different first contents respectively, that is, the number of times the first marking operation is performed may be the same as the number of first contents.

[0042] S13: Acquire text features of the first content, and mark the content having the text features in the remaining content of the target document as first type content.

[0043] In some embodiments, the first content is a first type of content marked by a user, which is the same type of content and therefore has the same text features. The text features of the first type of content can be known by extracting and summarizing the text features of the first content. The content with the text features in the remaining content of the target document other than the first content is also the first type of content, so it is marked as the first type of content. The text features of the first content can be obtained by inputting the first content into a model and allowing the model to identify the text features of the first content. After obtaining the text features of the first content, the text features of the remaining content of the target document can be identified, and the text features of the remaining content are compared with the text features of the first content. If the two are the same, it is considered that the content should be marked as the first type of content.

[0044] S14. Based on the marking results, the target document is identified.

[0045] In some embodiments, by identifying the first content in the target document, the target document can be subjected to identification processing such as splitting, establishing structural relationships, etc. Since the first type of content in the remaining content can be marked according to the text features of the first content, the efficiency of the identification processing of the target document is improved, and the user does not need to mark all the first type of content.

[0046] In some embodiments of the present disclosure, a user marks part of the first type of content (e.g., title) in a target document, and the first type of content of the target document is correctly identified by learning and recognizing text features of the marked first type of content, thereby determining the chapter structure of the target document, which is further used for recognition processing such as restoring the chapter structure of the target document.

[0047] In some embodiments of the present disclosure, in response to a user's first marking operation on one or more first contents in the target document, marking the first contents as first-type contents includes: in response to a user's operation of selecting a level of first-type contents for the first contents, marking the first contents as first-type contents of the selected level. In some embodiments, first-type contents have corresponding levels, and first-type contents can be divided into first-level first-type contents, second-level first-type contents, third-level first-type contents, etc. When the user performs the first marking operation on the first contents, the user selects a first-type content level for the first contents, thereby marking them as first-type contents of the selected level. The first-type contents can be titles, for example Figure 2 In the example, "Background Technology" is the first-level title, and "Conclusion 1" is the second-level title. The user can select a first-level title for "Background Technology" and a second-level title for "Conclusion 1".

[0048] In some embodiments of the present disclosure, obtaining the text features of the first content and marking the content with the text features in the remaining content of the target document as the first type of content includes: obtaining the text features of the first content of each level respectively, marking the content with the text features of the first content of any level in the remaining content as the first type of content of that level, wherein the text features of the first content of different levels are different. In some embodiments, the user may mark the first type of content of different levels. For example, taking the first type of content as a title, for example, the user may mark Figure 2 In the example, "Background Technology" and "Experimental Steps" are marked as first-level titles, and "Conclusion 1" is marked as second-level title. In this embodiment, the first content of each title level is classified according to the title level, and the text feature extraction is performed on the first content of the same title level to obtain the text feature of the title level. Figure 2 The text features of "Background Technology" and "Experimental Steps" are extracted to obtain the text features corresponding to the first-level title, and then the text features of the second-level title "Conclusion 1" are obtained as the text features corresponding to the second-level title. The text features corresponding to the first-level title are different from the text features corresponding to the second-level title. The text features have corresponding title levels, and the text features corresponding to different title levels are different. If the content in the rest of the content has the text features corresponding to a certain title level, then mark the content as the title of that title level. For example, Figure 2 The "Experimental Results" in the text has the text features of a first-level title, so "Experimental Results" is marked as a first-level title. Figure 2 If "Conclusion 2" in the text has the text features of a secondary title, "Conclusion 2" will be marked as a secondary title.

[0049] In some embodiments of the present disclosure, the user marks the first type of content at different levels, and the execution end of the method automatically identifies the text features of the first type of content at each level, thereby marking the content with the text features in the remaining content as the first type of content at that level. In this embodiment, the user simply marks several levels of the first type of content, and then the marking of the first type of content at different levels of the entire target document can be completed.

[0050] In some embodiments of the present disclosure, the text feature is obtained based on the target font and / or target font size. In some embodiments, the content with the target font and target font size in the remaining content of the target document is marked as the first type of content. In some embodiments, the text feature includes the font size and font size of the first content. For the standard document, for the first type of content of the same level, it has the same font and the same font size. Specifically, the first content can be classified according to the level, the first content of the same level is obtained, and the font and font size they have in common are extracted as the target font and target font size, that is, the font and font size of the first content of the same level should be the same, and at least one of the fonts and font sizes of the first content of different levels should be different. If there is a situation where the font or font size of the first content of the same level is different, a prompt message can be displayed to inform the user that there is an abnormal situation, and the first content with abnormal font or font size can be highlighted. Because the font and font size of the first type of content at the same level of the specification document are the same, the content with the target font and target font size can be marked as the first type of content, specifically marked as the first type of content at the level corresponding to the target font and target font size.

[0051] In some embodiments of the present disclosure, after acquiring the target document to be processed and before marking the content having the text feature in the remaining content of the target document as the first type of content, it also includes: in response to a second marking operation of the user on one or more second contents in the target document, marking the second contents as second type of content (for example, headers and footers); determining a non-processing area according to the position of the second content in the target document and the page size of the target document; and skipping the content of the non-processing area in the process of marking the content having the text feature in the remaining content of the target document as the first type of content.

[0052] In some embodiments, the second type of content (such as headers and footers) is not the first type of content. Therefore, before identifying the remaining content in the target document and marking it as the first type of content, a non-processing area can be set first, so that the non-processing area is skipped when marking the content with text features in the remaining content as the first type of content, and the content of the non-processing area does not need to be identified. The non-processing area is the area where the second type of content is located. Specifically, taking the second type of content as the header and footer as an example, the user can first mark the header and footer. The user does not need to mark the headers and footers of all pages. For example, only some pages need to be marked. The user can select the second content and mark it as the page footer, and then the non-processing area will be calculated based on the position of the second content and the document page size. The content located in the non-processing area will be filtered out and will not be marked as the first type of content. In some embodiments, when determining the non-processing area, the coordinates of the header and footer can be identified. Because the header and footer are located at the top and bottom of the page respectively, for the header part located in the upper half of the page size, the ordinate of the header part located in the upper half will be calculated, so as to determine the ordinate farthest from the top edge of the page, and the area from the horizontal line with the ordinate to the top edge of the page will be identified as the header area. Similarly, for the footer part located in the lower half of the page size, the ordinate farthest from the bottom edge of the page will be identified, and the area from the horizontal line with the ordinate to the bottom edge of the page will be identified as the footer area. In some embodiments, when the non-processing area (including the header area and the footer area) is identified, the proportion of the header area in the upper half of the page and the proportion of the footer area in the lower half of the page can be determined. If any proportion is greater than the preset proportion, a prompt can be issued, because the header area and the footer area will not occupy too large a proportion. When the proportion they occupy is too large, it is said that there may be an erroneous mark, and the user can be reminded at this time.

[0053] In some embodiments of the present disclosure, after obtaining the target document to be processed, before marking the content with the text feature in the remaining content of the target document as the first type of content, it also includes: in response to the user's selection operation on one or more pages in the target document, determining the page selected by the user; in the process of marking the content with the text feature in the remaining content of the target document as the first type of content, skipping the page selected by the user. In some embodiments, one or more pages can be selected by, for example, entering a page number, and the page selected by the user will be skipped when marking the first type of content, and the content of the selected page will not be processed, and the content therein will not be marked as the first type of content. By selecting pages, users can avoid content that they do not want to process being marked as the first type of content.

[0054] In some embodiments of the present disclosure, the first type of content, after step S11, before the document chapters are split or the structural relationship diagram is established, the method further includes: obtaining the bookmark of the target document; according to the bookmark of the target document, marking the content corresponding to the bookmark as the first type of content. In some embodiments, an option can be provided to select whether to obtain the bookmark. In the case of selecting to obtain the bookmark, the content corresponding to the bookmark will be marked as the first type of content, and the level of the first type of content can be set for the content corresponding to the bookmark according to the hierarchical relationship of the bookmark. For example, if the bookmark is selected to be obtained, and the content corresponding to the bookmark is marked by the user as a first type of content of a certain level, the level of the first type of content corresponding to each bookmark can be determined according to the level marked by the user and the hierarchical relationship of the bookmark. Specifically, for example, if the content corresponding to the bookmark is marked as the second level first type of content, the content corresponding to the bookmark of the same level of the bookmark corresponding to the content should also be marked as the second level first type of content, and the content corresponding to the previous level bookmark of the bookmark corresponding to the content should be marked as the first level first type of content, and the content corresponding to the next level bookmark of the bookmark corresponding to the content should be marked as the third level first type of content, and so on. If you choose not to obtain a bookmark, the step of marking the content corresponding to the bookmark as the first type of content will not be executed. It should be noted that if when marking the content corresponding to the bookmark as the first type of content, the marked first type of content conflicts with the first type of content (first content) marked by the user, the step of marking the content corresponding to the bookmark as the first type of content will not be executed, and it will be rolled back to the state before marking the content corresponding to the bookmark as the first type of content, because the bookmark may be wrong, and the first type of content marked by the user shall prevail.

[0055] In some embodiments of the present disclosure, after acquiring the target document to be processed and before responding to the user's first marking operation on one or more first contents in the target document, the process further includes: parsing the target document, identifying and highlighting the contents in the target document that meet preset conditions. In some embodiments, the preset conditions include: non-text features of the first type of content; the preset conditions are used to filter out candidate contents of the first type of content in the document. In some embodiments, in order to facilitate the user to select content that may be the first type of content, preset conditions are set in advance, and the preset conditions can be used to select possible candidate contents from the target document. Figure 3As shown, it schematically shows a schematic diagram after executing "selecting the content that meets the preset conditions in the target document". The preset conditions can be, for example, that the content is located at the leftmost side of the paragraph, is separated from other content by spaces or punctuation marks, and is not longer than a preset length. By selecting the candidate first type of content, it is convenient for the user to select and mark. After the user performs a preset operation such as clicking on the selected content that meets the preset conditions, a list of options (such as Figure 4 As shown), select the markable type in the option list, including title, header, footer, etc., so that the content selected in the box can be marked as title or header, footer, etc.

[0056] In some embodiments of the present disclosure, the target document is identified based on the marking results, including: splitting the chapters of the target document according to the marked first type of content; and / or establishing a structural relationship diagram of the first type of content of the target document based on the marked first type of content.

[0057] In some embodiments, after marking the title, the target document can be split according to the title, and divided into multiple chapters. A chapter includes the title of the chapter and the content of the chapter. The content marked as the title is displayed under the title part, and the content under the title is displayed under the chapter content part, so that the target document can be structured. In some embodiments, according to the title level and the upper and lower relationship of the title, a structural relationship diagram of the title of the target document can be established, which can be a tree diagram. Figure 5 The tree diagram schematically shows the structural relationship of the titles, in which the upper-level title is the parent node of the lower-level title, and the lower-level title is the child node of the upper-level title. The structural relationship diagram of the titles can well display the structural relationship of each chapter corresponding to each title of the target document.

[0058] The method proposed in the embodiment of the present disclosure can be used to process the target document. By having the user mark the first content as the first type of content, the first type of content of the target document can be automatically identified, and the accurate division of chapters can be further automatically completed, so that the processed chapters can be used as knowledge base content for large model question and answer. This processing can improve the data reserve during large model question and answer, and improve the richness of answers when using large model question and answer. The above-mentioned document processing method can improve the efficiency of producing a high-quality knowledge base.

[0059] In some embodiments of the present disclosure, a document processing device is also provided, including:

[0060] An acquisition unit, used for acquiring a target document to be processed;

[0061] a control unit, configured to mark the first content as a first type of content in response to a first marking operation of a user on one or more first contents in the target document;

[0062] The control unit is further configured to obtain a text feature of the first content, and mark the content having the text feature in the remaining content of the target document as a first type of content;

[0063] The control unit is further configured to perform recognition processing on the target document based on the marking result.

[0064] In some embodiments, in response to a first marking operation of a user on one or more first contents in the target document, marking the first contents as first-type contents includes: in response to an operation of a user selecting a level of the first-type contents for the first contents, marking the first contents as first-type contents of the selected level;

[0065] Obtaining text features of the first content, and marking the content having the text features in the remaining content of the target document as first-type content, including: respectively obtaining text features of first content at each level, and marking the content having the text features of the first content at any level in the remaining content as first-type content at that level, wherein the text features of first contents at different levels are different.

[0066] In some embodiments, the text feature is obtained based on a target font and / or a target font size.

[0067] In some embodiments, after acquiring the target document to be processed and before marking the content having the text feature in the remaining content of the target document as the first type of content, the control unit is further used to: in response to a second marking operation of the user on one or more second contents in the target document, mark the second contents as the second type of content; determine the non-processing area according to the position of the second contents in the target document and the page size of the target document;

[0068] In the process of marking the content with the text feature in the rest of the target document as the first type of content, the content of the non-processing area is skipped.

[0069] In some embodiments, after acquiring the target document to be processed and before marking the content having the text feature in the remaining content of the target document as the first type of content, the control unit is further configured to: in response to a user's selection operation on one or more pages in the target document, determine the page selected by the user;

[0070] In the process of marking the content having the text feature in the rest of the target document as the first type of content, the page selected by the user is skipped.

[0071] In some embodiments, the first type of content is a title;

[0072] The control unit is further used for: acquiring a bookmark of the target document; and marking the content corresponding to the bookmark as the first type of content according to the bookmark of the target document.

[0073] In some embodiments, after acquiring the target document to be processed and before responding to the user's first marking operation on one or more first contents in the target document, the control unit is further configured to:

[0074] The target document is parsed, and the content in the target document that meets preset conditions is identified and highlighted.

[0075] In some embodiments, the preset conditions include: some or all of the non-text features of the first type of content;

[0076] The preset condition is used to filter out candidate content of the first type of content in the document.

[0077] In some embodiments, based on the marking result, the target document is identified, including:

[0078] Splitting the target document into chapters according to the marked first type of content;

[0079] And / or, establishing a structural relationship diagram of the first type of content of the target document according to the marked first type of content.

[0080] For the embodiments of the device, since they basically correspond to the method embodiments, the relevant parts refer to the partial description of the method embodiments. The device embodiments described above are merely illustrative, wherein the modules described as separation modules may or may not be separated. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of the present embodiment. Those of ordinary skill in the art can understand and implement without paying creative work.

[0081] The method and device of the present disclosure are described above based on the embodiments and application examples. In addition, the present disclosure also provides an electronic device and a computer-readable storage medium, which are described below.

[0082] Reference below Figure 6, which shows a schematic diagram of the structure of an electronic device (such as a terminal device or a server) 800 suitable for implementing the embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. The electronic device shown in the figure is only an example and should not bring any limitation to the functions and scope of use of the embodiment of the present disclosure.

[0083] The electronic device 800 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage device 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the electronic device 800 are also stored. The processing device 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0084] Typically, the following devices may be connected to the I / O interface 805: input devices 806 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 807 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 808 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 809. The communication device 809 may allow the electronic device 800 to communicate with other devices wirelessly or by wire to exchange data. Although the electronic device 800 with various devices is shown in the figure, it should be understood that it is not required to implement or have all the devices shown. More or fewer devices may be implemented or have alternatively.

[0085] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 809, or installed from a storage device 808, or installed from a ROM 802. When the computer program is executed by the processing device 801, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0086] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0087] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0088] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0089] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method of the present disclosure.

[0090] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0091] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0092] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.

[0093] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0094] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0095] According to one or more embodiments of the present disclosure, a document processing method is provided, including:

[0096] Get the target document to be processed;

[0097] In response to a first marking operation of a user on one or more first contents in the target document, marking the first contents as first type contents;

[0098] Acquire a text feature of the first content, and mark the content having the text feature in the remaining content of the target document as a first type of content;

[0099] Based on the marking result, the target document is identified.

[0100] According to one or more embodiments of the present disclosure, a document processing method is provided, in response to a first marking operation of a user on one or more first contents in a target document, marking the first contents as first-type contents, including: in response to an operation of a user selecting a level of the first-type contents for the first contents, marking the first contents as first-type contents of the selected level;

[0101] Obtaining text features of the first content, and marking the content having the text features in the remaining content of the target document as first-type content, including: respectively obtaining text features of first content at each level, and marking the content having the text features of the first content at any level in the remaining content as first-type content at that level, wherein the text features of first contents at different levels are different.

[0102] According to one or more embodiments of the present disclosure, a document processing method is provided, wherein the text features are obtained based on a target font and / or a target font size.

[0103] According to one or more embodiments of the present disclosure, a document processing method is provided, which, after obtaining a target document to be processed and before marking the content having the text feature in the remaining content of the target document as the first type of content, further comprises: in response to a second marking operation of a user on one or more second contents in the target document, marking the second contents as the second type of content; determining a non-processing area according to the position of the second contents in the target document and the page size of the target document;

[0104] In the process of marking the content with the text feature in the rest of the target document as the first type of content, the content of the non-processing area is skipped.

[0105] According to one or more embodiments of the present disclosure, a document processing method is provided, which, after obtaining a target document to be processed and before marking the content having the text feature in the remaining content of the target document as a first type of content, further comprises: in response to a user selecting one or more pages in the target document, determining the page selected by the user;

[0106] In the process of marking the content having the text feature in the rest of the target document as the first type of content, the page selected by the user is skipped.

[0107] According to one or more embodiments of the present disclosure, a document processing method is provided, wherein the first type of content is a title;

[0108] The method also includes:

[0109] Obtaining a bookmark of the target document;

[0110] According to the bookmark of the target document, the content corresponding to the bookmark is marked as the first type of content.

[0111] According to one or more embodiments of the present disclosure, a document processing method is provided, which, after obtaining a target document to be processed and before responding to a first marking operation of a user on one or more first contents in the target document, further includes:

[0112] The target document is parsed, and the content in the target document that meets preset conditions is identified and highlighted.

[0113] According to one or more embodiments of the present disclosure, a document processing method is provided, wherein the preset conditions include: some or all non-text features of the first type of content;

[0114] The preset condition is used to filter out candidate content of the first type of content in the document.

[0115] According to one or more embodiments of the present disclosure, a document processing method is provided, which, after marking the content having the text feature in the remaining content of the target document as the first type of content, further includes:

[0116] Splitting the target document into chapters according to the marked first type of content;

[0117] and / or,

[0118] A structural relationship diagram of the first type of content of the target document is established according to the marked first type of content.

[0119] According to one or more embodiments of the present disclosure, there is provided a document processing device, comprising:

[0120] An acquisition unit, used for acquiring a target document to be processed;

[0121] a control unit, configured to mark the first content as a first type of content in response to a first marking operation of a user on one or more first contents in the target document;

[0122] The control unit is further configured to obtain a text feature of the first content, and mark the content having the text feature in the remaining content of the target document as a first type of content;

[0123] The control unit is further configured to perform recognition processing on the target document based on the marking result.

[0124] According to one or more embodiments of the present disclosure, there is provided an electronic device, including: at least one memory and at least one processor;

[0125] The at least one memory is used to store program codes, and the at least one processor is used to call the program codes stored in the at least one memory to execute any one of the above methods.

[0126] According to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium is used to store program code, and when the program code is executed by a processor, the processor is prompted to execute the above method.

[0127] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0128] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0129] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. A document processing method, characterized in that: include: Get the target document to be processed; In response to a first marking operation of a user on one or more first contents in the target document, marking the first contents as first type contents; Acquire a text feature of the first content, and mark the content having the text feature in the remaining content of the target document as a first type of content; Based on the marking result, the target document is identified.

2. The method according to claim 1, characterized in that: In response to a first marking operation of a user on one or more first contents in the target document, marking the first contents as first-type contents, comprising: in response to an operation of a user selecting a level of the first-type contents for the first contents, marking the first contents as first-type contents of the selected level; Obtaining text features of the first content, and marking the content having the text features in the remaining content of the target document as first-type content, including: respectively obtaining text features of first content at each level, and marking the content having the text features of the first content at any level in the remaining content as first-type content at that level, wherein the text features of first contents at different levels are different.

3. The method according to claim 1, characterized in that The text feature is obtained based on a target font and / or a target font size.

4. The method according to claim 1, characterized in that: After acquiring the target document to be processed, and before marking the content with the text feature in the remaining content of the target document as the first type of content, the method further includes: in response to a second marking operation of a user on one or more second contents in the target document, marking the second contents as the second type of content; determining a non-processing area according to the position of the second contents in the target document and the page size of the target document; In the process of marking the content with the text feature in the rest of the target document as the first type of content, the content of the non-processing area is skipped.

5. The method according to claim 1, characterized in that After obtaining the target document to be processed, and before marking the content with the text feature in the remaining content of the target document as the first type of content, the method further includes: in response to a user's selection operation on one or more pages in the target document, determining the page selected by the user; In the process of marking the content having the text feature in the rest of the target document as the first type of content, the page selected by the user is skipped.

6. The method according to claim 1, characterized in that The first type of content is a title; The method also includes: Obtaining a bookmark of the target document; According to the bookmark of the target document, the content corresponding to the bookmark is marked as the first type of content.

7. The method according to claim 1, characterized in that After obtaining the target document to be processed and before responding to the user's first marking operation on one or more first contents in the target document, the method further includes: The target document is parsed, and the content in the target document that meets preset conditions is identified and highlighted.

8. The method according to claim 1, characterized in that The preset conditions include: some or all of the non-text features of the first type of content; The preset condition is used to filter out candidate content of the first type of content in the document.

9. The method according to claim 1, characterized in that: Based on the marking result, the target document is identified, including: Splitting the target document into chapters according to the marked first type of content; and / or, A structural relationship diagram of the first type of content of the target document is established according to the marked first type of content.

10. A document processing device, characterized in that: include: An acquisition unit, used for acquiring a target document to be processed; a control unit, configured to mark the first content as a first type of content in response to a first marking operation of a user on one or more first contents in the target document; The control unit is further configured to obtain a text feature of the first content, and mark the content having the text feature in the remaining content of the target document as a first type of content; The control unit is further configured to perform recognition processing on the target document based on the marking result.

11. An electronic device, comprising: at least one memory and at least one processor; The at least one memory is used to store program code, and the at least one processor is used to call the program code stored in the at least one memory to execute the method according to any one of claims 1 to 9. 12 . A computer-readable storage medium, wherein the computer-readable storage medium is used to store program code, wherein when the program code is executed by a processor, the processor is prompted to execute the method according to claim 1 .