Semantic document storage method and device

Through the semantic document storage method and device, it is possible to add semantic metadata to streaming documents while maintaining the document display and editing characteristics, solving the problem that embedded semantic documents cannot be opened by word processing software, and achieving high efficiency of semantic documents. Retrieval and machine understanding.

CN114707514BActive Publication Date: 2024-10-01BEIJING INFORMATION SCI & TECH UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210312822.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-28
Publication Date
2024-10-01
Estimated Expiration
2042-03-28

AI Technical Summary

Technical Problem

It is difficult with existing technology to add machine-readable semantic metadata to streaming documents while maintaining document display and editing features, resulting in documents with embedded semantics unable to be opened and edited by commonly used word processing software.

Method used

Provide a method and device for storing semantic documents. Through semantic mark preprocessing, text editing and semantic annotation post-processing, semantic documents embedded with semantic marks can be seamlessly switched between ordinary flow documents and semantic documents, and the generated text can be generated. Processes streaming documents opened and edited by the software and preserves semantic information when stored.

Benefits of technology

It realizes that word processing software can normally open, edit and save semantic documents, and at the same time makes semantic documents convenient for efficient retrieval and machine understanding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114707514B_ABST
    Figure CN114707514B_ABST
Patent Text Reader

Abstract

The embodiments of the present disclosure disclose a semantic document storage method and device. A specific implementation of the method includes: in response to receiving a semantic tag conversion instruction for a semantic document with embedded semantic tags, performing semantic tag preprocessing on the semantic document with embedded semantic tags to obtain a preprocessed streaming document; performing text editing on the preprocessed streaming document to obtain an edited streaming document; in response to receiving a semantic annotation conversion instruction for the edited streaming document, performing semantic annotation post-processing on the edited streaming document to obtain a processed semantic document; and storing the processed semantic document. This implementation allows word processing software to normally open, edit and save semantic documents with embedded semantic tags, and at the same time allows semantic documents with embedded semantic tags to facilitate intelligent processing such as efficient document retrieval, information extraction and machine understanding.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular to a semantic document storage method and device.

[0002] Basic terminology

[0003] (1) A streaming document is a document that complies with the streaming document format specification (OOXML, ODF, UOF, etc.).

[0004] (2) Semantic documents with embedded semantic tags: Semantic documents with semantic tags, that is, semantic tags are added to the document format.

[0005] (2) Semantic annotation: Annotation element corresponding to the semantic tag in the flow document.

[0006] (3) Word processing software: software for creating, editing, and browsing streaming documents (such as office software).

[0007] (4) Streaming document format: There are currently three main streaming document format standards, OOXML (Office OpenXML), ODF (Open Fixed-layout Document) and UOF (Uniform Office document Format). Background Art

[0008] With the rise of semantic web-related concepts, people's research on knowledge acquisition is not only focused on the document itself, but has begun to turn to the semantics of the document content. Streaming documents contain rich semantic information, but few people add machine-readable semantic metadata to streaming documents to enable them to be used for intelligent processing such as efficient document retrieval, information extraction, and intelligent understanding. In order to improve the machine readability of streaming documents and express the semantic information of streaming documents, it is particularly important to embed semantic metadata of streaming documents.

[0009] The release of the specification T / CESA 1176-2021 "Method for embedding semantic metadata in electronic documents of information technology" has made it possible to have a unified standard for adding semantics to streaming documents. However, documents with embedded semantics no longer conform to the corresponding document format specifications to a certain extent, and the corresponding office document processing software can no longer open and utilize these documents. In order to fully retain the original display and editing characteristics of the document and include clear document semantic information, it is of great significance to study a processing method and tool that can seamlessly switch between semantically marked documents with embedded semantics and ordinary streaming documents. Summary of the invention

[0010] The content of this disclosure is used to introduce concepts in a brief form, which will be described in detail in the detailed implementation section below. The content of this disclosure is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to limit the scope of the technical solution claimed for protection.

[0011] Some embodiments of the present disclosure propose semantic document storage methods and devices to solve the technical problems mentioned in the above background technology section.

[0012] In a first aspect, some embodiments of the present disclosure provide a semantic document storage method, comprising: in response to receiving a semantic tag conversion instruction for a semantic document with embedded semantic tags, performing semantic tag preprocessing on the semantic document with embedded semantic tags to obtain a preprocessed streaming document, wherein the preprocessed streaming document contains various semantic annotations, and the various semantic annotations are generated based on the conversion of various semantic tags in the semantic document with embedded semantic tags; in response to receiving a document editing instruction for the preprocessed streaming document, performing text editing on the preprocessed streaming document to obtain an edited streaming document; in response to receiving a semantic annotation conversion instruction for the edited streaming document, performing semantic annotation post-processing on the edited streaming document to obtain a processed semantic document, wherein the processed semantic document contains various embedded semantic tags, and the various semantic tags in the processed semantic document are generated based on the conversion of various semantic annotations in the edited streaming document; and storing the processed semantic document.

