Query processing method and device, equipment and readable medium

By combining the structural information and semantic analysis of the target document, it is divided into hierarchical structure document fragments and generated vectorized representations, and the problem of semantic incomplete document fragments is solved, which improves the accuracy and comprehensiveness of query responses.

CN120429418APending Publication Date: 2025-08-05BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202410137529.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-31
Publication Date
2025-08-05

AI Technical Summary

Technical Problem

The prior art cannot effectively combine the semantic analysis results of the target document when document segmentation, resulting in incomplete semantics of document fragments, affecting the accuracy and comprehensiveness of query responses.

Method used

Based on the structural information and semantic analysis results of the target document, the document is divided into multiple document fragments with hierarchical structures, and each document vectorized representation is generated for data query.

Benefits of technology

Through the document fragment segmentation method of flexible segmentation boundaries, the accuracy and comprehensiveness of data query results are improved, and query responses that are more in line with user intentions are provided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120429418A_ABST
    Figure CN120429418A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a query processing method and device, equipment and a readable medium. The method comprises the steps that a target document is segmented into a plurality of document segments at least based on structure information of the target document and a semantic analysis result of the target document, and the structure information at least indicates a hierarchical structure of the target document; and generating respective document vectorization representations of the plurality of document segments for executing a data query for the target document. According to the embodiment of the invention, each document fragment can be ensured to have complete semantics. Therefore, the accuracy and comprehensiveness of the data query result can be improved, and the query response more conforming to the intention of the user can be provided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Example embodiments of the present disclosure generally relate to the field of computers, and more particularly, to query processing methods, apparatuses, devices, and computer-readable storage media. Background Art

[0002] With the development of information technology, various terminal devices can provide people with a variety of services in work and life. Applications that provide these services can be deployed on these devices. These applications present content and interact with users through their user interfaces, meeting their needs. In some cases, users may initiate data query requests within the application. In these cases, it is necessary to integrate with the corresponding database to return the desired query response. Therefore, improving the quality of query services provided to users is a key concern. Summary of the Invention

[0003] In a first aspect of the present disclosure, a query processing method is provided. The method comprises: segmenting a target document into multiple document segments based on at least structural information of the target document and a semantic analysis result of the target document, wherein the structural information indicates at least a hierarchical structure of the target document; and generating a document vectorized representation of each of the multiple document segments for use in executing a data query on the target document.

[0004] In a second aspect of the present disclosure, a device for query processing is provided. The device includes: a document segmentation module configured to segment a target document into multiple document segments based on at least structural information of the target document and a semantic analysis result of the target document, where the structural information at least indicates a hierarchical structure of the target document; and a representation generation module configured to generate a document vectorized representation of each of the multiple document segments for use in executing a data query for the target document.

[0005] In a third aspect of the present disclosure, an electronic device is provided. The electronic device includes at least one processing unit; and at least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions, when executed by the at least one processing unit, causing the electronic device to perform the method of the first aspect of the present disclosure.

[0006] In a fourth aspect of the present disclosure, a computer-readable storage medium is provided, wherein a computer program is stored on the computer-readable storage medium and can be executed by a processor to perform the method according to the first aspect of the present disclosure.

[0007] It should be understood that the contents described in the Summary of the Invention are not intended to limit the key features or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] The above and other features, advantages and aspects of the various embodiments of the present disclosure will become more apparent hereinafter with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:

[0009] Figure 1 A schematic diagram illustrating an example environment in which embodiments of the present disclosure can be implemented;

[0010] Figure 2 A flowchart illustrating a process for query processing according to some embodiments of the present disclosure is shown;

[0011] Figure 3 A schematic diagram showing an example of a document tree structure according to some embodiments of the present disclosure;

[0012] Figure 4 A schematic diagram illustrating a process for query processing according to some embodiments of the present disclosure is shown;

[0013] Figure 5 A block diagram illustrating an apparatus for query processing according to some embodiments of the present disclosure; and

[0014] Figure 6 A block diagram of an electronic device is shown in which one or more embodiments of the present disclosure may be implemented. DETAILED DESCRIPTION

[0015] The following describes embodiments of the present disclosure in more detail 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 limited to the embodiments described herein. Rather, 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 for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.

[0016] In the description of the embodiments of the present disclosure, the term "including" and similar terms should be understood as open inclusion, i.e., "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". Other explicit and implicit definitions may be included below.

[0017] Herein, unless explicitly stated otherwise, executing a step “in response to A” does not mean executing the step immediately after “A” but may include one or more intermediate steps.

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

[0019] It is understandable that before using the technical solutions disclosed in the various embodiments of the present disclosure, the type, scope of use, usage scenarios, etc. of the information involved in the present disclosure should be informed to relevant users and authorization should be obtained from relevant users in an appropriate manner in accordance with relevant laws and regulations. The relevant users may include any type of right holders, such as individuals, enterprises, and groups.

[0020] For example, in response to receiving an active request from a user, a prompt message is sent to the relevant user to clearly prompt the relevant user that the operation requested to be performed will require obtaining and using the information of the relevant user, so that the relevant user can independently choose whether to provide information to the software or hardware such as the electronic device, application, server or storage medium that executes the operation of the technical solution of the present disclosure based on the prompt message.

[0021] As an optional but non-limiting implementation, in response to receiving an active request from a relevant user, a prompt message may be sent to the relevant user in the form of a pop-up window, in which the prompt message may be presented in text form. Furthermore, the pop-up window may also include a selection control for the user to select "agree" or "disagree" to provide information to the electronic device.

[0022] It is understood that the above notification and user authorization process is merely illustrative and does not limit the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure. The activation of the relevant functions of the embodiments of the present disclosure, the data obtained, the processing and storage of the data, etc., shall all obtain the prior authorization of the user and other rights holders associated with the user, and shall comply with the provisions of relevant laws and regulations and the rules of agreement between rights holders.

