Document analysis method and device, equipment, storage medium and program product

By performing text similarity calculations and large language model analysis on documents recorded on different media, the problem of low efficiency in manual comparison and review was solved, and efficient and accurate document consistency analysis was achieved.

CN121920357APending Publication Date: 2026-04-24CHINA TELECOM CORP LTD TECHNOLOGY INNOVATION CENTER +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA TELECOM CORP LTD TECHNOLOGY INNOVATION CENTER
Filing Date
2026-01-06
Publication Date
2026-04-24

AI Technical Summary

Technical Problem

In existing technologies, the content recorded on different media requires manual comparison and review, which is inefficient and prone to misunderstanding.

Method used

By acquiring first and second documents from different sources, the question text sets are extracted, text similarity is calculated, common or unique question text groups are filtered out, and large language models are used for retrieval and analysis to generate consistency analysis results.

Benefits of technology

It enables intelligent document analysis, improving work efficiency and the accuracy of analysis results, and reducing the need for manual comparison.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121920357A_ABST
    Figure CN121920357A_ABST
Patent Text Reader

Abstract

The invention provides a document analysis method and device, equipment, a storage medium and a program product, and relates to the technical field of data processing. The method comprises the steps that a first document and a second document which are different in source and aim at the same event record are acquired, a first question text set is extracted from the first document, and a second question text set is extracted from the second document; based on the similarity between a first question text in the first question text set and a second question text in the question text set, screening out at least one question text group; for a third question text in the question text group, retrieving in the first document and / or the second document to obtain a retrieval result corresponding to the third question text; and taking the third question text and the retrieval result corresponding to the third question text as input of the large language model to obtain analysis results of the first document and the second document. According to the scheme, the two documents are analyzed by using the text similarity and the large language model, so that the working efficiency and the accuracy of an analysis result are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of data processing technology, and in particular to a document analysis method, apparatus, device, storage medium, and program product. Background Technology

[0002] To prevent information from being distorted during recording, transmission, and interpretation, different media are typically used to record the same event in the same scenario, in order to approximate the original event as closely as possible. For example, both voice and text can be used simultaneously to record the same event in the same scenario.

[0003] In the same scenario, for the same event, whether the content recorded by different media is consistent requires manual comparison and review, which leads to low work efficiency and is prone to misunderstandings.

[0004] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0005] This disclosure provides a document analysis method, apparatus, device, storage medium, and program product, which at least to some extent overcomes the technical problems in related technologies where the content recorded on different media needs to be manually compared and reviewed, resulting in low efficiency and misunderstanding.

[0006] Other features and advantages of this disclosure will become apparent from the following detailed description, or may be learned in part from practice of this disclosure.

[0007] According to one aspect of this disclosure, a document analysis method is provided, comprising: acquiring a first document and a second document from different sources, wherein the first document and the second document are records concerning the same event; extracting a first question text set from the first document and a second question text set from the second document, wherein the first question text set includes at least one first question text and the second question text set includes at least one second question text; based on the similarity between the first question text and the second question text, selecting at least one question text group from the first question text set and / or the second question text set, the question text group including at least one third question text; performing a search on each third question text in the question text group in the first document and / or the second document to obtain search results corresponding to the third question text; and using each third question text in the question text group and its corresponding search results as input to a large language model to obtain analysis results for the first document and the second document.

[0008] In some embodiments, the question text group includes a first question text group, and the search results corresponding to the third question text include: a first response text and a second response text; based on the similarity between the first question text and the second question text, at least one question text group is selected from the first question text group and / or the second question text group, including: if the similarity between the first question text and the second question text is greater than or equal to a set similarity threshold, then a third question text is determined based on the first question text and / or the second question text, and added to the first question text group; for each third question text in the question text group, a search is performed in the first document and / or the second document to obtain the search results corresponding to the third question text, including: for each third question text in the first question text group, a search is performed in the first document to obtain its corresponding first response text; a search is performed in the second document to obtain its corresponding second response text.

[0009] In some embodiments, at least one question text group includes a second question text group; based on the similarity between the first question text and the second question text, at least one question text group is selected from the first question text set and / or the second question text set, including: if the similarity between the first question text and the second question text is less than a set similarity threshold, then the first question text is added as a third question text to the second question text group; for each third question text in the question text group, a search is performed in the first document and / or the second document to obtain the search results corresponding to the third question text, including: for each third question text in the second question text group, a search is performed in the second document to obtain a first search result, wherein the first search result includes: no response text corresponding to the third question text in the second question text group was found in the second document.

[0010] In some embodiments, at least one question text group includes a third question text group; based on the similarity between the first question text and the second question text, at least one question text group is selected from the first question text set and / or the second question text set, including: if the similarity between the first question text and the second question text is less than a set similarity threshold, then the second question text is added as a third question text to the third question text group; for each third question text in the question text group, a search is performed in the first document and / or the second document to obtain the search results corresponding to the third question text, including: for at least one third question text in the third question text group, a search is performed in the first document to obtain a second search result, wherein the second search result includes: no response text corresponding to the third question text in the third question text group was found in the first document.

[0011] In some embodiments, extracting a first set of question texts from a first document and extracting a second set of question texts from a second document includes: filtering a first set of candidate question texts that conform to a set of set rules from the first document according to a rule matching algorithm; filtering the first set of candidate question texts using a large language model to obtain the first set of question texts; filtering a second set of candidate question texts that conform to a set of set rules from the second document according to a rule matching algorithm; and filtering the second set of candidate question texts to obtain the second set of question texts.

[0012] In some embodiments, selecting at least one group of question texts from the first and / or second question text sets based on the similarity between the first and second question texts includes: embedding the first question texts using a sentence embedding model to obtain a first question vector, wherein the sentence embedding model is obtained by fine-tuning a large language model based on question samples from a defined domain; embedding the second question texts using the sentence embedding model to obtain a second question vector; calculating the similarity between the first and second question vectors; and selecting at least one group of question texts from the first and / or second question text sets based on the relationship between the similarity and a defined similarity threshold.

[0013] In some embodiments, the third question text has its corresponding third question vector; for each third question text in the question text group, a search is performed in the first document and / or the second document to obtain the search results corresponding to the third question text, including: performing slicing and vectorization processing on the first document to obtain at least one first question-response vector; performing slicing and vectorization processing on the second document to obtain at least one second question-response vector; for each third question text in the question text group, the third question vector is used to search in at least one first question-response vector and / or at least one second question-response vector to obtain the search results corresponding to the third question text.

[0014] In some embodiments, the first document is sliced ​​and vectorized to obtain at least one first question-and-response vector, and the second question text is embedded using the sentence embedding model to obtain a second question vector. This includes: segmenting the first document using the semantic understanding capability of a large language model to obtain at least one first initial question-and-response block; segmenting the second document based on second set symbols and sentence structure features to obtain a second initial question-and-response block; semantically encoding the first document and the second document using a context embedding model to obtain a high-dimensional semantic vector corresponding to the first document and a high-dimensional vector corresponding to the second document; segmenting the high-dimensional semantic vector corresponding to the first document based on the first initial question-and-response block to obtain multiple first question-and-response vectors; and segmenting the high-dimensional semantic vector corresponding to the second document based on the second initial question-and-response block to obtain multiple second question-and-response vectors.

[0015] In some embodiments, the method further includes: preprocessing the first document and the second document respectively; filtering sensitive information in the first document and the second document using an information filtering big model, wherein the information filtering big model is obtained by fine-tuning a big language model based on knowledge of a set domain and annotated corpus obtained in real-world scenarios.

[0016] According to another aspect of this disclosure, a document analysis apparatus is also provided, comprising: a document acquisition module for acquiring a first document and a second document from different sources, wherein the first document and the second document are records concerning the same event; a question text set extraction module for extracting a first question text set from the first document and a second question text set from the second document, wherein the first question text set includes at least one first question text, and the second question text set includes at least one second question text; a question text group filtering module for filtering at least one question text group from the first question text set and / or the second question text set based on the similarity between the first question text and the second question text, wherein the question text group includes at least one third question text; a question text retrieval module for retrieving each third question text in the question text group from the first document and / or the second document to obtain the retrieval result corresponding to the third question text; and an analysis result determination module for using each third question text in the question text group and its corresponding retrieval result as input to a large language model to obtain the analysis results of the first document and the second document.