[0013] In a second aspect, some embodiments of the present disclosure provide a semantic document storage device, comprising: a semantic tag preprocessing unit, configured to, in response to receiving a semantic tag conversion instruction for a semantic document with embedded semantic tags, perform semantic tag preprocessing on the semantic document with embedded semantic tags to obtain a preprocessed streaming document, wherein the preprocessed streaming document contains various semantic annotations, and the various semantic annotations are generated based on the conversion of various semantic tags in the semantic document with embedded semantic tags; a text editing unit, configured to, in response to receiving a document editing instruction for the preprocessed streaming document, perform text editing on the preprocessed streaming document to obtain an edited streaming document; a semantic annotation post-processing unit, configured to, in response to receiving a semantic annotation conversion instruction for the edited streaming document, perform semantic annotation post-processing on the edited streaming document to obtain a processed semantic document, wherein the processed semantic document contains various embedded semantic tags, and the various semantic tags in the processed semantic document are generated based on the conversion of various semantic annotations in the edited streaming document; and a storage unit, configured to store the processed semantic document.

[0014] The above-mentioned embodiments of the present disclosure have the following beneficial effects: through this implementation, word processing software can normally open, edit and save semantic documents; at the same time, semantic documents are convenient for intelligent processing such as efficient document retrieval, information extraction and machine understanding. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] 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.

[0016] Figure 1 is a flow chart of some embodiments of the semantic document storage method according to the present disclosure;

[0017] Figure 2 This is a diagram of an OOXML format document browsing interface of a news case to be embedded with semantic metadata according to some embodiments of the semantic document storage method disclosed herein;

[0018] Figure 3 for Figure 2 The document shown here shows the format of the record after adding the namespace;

[0019] Figure 4 is a schematic diagram of a document format after semantic information is embedded in a document according to some embodiments of the semantic document storage method of the present disclosure;

[0020] Figure 5 is a schematic diagram of a document format after embedding summary semantic description information in a document according to some embodiments of the semantic document storage method of the present disclosure;

[0021] Figure 6 is a schematic diagram of a document format after a document is embedded with a picture object according to some embodiments of the semantic document storage method of the present disclosure;

[0022] Figure 7 is a schematic diagram of a document format after a document is embedded with a text named entity according to some embodiments of the semantic document storage method of the present disclosure;

[0023] Figure 8 is a schematic diagram of a document format in which multiple semantic tags correspond to multiple sections of content according to some embodiments of the semantic document storage method of the present disclosure;

[0024] Figure 9 is a schematic diagram of adjusting the format structure of a semantic document having embedded semantic tags according to some embodiments of the semantic document storage method of the present disclosure;

[0025] Figure 10 is a schematic diagram of the format structure of a preprocessed streaming document according to some embodiments of the semantic document storage method of the present disclosure;

[0026] Figure 11 is a schematic diagram of the format structure of a semantic document after adjusting the position of a second semantic tag according to some embodiments of the semantic document storage method of the present disclosure;

[0027] Figure 12 is a schematic diagram of semantic tag replacement according to some embodiments of the semantic document storage method of the present disclosure;

[0028] Figure 13 is a schematic diagram of a format record after content replacement according to some embodiments of the semantic document storage method of the present disclosure;

[0029] Figure 14 It is a schematic diagram of a format record after the semantic annotation of multiple segments of identifications is restored according to some embodiments of the semantic document storage method of the present disclosure;

[0030] Figure 15 is a schematic diagram of the structure of some embodiments of the semantic document storage device according to the present disclosure; DETAILED DESCRIPTION

[0031] 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 set forth herein. On the contrary, these embodiments are provided to provide 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.

[0032] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure can be combined with each other.

[0033] 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.

[0034] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0035] 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.

[0036] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.

[0037] refer to Figure 1 , shows a process 100 of some embodiments of the semantic document storage method according to the present disclosure. The semantic document storage method comprises the following steps:

[0038] Step 101 : in response to receiving a semantic tag conversion instruction for a semantic document with embedded semantic tags, semantic tag preprocessing is performed on the semantic document with embedded semantic tags to obtain a preprocessed streaming document.

[0039] In some embodiments, in response to receiving a semantic tag conversion instruction for a semantic document with embedded semantic tags, the execution subject (e.g., an electronic device) of the semantic document storage method may perform semantic tag preprocessing on the semantic document with embedded semantic tags to obtain a preprocessed streaming document. In the preprocessed streaming document, there are various semantic annotations, and the various semantic annotations are generated based on the conversion of various semantic tags in the semantic document with embedded semantic tags. The semantic document with embedded semantic tags may be a semantic document in a predetermined format. For example, it may be a document in XML format. The semantic tag conversion instruction may be an instruction to convert the semantic tag. The format of the semantic tag conversion instruction may be pre-set. In layman's terms, the method of semantic tag preprocessing is to represent the semantic tag with an annotation element in the streaming document format, which becomes a semantic annotation. In the semantic document with embedded semantic tags, since the semantic tag in the semantic document with embedded semantic tags is a tag in a special format, the semantic document with embedded semantic tags cannot be opened by commonly used word processing software. That is, the word processing software does not support tags in special formats. For example, the word processing software may be office software such as WPS software (WPS Office Software). The pre-processed streaming document can be opened by word processing software. The pre-processed streaming document can be a document with semantic contents corresponding to each semantic tag.