[0023] As used herein, the term "model" can learn the association between corresponding inputs and outputs from training data, so that after training is completed, corresponding outputs can be generated for given inputs. The generation of the model can be based on machine learning technology. Deep learning is a machine learning algorithm that processes inputs and provides corresponding outputs by using multiple layers of processing units. A neural network model is an example of a model based on deep learning. In this article, "model" may also be referred to as "machine learning model", "learning model", "machine learning network" or "learning network", and these terms are used interchangeably in this article.

[0024] Figure 1A schematic diagram of an example environment 100 in which embodiments of the present disclosure can be implemented is shown. In environment 100, an electronic device 110 can obtain a target document 102 and a user query 104. The target document 102 may include one or more documents in any appropriate format (including but not limited to doc, pdf, txt, etc.). The target document 102 may also include data information of any appropriate type (including but not limited to text, pictures, tables, etc.). Although a single document is shown, there may actually be multiple documents, and the user query may need to find matching data in multiple documents. The user query 104 may, for example, indicate a query for data associated with the target document 102.

[0025] The electronic device 110 may generate a query response 112 for the user query 104 based on the target document 102 and the user query 104. The query response 112 may include, for example, at least a portion of the content in the target document 102, which at least a portion of the content matches the user query 104.

[0026] In some embodiments, the electronic device 110 can use the target model 120 to generate a corresponding query response 112 based on the target document 102 and the user query 104. The target model 120 may include one or more models. The target model 120 may run locally on the electronic device 110, or on other electronic devices (e.g., a remote server). In some embodiments, the target model 120 may be a machine learning model, a deep learning model, a learning model, a neural network, etc. In some embodiments, the model may be based on a language model (LM). The language model can have question-answering capabilities by learning from a large amount of corpus. The target model 120 may also be based on other appropriate models.

[0027] The electronic device 110 can be any type of device with computing capabilities, including a terminal device or a server device. The terminal device can be any type of mobile terminal, fixed terminal or portable terminal, including a mobile phone, a desktop computer, a laptop computer, a notebook computer, a netbook computer, a tablet computer, a media computer, a multimedia tablet, a personal communication system (PCS) device, a personal navigation device, a personal digital assistant (PDA), an audio / video player, a digital camera / camcorder, a positioning device, a television receiver, a radio broadcast receiver, an e-book device, a gaming device or any combination of the foregoing, including accessories and peripherals of these devices or any combination thereof. The server device can, for example, include a computing system / server, such as a mainframe, an edge computing node, a computing device in a cloud environment, and the like. In some embodiments, the management platform 110 can be implemented based on a cloud service.

[0028] It should be understood that the structure and functionality of environment 100 are described for exemplary purposes only and do not imply any limitation on the scope of the present disclosure.

[0029] As mentioned above, improving the quality of query services provided to users is a key concern. To improve data retrieval efficiency, a document index is typically pre-selected and constructed. Currently, document index representations based on vectorized representations have been proposed. This involves segmenting documents into multiple document fragments and constructing and storing a vectorized representation for each document fragment. During a query, the vectorized identifier corresponding to the user query is compared with the vectorized representation of the document fragment to retrieve document fragments relevant to the user's query and use them to construct a query response.

[0030] Traditionally, documents are usually directly segmented into multiple document segments of the same size according to a fixed size, or multiple document segments are determined directly based on the paragraph division of the target document. However, the fixed-size division method will result in incomplete semantic information in a single document segment. On the other hand, if the document segments are directly divided according to the paragraph granularity, the sizes of different document segments will be very irregular, affecting the vector representation effect. Since there may be multiple paragraphs that echo each other in a document, and there may be multiple paragraphs with similar semantics, traditional segmentation methods cannot be combined with the semantic analysis results of the target document, which may result in incomplete semantics and missing information in the cut document segments. This may affect the accuracy of the subsequent query response, and thus affect the quality of the query service provided to the user.

[0031] In light of this, embodiments of the present disclosure provide an improved method for query processing. The method includes: segmenting a target document into multiple document segments based at least on structural information of the target document and a semantic analysis result of the target document, where the structural information indicates at least a hierarchical structure of the target document. Vectorized document representations are generated for each of the multiple document segments for use in executing data queries against the target document.

[0032] In this way, by considering the target document's structural information and combining it with semantic analysis, we can determine flexible segmentation boundaries for the document, ensuring that the segmented document segments are semantically continuous and complete. This helps improve the accuracy and comprehensiveness of data query results, providing query responses that better align with user intent.

[0033] Some example embodiments of the present disclosure will be described below with continued reference to the accompanying drawings.

[0034] Figure 2 FIG2 shows a flowchart of a process 200 for query processing according to some embodiments of the present disclosure. The process 200 may be implemented at the electronic device 110. For ease of discussion, reference will be made to FIG2 . Figure 1 The process 200 is described with reference to the environment 100 of FIG.

[0035] At block 210, the electronic device 110 divides the target document 102 into a plurality of document segments based at least on the structural information of the target document 102 and the semantic analysis result of the target document 102. The structural information herein indicates at least the hierarchical structure of the target document 102. The hierarchical structure of the target document 102 may, for example, indicate the title, subtitles, and content under different titles / subtitles of the target document 102.

[0036] In some embodiments, the electronic device 110 may perform semantic analysis on the target document 102 based on predetermined rules or algorithms to obtain a semantic analysis result. Alternatively or additionally, in some embodiments, the electronic device 110 may also use a semantic analysis model to determine the semantic analysis of the target document 102. Exemplarily, the electronic device 110 may provide the target document 102 as at least a part of the model input to the semantic analysis model, and obtain a model output indicating the semantic analysis of the target document 102 from the semantic analysis model. The semantic analysis model may include, but is not limited to, a perceptron, a multi-layer perceptron (MLP), a convolutional neural network (CNN), a feedforward neural network (FNN), a fully connected neural network (FCN), a transformer, a recurrent neural network (RNN), etc., and the present disclosure does not limit the specific model. The semantic analysis result may indicate the semantic information in the target document 102 and may be used to guide the segmentation of the target document 102.

