Document processing method and device, electronic equipment and storage medium
By merging the documents in the public database with the tag information during online reading, local documents with tag information are generated, which solves the problem of lack of tags after users download documents and improves the reading experience.
Patent Information
- Application Number
- CN202410708861.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-03
- Publication Date
- 2024-10-11
AI Technical Summary
After a user downloads a document from a public database, the downloaded document lacks reading marks for online reading, resulting in inconvenience for later offline reading.
Documents are obtained from public databases and merged with markup information during online reading to generate local documents with markup information. By identifying and compiling user markup information on web pages, it is added to downloaded documents.
It provides users with local documents with tagged information, which facilitates later offline reading and improves the reading experience.
Smart Images

Figure CN118760805A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Internet technology, and in particular to a document processing method, device, electronic equipment and storage medium. Background Art
[0002] At present, when it comes to public or specific databases, users can read documents in the public or specific databases online, and during the online reading process, users can also mark the documents they are reading. However, after users mark the documents they are reading online, the documents downloaded from the public or specific databases do not have the reading marks made by the users, which brings great inconvenience to users' later offline reading of the documents. Summary of the invention
[0003] The embodiment of the present invention provides a document processing method, which aims to solve the problem that when a user downloads a document from a public database, the downloaded document does not contain the reading mark made by the user. A first target document is obtained from the public database and a marked document of a webpage document is merged to obtain a second target document with marking information. Since the marked document includes the marking information marked by the user on the webpage document, the merged second target document will contain the mark made by the user when reading online. The second target document is stored locally, and a local document with marking information can be provided to the user, which is convenient for the user to read offline later, thereby improving the user's reading experience.
[0004] In a first aspect, an embodiment of the present invention provides a document processing method, the method comprising:
[0005] Acquire a first target document from a public database;
[0006] Acquire a marked document of a web page document, wherein the web page document is a document displayed after the first target document is loaded on a web page, and the marked document includes marking information marked by a user on the web page document;
[0007] The marked document is merged with the first target document to obtain a second target document, and the second target document is stored locally. The second target document includes the marking information marked by the user on the web page document.
[0008] Optionally, before the step of obtaining the markup document of the webpage document, the method further includes:
[0009] Identify the user mark in the web document to obtain the mark information of the web document marked by the user, wherein the mark information of the web document includes at least one mark information of the user mark;
[0010] The marking information marked by each user is compiled and processed to obtain a marking document of the web page document.
[0011] Optionally, the step of compiling the markup information marked by each user to obtain the markup document of the web page document includes:
[0012] Determine the mark type and starting character position of each user mark, as well as the mark character length or ending character position of each user mark according to the mark information of each user mark;
[0013] Determine a first assembly field of each user mark based on the mark type and the mark start character position, and the mark character length or the mark end character position of each user mark, each of the first assembly fields corresponding to one user mark;
[0014] All the first assembly fields are arranged in the order of positions corresponding to the user marks in the web page document to obtain a markup document of the web page document.
[0015] Optionally, the step of compiling the mark information marked by each user to obtain the mark document of the web page document further includes:
[0016] Determine the starting character position and the mark field of each user mark according to the mark information of each user mark;
[0017] Determine a second assembly field of each user tag based on the starting character position and the tag field of each user tag, each second assembly field corresponding to one user tag;
[0018] All the second assembly fields are arranged in the order of positions corresponding to the user marks in the web page document to obtain a markup document of the web page document.
[0019] Optionally, the step of compiling the markup information marked by each user to obtain the markup document of the web page document includes:
[0020] If there is a mark information of the user mark that includes multiple mark types, then sub-mark information corresponding to multiple mark types is determined in the mark information of the user mark;
[0021] Performing a first assembly process on the mark information of one of the user marks to obtain a parent assembly field;
[0022] Performing a second assembly process on the sub-tag information corresponding to the plurality of tag types to obtain a plurality of sub-level assembly fields;
[0023] Based on the parent assembly field and the plurality of child assembly fields, a third assembly field of the user mark is obtained, each of the third assembly fields corresponds to one of the user marks;
[0024] Based on the third assembly field, a markup document of the web page document is obtained.
[0025] Optionally, the step of merging the marked document with the first target document to obtain a second target document includes:
[0026] Determining a marking position of the marking information in the first target document according to a starting character position of the marking information;
[0027] The marking information is marked in the first target document according to the marking position to obtain a second target document.
[0028] Optionally, the step of marking the marking information in the first target document according to the marking position to obtain the second target document includes:
[0029] According to the mark position, marking the mark information in the first target document in an editable form to obtain a preliminary marked document, wherein the preliminary marked document includes the editable mark;
[0030] Jump links are added between the editable tags in the preliminary markup document to obtain a second target document.
[0031] In a second aspect, an embodiment of the present invention further provides a document processing device, the document processing device comprising:
[0032] A first acquisition module, used for acquiring a first target document from a public database;
[0033] A second acquisition module is used to acquire a marked document of a web page document, wherein the web page document is a document displayed after the first target document is loaded on a web page, and the marked document includes mark information marked by a user on the web page document;
[0034] The processing module is used to merge the marked document with the first target document to obtain a second target document, and store the second target document locally. The second target document includes the marking information marked by the user on the web page document.
[0035] In a third aspect, an embodiment of the present invention provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the document processing method provided in the embodiment of the present invention when executing the computer program.
[0036] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the document processing method provided in the embodiment of the invention are implemented.
[0037] In an embodiment of the present invention, a first target document is obtained from a public database; a markup document of a web page document is obtained, the web page document is a document displayed after the first target document is loaded on a web page, and the markup document includes markup information marked by a user on the web page document; the markup document is merged with the first target document to obtain a second target document, and the second target document is stored locally, the second target document includes markup information marked by a user on the web page document. The present invention will obtain a first target document from a public database and a markup document of a web page document, and merge them to obtain a second target document with markup information. Since the markup document includes markup information marked by a user on the web page document, the merged second target document will carry the markup made by the user when reading online. Storing the second target document locally can provide users with local documents with markup information, which is convenient for users to read offline later, thereby improving the user's reading experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0039] Figure 1 is a flow chart of a document processing method provided by an embodiment of the present invention;
[0040] Figure 2 is a structural schematic diagram of a document processing device provided by an embodiment of the present invention;
[0041] Figure 3 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0042] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0043] like Figure 1As shown, Figure 1 1 is a method flow chart of a document processing method provided by an embodiment of the present invention. The document processing method comprises the following steps:
[0044] 101. Obtain a first target document from a public database.
[0045] In an embodiment of the present invention, the above-mentioned document processing method can be applied to a client, and the above-mentioned client can run software applications such as a web browser, a public database front-end, and a third-party plug-in. The above-mentioned document processing method can be deployed in software applications such as a web browser, a public database front-end, and a third-party plug-in.
[0046] The above-mentioned public database can be understood as a database open to multiple people, which can be a paper database, policy database, magazine database, patent database, etc. The documents stored in the above-mentioned public database can generally be provided for online reading, but the source files in the public database cannot be edited and modified. When downloading, only the source files can be downloaded.
[0047] The user can find the first target document in the public database according to the search conditions, and load the first target document onto the web page, so that the user can read the first target document on the web page. During the reading process, the document on the web page can be marked using the reading tools on the web page.
[0048] When the user has finished marking the document on the webpage, the first target document can be downloaded from the public database, or the user can download the first target document from the public database through a download instruction. The first target document can be downloaded to a temporary storage space (cloud storage space) for temporary storage, or downloaded to a client for local storage.
[0049] 102. Obtain a markup document of the web page document.
[0050] In the embodiment of the present invention, the web page document is a document displayed after the first target document is loaded on the web page, and the marked document includes marking information marked by the user on the web page document.
[0051] When users browse web documents, they can mark the contents of web documents through web tools or third-party annotation tools. The above marks can be understood as making the target content different from the original content. The above marks can be underlined, bolded, italicized, annotated, font size, font color, highlighted, language translation, artistic effects, etc.
[0052] The above-mentioned tag information may include tag type, tag start position, tag length or tag content or tag end position, etc. The above-mentioned tag information can be identified and extracted by an AI assistant, and the above-mentioned AI assistant can be provided by software applications such as web browsers, public database front ends, and third-party plug-ins.
[0053] After obtaining the marking information marked by the user on the web page document, the marking information can be compiled to obtain a marking document of the web page document.
[0054] In one embodiment, after obtaining the markup document of the web page document, a download link of the markup document can be generated, and the user can download the markup document through the download link. The markup document can be downloaded to a temporary storage space for temporary storage, or downloaded to a client for local storage. Further, the markup document is downloaded to the storage space where the first target document is located. If the first target document is downloaded to the temporary storage space, the markup document can also be downloaded to the temporary storage space. If the first target document is downloaded to the local storage space, the markup document can also be downloaded to the local storage space. In this way, it is convenient to find the first target document to merge with the markup document. The above-mentioned AI assistant can access the above-mentioned temporary storage space and local storage space.
[0055] In a possible embodiment, before downloading the markup document, a page display of the markup document is provided, and the user can edit the markup document, such as modifying the markup type, length, deleting a markup, and the like.
[0056] 103. Merge the marked document with the first target document to obtain a second target document, and store the second target document locally.
[0057] In the embodiment of the present invention, after obtaining the marked document, the markup information in the marked document can be added to the corresponding position in the first target document, completing the merging process of the marked document and the first target document to obtain the second target document. The above-mentioned second target document includes the markup information, and these marks are the markup information of the user on the web page document.
[0058] The above-mentioned merging process can be completed by an AI assistant or by a third-party merging software, and the third-party software can be a document merging software. It is understandable that the above-mentioned AI assistant relies on the AI big model to realize a series of intelligent operations such as document scanning, marking records, document downloading, document merging, document translation, etc. The above-mentioned third-party merging software is only used for document merging, such as PDF document merging and WROD document merging, etc., and does not have a series of intelligent operations such as document scanning, document downloading, document merging, document translation, etc.
[0059] In a possible embodiment, before the marked document is merged with the second target document, the marked document can be displayed through the display interface provided by the AI assistant, and an editing toolbar can be provided so that the user can edit the marked document, such as modifying the mark type, length, deleting the mark, etc.
[0060] After obtaining the second target document, the second target document is stored locally. Specifically, if the first target document and the marked document are merged in the temporary storage space, a download link of the second target document can be generated, and the user can download the second target document from the temporary storage space to the local storage through the download link. If the first target document and the marked document are in the local storage space, after the second target document is generated, the second target document can be directly stored in the local storage space, and a document storage path of the second target document is generated.
[0061] The second target document may be an editable document. When the user opens the second target document locally, he may edit the tags in the second target document or add new tags in the second target document.
[0062] In an embodiment of the present invention, a first target document is obtained from a public database; a markup document of a web page document is obtained, the web page document is a document displayed after the first target document is loaded on a web page, and the markup document includes markup information marked by a user on the web page document; the markup document is merged with the first target document to obtain a second target document, and the second target document is stored locally, the second target document includes markup information marked by a user on the web page document. The present invention will obtain a first target document from a public database and a markup document of a web page document, and merge them to obtain a second target document with markup information. Since the markup document includes markup information marked by a user on the web page document, the merged second target document will carry the markup made by the user when reading online. Storing the second target document locally can provide users with local documents with markup information, which is convenient for users to read offline later, thereby improving the user's reading experience.
[0063] It should be noted that the document processing method provided in the embodiment of the present invention can be applied to devices such as smart phones, tablets, computers, servers, etc. that can perform the document processing method.
[0064] It is understandable that in the specific implementation of this application, user data, document data and other related data are involved. When the embodiments in this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data, as well as the training and use of large models need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0065] Optionally, before the step of obtaining the markup document of the web page document, the user marks in the web page document can also be identified to obtain the markup information of the web page document marked by the user, and the markup information of the web page document includes the markup information of at least one user mark; the markup information of each user mark is compiled and processed to obtain the markup document of the web page document.
[0066] In an embodiment of the present invention, the user tags in the web page document can be identified by an AI assistant to obtain the user's tag information for the web page document. The AI assistant can be constructed based on natural language processing (NLP) technology, and can automatically identify and parse the structure and content of the current web page document through natural language processing technology, and then extract all user tag information in the current web page document by browsing and identifying the current page.
[0067] The above-mentioned AI assistant can also be built based on the large language model (LLM) interface technology, which can automatically identify and parse the structure and content of the current web document through the large language model (LLM) interface technology, and then extract all user tag information in the current web document by browsing and identifying the current page.
[0068] The above-mentioned AI assistant can also be built based on a multimodal large model (such as a large graphic and text model) interface technology. It can take a screenshot of the current web document and use the large language model (LLM) interface technology to automatically identify and parse the structure and content of the current web document in the screenshot. Then, by browsing and identifying the current page in the screenshot, it can extract all user tag information in the current web document.
[0069] The user tag is the recognition target of the AI assistant. It should be noted that the user tag is a visual entity and the tag information is the description information of the user tag. After the user tag is recognized, the user tag is parsed to obtain the description information of the user tag, that is, the tag information of the user tag is obtained.
[0070] The above-mentioned mark information may include mark type, mark start position, mark length or mark content or mark end position, etc. The above-mentioned mark type may include underline, bold, italic, annotation, font size, font color, highlight, language translation, artistic effect, etc.
[0071] After identifying the marking information of the web page document marked by the user, the marking information can be compiled and arranged to obtain a marking document of the web page document.
[0072] For example, the AI assistant starts automatic recognition from the first character of the current web document and records the information features of each character. When a character has a special mark made by the user, it first records the position information (row and column information) and mark type (underline, RGB information, bold font, annotation, etc.) of the character, and includes it in the AI assistant as the first character of the mark type until the last character with matching mark information in this item. The web version of the AI assistant uses this "starting position of the mark + the last mark" as the first segment of characters with special marks (including position information, character length, mark type / content), and so on to the entire current web document until the last character of the current web document. At this time, the AI assistant ends automatic browsing, recognition and parsing of the document, and summarizes all user mark information of the current web document. The user mark type (mark type) is arranged in order of the position of the document characters in the current web document, and summarized and compiled into a mark document for users to download and apply.
[0073] By identifying user tags in web page documents, it is possible to accurately compile the tag information that users have marked on web page documents, which is convenient for the application of tagged documents.
[0074] Optionally, in the step of assembling the tag information of each user tag to obtain the tag document of the web page document, the tag type and starting character position of each user tag, as well as the tag character length or the tag ending character position can be determined according to the tag information of each user tag; based on the tag type and tag starting character position, as well as the tag character length or the tag ending character position of each user tag, the first assembly field of each user tag is determined, and each first assembly field corresponds to a user tag; all the first assembly fields are arranged in the order of the positions of the corresponding user tags in the web page document to obtain the tag document of the web page document.
[0075] In an embodiment of the present invention, the above-mentioned first assembly field may only include the tag type and the starting character position, and the tag character length or the ending character position, that is, the first assembly field may be: "tag type and starting character position, and tag character length", or, the first assembly field may be: "tag type and starting character position, and ending character position".
[0076] For a user mark, the corresponding mark information may include the mark type, the mark start position, the mark length or the mark end position, etc. The mark start position may be the start character position, the mark length may be the character length of the original text occupied by the mark, and the mark end position may be the last character position.
[0077] For example, user mark 1 can be assembled into the first assembly field, and then there is mark 1: (mark type: underline; starting character position: X1; character length of the mark in the original text L1 / last character position Y1; other content: none).
[0078] Assemble user mark 2 into the first assembly field, then there is mark 2: (mark type: highlighted; starting character position: X2; character length of the mark in the original text: L2 / last character position: Y2; other content: RGB yellow).
[0079] Assemble user mark 3 into the first assembly field, then there is mark 3: (mark type: underline; starting character position: X3; character length of the mark in the original text: L3 / last character position: Y3; other content: none).
[0080] Assemble user mark 4 into the first assembly field, then there is mark 4: (mark type: translation / translation and overwriting the translated part; starting character position: X4; character length of the mark in the original text: L4 / last character position: Y4; other content: abcde).
[0081] …
[0082] The marking information of all user marks is compiled and processed so that each complete mark is presented in the form of a first compilation field. The first compilation field can be understood as an information set that does not include the original text content, which can make the marking information in the marked document more concise and orderly.
[0083] Optionally, in the step of assembling the tag information of each user tag to obtain the tag document of the web page document, the starting character position and the tag field of each user tag can be determined according to the tag information of each user tag; based on the starting character position and the tag field of each user tag, the second assembly field of each user tag is determined, and each second assembly field corresponds to one user tag; all the second assembly fields are arranged in the order of the positions of the corresponding user tags in the web page document to obtain the tag document of the web page document.
[0084] In an embodiment of the present invention, the second assembly field may include only the starting character position and the marked original text, or the second assembly field may include only the starting character position and the original text+corresponding mark.
[0085] For a user mark, the corresponding mark information may include the mark start position, mark type, mark content, etc. The mark start position may be the start character position, and the mark content may be the marked original text or the original text + corresponding mark.
[0086] For example, the second assembly field includes the starting character position and the marked original text, and there is a mark N: [starting character position X (can be a character sequence); (marked original text)].
[0087] For example, for the lyrics: You are like a butterfly flying around, Swaying in the snowy season , can’t forget···.
[0088] Mark 1: [Starting character position X1; You are like a flying butterfly].
[0089] Mark 2: [Starting character position X2; Swaying in the snowy season 】.
[0090] Mark 3: [Starting character position X3; sway].
[0091] Mark 4: [Starting character position X4; can’t forget].
[0092] …
[0093] For example, the second assembly field includes the starting character position and the original text + corresponding mark, and there is a mark N: [starting character position X (can be the character sequence); (original text + corresponding mark)].
[0094] For example, for the lyrics: You are like a butterfly flying around, Swaying in the snowy season , can’t forget···.
[0095] Mark 1: [Starting character position X1; You are like a flying butterfly + bold font].
[0096] Mark 2: [Starting character position X2; swaying in the snowy season + underline].
[0097] Mark 3: [Starting character position X3; shake + bold font].
[0098] Mark 4: [Starting character position X4; forget + font italic].
[0099] …
[0100] The tag information of all user tags is compiled so that each complete tag is presented in the form of a second compilation field. The second compilation field can be understood as an information set, which can make the tag information in the tag document more concise and orderly.
[0101] Optionally, in the step of compiling the tag information of each user tag to obtain the tag document of the web page document, if there is a user tag that includes multiple tag types in the tag information, sub-tag information corresponding to the multiple tag types can be determined in the tag information of the user tag; a first compilation process is performed on the tag information of the user tag to obtain a parent compilation field; a second compilation process is performed on the sub-tag information corresponding to the multiple tag types to obtain multiple child compilation fields; based on the parent compilation field and the multiple child compilation fields, a third compilation field of the user tag is obtained, and each third compilation field corresponds to a user tag; based on the third compilation field, the tag document of the web page document is obtained.
[0102] In the embodiment of the present invention, if there are multiple tag types for a certain user tag, they can be distinguished by multi-level assembly. The first assembly process and the second assembly process can be the assembly process of the first assembly field or the assembly process of the second assembly field.
[0103] Specifically, the user mark can be identified in order first, and the mark type can be identified. If there are at least two marks at the same character position, different marks are identified respectively to obtain mark information (including mark type; mark starting position; mark length / mark ending position; other content: none / yes...), forming a recognition branch, and forming the parent assembly field "Mark N:..." and the child assembly field "Mark N+1:..." during assembly.
[0104] For example, see the following example of Mark 4 and Mark 4+1 (in order to facilitate comparison with the previous scheme, this example lists Mark 1-Mark 3 together):
[0105] Mark 1: (Mark type: underline; Starting character position: X1; Mark character length of the original text L1 / Last character position Y1; Other content: None).
[0106] Mark 2: (Mark type: highlight; starting character position: X2; character length of the mark in the original text: L2 / last character position: Y2; other content: RGB yellow).
[0107] Mark 3: (Mark type: underline; Starting character position: X3; Character length of the mark in the original text: L3 / Last character position: Y3; Other content: None).
[0108] Mark 4: (Mark type: translation / translation and overwriting the translated part; starting character position: X4; character length of the mark in the original text: L4 / last character position: Y4; other content: abcde).
[0109] Mark 4+1: (mark type: underline; starting character position: X4; character length of the mark in the original text: L4 / last character position: Y4; other content: none).
[0110] …
[0111] Alternatively, it can be, see the following example of Mark 4, Mark 4+1 and Mark 4+2 (in order to facilitate comparison with the previous scheme, this example lists Mark 1-Mark 3 together):
[0112] Mark 1: (Mark type: underline; Starting character position: X1; Mark character length of the original text L1 / Last character position Y1; Other content: None).
[0113] Mark 2: (Mark type: highlight; starting character position: X2; character length of the mark in the original text: L2 / last character position: Y2; other content: RGB yellow).
[0114] Mark 3: (Mark type: underline; Starting character position: X3; Character length of the mark in the original text: L3 / Last character position: Y3; Other content: None).
[0115] Mark 4:
[0116] Mark 4+1: (Mark type: translation / translation and covering the translated part; starting character position: X4; character length of the mark in the original text: L4 / last character position: Y4; other content: abcde).
[0117] Mark 4+2: (mark type: underline; starting character position: X4; character length of the mark in the original text: L4 / last character position: Y4; other content: none).
[0118] …
[0119] By distinguishing through multi-level compilation, the tag information in the tag document can be more concise and orderly.
[0120] It is worth mentioning that for a user tag with multiple tag types, there are multiple ways to set the confirmation of the parent and child, such as determining the parent and child according to the order of multiple tag recognition, or determining the parent and child according to a preset hierarchical format, etc. Among them, in the first case, for example, according to the tag recognition order, when the information representing tag 1 (such as translation) is first recognized, tag 1 is used as the parent assembly field of this time, and when the information representing tag 2 (such as underline) is later recognized, tag 2 is used as the child assembly field of this time. In the second case, please refer to the aforementioned examples of "tag 4, tag 4+1, tag 4+2", which will not be described in detail here. In addition, for a user tag with multiple tag types, the confirmation of the parent and child can also be calculated by weighting the number of historical tags of the user for each tag type (which can be the total number of historical tags or the total number of historical tag characters). The larger the number of historical tags, the higher the weight value. The tag type with the highest weight value is used as the parent of the user tag, and the other tag types are used as children. If there are multiple children, they are arranged in order of weight values.
[0121] Optionally, in the step of merging the marked document with the first target document to obtain the second target document, the marking position of the marked information in the first target document can be determined based on the starting character position of the marked information; and based on the marked position, the marked information can be marked in the first target document to obtain the second target document.
[0122] In the embodiment of the present invention, after obtaining the marked document, for each mark information in the marked document, its starting character position X can be found, and then the mark type corresponding to the position is determined, the beginnings are aligned, and then merged.
[0123] Specifically, when the markup document includes the first assembly field, the markup type is continued to be completed and restored according to the character length L of the original text occupied by the markup or the last character position Y. If the "other content" in the first assembly field is none, no processing is required. If the markup type is "translation" and "other content" is "abcde", "abcde" is combined, or the markup type is "translate and cover the translated part" and "other content" is "abcde", "abcde" replaces the corresponding original content. When the markup type is "highlight display" and "other content" is "RGB yellow", the corresponding original content is highlighted in yellow.
[0124] When the marked document includes the second assembly field, the original text range in the first target document is confirmed directly according to the marked original text or the original text + corresponding mark in the marked document, and then the mark is completed and restored according to the "row and column position relationship".
[0125] After the markup information in the markup document is completed and restored in the first target document, a second target document with user marks is obtained, and the user reads it offline later, which improves the user's reading experience.
[0126] Optionally, in the step of marking the marking information in the first target document according to the marking position to obtain the second target document, the marking information can be marked in the first target document in an editable form according to the marking position to obtain a preliminary marked document, which includes editable marks; jump links are added between the editable marks in the preliminary marked document to obtain the second target document.
[0127] In the embodiment of the present invention, in the process of marking the mark information in the first target document, the editable function of the mark information can be retained, and then the mark information is completed and restored in the first target document in an editable form. The completed and restored user mark can be in the second target document in the form of a sticker, for example, it can be edited by deletion like the mark in a PDF document, and other marks can be added on the basis of the second target document, so that the user can edit the mark on the second target document conveniently.
[0128] By adding jump links between editable tags, the user can jump from the current user tag to the next user tag through the jump link when reading the second target document, thereby improving the user's reading efficiency and reading experience.
[0129] like Figure 2 As shown, an embodiment of the present invention provides a document processing device, the document processing device comprising:
[0130] A first acquisition module 201 is used to acquire a first target document from a public database;
[0131] A second acquisition module 202 is used to acquire a marked document of a web page document, wherein the web page document is a document displayed after the first target document is loaded on a web page, and the marked document includes mark information marked by a user on the web page document;
[0132] The processing module 203 is used to merge the marked document with the first target document to obtain a second target document, and store the second target document locally. The second target document includes the marking information marked by the user on the web page document.
[0133] Optionally, the device further comprises:
[0134] An identification module, used for identifying user marks in a web document, and obtaining marking information of the web document marked by the user, wherein the marking information of the web document includes at least one marking information of the user mark;
[0135] The compilation module is used to compile the mark information marked by each user to obtain the mark document of the web page document.
[0136] Optionally, the assembly module is also used to determine the tag type and starting character position of each user tag, as well as the tag character length or the tag ending character position based on the tag information of each user tag; determine the first assembly field of each user tag based on the tag type and tag starting character position, as well as the tag character length or the tag ending character position of each user tag, each first assembly field corresponding to one user tag; arrange all the first assembly fields in the order of the positions of the corresponding user tags in the web page document to obtain a tag document of the web page document.
[0137] Optionally, the assembly module is also used to determine the starting character position and tag field of each user tag based on the tag information of each user tag; determine the second assembly field of each user tag based on the starting character position and tag field of each user tag, each second assembly field corresponds to one user tag; and arrange all the second assembly fields in the order of the positions of the corresponding user tags in the web page document to obtain a tag document of the web page document.
[0138] Optionally, the assembly module is also used to determine sub-tag information corresponding to multiple tag types in the tag information of the user tag if there is a tag information of the user tag that includes multiple tag types; perform a first assembly process on the tag information of the user tag to obtain a parent assembly field; perform a second assembly process on the sub-tag information corresponding to multiple tag types to obtain multiple child assembly fields; obtain a third assembly field of the user tag based on the parent assembly field and the multiple child assembly fields, each of the third assembly fields corresponds to one user tag; and obtain a tag document of the web page document based on the third assembly field.
[0139] Optionally, the processing module is further used to determine the marking position of the marking information in the first target document according to the starting character position of the marking information; and mark the marking information in the first target document according to the marking position to obtain a second target document.
[0140] Optionally, the processing module is also used to mark the marking information in an editable form in the first target document according to the marking position to obtain a preliminary marking document, wherein the preliminary marking document includes editable markings; and add jump links between the editable markings in the preliminary marking document to obtain a second target document.
[0141] It should be noted that the document processing apparatus provided in the embodiment of the present invention can be applied to devices such as smart phones, tablets, computers, servers, etc. that can perform document processing methods.
[0142] The document processing device provided in the embodiment of the present invention can implement each process implemented by the document processing method in the above method embodiment and can achieve the same beneficial effects. To avoid repetition, it will not be described here.
[0143] See also Figure 3 , Figure 3 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention, such as Figure 3 As shown, it includes: a memory 302, a processor 301, and a computer program of a document processing method stored in the memory 302 and executable on the processor 301, wherein:
[0144] The processor 301 is used to call the computer program stored in the memory 302 and execute the following steps:
[0145] Acquire a first target document from a public database;
[0146] Acquire a marked document of a web page document, wherein the web page document is a document displayed after the first target document is loaded on a web page, and the marked document includes marking information marked by a user on the web page document;
[0147] The marked document is merged with the first target document to obtain a second target document, and the second target document is stored locally. The second target document includes the marking information marked by the user on the web page document.
[0148] Optionally, before the step of obtaining the markup document of the webpage document, the method executed by the processor 301 further includes:
[0149] Identify the user mark in the web document to obtain the mark information of the web document marked by the user, wherein the mark information of the web document includes at least one mark information of the user mark;
[0150] The marking information marked by each user is compiled and processed to obtain a marking document of the web page document.
[0151] Optionally, the step of compiling the mark information marked by each user to obtain the mark document of the web page document performed by the processor 301 includes:
[0152] Determine the mark type and starting character position of each user mark, as well as the mark character length or ending character position of each user mark according to the mark information of each user mark;
[0153] Determine a first assembly field of each user mark based on the mark type and the mark start character position, and the mark character length or the mark end character position of each user mark, each of the first assembly fields corresponding to one user mark;
[0154] All the first assembly fields are arranged in the order of positions corresponding to the user marks in the web page document to obtain a markup document of the web page document.
[0155] Optionally, the step of compiling the mark information marked by each user to obtain the mark document of the web page document executed by the processor 301 further includes:
[0156] Determine the starting character position and the mark field of each user mark according to the mark information of each user mark;
[0157] Determine a second assembly field of each user tag based on the starting character position and the tag field of each user tag, each second assembly field corresponding to one user tag;
[0158] All the second assembly fields are arranged in the order of positions corresponding to the user marks in the web page document to obtain a markup document of the web page document.
[0159] Optionally, the step of compiling the mark information marked by each user to obtain the mark document of the web page document performed by the processor 301 includes:
[0160] If there is a mark information of the user mark that includes multiple mark types, then sub-mark information corresponding to multiple mark types is determined in the mark information of the user mark;
[0161] Performing a first assembly process on the mark information of one of the user marks to obtain a parent assembly field;
[0162] Performing a second assembly process on the sub-tag information corresponding to the plurality of tag types to obtain a plurality of sub-level assembly fields;
[0163] Based on the parent assembly field and the plurality of child assembly fields, a third assembly field of the user mark is obtained, each of the third assembly fields corresponds to one of the user marks;
[0164] Based on the third assembly field, a markup document of the web page document is obtained.
[0165] Optionally, the step of merging the marked document with the first target document to obtain the second target document performed by the processor 301 includes:
[0166] Determining a marking position of the marking information in the first target document according to a starting character position of the marking information;
[0167] The marking information is marked in the first target document according to the marking position to obtain a second target document.
[0168] Optionally, the step of marking the marking information in the first target document according to the marking position to obtain the second target document executed by the processor 301 includes:
[0169] According to the mark position, marking the mark information in the first target document in an editable form to obtain a preliminary marked document, wherein the preliminary marked document includes the editable mark;
[0170] Jump links are added between the editable tags in the preliminary markup document to obtain a second target document.
[0171] It should be noted that the electronic device provided in the embodiment of the present invention can be applied to devices such as smart phones, tablets, computers, servers, etc. that can perform document processing methods.
[0172] The electronic device provided by the embodiment of the present invention can implement each process implemented by the document processing method in the above method embodiment and can achieve the same beneficial effects. To avoid repetition, it will not be described here.
[0173] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the document processing method provided by the embodiment of the present invention are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.
[0174] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The computer-readable storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).
[0175] The above disclosure is only the preferred embodiment of the present invention, which certainly cannot be used to limit the scope of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.
Claims
1. A document processing method, It is characterized in that The method comprises the following steps: Acquire a first target document from a public database; Acquire a marked document of a web page document, wherein the web page document is a document displayed after the first target document is loaded on a web page, and the marked document includes marking information marked by a user on the web page document; The marked document is merged with the first target document to obtain a second target document, and the second target document is stored locally. The second target document includes the marking information marked by the user on the web page document.
2. The document processing method according to claim 1, It is characterized in that Before the step of obtaining the markup document of the web page document, the method further includes: Identify the user mark in the web document to obtain the mark information of the web document marked by the user, wherein the mark information of the web document includes at least one mark information of the user mark; The marking information marked by each user is compiled and processed to obtain a marking document of the web page document.
3. The document processing method according to claim 2, It is characterized in that The step of compiling and processing the markup information marked by each user to obtain the markup document of the web page document comprises: Determine the mark type and starting character position of each user mark, as well as the mark character length or ending character position of each user mark according to the mark information of each user mark; Determine a first assembly field of each user mark based on the mark type and the mark start character position, and the mark character length or the mark end character position of each user mark, each of the first assembly fields corresponding to one user mark; All the first assembly fields are arranged in the order of positions corresponding to the user marks in the web page document to obtain a markup document of the web page document.
4. The document processing method according to claim 2, It is characterized in that The step of compiling and processing the markup information marked by each user to obtain the markup document of the web page document further comprises: Determine the starting character position and the mark field of each user mark according to the mark information of each user mark; Determine a second assembly field of each user tag based on the starting character position and the tag field of each user tag, each second assembly field corresponding to one user tag; All the second assembly fields are arranged in the order of positions corresponding to the user marks in the web page document to obtain a markup document of the web page document.
5. The document processing method according to claim 2, It is characterized in that The step of compiling and processing the markup information marked by each user to obtain the markup document of the web page document comprises: If there is a mark information of the user mark that includes multiple mark types, then sub-mark information corresponding to multiple mark types is determined in the mark information of the user mark; Performing a first assembly process on the mark information of one of the user marks to obtain a parent assembly field; Performing a second assembly process on the sub-tag information corresponding to the plurality of tag types to obtain a plurality of sub-level assembly fields; Based on the parent assembly field and the plurality of child assembly fields, a third assembly field of the user mark is obtained, each of the third assembly fields corresponds to one of the user marks; Based on the third assembly field, a markup document of the web page document is obtained.
6. The document processing method according to any one of claims 1 to 5, It is characterized in that The step of merging the marked document with the first target document to obtain a second target document comprises: Determining a marking position of the marking information in the first target document according to a starting character position of the marking information; The marking information is marked in the first target document according to the marking position to obtain a second target document.
7. The document processing method according to claim 6, It is characterized in that The step of marking the marking information in the first target document according to the marking position to obtain the second target document comprises: According to the mark position, marking the mark information in the first target document in an editable form to obtain a preliminary marked document, wherein the preliminary marked document includes the editable mark; Jump links are added between the editable tags in the preliminary markup document to obtain a second target document.
8. A document processing device, It is characterized in that The document processing device comprises: A first acquisition module, used for acquiring a first target document from a public database; A second acquisition module is used to acquire a marked document of a web page document, wherein the web page document is a document displayed after the first target document is loaded on a web page, and the marked document includes mark information marked by a user on the web page document; The processing module is used to merge the marked document with the first target document to obtain a second target document, and store the second target document locally. The second target document includes the marking information marked by the user on the web page document.
9. An electronic device, It is characterized in that include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the document processing method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the document processing method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
PDF document real-time editing viewing tool
CN108009143A
Method for annotating file in browser
CN113705181A
Pre-training model training method and device for reading task and electronic equipment thereof
CN114241496A
Document editing method and device and storage medium
CN114757151A
Automated document tagging in a digital management platform
US20220035990A1