[0040] In some optional implementations of some embodiments, a document in OOXML streaming document format with embedded semantic tags is taken as an example to illustrate the process of semantic tag preprocessing and semantic annotation post-processing.

[0041] like Figure 2 As shown, Figure 2A (news case) document in OOXML format. The above document can be opened and edited by document office software (such as Microsoft Office, WPS, etc.) that supports OOXML format specifications.

[0042] According to the embedded semantic metadata specification T / CESA 1176-2021 "Method for embedding semantic metadata in electronic documents of information technology", the document format is recorded as follows after embedding some semantic tags: Figure 3 , Figure 4 , Figure 5 , Figure 6 , Figure 7 , Figure 8 shown.

[0043] like Figure 3 As shown, Figure 3 for Figure 2 The following is a schematic diagram of the document format record after the namespace is added to the document.

[0044] Specifically in the document.xml file of the document <w:document>The attributes under the tag include namespaces. For example, add "xmlns:rdfa="http: / / www.w3.org / TR / 2015 / REC-rdfa-core-20150317 / " and xmlns:dsm="http: / / document-semantic-metadata"" here.

[0045] like Figure 4 As shown, Figure 4 for Figure 2 Schematic diagram of the document format record after the document is embedded with semantic information such as word frequency and editing time of the full text of the document.

[0046] Specifically in the document.xml file of the document <w:document>Embed under sub-tag <dsm:metadata>Tags and corresponding semantic information, the semantic information includes word frequency and editing time describing the full text.

[0047] like Figure 5 As shown, Figure 5 is Figure 2 The document.xml file of the document embeds the document summary semantic description in the paragraph tag <w:p>Add rdfa tag to the attribute and record the attribute property = "summary"; here <w:p>The subtag embeds the rdfa tag of the word frequency and editing time of the current text paragraph, and the node is <dsm:metadata>Name it and put the rdfa tag as an attribute in the corresponding node.

[0048] like Figure 6 As shown, Figure 6 is Figure 2 The schematic diagram of the semantic information corresponding to the embedded image object in the document is the image in the document.xml file of the document. <w:drawing>Add rdfa tags to the tag attributes.

[0049] like Figure 7 As shown, Figure 7 for Figure 2 A schematic diagram of the form of semantic tags corresponding to text named entities embedded in the document. In the document.xml file, <w:r>Child Nodes <w:t>Under the label, named entities need to be annotated, such as names of people, places, organizations, events, and currencies. <w:t>In the tag, take "<dsm:metadatardfa.....> entity < / w:t> < / w:t> < / w:r> < / w:drawing> < / dsm:metadata> ” rules to embed semantic metadata tags.

[0050] like Figure 8 As shown, Figure 8 yes Figure 2 In a document, a named entity is a situation where multiple text tags are embedded with semantic representations, that is, multiple semantic tags correspond to multiple pieces of content. For example, in the document.xml file of a document, the marked date entity is in multiple <w:r>and <w:t>In the label, according to the embedding rule, the date can be split into three sequential numbers of year, month, and day. Then, when the entity date is the first day of the month, <w:r>Embed "<dsm:metadata ID='X' Seq='X' IsStart='true' rdfa.... / >" above the tag. At the end of the month when the entity date is < / w:r> embed "<dsm:metadata ID='X' Seq='X' IsStart='false' / >" after the <w:r>Embed "<dsm:metadata ID='X' Seq='X' IsStart='true' rdfa.... / >" above the tag. At the end of the month when the entity date is < / w:r> label. Similarly, the entity with the date as the day also uses the same rule to embed the marker. Among them, ID (Identity) can be used as a multi-segment identifier. The value of "IsStart" (for example, the value of "IsStart" is "false") can be used as the start and end of a content segment marker.

[0051] In some optional implementation manners of some embodiments, preprocessing the semantic tags of the above-mentioned semantic document with embedded semantic tags to obtain a preprocessed streaming document may include the following steps:

[0052] First step, the above-mentioned execution subject can adjust the format structure of the above-mentioned semantic document with embedded semantic tags to obtain an adjusted semantic document.

[0053] As an example, the above-mentioned execution subject can adjust the format structure of the above-mentioned semantic document with embedded semantic tags according to a preset document adjustment logic to obtain an adjusted semantic document.

[0054] Second step, the above-mentioned execution subject can perform semantic scope annotation on each semantic tag included in the above-mentioned adjusted semantic document to obtain an annotated streaming document.