[0037] In an embodiment of the present disclosure, the electronic device 110 can determine the segmentation boundaries between each document segment when segmenting the target document 102 based on the structural information of the target document 102 and the semantic analysis results of the target document 102, and each document segment can be defined by adjacent segmentation boundaries. In some embodiments, by utilizing the semantic analysis results of the target document 102, each document segment obtained by segmentation can be made semantically complete. That is, the multiple document segments determined by the electronic device 110 based on multiple segmentation boundaries all have complete semantics, and there will be no abrupt semantic faults, semantic discontinuities, semantic jumps, etc. in the document segments. In this way, based on the document segments with semantic integrity, subsequent data queries for the target document 102 can be better performed.

[0038] In some embodiments, when segmenting the target document 102, the multiple document segments may be segmented so as to have no overlapping parts. This can reduce the processing resource overhead of subsequently converting the document segments into document vectorized representations and the storage overhead of the document vectorized representations.

[0039] In some embodiments, the structural information also indicates the data types in the target document 102. The target document 102 may include data of multiple data types. Different data types can be divided based on different data modalities. Different data types or different data modalities can include text, tables, charts, images, videos, knowledge graphs, and the like. In some embodiments, the electronic device 110 can, in response to detecting that at least a portion of the data in the target document 102 contains data of a first data type and data of a second data type, segment the at least portion of the data into two document segments, namely, a first document segment and a second document segment. The first document segment includes data of the first data type, and the second document segment includes data of the second data type. In other words, during document segmentation, a single document segment is ensured to include continuous data of a single data type. Of course, if two or more data types are found in a data portion of any granularity in the target document 102, the data portion can also be segmented into two or more document segments. Thus, in a document containing multiple data types, the segmentation boundary of the document segments is determined between the different data types, and the electronic device 110 can determine the document segments containing the different data types based on such segmentation boundaries.

[0040] In some embodiments, the electronic device 110 may subsequently generate multiple document vectorized representations (embeddings) corresponding to the multiple document segments, each document vectorized representation may have a predetermined dimension. Therefore, in some embodiments, the electronic device 110 may further segment the target document 102 into multiple document segments based on the dimension of the document vectorized representation to be generated. Because document vectorized representations have a larger dimension, they can more accurately represent larger data. Therefore, for the same target document 102, the larger the dimension of the document vectorized representation to be generated, the fewer segmentation boundaries the electronic device 110 may determine, resulting in larger document segments. For example, if the dimension of the document vectorized representation to be generated is 512, the electronic device 110 may determine more segmentation boundaries in the target document 102 to determine multiple (e.g., a first number) of smaller document segments. If the dimension of the document vectorized representation to be generated is 1024 or 2048, the electronic device 110 may determine fewer segmentation boundaries in the target document 102 to determine multiple (e.g., a second number) of larger document segments. It will be appreciated that for the same target document 102, the first number should be greater than the second number.

[0041] In some embodiments, the hierarchical structure of the target document 102 includes a document tree structure of the target document 102. Of course, the hierarchical structure may also include any other appropriate structure (such as a knowledge graph), which is not limited in this disclosure. The following description will only take the document tree structure as an example. Figure 3Schematic diagram showing an example 300 of a document tree structure according to some embodiments of the present disclosure. Figure 3 As shown, the hierarchical structure of the target document 102 may include a document tree structure 310. In some embodiments, the electronic device 110 may segment the target document 102 into multiple document fragments based on at least the semantic analysis results of the data corresponding to each leaf node in the document tree structure 310 (e.g., the node "paragraph 1", the node "paragraph 2", the node "paragraph 3", the node "picture", the node "table", and the node "paragraph 4" shown in the figure). Each leaf node of the document tree structure 310 may indicate the paragraphs under each heading in the target document 102, as well as data of different data types.

[0042] For example, the electronic device 110 can segment the data corresponding to each leaf node in the document tree structure 310 into at least one document segment based on at least the semantic analysis result of the data corresponding to each leaf node. For example, the electronic device 110 can segment the data corresponding to each leaf node in the document tree structure 310 to determine the segmented document tree structure 320 of the target document 102. Figure 3 As shown, in the segmented document tree structure 320, the data corresponding to the node "paragraph 1" can be segmented into "paragraph 1.1, paragraph 1.2, and paragraph 1.3", the data corresponding to the node "paragraph 2" can be segmented into "paragraph 2.1 and paragraph 2.2", and the data corresponding to the node "paragraph 4" can be segmented into "paragraph 4.1 and paragraph 4.2". As a result, the electronic device 110 can perform data segmentation for the target document 102 at the leaf nodes of the target document 102, at least in combination with semantic analysis (for example, it can also be combined with the data type and the dimension of the document vectorization representation).

[0043] Notice, Figure 3 This is just one example of document segmentation. In addition to segmenting document segments at the paragraph level in combination with semantic analysis, in other embodiments, document segments may be segmented at other granularities, such as chapter level or entire document level in combination with semantic analysis.

[0044] The electronic device 110 can determine multiple segmentation boundaries for the target document 102 by combining the data type of the target document 102, the semantic analysis of the target document 102, and the structural information of the target document 102 in the above manner. Such multiple segmentation boundaries can also be referred to as flexible segmentation boundaries. The electronic device 110 can then obtain multiple document segments of the target document 102 with complete semantics based on these multiple segmentation boundaries, and each document segment can only include data of a unique data type.

[0045] In box 220, the electronic device 110 generates a document vectorization representation of each of the multiple document fragments for use in executing a data query for the target document 102. The electronic device 110 can, for example, use a coding model to perform vectorization coding on each of the multiple document fragments to obtain a document vectorization representation of each of the multiple document fragments. It should be noted that since the multiple document fragments can include data of multiple data types, for different document fragments including different data types, the electronic device 110 can use different coding models to perform vectorization coding on different document fragments. For example, the electronic device 110 can use a first coding model to perform vectorization coding on a document fragment containing a text data type, use a second coding model to perform vectorization coding on a document fragment containing an image data type, use a third coding model to perform vectorization coding on a document fragment containing a table data type, and so on.