[0017] According to another aspect of this disclosure, an electronic device is also provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the document analysis method of any of the above by executing the executable instructions.

[0018] According to another aspect of this disclosure, a computer-readable storage medium is also provided, on which a computer program is stored, which, when executed by a processor, implements the document analysis method of any of the above.

[0019] According to another aspect of this disclosure, a computer program product is also provided, comprising: a computer program or instructions, wherein the document analysis method implements any one of the above when the computer program or instructions are executed by a processor.

[0020] The document analysis method, apparatus, device, storage medium, and program products provided in the embodiments of this disclosure acquire first and second documents from different sources regarding the same event record. All query texts are extracted from the first and second documents respectively, forming a first query text set and a second query text set. By calculating the similarity of each query text in the two query text sets, query texts common to both sets and query texts present in one set but not in the other are selected, forming query text groups. Then, based on each query text in the query text group, a search is performed from the first and / or second documents. The search results and the query texts in the query text groups are used as input to a large language model, which performs semantic analysis and comprehensive reasoning, outputting a consistency analysis result between the first and second documents. By analyzing the similarities and differences between the two documents through text similarity and a large language model, intelligent document analysis is achieved, improving work efficiency and the accuracy of analysis results.

[0021] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0022] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.

[0023] Figure 1 This diagram illustrates a communication system architecture according to an embodiment of the present disclosure. Figure 2 This diagram illustrates a document analysis method according to an embodiment of the present disclosure. Figure 3 An example diagram of a document from a different source is shown in an embodiment of this disclosure; Figure 4 This diagram illustrates another document analysis method according to an embodiment of the present disclosure. Figure 5A flowchart illustrating the extraction of a query text set according to an embodiment of this disclosure is shown; Figure 6 This illustration shows a flowchart of yet another document analysis method according to an embodiment of the present disclosure; Figure 7 This diagram illustrates a flowchart of a question-and-response vector extraction method according to an embodiment of the present disclosure. Figure 8 This diagram illustrates an application example of a document analysis method according to an embodiment of the present disclosure. Figure 9 This diagram illustrates the structure of a document analysis apparatus according to an embodiment of the present disclosure. Figure 10 A structural block diagram of an electronic device according to an embodiment of the present disclosure is shown. Detailed Implementation

[0024] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, they are provided so that this disclosure will be more comprehensive and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0025] Furthermore, the accompanying drawings are merely illustrative of this disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0026] The specific implementation methods of the embodiments of this disclosure will now be described in detail with reference to the accompanying drawings.

[0027] Figure 1 A schematic diagram of an exemplary communication system architecture to which the document analysis methods of the embodiments of this disclosure can be applied is shown. Figure 1 As shown, the system architecture may include terminal device 101, network 102 and server 103.

[0028] It should be noted that, in the embodiments of this disclosure, terminal 10 refers to an entity on the user side used to receive or transmit signals, and may also be referred to as terminal equipment, mobile station (MS), mobile terminal (MT), etc. The embodiments of this disclosure do not limit the specific technology or device form used in the terminal.

[0029] In some embodiments of this disclosure, the terminal 10 may be a mobile phone, tablet computer, laptop computer, notebook computer, personal digital assistant (PDA), handheld computer, netbook, ultra-mobile personal computer (UMPC), mobile internet device (MID), augmented reality (AR), virtual reality (VR) device, robot, wearable device, flight vehicle, vehicle user equipment (VUE), shipboard equipment, pedestrian user equipment (PUE), smart home (home devices with wireless communication capabilities, such as refrigerators, televisions, washing machines, or furniture), game console, personal computer (PC), ATM, or self-service machine, etc. Wearable devices include: smartwatches, smart bracelets, smart earphones, smart glasses, smart jewelry (smart bracelets, smart chains, smart rings, smart necklaces, smart anklets, smart anklets, etc.), smart wristbands, smart clothing, etc. Among these, in-vehicle devices can also be referred to as in-vehicle terminals, in-vehicle controllers, in-vehicle modules, in-vehicle components, in-vehicle chips, or in-vehicle units, etc. It should be noted that the specific type of terminal 10 is not limited in the embodiments disclosed herein.

[0030] Optionally, the client of the application installed on different terminal devices 101 may be the same, or the client of the same type of application based on different operating systems. Depending on the terminal platform, the specific form of the application client may also be different; for example, the application client may be a mobile client, a PC client, etc.

[0031] Network 102 is a medium used to provide a communication link between terminal device 101 and server 103, and can be a wired network or a wireless network.

[0032] Optionally, the aforementioned wireless or wired networks use standard communication technologies and / or protocols. The network is typically the Internet, but can also be any network, including but not limited to Local Area Networks (LANs), Metropolitan Area Networks (MANs), Wide Area Networks (WANs), mobile, wired or wireless networks, private networks, or any combination of virtual private networks. In some embodiments, technologies and / or formats, including Hyper Text Markup Language (HTML), Extensible Markup Language (XML), etc., are used to represent data exchanged over the network. Furthermore, conventional encryption technologies such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Networks (VPNs), and Internet Protocol Security (IPSec) can be used to encrypt all or some links. In other embodiments, custom and / or dedicated data communication technologies can be used to replace or supplement the aforementioned data communication technologies.

[0033] Server 103 can be a server that provides various services, such as a backend management server that supports the device operated by the user using terminal device 101. The backend management server can analyze and process received requests and other data, and feed the processing results back to the terminal device.

[0034] Optionally, the server can be a standalone physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.

[0035] Those skilled in the art will know that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative; any number of terminal devices, networks, and servers can be included depending on actual needs. This disclosure does not limit the scope of the embodiments.

[0036] Under the above system architecture, this disclosure provides a document analysis method that can be executed by any electronic device with computing capabilities.

[0037] In some embodiments, the document analysis method provided in this disclosure can be executed by a terminal or server in the above-described system architecture; in other embodiments, the document analysis method provided in this disclosure can be implemented by the terminal and server in the above-described system architecture through interaction.

[0038] Figure 2 This diagram illustrates a flowchart of a terminal-side document analysis method according to an embodiment of the present disclosure, such as... Figure 2 As shown, the document analysis method provided in this embodiment includes the following steps: In step S202, a first document and a second document from different sources are obtained, wherein the first document and the second document are records of the same event.

[0039] The same event can be understood as a specific activity or process involving the same people at the same time and place. The same event can be represented by a unique event identifier, which may include, but is not limited to: case number, meeting ID, transaction serial number, project code, etc.

[0040] The first document and the second document refer to two independently created and stored digital documents that jointly record the same event. The first document and the second document each have their own data modality, data structure, and metadata. For example, the first document and the second document refer to documents obtained by recording the same event using different media. The different sources can be understood as the first document and the second document being recorded from different media.

[0041] In one possible implementation, the first document can be understood as the text data generated after speech-to-text processing of the original audio stream recording the event. Specifically, a voice acquisition device (e.g., a microphone) is installed in the scene where the event occurs to capture the original audio signal. This original audio signal is then used as input to a speech recognition engine, which converts it into text data, which is the first document. Because the first document is a direct conversion of the original audio signal, the temporal sequence and integrity of the original dialogue are preserved to the greatest extent possible.

[0042] A second document can be understood as text data generated through manual writing, recording an event on-site or afterward. In one implementation, text data collected from an input device (such as a keyboard) is directly acquired to generate the second document. Alternatively, the user records the event by handwriting on a physical medium, which is then photographed to create an image. This image is then processed by an optical character recognition engine to obtain the text, ultimately resulting in the second document. The physical medium mentioned above includes, but is not limited to, paper, handwritten touchscreens, etc. Because the second document is manually recorded, subjective biases or omissions of details may be introduced during the recording process.

[0043] In one possible implementation, the content is recorded in the form of an interactive dialogue in both the first and second documents, clearly distinguishing between the questioner's and responder's statements. For example... Figure 3 As shown, the left side is the "first document F after speech transcription" 310, which includes a series of questions (Q1, Q2, Q3, ..., Qt) and corresponding responses (A1, A2, A3, ..., At). The right side is the "second document F'" 320, which has a similar structure to the first document F, including a series of questions (Q1', Q2', Q3', ..., Qt') and corresponding responses (A1', A2', A3', ..., At'). The diagram shows... "This indicates that the specific content has been hidden."