[0055] Third step, for each semantic scope annotation in the above-mentioned annotated streaming document, the above-mentioned execution subject can generate a semantic annotation according to the semantic content corresponding to the above-mentioned semantic scope annotation, where the above-mentioned semantic content includes: vocabulary namespace identifier, category, attribute name, attribute value, semantic information of a specific position or regional position, and the above-mentioned semantic information includes: document author name, document writing date, writing time, keywords, word frequency information. Among them, the above-mentioned specific position can be the start position or end position of the document. The above-mentioned regional position can be the start position or end position of a certain paragraph of the document.

[0056] As an example, the above-mentioned execution subject can use relevant code programs to generate semantic annotations according to the semantic content corresponding to the above-mentioned semantic scope annotations.

[0057] Fourth step, the above-mentioned execution subject can generate the above-mentioned preprocessed streaming document according to each semantic scope annotation and each semantic annotation in the above-mentioned annotated streaming document.

[0058] As an example, the above-mentioned execution subject can use relevant file conversion programs to generate the above-mentioned preprocessed streaming document according to each semantic scope annotation and each semantic annotation in the above-mentioned annotated streaming document.

[0059] Optionally, the adjusting the format structure of the semantic document embedded with the semantic mark to obtain the adjusted semantic document may include the following steps:

[0060] In the first step, in response to determining that there are multiple first target semantic tags in the semantic document with embedded semantic tags, and the multiple first target semantic tags are located under the same target tag, the execution subject can perform semantic tag segmentation processing on the multiple first target semantic tags according to a predetermined segmentation method. The semantic content type corresponding to the multiple first target semantic tags is a named entity.

[0061] Specifically, if the text content of the semantic tag is a named entity, the named entity is separated from other common texts according to the text sequence before and after the text content, so that each semantic tag of the named entity corresponds to a semantic annotation.

[0062] like Figure 9 As shown, Figure 9 A schematic diagram showing the adjustment of the format structure of a semantic document having embedded semantic tags is shown.

[0063] In response to the text content of the semantic tag being a named entity, the named entity is separated from other common texts according to the text sequence before and after the text content, so that each semantic tag of the named entity corresponds to a semantic annotation.

[0064] Specifically, Figure 7 In the original document structure, "Central News Agency" is a named entity. In the original document structure, "Central News Agency", "East Africa", "Ethiopia", and "Kenya" need to be named separately. <w:t>The named entity of each semantic tag is represented as an independent text structure to prepare for the generation of semantic annotations.

[0065] In the second step, in response to determining that the second target semantic tag exists in the semantic document with the embedded semantic tag, and the second target semantic tag is outside the visible range of the document, the execution subject can move the second target semantic tag to the visible range of the document. The semantic content type corresponding to the second target semantic tag is the metadata type describing the document. As an example, the visible range of the document can be the tag <w:body>< / w:body> That is, the document visible range is <w:body>< / w:body> Outside the document's visible range is <w:body>< / w:body> The target location may be outside the visible range of the document.

[0066] Specifically, the semantic information of the semantic tag (i.e., the second target semantic tag) in response to a specific position of the document is document metadata whose semantic content type is a metadata type. If it is outside the visible range of the document, the semantic information needs to be moved into the visible range of the document and converted into a form that can be annotated.

[0067] See Figure 11 , the semantic information of the semantic tag at a specific position of the document (i.e., the second target semantic tag) is the basic document metadata. If it is outside the visible range of the document, the semantic information needs to be moved into the visible range of the document and converted into a form that can be annotated. Figure 4 The DSM tags at specific positions in the text (i.e., the DSM tags corresponding to the word frequency and editing time of the full text) are <w:body>The tag content (i.e., the word frequency and editing time of the full text) in the dsm tag at the specific location needs to be moved to <w:body>The tag is inside the visible area of ​​the document, and to enable annotations to be added to this tag, place it in <w:p>In the tag, the specific form is as follows Figure 11 The structure shown.

[0068] The semantic information marked in response to a specific position in the document is basic document metadata. If it is outside the visible range of the document, the semantic information needs to be moved into the visible range of the document and converted into a form that can be annotated.

[0069] It should be noted that the purpose of adjusting the structure in this way is to make the original streaming document no longer conform to the streaming document format specification (standard) after embedding metadata in accordance with T / CESA 1176-2021 "Method for embedding semantic metadata in electronic documents of information technology", and office document processing software cannot open this document. The structural adjustment is made to be able to apply annotation elements to retain semantic information and be able to be opened and edited by office document processing software.

[0070] Optionally, the step of annotating the semantic range of each semantic tag included in the adjusted semantic document to obtain the annotated streaming document may include the following steps:

[0071] In the first step, for each of the semantic tags, the execution entity may determine a tag start position and a tag end position of a tag corresponding to the semantic tag.