[0046] In some embodiments, the electronic device 110 may further generate enhanced data for at least a portion of the target document 102. The enhanced data may, for example, include a reference question-answer pair (QA pair) constructed based on the at least a portion and / or summary information extracted from the at least a portion, where the at least a portion includes at least one document fragment from a plurality of document fragments. The electronic device 110 may, for example, determine at least one document fragment based on the structural information of the target document 102. Exemplarily, if a paragraph of the target document 102 is segmented to obtain at least one document fragment, the electronic device 110 may generate enhanced data based on at least one paragraph of the target document 102 in units of paragraphs. Alternatively or additionally, the electronic device 110 may also generate enhanced data based on units larger than paragraphs (e.g., chapters, entire documents).

[0047] Exemplarily, the electronic device 110 may construct a reference question-answer pair based on at least one document fragment among the multiple document fragments, and each reference question-answer pair may include a reference query for the at least one document fragment and a reference query response 112 for the reference query. The electronic device 110 may also perform content extraction on the at least one document fragment to obtain summary information corresponding to the at least one document fragment. The reference question-answer pair and / or summary information here may be determined by the electronic device 110 based on predetermined rules, or may be determined by the electronic device 110 with the help of a model, and the present disclosure does not limit this. In some embodiments, the enhanced data may also include other data, for example, other document fragments that have the same semantics as this at least one part but different content. For example, the electronic device 110 may perform operations such as expansion, replacement, abbreviation, etc. on the content of this at least one part while ensuring that the semantics of this at least one part do not change to obtain other document fragments.

[0048] The electronic device 110 may generate an enhanced vectorized representation of the enhanced data. Similarly, the electronic device 110 may, for example, perform vectorized encoding on the enhanced data using a coding model to obtain the enhanced vectorized representation of the enhanced data. The enhanced data may also include data of different data types. For different enhanced data including different data types, the electronic device 110 may perform vectorized encoding on the different enhanced data using different coding models. The electronic device 110 may then store the enhanced vectorized representation in association with the respective document vectorized representation of at least one document segment.

[0049] For example, if the target document 102 is divided into a total of 5 document segments (document segment A, document segment B, document segment C, document segment D and document segment E), and the electronic device 110 also generates enhanced data A and enhanced data B corresponding to the document segment A and document segment B respectively, the electronic device 110 can obtain 5 document segments and 2 enhanced data. The electronic device 110 can then obtain 5 document vectorized representations and 2 enhanced vectorized representations. The electronic device 110 can store the document vectorized representation A and the enhanced vectorized representation A corresponding to the document segment A and the enhanced data A in association with each other, and store the document vectorized representation B and the enhanced vectorized representation B corresponding to the document segment B and the enhanced data B in association with each other. The electronic device 110 can, for example, store these 5 document vectorized representations and 2 enhanced vectorized representations in the form of (document vectorized representation A and enhanced vectorized representation A), (document vectorized representation B and enhanced vectorized representation B), document vectorized representation C, document vectorized representation D and document vectorized representation E.

[0050] The electronic device 110 can perform a data query for the target document 102 based on the document vectorized representation and enhanced vectorized representation of each of the stored multiple document fragments. The electronic device 110 can receive a user query 104 for the target document 102. In some embodiments, the electronic device 110 can provide a query page for receiving the user query 104. The query page may include, for example, a query portal. In response to receiving user input via a query portal (e.g., an input box), the electronic device 110 may determine the user input as a user query 104. It will be understood that the user query 104 can be a query in any appropriate form and language. For example, the user query 104 can be a query in text form, a query in voice form, and the like.

[0051] In response to receiving the user query 104, the electronic device 110 generates a query vectorized representation corresponding to the user query 104. For example, the electronic device 110 can use an encoding model to perform vectorized encoding on the user query 104 to obtain a query vectorized representation corresponding to the user query 104. The electronic device 110 can determine multiple matching degrees between the query vectorized representation and the document vectorized representations of multiple document fragments, and based on the determined multiple matching degrees, select at least one first document fragment that matches the user query 104 from the multiple document fragments. The process of selecting at least one first document fragment from the multiple document fragments can also be referred to as document fragment recall. The at least one first document fragment here can be, for example, at least one of a predetermined number of first document fragments with the highest matching degree. The electronic device 110 can generate a query response 112 for the user query 104 based on at least the at least one first document fragment. It will be understood that although the document segmentation and storage and recall of the vectorized representation are described with reference to a single document in the accompanying drawings, in actual applications, vectorized representations of more documents can be constructed and stored. For the user query 104, one or more document fragments from different documents may be recalled. Here, for illustrative purposes only, reference is made to the target document 102 .

[0052] When dividing document fragments for storage, the stored data may be fragmented. When the data required for the user query exists in multiple associated document fragments, there may be a situation where the recalled data is missing, resulting in incomplete and incomplete response content. Taking this situation into consideration, in some embodiments, in addition to recalling a portion of document fragments based on the matching of the query vector representation of the user query, the electronic device 110 can also complete more semantically related document fragments through multiple rounds of recall. In some embodiments, the electronic device 110 can also determine at least one second document fragment that is semantically related to at least one first document fragment from multiple document fragments based on the structural information of the target document 102 and the semantic context of at least one first document fragment in the target document 102. The semantic context can refer to the semantic relevance of each first document fragment in a paragraph (or a larger-granularity document portion), or the semantic relevance of each document fragment between paragraphs (or within the entire document).

[0053] For example, the electronic device 110 can determine at least one second document fragment for each first document fragment to determine at least one second document fragment that has semantic relevance to the at least one first document fragment. That is, after recalling at least one first document fragment, the electronic device 110 can also recall at least one second document fragment that has semantic relevance to the at least one first document fragment through a multi-round recall strategy (for example, a strategy for determining whether to additionally recall at least one second document fragment for each first document fragment). There can be many specific recall strategies for multi-round recall, and the electronic device 110 can recall different second document fragments based on different recall strategies. The electronic device 110 can then generate a query response 112 for the user query 104 based on the at least one first document fragment and the at least one second document fragment.