[0044] In step S204, a first question text set is extracted from the first document and a second question text set is extracted from the second document, wherein the first question text set includes at least one first question text and the second question text set includes at least one second question text.

[0045] A question text can be understood as a unit of statement in a document issued by the questioner for the purpose of obtaining information, confirming facts, or guiding a dialogue. The form of a question text may include, but is not limited to: interrogative sentences, rhetorical questions, imperative sentences with interrogative semantics, etc.

[0046] The first question text refers to the question text extracted from the first document. The first question text set refers to the data set consisting of multiple question texts extracted from the first document. The second question text refers to the question text extracted from the second document. The second question text set refers to the data set consisting of multiple question texts extracted from the second document.

[0047] In one possible implementation, a natural language processing engine is used to segment the entire first document into sentences, dividing it into a list of independent sentences. A rule-based matching algorithm is then used to initially filter these sentences, retaining those that meet certain criteria. These criteria include: sentences ending with a question mark, sentences beginning with or containing a specific interrogative word, and sentences with a specific sentence structure. Further syntactic analysis is then performed on each sentence that meets these criteria to identify its subject-verb-object structure and semantic roles. If the core verb of a sentence is an interrogative verb, or if its semantic role clearly indicates a questioning intent, then that sentence is considered the first interrogative text.

[0048] In one possible implementation, a large language model is fine-tuned and trained using a large number of question text samples to obtain a question text recognition model. The first document is used as the input to the question text recognition model, so that the question text recognition model recognizes more question texts than those in the first document and outputs the first question text set.

[0049] It should be noted that the extraction method of the second question text set is the same as that of the first question text set, and will not be described again in this embodiment.

[0050] In step S206, based on the similarity between the first question text and the second question text, at least one question text group is selected from the first question text set and / or the second question text set, and the question text group includes at least one third question text.

[0051] The aforementioned similarity refers to semantic similarity, that is, the degree of semantic similarity between the first question text and the second question text, which indicates whether the first question text and the second question text are asking about the same core facts or issues.

[0052] Similarity calculation methods include, but are not limited to: edit distance algorithm, TF-IDF (Term Trequency–Inverse Document Frequency) vectorization algorithm, and similarity calculation methods based on pre-trained models.

[0053] A question text group can be understood as a subset of question texts selected based on the semantic similarity of two question texts and set conditions. This subset of question texts is the question text group, and a third question text belonging to the same question text group satisfies the same set conditions.

[0054] In one possible implementation, at least one question text group includes at least one or more of the following: a first question text group, a second question text group, and a third question text group.

[0055] The first question text group includes either a first question text or a second question text with a similarity greater than a set similarity threshold. In other words, the third question text in the first question text group originates from the first document and exists in the second document. In other words, in the second question text set, if there is a first question text with a similarity greater than or equal to the set similarity threshold, that first or second question text is selected as the third question text.

[0056] The second question text group includes the first question text with a similarity lower than the set similarity threshold. In other words, the third question text in the second question text group originates from the first document but does not exist in the second document. In other words, in the second question text set, no second question text with a similarity greater than or equal to the set similarity threshold can be found with a given first question text; therefore, that first question text is selected as the third question text.

[0057] The third question text group includes second question texts with a similarity lower than the set similarity threshold. In other words, the third question text in the third question text group originates from the second document but does not exist in the first document. In other words, if no first question text with a similarity greater than or equal to the set similarity threshold can be found in the first question text set, then that second question text is selected as the third question text.

[0058] The similarity threshold set above can be set according to the actual situation, and is not specifically limited in this embodiment.

[0059] In step S208, for each third question text in the question text group, a search is performed in the first document and / or the second document to obtain the search results corresponding to the third question text.

[0060] Searching in the first and / or second documents can be understood as finding the answer or argument fragment that is most semantically relevant to the third question text within the first and / or second documents.

[0061] In one possible implementation, for each third question text in the first question text group, a search is performed in the first document and the second document respectively, and the corresponding search results include the first response text retrieved in the first document and the second response text retrieved in the second document.

[0062] For each of the third question texts in the second question text group, since they come from the first document but do not exist in the second document, a search is performed in the second document. The corresponding search results include: no corresponding response text was found in the second document.

[0063] For each third question text in the third question text group, since it comes from the second document but does not exist in the first document, a search is performed in the first document. The corresponding search results include: no corresponding response text was found in the first document.

[0064] In step S210, each third question text in the question text group and its corresponding search results are used as input to the large language model to obtain the analysis results of the first document and the second document.

[0065] A large language model refers to a model pre-trained on a large amount of text data based on the Transformer architecture. In this embodiment, the large language model can be a basic language model, or a legal domain adaptation model further fine-tuned with legal domain knowledge or specific verification knowledge.

[0066] The input to the large language model includes the third question text and its corresponding search results. The output of the large language model is the qualitative or quantitative conclusions that the large language model outputs after reasoning about the input third question text and its corresponding search results, namely the analysis results of the first document and the second document.

[0067] Furthermore, the above analysis results include, but are not limited to: classification labels, judgment criteria, and descriptions of differences. Classification labels include, but are not limited to: fact concealment, fact fabrication, inconsistent statements, no substantial difference, etc.

[0068] In this embodiment, a first document and a second document from different sources are obtained, each concerning the same event record. All question texts are extracted from the first and second documents respectively, forming a first question text set and a second question text set. By calculating the similarity of each question text in the two question text sets, question texts common to both sets and question texts present in one set but not in the other are selected, forming question text groups. Then, based on each question text in the question text group, a search is performed in the first and / or second document. The search results and the question texts in the question text groups are used as input to a large language model, which performs semantic analysis and comprehensive reasoning, outputting the consistency analysis results between the first and second documents. By analyzing the similarities and differences between the two documents using text similarity and a large language model, intelligent document analysis is achieved, improving work efficiency and the accuracy of the analysis results.

[0069] Based on the above embodiments, the document analysis method disclosed herein has been optimized, such as... Figure 4 As shown, the optimized document analysis method includes steps S402-S420.

[0070] In step S402, a first document and a second document from different sources are obtained, wherein the first document and the second document are records of the same event.

[0071] In step S404, a first question text set is extracted from the first document and a second question text set is extracted from the second document. The first question text set includes at least one first question text, and the second question text set includes at least one second question text.

[0072] In step S406, the similarity between each first question text and each second question text is calculated.

[0073] In this embodiment, the first question texts in the first question text set are traversed, and the similarity between the first question text and each second question text in the second question text set is calculated. In this way, the similarity between each first question text and each second question text can be obtained.

[0074] In step S408, if the similarity between the first question text and the second question text is greater than or equal to a set similarity threshold, then a third question text is determined based on the first question text and / or the second question text, and added to the first question text group.

[0075] For any given first question text, determine whether its similarity to each of the second question texts is greater than or equal to a set similarity threshold. If the similarity between the first question text and any of the second question texts is greater than or equal to the set similarity threshold, it indicates that the first and second question texts are semantically identical or similar. That is, if the question text exists in both the first and second documents, then either the first or second question text is directly added as the third question text to the first question text group. Alternatively, the first and second question texts can be semantically rewritten and then added as the third question text to the first question text group.

[0076] In step S410, for each third question text in the first question text group, a search is performed in the first document to obtain its corresponding first response text; a search is performed in the second document to obtain its corresponding second response text.

[0077] Using each third question text in the first question text group with a semantic similarity greater than a set similarity threshold as search conditions, semantic retrieval technology is used to recall the first response text m1 from the first document F and the second response text m1' from the second document F' that are related to the search conditions. The first response text and the second response text cover the factual details of the answer corresponding to the question text. The factual details include, but are not limited to, time, place, and person's behavior.

[0078] For example, a semantic retrieval technique is the Dense Passage Retrieval (DPR) model.

[0079] In step S412, if the similarity between the first question text and the second question text is less than a set similarity threshold, then the first question text is added to the second question text group as the third question text.

[0080] For any given first question text, determine whether its similarity to each of the second question texts is less than a set similarity threshold. If the similarity between the first question text and all the second question texts is less than the set similarity threshold, it indicates that the first question text and all the second question texts are semantically dissimilar. That is, the first question text exists in the first document but not in the second document. In this case, the first question text is added to the second question text group.