[0072] The tag start position and tag end position of the corresponding tag are used as the range of the corresponding semantic annotation, and are replaced with the semantic annotation start mark and end mark.

[0073] Specifically, taking the date as an example, the semantic tag start tag and the semantic tag end tag before and after the semantic tag are used as the tags of the semantic annotation range to facilitate the replacement of the annotation tag.

[0074] In the second step, the execution subject may delete the namespace description corresponding to each semantic tag and the target tag corresponding to each semantic tag. <dsm:metadata>mark.

[0075] As an example, remove or hide Figure 3 The namespaces added to the document can be:

[0076] "xmlns:rdfa="http: / / www.w3.org / TR / 2015 / REC-rdfa-core-20150317 / " and xmlns:dsm="http: / / document-semantic-metadata"".

[0077] In a third step, the execution subject may determine the tag start position and tag end position of the tag corresponding to the semantic tag in each semantic tag as the semantic range of the semantic tag.

[0078] In the fourth step, the execution entity may annotate the semantic scope of each semantic tag according to a predetermined format.

[0079] Optionally, for marking the scope of the semantic annotation, that is, corresponding the semantically annotated area to the content covered by the semantic annotation, the following situations are included:

[0080] Case 1: In response to the text content of the semantic mark being a named entity, the start position and the end position of the current text are used as the area range of the semantic annotation.

[0081] See also Figure 10 ,like Figure 10 In [dsm5], "China News Service" is the named entity of an organization, and the semantic annotation range area is at the start and end positions of the "China News Service" text.

[0082] Scenario 2: In response to the semantic content corresponding to the semantic tag being the semantic information of a specific position in the document, a corresponding semantic annotation range needs to be set for the semantic tag. The content corresponding to the specific position in the document can be the semantic information of the entire document or the semantic information of a local content of the document.

[0083] Specifically, the execution subject can set a corresponding semantic annotation range. In response to the semantic content corresponding to the semantic tag being the semantic information of a specific position in the document, for the semantic information describing the full text content, an empty semantic annotation range can be set at the document header, such as Figure 10 [dsm2] in the document, you can also set the start and end positions of the entire document as the semantic annotation range. For semantic information describing the local content of the document, such as semantic information containing one or more text paragraphs or one or more document objects, you can set an empty semantic annotation range at the head of the local content, such as Figure 10 [dsm3] in , you can also directly treat the entire area covered by the document object as a whole, record the starting position and the ending position, and use them as the scope of the semantic annotation, such as Figure 10 [dsm15] in.

[0084] Scenario 3: In response to the named entity of the semantic tag being a picture object, the scope of the semantic tag can be set according to the semantic information of a specific position in the document. The scope of the semantic annotation can cover the scope of the picture object, such as Figure 6 The corresponding semantic annotation range corresponds to Figure 10 [dsm18].

[0085] Scenario 4: In response to the semantic tag corresponding to multiple sections of content, the start and end tags of the multiple sections of content are used as the scope of the semantic annotation. Figure 8 and Figure 10 [dsm6] and [dsm7].

[0086] Replace the range of the corresponding semantic annotation with the semantic annotation start and end tags.

[0087] Optionally, the generating of the semantic annotation according to the semantic content corresponding to the semantic range annotation may include the following steps:

[0088] In the first step, the execution subject may generate a semantic annotation mark corresponding to the semantic annotation range according to the start mark and the end mark of the semantic annotation range.

[0089] In a second step, the execution subject may determine the semantic content in the semantic annotation mark as the content information of the semantic annotation.

[0090] Optionally, the process of obtaining the content in the semantic tag and using the content in the semantic tag as the content of the semantic annotation is as follows:

[0091] Traverse the documents with semantic annotation range and semantic tags, and obtain the content of each semantic tag. The content of the obtained semantic tag is used as the content of the semantic annotation, such as Figure 10 Semantic annotation on the right side of the text box.

[0092] In addition, a semantic user ID can be assigned to each semantic annotation to distinguish the semantic annotation of the streaming document from the ordinary document annotation, such as Figure 10 The semantic user ID of the semantic annotation on the right side is [dsmxx], and the normal document annotation ID is [fbxx].

[0093] In response to the semantic tag of a named entity corresponding to the contents of multiple text paragraphs, the multiple paragraph identifiers and sequence numbers are processed into one or more semantic annotations, and the identifiers and sequence numbers are retained in the semantic annotation contents. Figure 10 Semantic annotations [dsm6] and [dsm7].

[0094] Multiple semantic tags in a streaming document may have different semantics due to different vocabulary namespaces, etc., so the semantic annotations corresponding to multiple semantic tags may overlap and intersect.

[0095] like Figure 10 The annotation range of annotation 15 [dsm15] covers annotations 5-14 [dsm5]-[dsm14], resulting in overlap and intersection of semantic annotations.

[0096] In the third step, the execution subject may generate a user ID corresponding to the semantic annotation. For example, the user ID may be "dsm".