[0054] Regarding the specific method of determining at least one second document fragment, in some embodiments, for each first document fragment in at least one first document fragment, the electronic device 110 may determine the at least one other document fragment as at least one second document fragment in response to determining that the document portion of the predetermined granularity in which the first document fragment is located includes at least one other document fragment. The predetermined granularity here may be, for example, a paragraph, a chapter, a document, and the like. The electronic device 110 may, for example, determine the document portion of the predetermined granularity in which the first document fragment is located based on the structural information of the target document 102. Exemplarily, if the first document fragment is in the first paragraph and the first paragraph includes a total of three document fragments, the electronic device 110 may determine the remaining two document fragments of the first document fragment in the first paragraph as at least one second document fragment. Thus, the electronic device 110 may recall all document fragments within the same paragraph (or a document portion of a larger granularity).

[0055] In some embodiments, for each first document fragment in at least one first document fragment, the electronic device 110 may also determine at least one additional document fragment in the multiple document fragments as at least one second document fragment based on the semantic relevance between the first document fragment and the additional document fragment in the multiple document fragments. Exemplarily, for each first document fragment, the electronic device 110 may determine the semantic relevance between the additional document fragment in the multiple document fragments and the first document fragment. The electronic device 110 may, for example, determine the semantic relevance based on predetermined rules and / or using a model. The electronic device 110 may then determine at least one additional document fragment having a semantic relevance higher than a threshold as at least one second document fragment. For example, if the target document 102 includes five document fragments (document fragment A, document fragment B, document fragment C, document fragment D, and document fragment E), and the electronic device 110 determines document fragment A as the first document fragment, the electronic device 110 can respectively determine the semantic relevance between the four document fragments, namely, document fragment B, document fragment C, document fragment D, and document fragment E, and document fragment A, and determine at least one document fragment (e.g., document fragment B and document fragment C) having a semantic relevance higher than a threshold as at least one second document fragment. Thus, the electronic device 110 can consider the global semantic information and recall at least one second document fragment having a higher semantic relevance to the at least one first document fragment.

[0056] As mentioned above, considering the computational efficiency and storage overhead of vectorized representation, the multiple document segments obtained by segmenting target document 102 can be non-overlapping. During data queries, by applying a multi-round recall strategy, even if there is no overlap between the document segments, sufficient relevant document segments can be recalled to construct a query response without missing or insufficient information.

[0057] In some embodiments, multiple rounds of recall may include two rounds of recall. In some embodiments, multiple rounds of recall may include more than two rounds of recall. That is, after the second round of recall of at least one second document fragment having a higher semantic relevance to at least one first document fragment, a third round of recall may be continued based on the second document fragment to obtain more document fragments having a higher semantic relevance to at least one second document fragment. In some embodiments, the number of multiple rounds of recall may be a pre-set number of rounds. In some embodiments, whether to stop the recall may also be determined based on other pre-set judgment conditions.

[0058] In addition, as mentioned above, the electronic device 110 can generate enhancement data for at least one document fragment of the target document 102, and store the enhanced vectorized representation of the enhancement data in association with the document vectorized representation of each of the at least one document fragment. In some embodiments, the electronic device 110 can also determine a query response 112 for the user query 104 based on the one or more document fragments and the enhancement data in response to determining that one or more document fragments in the at least one document fragment are determined to match the user query 104. That is, the electronic device 110 can determine the query response 112 based on the at least one first document fragment, the at least one second document, and the corresponding enhancement data in response to the at least one first document fragment and / or the at least one second document fragment including a document fragment with corresponding enhancement data.

[0059] Since user query 104 is typically in textual modality, query response 112 determined by electronic device 110 for user query 104 is also typically in textual modality. In certain scenarios (e.g., where target document 102 includes multimodal data), the accuracy of query response 112 may not be guaranteed. Based on the various multi-round recall strategies described above, electronic device 110 can recall data in other modalities from target document 102, such as tables, images, or videos. This type of data may also be required by the user and, after recall, can be used to generate a more accurate query response 112.