[0081] In step S414, for each third question text in the second question text group, a search is performed in the second document to obtain a first search result, wherein the first search result includes: no response text corresponding to the third question text in the second question text group was found in the second document.

[0082] For each third question text in the second question text group within the first document whose semantic similarity is less than a set similarity threshold, a semantic search is performed in the second document F' using the third question text in the second question text group as the search criteria, resulting in the first search result. This semantic search may include vector-based approximate nearest neighbor search.

[0083] Specifically, the response text corresponding to the third question text in the second question text group that was not found in the second document includes: using the third question text in the second question text group as the search criteria, no valid content was found in the second document, and an empty list was returned. Alternatively, using the third question text in the second question text group as the search criteria, the score corresponding to the relevant content recalled in the second document is less than a set threshold.

[0084] In step S416, if the similarity between the first question text and the second question text is less than a set similarity threshold, then the second question text is added to the third question text group as the third question text.

[0085] For any given second question text, determine whether its similarity to each of the first question texts is less than a set similarity threshold. If the similarity between the second question text and all the first question texts is less than the set similarity threshold, it indicates that the second question text and all the first question texts are semantically dissimilar. That is, the second question text exists in the second document but not in the first document. In this case, the second question text is added to the third question text group.

[0086] In step S418, a search is performed in the first document for at least one third question text in the third question text group to obtain a second search result, wherein the second search result includes: no response text corresponding to the third question text in the third question text group was found in the first document.

[0087] For each third question text in the third question text group in the second document whose semantic similarity is less than a set similarity threshold, a semantic search is performed in the first document F using the third question text in the third question text group as the search criteria, to obtain the second search result. This semantic search may include vector-based approximate nearest neighbor search.

[0088] The following are examples of responses not found in the first document: When the third question text in the third question text group is used as the search condition, no valid content is found in the first document, i.e., the search returns an empty list. Alternatively, when the score of the relevant content recalled in the first document using the third question text in the third question text group as the search condition is less than a set threshold.

[0089] In step S420, each third question text in the question text group and its corresponding search results are used as input to the large language model to obtain the analysis results of the first document and the second document.

[0090] In one possible implementation, for any third question text in the first question text group, the first and second response texts retrieved are used as input data based on the first and second response texts and a preset first prompt word. This input data is then input into a large language model to obtain the analysis results output by the large language model.

[0091] The first prompt word instructs the large language model to compare and analyze factual details in the first and second response texts, generating a factual detail comparison report. For example, the first prompt word could be: "Compare the differences in factual details such as time, location, and people's actions in the two texts, and output a structured report."

[0092] In one possible implementation, for any third question text in the second question text group, the third question text and its corresponding first search result are used as input to a fine-tuned large language model. The fine-tuned large language model, combined with legal knowledge and contextual analysis, is then used to generate the conclusion that "some facts are concealed in the second document." Here, the fine-tuned large language model can refer to the model obtained by fine-tuning the basic large language model using legal domain knowledge.

[0093] In one possible implementation, for any third question text in the third question text group, the third question text and its corresponding second search result are used as input to a fine-tuned large language model. The fine-tuned large language model is then used in conjunction with legal knowledge and contextual analysis to generate the conclusion that "the second document contains some factual fabrications".

[0094] The question texts are divided into three groups: the first group, the second group, and the third group. The first group retrieves relevant fragments through semantic retrieval and generates a factual detail comparison report using a legal domain large language model. The second group searches second documents using the question text as search criteria, combining a finely tuned LLM (Legal Language Model) to detect fact concealment. The third group similarly detects fact fabrication. Differential comparative analysis of question vectors with varying similarities assists staff in reviewing cases, detecting potential fact concealment and fabrication, and providing more reliable references for legal judgments. Furthermore, the large model analysis logic reduces the scope for human intervention, enhances the transparency of judicial supervision, and frees up human resources to focus on core tasks.

[0095] Based on the above embodiments, this disclosure optimizes the extraction process of "first question text set and second question text set" in step S202, and adds a preprocessing process before extracting the question text sets. Figure 5 As shown, the extraction process of the question text set mainly includes steps S502-S514.

[0096] In step S502, a first document and a second document from different sources are obtained, wherein the first document and the second document are records of the same event.

[0097] In one exemplary embodiment, during an interrogation, after the on-site audio is captured by a recording device, the raw audio signal is obtained. The raw audio signal is then converted into text by a speech recognition engine, and the resulting text data is the first document F. During the interrogation, the recorder manually inputs the text into an electronic device via a keyboard, creating a second document. Alternatively, during the interrogation, the recorder writes on paper, and by photographing an image of the paper, an optical character recognition engine performs text recognition on the paper image, resulting in the second document F'.

[0098] In step S504, the first document and the second document are preprocessed respectively.

[0099] In this embodiment, the first document F and the second document F' are standardized in terms of format and unstructured content.

[0100] Since the first document F is obtained through speech transcription, it contains some colloquial expressions. Therefore, a text correction model is used to correct the expressions based on the colloquial features of the first document F (such as repetitive speech, slips of the tongue, etc.). For example, the text correction model can include a correction model based on the Transformer architecture.

[0101] Based on the written characteristics of the second document F', the implicit semantic logic is restored through word segmentation and syntactic analysis, making the text structure of both documents clear and analyzable.

[0102] In step S506, sensitive information in the first and second documents is filtered using a large information filtering model. The large information filtering model is obtained by fine-tuning the large language model based on knowledge of the set domain and annotated corpus obtained from real-world scenarios.

[0103] The knowledge in the defined domain includes legal knowledge, and the annotated data obtained from real-world scenarios includes annotated data from real interrogation scenarios.

[0104] By employing legal domain knowledge and annotated corpora from real-world interrogation scenarios, a pre-trained large-scale speech model is fine-tuned for specific tasks, resulting in a large-scale information filtering model. The annotated corpora from real-world interrogation scenarios include, but are not limited to, typical phrases used to inquire about personal information such as name, ID number, address, and contact information, such as "What's your name?" and "Where do you live?". Supervised learning is used to enable the fine-tuned information filtering model to recognize context-aware personal information content. The pre-trained large-scale speech model includes legal domain-adapted large-scale speech models based on BERT (Bidirectional Encoder Representations from Transformers) or GPT (Generative Pretrained Transformer) architectures.

[0105] During the document cleaning stage, non-textual information from interrogation videos (such as gestures and pauses in speech) is introduced. Multimodal features are extracted using video-text alignment models (such as CLIP-Legal) to assist in personal information recognition. For example, pointing to the ID card with the gesture "What's your name?" can enhance the confidence level of recognition.

[0106] The preprocessed first document F and second document F' from step S504 are input into the information filtering model, and the semantics of the text are analyzed sentence by sentence. Paragraphs or sentences directly related to personal information inquiries are identified and marked, with a focus on covering dialogue content in scenarios such as identity verification and family relationship verification.

[0107] Furthermore, the cleaning effect was verified by a combination of manual sampling and model-based secondary verification on the filtered first document F and second document F'.

[0108] For example, a manual sampling of 5%-10% of the samples is conducted, and professionals assess whether the key factual content is completely preserved. The model's secondary verification uses the same large information filtering model to detect whether there is any personal information related to the remaining text that has not been removed, ensuring that the cleaned document only contains the factual findings that affect legal judgments.

[0109] In this embodiment, the first document F and the second document F' are cleaned to accurately remove non-critical content related to personal information inquiries, so that the cleaned documents focus on the factual findings that affect legal judgments, providing a more focused textual basis for subsequent analysis.

[0110] In step S508, the first candidate question text set ending with the first symbol is selected from the first document according to the rule matching algorithm.

[0111] Rule-based matching algorithms are algorithms that quickly identify and extract potential questions from documents based on predefined patterns and rules. Heuristic rule-based rapid filtering aims for high recall, meaning it tries to avoid missing any possible questions, even if the document contains some non-question text.

[0112] Build a rule base that includes at least the following rules: punctuation rules, keyword rules, and sentence structure rules. Punctuation rules are used to filter sentences ending with a question mark (?). Keyword rules are used to filter sentences that begin with or contain specific interrogative words, even if they do not end with a question mark. Specific interrogative words include, but are not limited to, "whether," "why," "how," "who," "where," and "when." Sentence structure rules are used to match preset interrogative sentence templates.