[0097] In a fourth step, the execution subject may generate the semantic annotation according to the content information of the semantic annotation and the user identifier.

[0098] Optionally, in response to determining that the semantic content type of the semantic tag is a named entity corresponding to the content of multiple paragraphs of text, the execution entity may determine the semantic content of the semantic tag as content information of at least one semantic annotation according to the multiple paragraph identifiers and sequence numbers of the semantic tag.

[0099] Optionally, before adjusting the format structure of the semantic document embedded with the semantic mark to obtain the adjusted semantic document, the steps further include:

[0100] The execution subject may store the semantic tag attribute information of each semantic tag in the semantic document with embedded semantic tags into a target file.

[0101] Optionally, the semantic annotations corresponding to the above-mentioned semantic tags may overlap or intersect with each other.

[0102] Step 102: in response to receiving a document editing instruction for the preprocessed streaming document, text editing is performed on the preprocessed streaming document to obtain an edited streaming document.

[0103] In some embodiments, in response to receiving a document editing instruction for the preprocessed streaming document, the execution subject may perform text editing on the preprocessed streaming document to obtain an edited streaming document. As an example, in response to receiving a document editing instruction for the preprocessed streaming document, the execution subject may perform a text adding information operation, a text deleting information operation and / or a text modifying information operation on the preprocessed streaming document. For example, the text adding information operation may be an operation of adding semantic annotation information in the form of semantic annotation. The text deleting information operation may be an operation of deleting semantic annotation information in the form of semantic annotation.

[0104] Step 103 , in response to receiving the semantic annotation conversion instruction for the edited streaming document, performing semantic annotation post-processing on the edited streaming document to obtain a processed semantic document.

[0105] In some embodiments, in response to receiving a semantic annotation conversion instruction for the edited streaming document, the execution subject may perform semantic annotation post-processing on the edited streaming document to obtain a processed semantic document. The semantic annotation conversion instruction may be an instruction to convert the semantic annotation. The processed semantic document contains embedded semantic tags, and the semantic tags in the processed semantic document are generated based on the conversion of the semantic annotations in the edited streaming document. The processed semantic document cannot be opened by commonly used word processing software.

[0106] In some optional implementations of some embodiments, the above-mentioned processing of semantic annotation post-processing of the above-mentioned edited streaming document to obtain the processed semantic document may include the following steps:

[0107] In the first step, according to the semantic user identifier, the semantic annotation range corresponding to the corresponding semantic annotation is used as the range of the semantic tag. Although there are multiple identical semantic user identifiers in the edited streaming document, each of the semantic user identifiers has a one-to-one corresponding semantic annotation.

[0108] In the second step, according to the above semantic user identification, the corresponding semantic annotation content information is extracted to obtain the semantically marked content information.

[0109] The third step is to restore the semantic annotations with multiple paragraphs of identification into multiple paragraphs of text or semantic tags in numerical order according to the content information of the above semantic annotations.

[0110] In the fourth step, in response to the content type of the semantic annotation content information being a metadata type describing the document, the semantic mark together with the content information is restored to the original position, wherein the original position is outside the invisible area of ​​the document.

[0111] The fifth step is to add or restore the namespace description to make the document a processed semantic document.

[0112] Specifically, according to the semantic user identifier, the corresponding semantic annotation area is used as the range of the new semantic tag, mainly to identify the semantic user identifier in the annotation, obtain the text coverage of the current annotation, that is, the starting position and ending position of the semantic annotation, and replace it with the semantic tag.

[0113] Identify semantic annotations set by common users (can be identified by rdfa tags contained in common user semantic annotations) Figure 10 In [fb16] and [fb17], the general user ID is replaced by the semantic user ID, and the semantic tag is replaced by the semantic user's annotation area as the new semantic tag range. For details, see Figure 12 .

[0114] In addition, according to the semantic user identifier, the corresponding semantic annotation content is extracted as new semantic tag content. The above semantic annotation content includes vocabulary namespace identifier, category, attribute and value, etc.; it also includes the semantic information of specific position tags of the document, such as author, writing date, writing time, keywords and word frequency, etc.

[0115] like Figure 10 [dsmX] in the content replacement format record, see Figure 13 .

[0116] In practice, semantic annotations with multiple paragraphs of identifiers are restored to multiple paragraphs of text or semantic tags in the order of numbers. The specific process is as follows: if the semantic annotation contains multiple paragraphs of identifiers and sequential numbers, the semantic annotation tags are replaced with semantic tags, and the numbers are reorganized according to the rules, and the semantic annotation content is restored to the multiple paragraphs of text or semantic tags in turn. Add or restore the namespace description and save the document as a semantically tagged document.

[0117] like Figure 10 [dsm6] and [dsm7] in the . Figure 14 .

[0118] The above-mentioned embodiments of the present disclosure have the following beneficial effects: through this implementation, word processing software can normally open, edit and save semantic documents; at the same time, semantic documents are convenient for intelligent processing such as efficient document retrieval, information extraction and machine understanding.