[0060] Regarding the specific manner of generating the query response 112, in some embodiments, the electronic device 110 may generate a query response for the target model (e.g., Figure 1 The electronic device 110 may also generate a prompt word input for the target model based on the at least one first document fragment, the at least one second document fragment, and the user query 104. The electronic device 110 may provide the prompt word input to the target model and obtain a model output from the target model indicating a query response 112 for the target query. The electronic device 110 may then generate a query response 112 for the user query 104 based on the model output.

[0061] In some embodiments, in addition to the user query 104 input by the user, the electronic device 110 can also generate more relevant queries (also referred to as at least one additional query) by rewriting the user query 104 during the data query process. The at least one additional query generated can be, for example, a query obtained by performing any appropriate operation such as a summarization operation, an expansion operation, a keyword replacement operation, etc. on the user query 104. By expanding the new query from the original user query 104, the determined query response 112 can be made as consistent with the user's intention to ask the question as much as possible. In some embodiments, the electronic device 110 can generate at least one first additional query for the user query 104 based on context information related to the user query 104 in the target application. The first additional query can be understood as a rewrite of the user query 104. The context information used can include, for example, the historical query record of the user who initiated the user query 104 in the target application, the time information when the user query 104 was initiated, and the like.

[0062] The electronic device 110 can extract target information related to the user query 104 from the context information, and use the target information to perform at least one of replacing or supplementing at least part of the information in the user query 104, thereby obtaining at least one first additional query. The extracted target information may include, for example, keywords, time information, etc. The target information here can be, for example, extracted from the context information by the electronic device 110 based on pre-acquired rules or any appropriate algorithm. Alternatively or additionally, in some embodiments, the target information here can also be extracted from the context information by the electronic device 110 using any appropriate model.

[0063] In some embodiments, alternatively or additionally, the electronic device 110 may also generate at least one second additional query based on the user query 104 that is semantically relevant to the user query 104. The second additional query may be an expansion of the user query 104, generating more expressions of related semantics based on the semantics of the user query 104. In some embodiments, the electronic device 110 may generate the second additional query directly from the original user query 104. In some embodiments, the electronic device 110 may first generate one or more first additional queries from the original user query 104 based on contextual information, and then generate at least one second additional query based on one or each first additional query that is semantically relevant to the first additional query. The at least one second additional query may, for example, include a query obtained by the electronic device 110 summarizing one or more keywords in the user query 104 and / or the first additional query, a query obtained by refining one or more keywords in the user query 104 and / or the first additional query, a query obtained by performing language conversion on the user query 104 and / or the first additional query, and the like.

[0064] For example, the electronic device 110 may separately determine at least one document fragment (including at least one first document fragment and at least one second document fragment obtained through multiple rounds of recall) and enhanced data (if enhanced data is included) that matches the user query 104, and at least one additional document fragment (including at least one first additional query and at least one second additional query) and enhanced data (if enhanced data is included) for at least one additional query. In some embodiments, the electronic device 110 may directly generate a query response 112 for the user query 104 based on the at least one document fragment, the at least one additional document fragment, and the enhanced data.

[0065] Alternatively or additionally, in some embodiments, to reduce computational complexity and improve computational efficiency, the electronic device 110 may further determine a group of document fragments (including one or more document fragments) from the at least one document fragment and the at least one additional document fragment, and generate a query response 112 for the user query 104 based solely on this group of document fragments. Specifically, the electronic device 110 may determine the degree of match between the at least one document fragment and the at least one additional document fragment and corresponding queries in the user query 104 and the additional queries. The electronic device 110 may then rank the at least one document fragment and the at least one additional document fragment based on the determined multiple degrees of match. Based on the ranking results, the electronic device 110 may select a group of document fragments (e.g., the group of document fragments with the highest degree of match) from the at least one document fragment and the at least one additional document fragment, and generate a query response 112 for the user query 104 based on the selected group of document fragments. In some embodiments, the electronic device 110 may further present the query response 112 to the user. For example, the electronic device 110 may present the query response 112 in any suitable form (e.g., a card, a window, etc.) on the query page.

[0066] Figure 4 FIG. 4 is a schematic diagram showing a process 400 for query processing according to some embodiments of the present disclosure. Figure 4As shown, after the electronic device 110 obtains the target document 102, it can first store (405) the target document 102. The electronic device 110 can perform a segmentation (410) operation on the stored target document 102 (that is, segment the target document 102) to obtain multiple document fragments. The electronic device 110 can also perform information enhancement (415) based on at least one document fragment among the multiple document fragments to generate enhanced data for at least a portion of the target document 102. The electronic device 110 can perform a vectorization (420) operation on the multiple document fragments and the enhanced data to generate multiple document vectorized representations and enhanced vectorized representations. The electronic device 110 can then perform data storage (425) on the multiple document vectorized representations and the enhanced vectorized representations. It should be noted that the enhanced vectorized representation is stored in association with the respective document vectorized representations of the corresponding at least one document fragment.

[0067] The electronic device 110 may also receive a user query 104. In response to receiving the user query 104, the electronic device 110 may perform pre-processing (430) operations such as normalization, content completion, reference disambiguation, and content rewriting on the user query 104. The electronic device 110 may then perform a vectorization (435) operation on the pre-processed user query 104 to generate a query vectorized representation corresponding to the user query 104. The electronic device 110 may perform a recall (440) operation based at least on the query vectorized representation and a plurality of previously stored document vectorized representations.

[0068] Specifically, the electronic device 110 can determine multiple matching degrees between the query vectorization representation and the multiple document vectorization representations, and select at least one first document fragment that matches the user query 104 from the multiple document fragments based on the determined multiple matching degrees. The electronic device 110 can also determine at least one second document fragment that is semantically related to the at least one first document fragment from the multiple document fragments based on the structural information of the target document 102 and the semantic context of the at least one first document fragment in the target document 102. If there is a document fragment that includes corresponding enhanced data in at least one first fragment and / or at least one second document fragment, the electronic device can also determine the enhanced data corresponding to the document fragment. That is, the electronic device 110 can obtain a recall result including at least one first document fragment, at least one second document fragment, and enhanced data that matches the user query 104 by performing a recall operation.

[0069] The electronic device 110 can, for example, sort the multiple document fragments included in the recall results based on the degree of match between each recall result and the user query 104 (445). The electronic device 110 can, for example, determine one or more document fragments (e.g., topN document fragments) with the highest degree of match from the recall results. If there is a document fragment including corresponding enhanced data among the multiple document fragments, the electronic device 110 can also determine the corresponding enhanced data. The electronic device 110 can then generate a prompt word (450) input for the target model 120 based on the multiple document fragments (and enhanced data). The electronic device 110 can provide the prompt word input to the target model 120, obtain the output of the target model 120, and generate a query response 112 for the user query 104 based on the output.

[0070] In summary, in the embodiments of the present disclosure, multiple document fragments included in the target document 102 can be determined based at least on the structural information of the target document 102 and a semantic analysis of the target document 102. Data queries targeting the target document 102 can be executed based on the document vectorized representations of each of these multiple document fragments. This ensures that each document fragment possesses complete semantics. This helps improve the accuracy and comprehensiveness of data query results and provides query responses 112 that better align with user intent.

[0071] The embodiments of the present disclosure also provide corresponding devices for implementing the above methods or processes. Figure 5 1 shows a block diagram of an apparatus 500 for query processing according to some embodiments of the present disclosure. The apparatus 500 may be implemented as or included in the electronic device 110. Each module / component in the apparatus 500 may be implemented by hardware, software, firmware, or any combination thereof.

[0072] like Figure 5 As shown, apparatus 500 includes a document segmentation module 510 configured to segment a target document into multiple document segments based at least on structural information of the target document and a semantic analysis result of the target document, where the structural information at least indicates a hierarchical structure of the target document. Apparatus 500 also includes a representation generation module 520 configured to generate document vectorized representations for each of the multiple document segments for use in executing data queries against the target document.

[0073] In some embodiments, the document segmentation module 510 is further configured to segment the target document into multiple document segments based on the structural information of the target document and the semantic analysis result of the target document, so that each document segment has semantic integrity.

[0074] In some embodiments, the device 500 also includes: a query vector generation module, configured to generate a query vectorized representation corresponding to the user query in response to receiving a user query; a matching degree determination module, configured to determine multiple matching degrees between the query vectorized representation and the respective document vectorized representations of multiple document fragments; a fragment selection module, configured to select at least one first document fragment that matches the user query from the multiple document fragments based on the determined multiple matching degrees; and a query response generation module, configured to generate a query response to the user query based on at least the at least one first document fragment.

[0075] In some embodiments, the query response generation module is further configured to: determine at least one second document fragment that is semantically related to at least one first document fragment from multiple document fragments based on the structural information of the target document and the semantic context of at least one first document fragment in the target document; and generate a query response to the user query based on the at least one first document fragment and the at least one second document fragment.

[0076] In some embodiments, the query response generation module is further configured to: for each first document fragment in at least one first document fragment, in response to determining that the document part of the predetermined granularity in which the first document fragment is located includes at least one additional document fragment, determine the at least one additional document fragment as at least one second document fragment; for each first document fragment in at least one first document fragment, based on the semantic relevance between the first document fragment and the additional document fragment in the multiple document fragments, determine at least one additional document fragment in the multiple document fragments as at least one second document fragment.

[0077] In some embodiments, the query response generation module is further configured to: generate a prompt word input for the target model based at least on at least one first document fragment and a user query; provide the prompt word input to the target model to obtain an output of the target model; and generate a query response to the user query based on the output of the target model.

[0078] In some embodiments, the structural information also indicates the data type in the target document, and the document segmentation module 510 is further configured to: in response to detecting that at least part of the data of the target document contains data of the first data type and data of the second data type, segment at least part of the data into a first document fragment and a second document fragment, the first document fragment including data of the first data type, and the second document fragment including data of the second data type.

[0079] In some embodiments, the document segmentation module 510 is further configured to segment the target document into multiple document segments based on the dimension of the document vectorized representation to be generated.

[0080] In some embodiments, the hierarchical structure of the target document includes a document tree structure of the target document, and the document segmentation module 510 is further configured to: segment the target document into multiple document fragments based at least on the semantic analysis results of the data corresponding to each leaf node in the document tree structure.

[0081] In some embodiments, the device 500 also includes: an enhanced data generation module, configured to generate enhanced data for at least a portion of the target document, wherein the at least portion includes at least one document fragment from a plurality of document fragments, and the enhanced data includes at least one of the following: summary information extracted from the at least portion based on a reference question-answer pair constructed from the at least portion; an enhanced vector generation module, configured to generate an enhanced vectorized representation of the enhanced data; and an associated storage module, configured to store the enhanced vectorized representation in association with the document vectorized representation of each of the at least one document fragment.

[0082] In some embodiments, the device 500 also includes: a query response determination module, configured to determine a query response to the user query based on the one or more document fragments and enhanced data in response to one or more document fragments in at least one document fragment being determined to match the user query.

[0083] The units and / or modules included in the device 500 can be implemented in various ways, including software, hardware, firmware, or any combination thereof. In some embodiments, one or more units and / or modules can be implemented using software and / or firmware, such as machine executable instructions stored on a storage medium. In addition to or as an alternative to machine executable instructions, some or all of the units and / or modules in the device 500 can be implemented at least in part by one or more hardware logic components. By way of example and not limitation, exemplary types of hardware logic components that can be used include field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.

[0084] Figure 6 1 shows a block diagram of an electronic device 600 in which one or more embodiments of the present disclosure may be implemented. It should be understood that Figure 6 The illustrated electronic device 600 is merely exemplary and should not be construed as limiting the functionality and scope of the embodiments described herein. Figure 6 The electronic device 600 shown can be used to implement Figure 1 electronic device 110 or Figure 5 device 500.

[0085] like Figure 6As shown, electronic device 600 is in the form of a general-purpose computing device. Components of electronic device 600 may include, but are not limited to, one or more processors or processing units 610, memory 620, storage device 630, one or more communication units 640, one or more input devices 650, and one or more output devices 660. Processing unit 610 may be a real or virtual processor and is capable of performing various processes according to programs stored in memory 620. In a multi-processor system, multiple processing units execute computer-executable instructions in parallel to increase the parallel processing capabilities of electronic device 600.

[0086] The electronic device 600 typically includes a plurality of computer storage media. Such media can be any available media accessible to the electronic device 600, including but not limited to volatile and non-volatile media, removable and non-removable media. The memory 620 can be a volatile memory (e.g., registers, cache, random access memory (RAM)), a non-volatile memory (e.g., read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. The storage device 630 can be a removable or non-removable medium and can include a machine-readable medium, such as a flash drive, a disk, or any other medium that can be used to store information and / or data and can be accessed within the electronic device 600.

[0087] The electronic device 600 may further include additional removable / non-removable, volatile / non-volatile storage media. Figure 6 As shown in FIG, a magnetic disk drive for reading from or writing to a removable, non-volatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, non-volatile optical disk may be provided. In these cases, each drive may be connected to a bus (not shown) by one or more data media interfaces. Memory 620 may include a computer program product 625 having one or more program modules configured to perform various methods or actions of various embodiments of the present disclosure.

[0088] The communication unit 640 enables communication with other electronic devices via a communication medium. Additionally, the functions of the components of the electronic device 600 can be implemented in a single computing cluster or multiple computing machines that can communicate via a communication connection. Thus, the electronic device 600 can operate in a networked environment using a logical connection with one or more other servers, a network personal computer (PC), or another network node.

[0089] The input device 650 may be one or more input devices, such as a mouse, keyboard, or trackball. The output device 660 may be one or more output devices, such as a display, a speaker, or a printer. The electronic device 600 may also communicate with one or more external devices (not shown) through the communication unit 640 as needed, such as a storage device, a display device, or the like, with one or more devices that allow a user to interact with the electronic device 600, or with any device that allows the electronic device 600 to communicate with one or more other electronic devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input / output (I / O) interface (not shown).

[0090] According to an exemplary implementation of the present disclosure, a computer-readable storage medium is provided, on which computer-executable instructions are stored, wherein the computer-executable instructions are executed by a processor to implement the method described above. According to an exemplary implementation of the present disclosure, a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, and the computer-executable instructions are executed by a processor to implement the method described above.

[0091] Various aspects of the present disclosure are described herein with reference to flowcharts and / or block diagrams of methods, apparatuses, devices, and computer program products implemented according to the present disclosure. It should be understood that each block of the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer-readable program instructions.

[0092] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, such that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device is generated that implements the functions / actions specified in one or more blocks in the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, where these instructions cause the computer, programmable data processing device, and / or other device to operate in a specific manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing various aspects of the functions / actions specified in one or more blocks in the flowchart and / or block diagram.

[0093] Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0094] The flow charts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple implementations of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a part for a module, program segment or instruction, and a part for a module, program segment or instruction comprises one or more executable instructions for realizing the logical function of the specification. In some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be realized by a special hardware-based system that performs the function or action of the specification, or can be realized by a combination of special hardware and computer instructions.

[0095] While various implementations of the present disclosure have been described above, the foregoing description is intended to be illustrative, not exhaustive, and not limited to the disclosed implementations. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described implementations. The terminology used herein is selected to best explain the principles of the implementations, their practical applications, or improvements to existing technologies, or to enable others skilled in the art to understand the various implementations disclosed herein.

Claims

1. A query processing method, comprising: Segmenting the target document into a plurality of document segments based at least on structural information of the target document and a result of semantic analysis of the target document, wherein the structural information at least indicates a hierarchical structure of the target document; as well as Generate document vectorized representations for each of the plurality of document fragments for use in executing a data query for the target document.

2. The method according to claim 1, wherein segmenting the target document into a plurality of document segments comprises: Based on the structural information of the target document and the semantic analysis result of the target document, the target document is divided into a plurality of document segments, so that each document segment has semantic integrity.

3. The method according to claim 1, further comprising: In response to receiving a user query, generating a query vectorized representation corresponding to the user query; Determining a plurality of matching degrees between the query vectorized representation and the respective document vectorized representations of the plurality of document fragments; selecting at least one first document fragment matching the user query from the plurality of document fragments based on the determined plurality of matching degrees; as well as A query response to the user query is generated based at least on the at least one first document fragment.

4. The method of claim 3, wherein generating a query response to the user query based on the at least one document fragment comprises: Determining, from the plurality of document fragments, at least one second document fragment semantically related to the at least one first document fragment based on the structural information of the target document and the semantic context of the at least one first document fragment in the target document; as well as A query response to the user query is generated based on the at least one first document fragment and the at least one second document fragment.

5. The method according to claim 4, wherein determining the at least one second document fragment comprises at least one of the following: For each first document fragment of the at least one first document fragment, in response to determining that the document portion of the predetermined granularity in which the first document fragment is located includes at least one additional document fragment, determining the at least one additional document fragment as at least one second document fragment; For each first document fragment in the at least one first document fragment, at least one other document fragment in the multiple document fragments is determined as at least one second document fragment based on the semantic relevance between the first document fragment and other document fragments in the multiple document fragments.

6. The method of claim 3, wherein generating a query response to the user query based at least on the at least one first document fragment comprises: generating a prompt word input for a target model based at least on the at least one first document fragment and the user query; Providing the prompt word input to the target model to obtain the output of the target model; as well as The query response to the user query is generated based on the output of the target model.

7. The method of claim 1 , wherein the structural information further indicates a type of data in the target document, and wherein segmenting the target document into a plurality of document segments comprises: In response to detecting that at least a portion of the data of the target document contains data of a first data type and data of a second data type, the at least a portion of the data is segmented into a first document fragment and a second document fragment, the first document fragment including data of the first data type, and the second document fragment including data of the second data type.

8. The method according to claim 1, wherein segmenting the target document into a plurality of document segments comprises: The target document is further divided into a plurality of document segments based on the dimension of the document vectorized representation to be generated.

9. The method according to claim 1 , wherein the hierarchical structure of the target document comprises a document tree structure of the target document, and wherein segmenting the target document into a plurality of document segments comprises: In the data corresponding to each leaf node in the document tree structure, the target document is divided into a plurality of document segments based at least on a semantic analysis result of the data corresponding to each leaf node.

10. The method according to claim 1, further comprising: generating enhanced data for at least a portion of the target document, wherein the at least a portion includes at least one document fragment among the plurality of document fragments, the enhanced data including at least one of the following: summary information extracted from the at least a portion based on a reference question-answer pair constructed from the at least a portion; generating an enhanced vectorized representation of the enhanced data; as well as The enhanced vectorized representation is stored in association with a respective document vectorized representation of the at least one document segment.

11. The method according to claim 10, further comprising: In response to one or more document fragments of the at least one document fragment being determined to match the user query, a query response to the user query is determined based on the one or more document fragments and the enhanced data.

12. A device for query processing, comprising: a document segmentation module configured to segment the target document into a plurality of document segments based at least on structural information of the target document and a result of semantic analysis of the target document, wherein the structural information at least indicates a hierarchical structure of the target document; as well as The representation generation module is configured to generate a document vectorized representation of each of the multiple document fragments for executing a data query for the target document.

13. An electronic device comprising: at least one processing unit; as well as At least one memory, the at least one memory being coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions causing the electronic device to perform the method according to any one of claims 1 to 11 when executed by the at least one processing unit.

14. A computer-readable storage medium having a computer program stored thereon, wherein the computer program can be executed by a processor to implement the method according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Structured document generation method and device and storage medium

    CN109783787A

  • Document segmentation method and device and electronic equipment

    CN111832258A

  • Long text segmentation method and device, storage medium and electronic device

    CN113076720A

  • Digital reconstruction system and method forprinted text layout

    CN114005123A

  • Document-based question generation method and device and server

    CN115688792A