[0113] In one possible implementation, a natural language processing tool is used to segment the first document into sentences, resulting in a list of sentences. Each sentence in the sentence list is then matched against the rules defined above, and all sentences that match any of the rules are compiled into a first candidate query text set.

[0114] In step S510, the first candidate question text set is filtered using a large language model to obtain the first question text set.

[0115] In this embodiment, a classification prompt is constructed for each candidate question text. For example, the classification prompt is: "Please determine whether the following sentence is a genuine question aimed at obtaining information (rather than a rhetorical question, interrogative sentence, or statement with a question mark), please only answer 'yes' or 'no': {candidate question text}".

[0116] The constructed prompts are input into the large language model in batches. Based on its deep understanding of sentence semantics and intent, the large language model outputs a "yes" or "no" judgment result. The output of the large language model is parsed, and all the first candidate question texts judged as "yes" are retained to form the final first question text set.

[0117] In step S512, a second set of candidate question texts ending with the first symbol is selected from the second document according to the rule matching algorithm.

[0118] In one possible implementation, a natural language processing tool is used to segment the second document into sentences, resulting in a list of sentences. Each sentence in the sentence list is then matched against the rules defined above, and all sentences that match any of the rules are compiled into a second candidate question text set.

[0119] In step S514, the second candidate question text set is filtered to obtain the second question text set.

[0120] The output of the large language model is parsed, and all the second candidate question texts that are judged as "yes" are retained to form the final second question text set.

[0121] In this embodiment, a two-layer filtering architecture based on form-based fast matching and semantic-based deep understanding enables the processing of complex and diverse real-world language phenomena, thereby improving processing capabilities while ensuring accuracy.

[0122] Based on the above embodiments, the filtering process of the "question text group" in step S206 and the retrieval process in step S208 in this disclosure embodiment have been optimized, such as... Figure 6 As shown, the optimized document analysis method mainly includes steps S602-S620.

[0123] In step S602, a first document and a second document from different sources are obtained, wherein the first document and the second document are records of the same event.

[0124] In step S604, the first document is sliced ​​and vectorized to obtain at least one first question-and-response vector.

[0125] In step S606, the second document is sliced ​​and vectorized to obtain at least one second question-and-response vector.

[0126] In this embodiment, a natural language processing tool is used to segment the document into sentences, resulting in a list of sentences. A named entity recognition or classification model is then used to label each sentence with its speaker role, such as "questioner" or "responder." Based on the role sequence and text logic, consecutive "questioner" statements are associated and merged with subsequent "responder" statements to form a complete "question-response" text block.

[0127] A sentence embedding model is adopted, which is further pre-trained or fine-tuned on legal texts. This sentence embedding model can directly convert the entire input "question-response" text block into a semantic vector. Each "question-response" text block obtained by slicing is directly input into the sentence embedding model. The sentence embedding model outputs a dense vector of fixed dimension as the final vector representation of the "question-response" text block.

[0128] In step S608, a first question text set is extracted from the first document and a second question text set is extracted from the second document, wherein the first question text set includes at least one first question text and the second question text set includes at least one second question text.

[0129] In step S610, the first question text is embedded using a sentence embedding model to obtain the first question vector. The sentence embedding model is obtained by fine-tuning the large language model based on question samples from a defined domain.

[0130] Among them, the question samples in the setting domain include inquiry question samples in the legal domain, which contain legal fact-related questions. The sentence embedding model can be selected from the sentence embedding models suitable for semantic similarity tasks, such as: Sentence-BERT or Instructor-Embedding.

[0131] We selected a sentence embedding model suitable for semantic similarity tasks. Taking into account the linguistic characteristics of the query documents (both colloquial and formal), we fine-tuned the sentence embedding model using query samples from the legal domain to enhance its ability to represent the semantics of legally related questions and generate dense vectors with fixed dimensions.

[0132] Each first question text is used as input to the sentence embedding model. The sentence embedding model is used to embed the first question text and outputs the first question vector corresponding to each first question text.

[0133] In step S612, the second question text is embedded using a sentence embedding model to obtain the second question vector.

[0134] Each second question text is used as input to the sentence embedding model. The sentence embedding model is used to embed the second question texts and outputs the second question vector corresponding to each second question text.

[0135] In step S614, the similarity between the first question vector and the second question vector is calculated.

[0136] In this embodiment, cosine similarity is used to calculate the similarity between the first question vector and the second question vector.

[0137] In step S616, at least one question text group is selected from the first question text set and / or the second question text set based on the relationship between similarity and a set similarity threshold.

[0138] In this approach, the similarity threshold is fine-tuned for samples (including similar and dissimilar cases) by using domain-annotated questions. For example, a similarity threshold of 0.7 is set to effectively distinguish between semantically similar (requiring further detailed comparison) and dissimilar (requiring cross-referencing) questions, providing a basis for subsequent logical branches.

[0139] For different case types (such as Class A cases and Class B cases), a threshold prediction model is trained based on historical labeled data. The similarity threshold is automatically adjusted according to the complexity of the case. For example, for Class B cases, the threshold is reduced from 0.75 to 0.7 because the questions are more complex, thus improving the adaptability of the comparison.

[0140] In this embodiment, a method combining rule matching algorithm and pre-trained model classification is used to extract question sentences. Sentences suitable for semantic similarity tasks are selected for embedding into the model and fine-tuned using interrogation question samples within the domain. Cosine similarity is used to calculate the similarity of question sentence vectors and the preset similarity threshold is optimized to distinguish between semantically similar and dissimilar question sentences. This provides a basis for subsequent semantic similarity-based comparison analysis and improves the accuracy and efficiency of the analysis.

[0141] Based on the semantic similarity results of the question texts, the question texts were divided into three groups: the first group of question texts, the second group of question texts, and the third group of question texts, and differential comparison analysis was performed on each group.

[0142] In step S618, for each third question text in the question text group, the third question vector is used to search in at least one first question-response vector and / or at least one second question-response vector to obtain the search results corresponding to the third question text.

[0143] In step S620, each third question text in the question text group and its corresponding search results are used as input to the large language model to obtain the analysis results of the first document and the second document.

[0144] Based on the above embodiments, this disclosure optimizes the extraction process of the "question-response vector", such as... Figure 7 As shown, it mainly includes steps S702-S710.

[0145] In step S702, the first document is segmented using the semantic understanding capability of the large language model to obtain at least one first initial question-and-response block.

[0146] Large speech models can be fine-tuned GPT models for the legal field.

[0147] For the first document F, which is conversational, the semantic understanding capabilities of the large model are used to automatically detect implicit question markers. Combined with explicit rules, the initial segmentation of the question-and-response block is achieved, resulting in at least one first initial question-and-response block.

[0148] For example, implicit question markers include colloquial prompts such as "A" and "Then what?", while explicit rules include markers such as "A:" and "B:".

[0149] In step S704, the second document is segmented based on the second set symbols and sentence features to obtain at least one second initial question and answer block.

[0150] For the written second document F', explicit identification of the question-and-response structure is achieved based on punctuation marks (such as colons and periods) and sentence structure features (such as the ending of interrogative sentences). During the segmentation process, the semantic integrity of the questions and corresponding responses is strictly maintained, cross-segmentation is avoided, and each slice unit is an independent "question-and-response" text block.

[0151] In step S706, the first document and the second document are semantically encoded using a context embedding model to obtain a high-dimensional semantic vector corresponding to the first document and a high-dimensional vector corresponding to the second document.

[0152] In this embodiment, the late chunking method is adopted. The first and second documents are semantically encoded as a whole through a long context embedding model to preserve global context information.

[0153] In step S708, the high-dimensional semantic vector corresponding to the first document is segmented based on the first initial question and response block to obtain multiple first question and response vectors.

[0154] In the post-embedding stage, the high-dimensional semantic vector corresponding to the first document is sliced ​​based on the structure of the first initial question-and-response block to obtain multiple first question-and-response vectors, thus avoiding the context loss problem caused by local truncation in traditional block-segmentation methods.

[0155] In step S710, the high-dimensional semantic vector corresponding to the second document is segmented based on the second initial question and response block to obtain multiple second question and response vectors.

[0156] In the post-embedding stage, the high-dimensional semantic vector corresponding to the first person's document is sliced ​​based on the structure of the second initial question-and-response block to obtain multiple second question-and-response vectors, thus avoiding the context loss problem caused by local truncation in traditional block-segmentation methods.