[0119] Further references Figure 15 As an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a semantic document storage device. These device embodiments are similar to Figure 2 Corresponding to the method embodiments shown, the device can be specifically applied to various electronic devices.

[0120] like Figure 15 As shown, a semantic document storage device 1500 includes: a semantic tag preprocessing unit 1501, a text editing unit 1502, a semantic annotation post-processing unit 1503 and a storage unit 1504. The semantic tag preprocessing unit 1501 is configured to, in response to receiving a semantic tag conversion instruction for a semantic document with embedded semantic tags, perform semantic tag preprocessing on the semantic document with embedded semantic tags to obtain a preprocessed streaming document, wherein the preprocessed streaming document contains various semantic annotations, and the various semantic annotations are generated based on the conversion of various semantic tags in the semantic document with embedded semantic tags; the text editing unit 1502 is configured to, in response to receiving a document editing instruction for the preprocessed streaming document, perform semantic tag preprocessing on the preprocessed streaming document The processed streaming document is subjected to text editing to obtain the edited streaming document; the semantic annotation post-processing unit 1503 is configured to, in response to receiving a semantic annotation conversion instruction for the edited streaming document, perform semantic annotation post-processing on the edited streaming document to obtain a processed semantic document, wherein the processed semantic document contains embedded semantic tags, and the semantic tags in the processed semantic document are generated based on the conversion of the semantic annotations in the edited streaming document; the storage unit 1504 is configured to store the processed semantic document.

[0121] It is understood that the units described in the device 1500 are similar to those described in the reference Figure 1 Therefore, the operations, features and beneficial effects described above for the method are also applicable to the device 1500 and the units included therein, and will not be described in detail here.

[0122] The above descriptions are only some preferred embodiments of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with the technical features with similar functions disclosed in the embodiments of the present disclosure (but not limited to) and the technical solutions formed.< / dsm:metadata> < / w:p> < / w:body> < / w:body> < / w:t> < / w:t> < / w:r> < / w:p> < / w:p> < / dsm:metadata> < / w:document> < / w:document>

Claims

1. A semantic document storage method, comprising: In response to receiving a semantic tag conversion instruction for a semantic document with embedded semantic tags, semantic tag preprocessing is performed on the semantic document with embedded semantic tags to obtain a preprocessed streaming document, wherein the preprocessed streaming document contains various semantic annotations, and the various semantic annotations are generated based on the conversion of various semantic tags in the semantic document with embedded semantic tags, wherein: The step of performing semantic tag preprocessing on the semantic document embedded with the semantic tag to obtain a preprocessed streaming document includes: Adjusting the format structure of the semantic document embedded with the semantic mark to obtain an adjusted semantic document; Annotating the semantic range of each semantic tag included in the adjusted semantic document to obtain an annotated streaming document; For each semantic range annotation in the annotated streaming document, a semantic annotation is generated according to the semantic content corresponding to the semantic range annotation, wherein the semantic content includes: vocabulary namespace identifier, category, attribute name, attribute value, semantic information of a specific position or regional position, and the semantic information includes: document author name, document writing date, writing time, keywords, word frequency information; generating the preprocessed streaming document according to each semantic range annotation and each obtained semantic annotation in the annotated streaming document, The step of adjusting the format structure of the semantic document embedded with the semantic mark to obtain the adjusted semantic document includes: In response to determining that there are multiple first target semantic tags in the semantic document with embedded semantic tags, and the multiple first target semantic tags are located under the same target tag, performing semantic tag segmentation processing on the multiple first target semantic tags according to a predetermined segmentation method, wherein the semantic content types corresponding to the multiple first target semantic tags are named entities; In response to determining that a second target semantic tag exists in the semantic document having embedded semantic tags, and the second target semantic tag is located outside the visible range of the document, moving the semantic content of the second target semantic tag into the visible range of the document, wherein the type of the semantic content corresponding to the second target semantic tag is a metadata type describing the document; In response to receiving a document editing instruction for the preprocessed streaming document, performing text editing on the preprocessed streaming document to obtain an edited streaming document; In response to receiving a semantic annotation conversion instruction for the edited streaming document, the edited streaming document is subjected to semantic annotation post-processing to obtain a processed semantic document, wherein the processed semantic document contains various embedded semantic tags, and each semantic tag in the processed semantic document is generated based on the conversion of each semantic annotation in the edited streaming document, wherein, The step of performing semantic annotation post-processing on the edited streaming document to obtain a processed semantic document includes: According to the semantic user identifier, the semantic annotation range corresponding to the corresponding semantic annotation is used as the range of the semantic tag; According to the semantic user identifier, the corresponding semantically annotated content information is extracted to obtain semantically marked content information; According to the content information of the semantic annotation, the semantic annotation with multiple segment identifiers is restored to multiple segments of text or semantic tags in numerical order; In response to the content type of the content information of the semantic annotation being a metadata type describing a document, restoring the semantic mark together with the content information to an original position; Add or restore namespace descriptions to documents as processed semantic documents; The processed semantic document is stored.