[0157] In one possible implementation, a pre-trained embedding model adapted to legal question-and-answer semantics is selected, and each block of first question-and-answer vectors or second question-and-answer vectors is converted into a low-dimensional dense vector. The pre-trained embedding model includes a Sentence-BERT variant fine-tuned for the legal domain.

[0158] During the model training phase, a comparative learning task involving spoken and written questions was incorporated to enhance the model's ability to capture the core question intent under different expression forms, ensuring the accuracy of subsequent similarity comparisons. The comparative learning task involving spoken and written questions included semantic alignment between "Where were you at the time?" and "Where was person A when the event occurred?".

[0159] One possible implementation involves building a dynamically updated legal interrogation corpus, collecting new labeled data (such as new types of online interrogation texts) every quarter, and continuously pre-training and updating the personal information recognition model and vectorization model to maintain the model's adaptability to emerging interrogation scenarios.

[0160] In this embodiment, the semantic understanding capabilities of a large model and explicit rule recognition are used to identify the semantic structure of Q&A. A late-blocking method is adopted to optimize the segmentation of long texts. A pre-trained embedding model adapted to legal question-and-answer semantics is used to convert Q&A blocks into low-dimensional dense vectors. The model training incorporates a comparative learning task of spoken and written questioning, which realizes the structured analysis of interrogation dialogues, avoids the context loss problem of traditional segmentation methods, enhances the model's ability to capture the core questioning intent under different expression forms, and is beneficial to subsequent similarity comparison and analysis.

[0161] This disclosure provides a specific example of applying the above-described document analysis method in an interrogation record scenario. The first document is an audio transcription document F, and the second document is a case file document F'. Figure 8 As shown, the main steps include the following: In step S802, the two original documents are cleaned by removing personal information and retaining only the factual information.

[0162] Content cleaning was performed on the two original documents of the same interrogation record (audio transcription document F and case file document F'). Since the staff only focused on the factual findings that would affect the legal judgment, the differences between the two transcripts regarding the inquiry and confirmation of personal information could be ignored. Therefore, irrelevant content related to the inquiry of personal information was removed.

[0163] In step S804, the code is divided into blocks according to the semantic structure of "question-response".

[0164] In step S806, the audio transcription document F and the volume document F' slices are vectorized, and a retrieval is established.

[0165] In step S808, all query texts in the audio transcription document F and the case file document F' are vectorized, and their similarity is compared, resulting in three logical branches.

[0166] The cross-document comparison system architecture based on three-path retrieval uses a tritree retrieval architecture of query text groups (Q1, second query text group Q2, and third query text group Q3) to analyze the content of audio transcription documents and written case files.

[0167] In step S810, the first question text Q in the audio transcription document F and the file document F' with semantic similarity greater than or equal to the set similarity threshold is selected as the first question text group Q1.

[0168] The first question text in the audio transcription document F and the second question text in the file document F' are semantically similar, meaning they are quite similar questions.

[0169] In step S812, the audio transcription document F and the file document F' are retrieved and recalled respectively.

[0170] Select either the first or the second query text as the search criteria, and perform retrieval and recall in the audio transcription document F and the file document F' respectively, recalling the first response text m1 and the second response text m1'.

[0171] In step S814, the large model is input for analysis and comparison.

[0172] The first response text m1 and the second response text m1' are fed into a large model for analysis and comparison, and a factual detail comparison report is generated using the large model. Questions with similar semantics appear in the audio transcription document and the case file document. The large model is then used to generate and compare the detailed differences between the two retrieved documents, and corresponding conclusions are given.

[0173] In step S816, the first question text in the audio transcription document F and the file document F' with a semantic similarity less than a set similarity threshold is selected as the second question text group Q2.

[0174] The first question text is in the audio transcription document F, but there is no similar question in the file document F'. The second question text group Q2 is used for cross-referencing.

[0175] In step S818, the second query text group Q2 is used to retrieve fragments from the volume document F'.

[0176] That is, select the second question text group Q2 in the transcribing document F as the search condition, and search for the fragment in the volume document F'.

[0177] In step S814, the large model is input for analysis and comparison.

[0178] If the recalled fragments have low relevance (i.e. no relevant content was retrieved), the large model is used to generate a conclusion that some facts are concealed in the case file.

[0179] In step S820, the second question text in the audio transcription document F and the file document F' with a semantic similarity less than a set similarity threshold is selected as the third question text group Q3.

[0180] The second question text in the audio transcription document F and the case file document F' with a semantic similarity less than the set similarity threshold is selected as the third question text group Q3. The second question text is in the case file document F', but there is no similar question in the audio transcription document F.

[0181] In step S820, the third question text group Q3 is used to retrieve the segment from the audio transcription document F.

[0182] A cross-referencing search was performed, using the question text in the third question text group Q3 as the search criteria to retrieve fragments from the audio transcription document F.

[0183] In step S814, the large model is input for analysis and comparison.

[0184] If the recalled fragments have low relevance (not retrieved), a large model is used to generate a conclusion that some facts in the case file are fabricated.

[0185] In this embodiment, an implementation use case is provided as follows: 1. Document Content Cleaning Example (1) Preprocessing stage: For the audio transcription document F, the Transformer-based text error correction model is used to correct repeated speech and slips of the tongue; for the case file document F', the HanLP word segmentation tool is used in combination with dependency parsing to restore the implicit logic.

[0186] (2) Information filtering large model: Based on the pre-trained model CHILD-3 (Chinese legal domain large model), it is fine-tuned using 100,000 real interrogation annotation corpora (containing 5 types of personal information: name, ID number, address, contact information, and kinship). The training adopts the sequence labeling task (BIO labeling method), and the F1 value of the validation set reaches 0.92.

[0187] (3) Content recognition and labeling: The preprocessed audio transcription document F and the case file document F' are input into the fine-tuning model. After sentence-by-sentence analysis, personal information inquiry sentences such as "What is the mobile phone number of person C?" and "Please provide your current residential address" are labeled, with a labeling coverage rate of 98%.

[0188] (4) Cleaning and verification: 5% of the samples (200 documents) were randomly selected and evaluated by two legal experts. The key facts were retained in 95% of the documents. The model was then used to verify the remaining text, and no personal information was detected.

[0189] 2. Semantic Segmentation and Vectorization

[0190] (1) "Question-response" structure recognition: For the audio transcription document F, the GPT-3.5 model with fine-tuning in the legal field is used to detect spoken words such as "question" and "at that time". Combined with the explicit "question:" and "response:" markers, independent question-response text blocks are segmented (such as "question: were you at the scene at that time? answer: I was buying something nearby."). For the case file document F', explicit segmentation is completed based on colons and the end of interrogative sentences (such as "Where were you when the incident happened?"). The segmentation accuracy is 97%.

[0191] (2) Long text segmentation optimization: The Longformer model is used to encode the entire document (maximum context length 4096). After preserving global information, the document is sliced ​​based on the "question-response" structure to avoid the cross-block problem of "person A enters the room" and "then leaves" caused by traditional segmentation.

[0192] (3) Vectorization: Using the Sentence-BERT-Legal model fine-tuned in the legal field, 10,000 pairs of spoken-written question comparison samples were added during the training phase to generate 768-dimensional vectors, improving the accuracy of semantic alignment task to 89%.

[0193] 3. Question vectorization and similarity comparison

[0194] (1) Question extraction: Rule matching is used to filter sentences ending with a question mark (such as “What time did you arrive?”), and the BERT-Question classification model is used to filter rhetorical questions (such as “Didn’t I say that?”). The extraction accuracy is 93%.

[0195] (2) Vectorization: The Instructor-Embedding-Legal model was adopted and fine-tuned using 50,000 interrogation question samples to generate a fixed 768-dimensional vector, which improved the cosine similarity of the legal question representation task by 0.12.

[0196] (3) Similarity calculation: The threshold was optimized to 0.75 by using 2000 pairs of labeled query pairs (1000 similar pairs and 1000 dissimilar pairs), and the correct classification rate of similar pairs was 91%.

[0197] 4. Semantic similarity comparison analysis

[0198] (1) First question text group comparison: Select questions with similarity > 0.75 (such as "What items did you carry at the time?"), use the DPR model to recall answer fragments in speech transcription document F and volume document F' (recall "I carried a black backpack" in speech transcription document F, and "Person A carried a black backpack" in volume document F'), input GPT-4 to generate a comparison report, pointing out that "the color of the items is consistent, and no details of the differences in the items inside the backpack are mentioned".