2. The method according to claim 1, wherein: The step of annotating the semantic range of each semantic tag included in the adjusted semantic document to obtain an annotated streaming document includes: For each of the semantic tags, determining a tag start position and a tag end position of a tag corresponding to the semantic tag; Deleting the namespace description corresponding to each semantic tag and the target tag corresponding to each semantic tag; Determine the tag start position and tag end position of the tag corresponding to the semantic tag in each semantic tag as the semantic range of the semantic tag; According to a predetermined format, a scope annotation is performed on the semantic scope of each semantic tag.

3. The method according to claim 1, wherein: The step of generating a semantic annotation according to the semantic content corresponding to the semantic range annotation comprises: Generating a semantic annotation mark corresponding to the semantic annotation range according to the start mark and the end mark of the semantic annotation range; Determining the semantic content in the semantic annotation mark as content information of the semantic annotation; generating a user identifier corresponding to the semantic annotation; The semantic annotation is generated according to the content information of the semantic annotation and the user identifier.

4. The method according to claim 3, wherein: The step of determining the semantic content in the semantic annotation mark as the content information of the semantic annotation further includes: In response to determining that the semantic content type of the semantic tag is a named entity corresponding to the content of multiple paragraphs of text, the semantic content of the semantic tag is determined as content information of at least one semantic annotation according to the multiple paragraph identifiers and sequence numbers of the semantic tag.

5. The method according to claim 1, wherein: Before adjusting the format structure of the semantic document embedded with the semantic mark to obtain the adjusted semantic document, the method further includes: The semantic tag attribute information of each semantic tag in the semantic document having embedded semantic tags is stored.

6. A semantic document storage device, comprising: A semantic tag preprocessing unit is configured to, in response to receiving a semantic tag conversion instruction for a semantic document with embedded semantic tags, perform semantic tag preprocessing on the semantic document with embedded semantic tags to obtain a preprocessed streaming document, wherein the preprocessed streaming document contains various semantic annotations, and the various semantic annotations are generated based on the conversion of various semantic tags in the semantic document with embedded semantic tags, wherein the semantic tag preprocessing on the semantic document with embedded semantic tags to obtain the preprocessed streaming document includes: adjusting the format structure of the semantic document with embedded semantic tags to obtain the adjusted semantic document; performing semantic range annotating on various semantic tags included in the adjusted semantic document to obtain the annotated streaming document; for each semantic range annotation in the annotated streaming document, generating a semantic annotation according to the semantic content corresponding to the semantic range annotation, wherein the semantic content includes: semantic information of vocabulary namespace identifier, category, attribute name, attribute value, specific location or regional location, The semantic information includes: the name of the document author, the date and time of writing the document, keywords, and word frequency information; the preprocessed streaming document is generated according to the semantic range annotations in the annotated streaming document and the obtained semantic annotations, wherein the format structure of the semantic document with embedded semantic tags is adjusted to obtain the adjusted semantic document, including: in response to determining that there are multiple first target semantic tags in the semantic document with embedded semantic tags, and the multiple first target semantic tags are located under the same target label, according to a predetermined segmentation method, semantic tag segmentation processing is performed on the multiple first target semantic tags, wherein the semantic content type corresponding to the multiple first target semantic tags is a named entity; in response to determining that there is a second target semantic tag in the semantic document with embedded semantic tags, and the second target semantic tag is located outside the visible range of the document, the semantic content of the second target semantic tag is moved to the visible range of the document, wherein the type of the semantic content corresponding to the second target semantic tag is a metadata type describing the document; a text editing unit configured to, in response to receiving a document editing instruction for the preprocessed streaming document, perform text editing on the preprocessed streaming document to obtain an edited streaming document; A semantic annotation post-processing unit is configured to, in response to receiving a semantic annotation conversion instruction for the edited streaming document, perform semantic annotation post-processing on the edited streaming document to obtain a processed semantic document, wherein the processed semantic document contains various embedded semantic tags, and each semantic tag in the processed semantic document is generated based on the conversion of each semantic annotation in the edited streaming document, wherein the semantic annotation post-processing on the edited streaming document to obtain the processed semantic document includes: according to a semantic user identifier, taking a semantic annotation range corresponding to a corresponding semantic annotation as a range of a semantic tag; according to the semantic user identifier, extracting content information of the corresponding semantic annotation to obtain content information of the semantic tag; according to the content information of the semantic annotation, restoring multiple paragraphs of text or semantic tags in a numbered order for a semantic annotation with multiple paragraph identifiers; in response to the content type of the content information of the semantic annotation being a metadata type describing a document, restoring the semantic tag together with the content information to the original position; adding or restoring a namespace description to treat the document as a processed semantic document; The storage unit is configured to store the processed semantic document.