[0199] (2) Second question text group detection: For questions specific to speech transcription document F (such as "Have you had contact with person B?"), no valid match was found in case file document F' (search score 0.3 < baseline value 0.6). After inputting into legal LLM analysis, the conclusion "The case file does not record any questions related to contact with person B" was generated.

[0200] (3) Third question text group detection: For questions specific to the file document F' (such as "Does person A possess item W?"), no match was found in the speech transcription document F (score 0.2 < 0.6). After LLM analysis, the conclusion "The original recording does not contain questions related to item W, and there is a possibility of factual fabrication" is generated.

[0201] It should be noted that the acquisition, storage, use, and processing of data in this disclosed technical solution comply with the relevant provisions of laws and regulations. All types of data, such as personal identity data, operational data, and behavioral data related to individuals, customers, and groups, obtained in this disclosed embodiment have been agreed upon by the users.

[0202] Based on the same inventive concept, this disclosure also provides a document analysis device, as shown in the following embodiments. Since the principle by which this device solves the problem is similar to that of the method embodiments described above, the implementation of this device embodiment can refer to the implementation of the method embodiments described above, and repeated details will not be elaborated further.

[0203] Figure 9 This diagram illustrates a document analysis apparatus according to an embodiment of the present disclosure, such as... Figure 9 As shown, the document analysis device 900 includes: a document acquisition module 910, a question text set extraction module 920, a question text group filtering module 930, a question text retrieval module 940, and an analysis result determination module 950.

[0204] The system includes the following modules: a document acquisition module 910, which acquires a first document and a second document from different sources, wherein the first document and the second document are records of the same event; a question text set extraction module 920, which extracts a first question text set from the first document and a second question text set from the second document, wherein the first question text set includes at least one first question text and the second question text set includes at least one second question text; a question text group filtering module 930, which filters at least one question text group from the first question text set and / or the second question text set based on the similarity between the first question text and the second question text, wherein the question text group includes at least one third question text; a question text retrieval module 940, which searches for each third question text in the question text group in the first document and / or the second document to obtain the retrieval results corresponding to the third question text; and an analysis result determination module 950, which uses each third question text in the question text group and its corresponding retrieval results as input to the large language model to obtain the analysis results of the first document and the second document.

[0205] In some embodiments, the question text group includes a first question text group, and the retrieval results corresponding to the third question text include: a first response text and a second response text; based on the similarity between the first question text and the second question text, the question text group filtering module 930 is specifically used to add the first question text and / or the second question text as the third question text to the first question text group if the similarity between the first question text and the second question text is greater than or equal to a set similarity threshold; the question text retrieval module 940 is specifically used to search for each third question text in the first question text group in a first document to obtain its corresponding first response text; and to search for it in a second document to obtain its corresponding second response text.

[0206] In some embodiments, at least one question text group includes a second question text group; the question text group filtering module 930 is specifically used to add the first question text as a third question text to the second question text group if the similarity between the first question text and the second question text is less than a set similarity threshold; the question text retrieval module 940 is specifically used to perform a retrieval in a second document for each third question text in the second question text group to obtain a first retrieval result, wherein the first retrieval result includes: no response text corresponding to the third question text in the second question text group was found in the second document.

[0207] In some embodiments, at least one question text group includes a third question text group; the question text group filtering module 930 is specifically used to add the second question text as a third question text to the third question text group if the similarity between the first question text and the second question text is less than a set similarity threshold; the question text retrieval module 940 is specifically used to perform a retrieval in a first document for at least one third question text in the third question text group to obtain a second retrieval result, wherein the second retrieval result includes: no response text corresponding to the third question text in the third question text group was found in the first document.

[0208] In some embodiments, the question text set extraction module 920 is specifically used to: filter out a first candidate question text set that conforms to a set of set rules from a first document according to a rule matching algorithm; filter the first candidate question text set using a large language model to obtain a first question text set; filter out a second candidate question text set that conforms to a set of set rules from a second document according to a rule matching algorithm; and filter the second candidate question text set to obtain a second question text set.

[0209] In some embodiments, the question text group filtering module 930 includes: an embedding processing unit, configured to embed a first question text using a sentence embedding model to obtain a first question vector, wherein the sentence embedding model is obtained by fine-tuning a large language model based on question samples from a defined domain; to embed a second question text using the sentence embedding model to obtain a second question vector; a similarity calculation unit, configured to calculate the similarity between the first question vector and the second question vector; and a question text group filtering unit, configured to filter at least one question text group from the first question text set and / or the second question text set based on the relationship between the similarity and a defined similarity threshold.

[0210] In some embodiments, the third question text has its corresponding third question vector; the question text retrieval module 940 includes: a vectorization processing unit, used to perform slicing and vectorization processing on the first document to obtain at least one first question-response vector; to perform slicing and vectorization processing on the second document to obtain at least one second question-response vector; and a retrieval unit, used to retrieve, for each third question text in the question text group, the third question vector in the at least one first question-response vector and / or at least one second question-response vector to obtain the retrieval result corresponding to the third question text.

[0211] In some embodiments, the vectorization processing unit is specifically used to segment the first document using the semantic understanding capability of a large language model to obtain at least one first initial question-and-response block; to segment the second document based on second set symbols and sentence structure features to obtain a second initial question-and-response block; to perform semantic encoding on the first document and the second document respectively using a context embedding model to obtain a high-dimensional semantic vector corresponding to the first document and a high-dimensional vector corresponding to the second document; to segment the high-dimensional semantic vector corresponding to the first document based on the first initial question-and-response block to obtain multiple first question-and-response vectors; and to segment the high-dimensional semantic vector corresponding to the second document based on the second initial question-and-response block to obtain multiple second question-and-response vectors.

[0212] In some embodiments, the system further includes: a preprocessing module for preprocessing the first document and the second document respectively; and filtering sensitive information in the first document and the second document using an information filtering big model, wherein the information filtering big model is obtained by fine-tuning the big language model based on knowledge of a set domain and annotated corpus obtained in real-world scenarios.

[0213] It should be noted that the examples and application scenarios implemented by the modules in the above device embodiments and the corresponding steps in the method embodiments are the same, but are not limited to the content disclosed in the above method embodiments. It should also be noted that the above modules, as part of the device, can be executed in a computer system such as a set of computer-executable instructions.

[0214] Those skilled in the art will understand that various aspects of this disclosure can be implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, which can be collectively referred to herein as a "circuit", "module" or "system".

[0215] Based on the same inventive concept, this disclosure also provides an electronic device, which includes: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the document analysis method described above by executing the executable instructions. Since the principle by which this electronic device solves the problem is similar to that of the above method embodiments, the implementation of this electronic device embodiment can refer to the implementation of the above method embodiments, and repeated details will not be described again.

[0216] The following reference Figure 10 To describe an electronic device 1000 according to such an embodiment of the present disclosure. Figure 10 The electronic device 1000 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments disclosed herein.

[0217] like Figure 10As shown, the electronic device 1000 is manifested in the form of a general-purpose computing device. The components of the electronic device 1000 may include, but are not limited to: at least one processing unit 1010, at least one storage unit 1020, and a bus 1030 connecting different system components (including storage unit 1020 and processing unit 1010).

[0218] The storage unit stores program code, which can be executed by the processing unit 1010, causing the processing unit 1010 to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of this disclosure. The processing unit 1010 can perform the following steps of the above method embodiments: obtaining a first document and a second document from different sources, wherein the first document and the second document are records concerning the same event; extracting a first question text set from the first document and a second question text set from the second document, wherein the first question text set includes at least one first question text, and the second question text set includes at least one second question text; based on the similarity between the first question text and the second question text, filtering at least one question text group from the first question text set and / or the second question text set, the question text group including at least one third question text; searching for each third question text in the question text group in the first document and / or the second document to obtain search results corresponding to the third question text; using each third question text in the question text group and its corresponding search results as input to a large language model to obtain analysis results for the first document and the second document.

[0219] Storage unit 1020 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 10201 and / or a cache memory unit 10202, and may further include a read-only memory unit (ROM) 10203.

[0220] Storage unit 1020 may also include a program / utility 10204 having a set (at least one) program module 10205, such program module 10205 including but not limited to: operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.

[0221] Bus 1030 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the multiple bus structures.

[0222] Electronic device 1000 can also communicate with one or more external devices 1040 (e.g., keyboard, pointing device, Bluetooth device, etc.), one or more devices that enable a user to interact with electronic device 1000, and / or any device that enables electronic device 1000 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 1050. Furthermore, electronic device 1000 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 1060. As shown, network adapter 1060 communicates with other modules of electronic device 1000 via bus 1030. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 1000, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0223] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the methods according to the embodiments of this disclosure.

[0224] Based on the same inventive concept, this disclosure also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements any of the above-described document analysis methods. Since the principle by which this computer-readable storage medium embodiment solves the problem is similar to that of the above-described method embodiments, the implementation of this computer-readable storage medium embodiment can refer to the implementation of the above-described method embodiments, and repeated details will not be elaborated further.

[0225] More specific examples of computer-readable storage media in this disclosure may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0226] In this disclosure, a computer-readable storage medium may include a data signal propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of transmitting, propagating, or transmitting a program for use by or in connection with an instruction execution system, apparatus, or device.

[0227] Optionally, the program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.

[0228] In practice, program code for performing the operations of this disclosure can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java and C++, and conventional procedural programming languages ​​such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0229] Based on the same inventive concept, this disclosure also provides a computer program product, including a computer program or instructions, which, when executed by a processor, implement the document analysis method of any one of the above method embodiments. Since the principle by which this computer program product embodiment solves the problem is similar to that of the above method embodiments, the implementation of this computer program product embodiment can refer to the implementation of the above method embodiments, and repeated details will not be elaborated further.

[0230] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0231] Furthermore, although the steps of the method in this disclosure are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or a step may be broken down into multiple steps.

[0232] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, mobile terminal, or network device, etc.) to execute the methods according to the embodiments of this disclosure.

[0233] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the appended claims.

Claims

1. A document analysis method, characterized in that, include: Obtain a first document and a second document from different sources, wherein the first document and the second document are records of the same event; Extract a first question text set from the first document and extract a second question text set from the second document, wherein the first question text set includes at least one first question text and the second question text set includes at least one second question text; Based on the similarity between the first question text and the second question text, at least one question text group is selected from the first question text set and / or the second question text set, and the question text group includes at least one third question text; For each third question text in the question text group, a search is performed in the first document and / or the second document to obtain the search results corresponding to the third question text; Each third question text in the question text group and its corresponding search results are used as input to the large language model to obtain the analysis results of the first document and the second document.

2. The document analysis method according to claim 1, characterized in that, The question text group includes a first question text group, and the search results corresponding to the third question text include: a first response text and a second response text; Based on the similarity between the first question text and the second question text, at least one group of question texts is selected from the first question text set and / or the second question text set, including: If the similarity between the first question text and the second question text is greater than or equal to a set similarity threshold, then a third question text is determined based on the first question text and / or the second question text, and added to the first question text group; For each third question text in the question text group, a search is performed in the first document and / or the second document to obtain the search results corresponding to the third question text, including: For each of the third question texts in the first question text group, a search is performed in the first document to obtain the corresponding first response text; The second document is searched to obtain the corresponding second response text.

3. The document analysis method according to claim 1, characterized in that, The at least one question text group includes a second question text group; The step of selecting at least one group of question texts from the first and / or second question text sets based on the similarity between the first and second question texts includes: If the similarity between the first question text and the second question text is less than a set similarity threshold, then the first question text is added as the third question text to the second question text group; For each third question text in the question text group, a search is performed in the first document and / or the second document to obtain the search results corresponding to the third question text, including: For each of the third question texts in the second question text group, a search is performed in the second document to obtain a first search result, wherein the first search result includes: no response text corresponding to the third question text in the second question text group was found in the second document.

4. The document analysis method according to claim 1, characterized in that, The at least one question text group includes a third question text group; The step of selecting at least one group of question texts from the first and / or second question text sets based on the similarity between the first and second question texts includes: If the similarity between the first question text and the second question text is less than a set similarity threshold, then the second question text is added as the third question text to the third question text group; For each third question text in the question text group, a search is performed in the first document and / or the second document to obtain the search results corresponding to the third question text, including: For at least one of the third question texts in the third question text group, a search is performed in the first document to obtain a second search result, wherein the second search result includes: no response text corresponding to the third question text in the third question text group was found in the first document.

5. The document analysis method according to any one of claims 1-4, characterized in that, The steps of extracting the first question text set from the first document and extracting the second question text set from the second document include: The first candidate question text set that meets the set rules is selected from the first document according to the rule matching algorithm; The first candidate question text set is filtered using the large language model to obtain the first question text set. According to the rule matching algorithm, a second set of candidate question texts that conform to the set rules is selected from the second document; The second candidate question text set is filtered to obtain the second question text set.

6. The document analysis method according to any one of claims 1-4, characterized in that, The step of selecting at least one group of question texts from the first and / or second question text sets based on the similarity between the first and second question texts includes: The first question text is embedded using a sentence embedding model to obtain a first question vector, wherein the sentence embedding model is obtained by fine-tuning a large language model based on question samples from a defined domain. The second question text is embedded using the sentence embedding model to obtain the second question vector; Calculate the similarity between the first question vector and the second question vector; Based on the relationship between the similarity and the set similarity threshold, at least one group of question texts is selected from the first question text set and / or the second question text set.

7. The document analysis method according to any one of claims 6, characterized in that, The third question text has its corresponding third question vector; The step of searching for each third question text in the question text group within the first document and / or the second document to obtain the search results corresponding to the third question text includes: The first document is sliced ​​and vectorized to obtain at least one first question-and-response vector. The second document is sliced ​​and vectorized to obtain at least one second question-and-answer vector; For each third question text in the question text group, the third question vector is used to search in at least one first question response vector and / or at least one second question response vector to obtain the search results corresponding to the third question text.

8. The document analysis method according to claim 7, characterized in that, The step of slicing and vectorizing the first document to obtain at least one first question-and-response vector, and then embedding the second question text using the sentence embedding model to obtain a second question vector, includes: The first document is segmented using the semantic understanding capabilities of the large language model to obtain at least one initial question-and-response block. The second document is segmented based on the set symbols and sentence structure features to obtain the second initial question and answer block; The first document and the second document are semantically encoded using a context embedding model to obtain a high-dimensional semantic vector corresponding to the first document and a high-dimensional vector corresponding to the second document. Based on the first initial question-and-response block, the high-dimensional semantic vector corresponding to the first document is segmented to obtain multiple first question-and-response vectors; Based on the second initial question-and-response block, the high-dimensional semantic vector corresponding to the second document is segmented to obtain multiple second question-and-response vectors.

9. The document analysis method according to any one of claims 1-4, characterized in that, Also includes: The first document and the second document are preprocessed separately; Sensitive information in the first and second documents is filtered using a large information filtering model, which is obtained by fine-tuning a large language model based on knowledge of a defined domain and annotated corpus obtained from real-world scenarios.

10. A document analysis device, characterized in that, include: The document acquisition module is used to acquire a first document and a second document from different sources, wherein the first document and the second document are records of the same event; The question text set extraction module is used to extract a first question text set from the first document and a second question text set from the second document, wherein the first question text set includes at least one first question text and the second question text set includes at least one second question text; The question text group filtering module is used to filter at least one question text group from the first question text set and / or the second question text set based on the similarity between the first question text and the second question text set, wherein the question text group includes at least one third question text. The question text retrieval module is used to search in the first document and / or the second document for each third question text in the question text group, and obtain the retrieval results corresponding to the third question text. The analysis result determination module is used to take each third question text in the question text group and its corresponding search results as input to the large language model to obtain the analysis results of the first document and the second document.

11. An electronic device, characterized in that, include: processor; as well as Memory for storing the executable instructions of the processor; The processor is configured to execute the document analysis method of any one of claims 1 to 9 by executing the executable instructions.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the document analysis method according to any one of claims 1 to 9.

13. A computer program product comprising: A computer program or instruction, characterized in that, when executed by a processor, the computer program or instruction implements the document analysis method according to any one of claims 1 to 9.