A method, apparatus, electronic device and storage medium for retrieving and analyzing interview data.

By constructing a structured knowledge base and a multi-dimensional inverted index, combined with a large language model and a code interpreter, the problem of accurate retrieval and anti-illusion analysis of unstructured interview data was solved, achieving efficient financial interview data processing.

CN122817266BActive Publication Date: 2026-11-10CHINA FINANCIAL SUPPORTING SERVICES CFSS
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611329856.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-08-31
Publication Date
2026-11-10
Estimated Expiration
2046-08-31

AI Technical Summary

Technical Problem

Existing technologies suffer from several drawbacks when processing unstructured interview data: insufficient accuracy in structured queries, a large amount of irrelevant content in the recall results, the potential for data illusion when directly reading large models, and the inability to perform multi-dimensional combined queries, all of which are costly.

Method used

By using a predefined vocabulary and pattern matching rule base for multi-pattern matching and field location, a structured knowledge base is built. Intent recognition and key-value matching are performed using a multi-dimensional inverted index and a large language model. Combined with a code interpreter to execute query code, accurate retrieval and anti-hallucination analysis are achieved.

Benefits of technology

It significantly improved retrieval accuracy, reduced token consumption, enabled automated and continuous updates of the knowledge base, and solved the problems of data illusion and insufficient retrieval accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122817266B_ABST
    Figure CN122817266B_ABST
Patent Text Reader

Abstract

This invention discloses an interview data retrieval and analysis method, apparatus, electronic device, and storage medium, relating to the fields of artificial intelligence and big data analysis. The method includes: performing multi-pattern matching and field location on the original interview text using a predefined lexicon and pattern matching rule base; extracting metadata fields; and semantically tagging them using a risk lexicon to construct a structured knowledge base. A multi-dimensional inverted index is constructed by reading the field values ​​of five dimensions from each record as index keys and the record ID as the index value. Upon receiving a query, a large language model is used for intent recognition and query code generation. Based on the inverted index, key-value matching is performed to locate the record and return the data. Newly added files are identified, parsed, and converted into structured records. Content identifiers are calculated and compared with the identifier set in the knowledge base. Records that do not match are appended to the knowledge base and inserted into the inverted index. This invention solves the problems of low retrieval accuracy and high cost in existing technologies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of artificial intelligence and big data analysis technology, and in particular to a method, apparatus, electronic device and storage medium for interview data retrieval and analysis. Background Technology

[0002] As the digital transformation of the banking industry deepens, frontline account managers have accumulated massive amounts of unstructured interview records through numerous on-site interviews. These records, existing in free text form, contain extremely high business value, including implicit customer needs, competitor dynamics, abnormal risk signals, and market price information. However, how to efficiently and accurately extract structured business insights from tens of thousands of unstructured interview data points is a core challenge facing data intelligence in the financial industry.

[0003] In existing technologies, the following methods are commonly used to address this problem: Pure vector semantic retrieval schemes slice the text and generate vectors through an embedding model, then store them in a vector database for similarity retrieval. However, vector retrieval suffers from semantic drift, and for precise structured queries, it cannot guarantee recall accuracy, resulting in a large amount of irrelevant content in the returned results due to incomplete or inaccurate retrieval. Large-scale models directly read the original text, directly inputting the complete interview transcript into a large language model for analysis. However, large models are prone to data illusions when processing long texts, fabricating non-existent data, incorrectly citing sources, and confusing the content of different records, while also incurring extremely high labeling costs.

[0004] Traditional keyword full-text search solutions use full-text search engines, but they cannot understand the semantic context of business operations, lack structured field support, and cannot perform multi-dimensional combined queries and statistical analysis. Rule engines and knowledge graph solutions extract and reason through manually defined rules and knowledge graph construction, but the coverage of fixed rules is low, and the construction and maintenance costs of knowledge graphs are extremely high. None of the above methods can effectively solve the triple challenges of data illusion, insufficient retrieval accuracy, and excessive labeling costs in financial interview data processing.

[0005] Therefore, there is an urgent need for an interview data retrieval and analysis method that can perform domain-adapted structured parsing of unstructured interview data, enabling accurate retrieval and anti-hallucination intelligent analysis. Summary of the Invention

[0006] This invention provides an interview data retrieval and analysis method to address the problems of insufficient accuracy and high cost associated with existing structured queries, the presence of irrelevant content in recall results, the tendency for direct reading of large models to produce data illusions, and the inability to perform multi-dimensional combined queries. The technical solution is as follows: According to one aspect of the present invention, an interview data retrieval and analysis method is provided, the method comprising: acquiring original interview records; performing multi-pattern matching and field positioning on the text in the interview records based on a predefined thesaurus and pattern matching rule base to obtain metadata fields; and semantically tagging the interview records using a risk thesaurus to obtain tag fields; constructing a structured knowledge base in combination with the metadata fields; traversing each record in the knowledge base, reading the field values ​​of each dimension in each record as index keys, and constructing a multi-dimensional inverted index using the record ID as the index value; the dimensions include organizational dimension, department dimension, and interviewer dimension. The system includes dimensions for degree, anomaly markers, and keywords; it receives query language, uses a large language model to identify the intent of the query language and generate corresponding query code, and uses a code interpreter to perform key-value matching based on the knowledge base and inverted index to locate the corresponding record ID and corresponding field data; it obtains a list of remote files and performs set difference operation with the local processed file list to identify newly added files, downloads the newly added files and parses them into structured records, calculates the content identifier for each record, compares it with the identifier set in the knowledge base, and appends records that do not match to the knowledge base and inserts them into the inverted index.

[0007] In one embodiment, obtaining the original interview transcript and performing multi-pattern matching and field location on the text in the interview transcript based on a predefined thesaurus and pattern matching rule library to obtain metadata fields is achieved through the following steps: receiving the original unstructured interview transcript, loading a predefined regular expression pattern library and a business keyword thesaurus; the regular expression pattern library includes a bank name thesaurus, a department thesaurus, date pattern regular expressions, amount pattern regular expressions, and personnel title regular expressions; the business keyword thesaurus includes a bank name thesaurus, a department name thesaurus, and a business direction thesaurus; and using a field extraction engine to perform multi-pattern matching and field location on the text in the interview transcript based on the regular expression pattern library and the business keyword thesaurus, automatically identifying and extracting structured metadata fields; the metadata fields include bank name, department name, interviewer, date, and amount.

[0008] In one embodiment, the semantic tagging of the interview records using a risk terminology to obtain tag fields is achieved through the following steps: a predefined risk terminology is input into a field extraction engine, which scans and matches the original text content of each interview record; the risk terminology includes risk, anomaly, problem, difficulty, challenge, complaint, dispute, litigation, and violation; the field extraction engine searches the original text of the interview records to see if the above keywords are matched, automatically determines whether the corresponding record contains abnormal or risk information, and outputs the corresponding semantic tag field as the tagging result for each record.

[0009] In one embodiment, the construction of a structured knowledge base by combining the metadata fields is achieved through the following steps: assembling the metadata fields, the semantic tag fields, and the interview transcript text content according to a predefined data structure to obtain structured records, and persistently storing each record in JSON format to a local knowledge base file; the data structure includes metadata fields, content fields, and tag fields; the metadata fields include the interviewer, department, and bank type; the content fields include the original text and structured subfields extracted from the original text; the tag fields include anomaly tags and a list of keywords.

[0010] In one embodiment, traversing each record in the knowledge base and reading the field values ​​of each dimension in each record as index keys, and using the record ID as the index value, a multi-dimensional inverted index is constructed through the following steps: traversing each structured record in the knowledge base, for each record, reading the organization dimension field value, department dimension field value, interviewer dimension field value, anomaly marker dimension field value, and keyword dimension field value from the record; using the organization dimension field value as the key for the organization dimension index, the department dimension field value as the key for the department dimension index, the interviewer dimension field value as the key for the interviewer dimension index, and the anomaly marker dimension field value as the key for the anomaly marker dimension index; using the keyword dimension field value as the key for the keyword dimension index, and using the unique identifier of each record as the index value, constructing five key-value pairs and writing them into the five-dimensional inverted index structure to form a five-dimensional inverted index; the five-dimensional inverted index is used to enable each record to be directly located through field values ​​in all five dimensions.

[0011] In one embodiment, the process involves receiving a query language, using a large language model to identify the intent of the query language and generate corresponding query code, and then using a code interpreter to perform key-value matching based on the knowledge base and inverted index to locate the corresponding record ID and field data. This is achieved through the following steps: receiving a natural language query request input by a user; using a large language model as an intent understanding engine to analyze the query request and identify the intent type; the intent types include interviewee query, bank query, region query, keyword search, anomaly detection, competitor analysis, cross-bank topic analysis, price analysis, and personnel change analysis; selecting a corresponding template from predefined code templates based on the intent type, and extracting the key parameters required for the intent type from the query request; the key parameters include interviewee name, bank name, and search keywords; filling the key parameters into the corresponding variable positions of the template to generate query code; receiving the query code through a code interpreter, performing syntactic preprocessing on the query code, loading the knowledge base and inverted index in an isolated environment to execute the query code, performing key-value matching in the inverted index to locate a list of record identifiers that meet the conditions, and reading all field data of the corresponding record from the knowledge base as the query result.

[0012] In one embodiment, the process involves obtaining a remote file list, performing a set difference operation with the locally processed file list to identify newly added files, downloading the new files and parsing them into structured records, calculating a content identifier for each record, comparing it with the identifier set in the knowledge base, and appending records that do not match to the knowledge base and inserting them into the inverted index. This is achieved through the following steps: connecting to an object storage service via a compatible interface, paginating and listing files in the storage bucket based on a specified directory prefix to construct a remote file list, performing a set difference operation with the locally processed file list to identify files that exist in the remote file list but not in the locally processed list. If no new file is added, the synchronization is skipped. If a new file exists, it is normalized through the object storage interface and downloaded to the local temporary directory. The data in each column of the new file is mapped to the corresponding field of the structured record according to the predefined column mapping relationship, and converted into a record consistent with the knowledge base. Part of the characters in the original content of each record are concatenated with the field value to form a string, and a hash value is calculated as the content identifier. This hash value is compared with the content identifier set of all records in the knowledge base one by one. If no match is found, the new record is written to the knowledge base file, and the field value of the new record is inserted into the inverted index.

[0013] According to one aspect of the present invention, an interview data retrieval and analysis apparatus includes: a data structuring and parsing module, configured to acquire original interview records, perform multi-pattern matching and field positioning on the text in the interview records based on a predefined lexicon and pattern matching rule base to obtain metadata fields, and perform semantic tagging on the interview records using a risk lexicon to obtain tag fields, and construct a structured knowledge base by combining the metadata fields; and an inverted index construction module, configured to traverse each record in the knowledge base, read the field values ​​of each dimension in each record as index keys, and construct a multi-dimensional inverted index using the record ID as the index value; the dimensions include an organization dimension, a department dimension, and an interviewer dimension. The system includes three dimensions: degree, anomaly marker, and keyword. An intent understanding and retrieval module receives the query language, uses a large language model to identify the intent of the query language and generate corresponding query code, and uses a code interpreter to perform key-value matching based on the knowledge base and inverted index to locate the corresponding record ID and corresponding field data. A knowledge base incremental update module obtains a remote file list and performs a set difference operation with the locally processed file list to identify newly added files. It downloads the newly added files, parses and converts them into structured records, calculates a content identifier for each record, compares it with the identifier set in the knowledge base, and appends records that do not match to the knowledge base and inserts them into the inverted index.

[0014] According to one aspect of the present invention, an electronic device includes at least one processor and at least one memory, wherein computer-readable instructions are stored on the memory; the computer-readable instructions are executed by one or more of the processors to cause the electronic device to implement the interview data retrieval and analysis method as described above.

[0015] According to one aspect of the present invention, a storage medium has computer-readable instructions stored thereon, which are executed by one or more processors to implement the interview data retrieval and analysis method as described above.

[0016] The beneficial effects of the technical solution provided by this invention are: In the above technical solution, this invention first acquires the original interview records. Based on a predefined thesaurus and pattern matching rule base, it performs multi-pattern matching and field localization on the interview text, extracting metadata fields such as organization name, department name, interviewer, and date. Simultaneously, it uses a risk thesaurus to semantically label the records, transforming the unstructured interview text into a structured knowledge base containing metadata fields, content fields, and tag fields. It then traverses each record in the knowledge base, reading the field values ​​of five dimensions—organization, department, interviewer, anomaly marker, and keywords—as index keys and the record ID as index values ​​to construct a multi-dimensional inverted index, achieving direct localization based on field values. Upon receiving a user's natural language query, it uses a large language model to identify the query intent and generate corresponding query code. A code interpreter loads the knowledge base and inverted index to execute the code for key-value matching, locating records that meet the conditions and returning the corresponding field data. Simultaneously, by obtaining a remote file list through an object storage interface and performing a set difference operation with the locally processed file list to identify newly added files, the files are downloaded, parsed, and converted into structured records. Content identifiers are calculated and compared with the identifier set in the knowledge base. Records that do not match are appended to the knowledge base and inserted into the inverted index, achieving automated incremental updates to the knowledge base. This invention solves the data illusion problem that occurs when large models directly read raw text through structured preprocessing, inverted index precise matching, and code interpreter execution mechanisms. It also significantly reduces token consumption, substantially improves retrieval accuracy, and achieves automated continuous updates to the knowledge base. Therefore, it effectively addresses the triple challenges of frequent data illusions, insufficient retrieval accuracy, and excessive token consumption in existing technologies. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention, and those skilled in the art can obtain other drawings based on these drawings without creative effort.

[0018] Figure 1 This is a flowchart illustrating an interview data retrieval and analysis method according to an exemplary embodiment; Figure 2 This is a schematic diagram illustrating the architecture of an interview data retrieval and analysis method according to an exemplary embodiment; Figure 3 yes Figure 2 The flowchart of dynamic parsing and structuring of unstructured text in the corresponding embodiment; Figure 4 yes Figure 2 A schematic diagram of the multi-dimensional inverted index construction in the corresponding embodiment; Figure 5 yes Figure 2 The flowchart of anti-hallucination query and analysis based on the code interpreter in the corresponding embodiment; Figure 6 yes Figure 2 A schematic diagram of the multi-scenario report generation logic in the corresponding embodiment; Figure 7 yes Figure 2 The flowchart of incremental knowledge base update in the corresponding embodiment; Figure 8 This is a block diagram illustrating an interview data retrieval and analysis apparatus according to an exemplary embodiment; Figure 9 This is a hardware structure diagram of an electronic device according to an exemplary embodiment; Figure 10 This is a block diagram illustrating an electronic device according to an exemplary embodiment. Detailed Implementation

[0019] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.

[0020] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this disclosure means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when we say an element is “connected” or “coupled” to another element, it can be directly connected or coupled to the other element, or there may be intermediate elements. Furthermore, “connected” or “coupled” as used herein can include wireless connections or wireless coupling. The term “and / or” as used herein includes all or any units and all combinations of one or more associated listed items.

[0021] This invention provides an interview data retrieval and analysis method. It transforms unstructured interview text into a structured knowledge base through a business thesaurus and rule engine, achieves precise matching retrieval through a multi-dimensional inverted index, eliminates data illusions in large models by executing queries through a code interpreter, and achieves automated incremental updates of the knowledge base through object storage synchronization and content identifier comparison. This method solves the triple challenges of frequent data illusions, insufficient retrieval accuracy, and excessive token consumption in existing technologies. This interview data retrieval and analysis method is applicable to interview data retrieval and analysis devices, which can be electronic devices. The interview data retrieval and analysis method in this invention can be applied to various scenarios, such as domain-adaptive knowledge mining and decision support for financial interview data.

[0022] Please see Figure 1 This invention provides a method for retrieving and analyzing interview data, which is applicable to electronic devices.

[0023] In the following method embodiments, for ease of description, the execution subject of each step of the method is an electronic device, but this does not constitute a specific limitation.

[0024] like Figure 1 As shown, the method may include the following steps: Step 110: Obtain the original interview records. Based on the predefined vocabulary and pattern matching rule base, perform multi-pattern matching and field positioning on the text in the interview records to obtain metadata fields. Then, use the risk vocabulary to perform semantic tagging on the interview records to obtain tag fields. Combine the metadata fields to build a structured knowledge base.

[0025] In one possible implementation, the system receives raw, unstructured interview transcripts, loads a predefined regular expression pattern library and a business keyword thesaurus, and uses a field extraction engine to perform multi-pattern matching and field location on the text in the interview transcripts based on the regular expression pattern library and the business keyword thesaurus, automatically identifying and extracting structured metadata fields.

[0026] In one possible implementation, a predefined risk term list is input into a field extraction engine. The field extraction engine scans and matches the original text content of each interview record. The engine searches the original text of the interview record to see if the above keywords are matched, automatically determines whether the corresponding record contains abnormal or risk information, and outputs the corresponding semantic tag field as the annotation result for each record.

[0027] In one possible implementation, the metadata fields, semantic tag fields, and interview transcript text content are assembled according to a predefined data structure to obtain structured records, which are then persistently stored in a local knowledge base file in JSON format.

[0028] The regular expression pattern library includes bank name thesaurus, department thesaurus, date pattern regular expression, amount pattern regular expression, and personnel title regular expression, etc. The business keyword thesaurus includes bank name thesaurus, department name thesaurus, and business direction thesaurus, etc. The metadata fields include bank name, department name, interviewer, date, amount, etc. The risk thesaurus includes risk, anomaly, problem, difficulty, challenge, complaint, dispute, litigation, violation, etc. The data structure includes metadata fields, content fields, and tag fields, etc. The metadata fields include interviewer, department, and bank type, etc. The content fields include raw text and structured subfields extracted from the raw text, etc. The tag fields include anomaly tags and keyword lists, etc., none of which are specified here.

[0029] Specifically, the system receives raw, unstructured interview transcripts containing business visit information in free text format. It loads a predefined regular expression pattern library and a business keyword thesaurus. The regular expression pattern library includes date, amount, and personnel title patterns, used to match date information in formats such as "year, month, day," amount information in formats such as "ten thousand yuan," and personnel title information in formats such as "visiting Mr. / Ms. [Name]." The business keyword thesaurus includes bank name, department name, and business direction thesaurus. The bank name thesaurus covers the full and abbreviations of the five major state-owned banks and joint-stock banks. These rules and thesaurus resources provide the matching basis for subsequent text parsing.

[0030] Furthermore, the loaded regular expression pattern library and business keyword thesaurus are input into the field extraction engine, which performs multi-pattern matching and field location operations on the original interview text. Based on the aforementioned rules and the thesaurus, the field extraction engine scans the text, automatically identifying and extracting structured metadata fields, including core information such as bank name, department name, interviewer, date, and amount. This process accurately locates and extracts key information scattered throughout the free text.

[0031] Furthermore, a predefined risk terminology is input into the extraction engine, which scans and matches the original text content of each interview record. This risk terminology includes at least semantic keywords representing abnormal or risky situations, such as "risk," "abnormality," "problem," "difficulty," "challenge," "complaint," "dispute," "litigation," and "violation." Based on whether these keywords are found in the original text, the engine automatically determines whether the record contains abnormal or risky information and outputs corresponding semantic tag fields as annotation results for each record.

[0032] Furthermore, all structured metadata fields extracted through field extraction, semantic tag fields obtained through risk terminology annotation, and the original interview text content are assembled according to a predefined data structure to form a complete structured record. This data structure consists of three parts: metadata fields, content fields, and tag fields. The metadata fields include the interviewer, their department, and bank type; the content fields include the original text and structured subfields extracted from the original text; and the tag fields include anomaly tags and a list of keywords. The assembled structured record is then persistently stored in a local knowledge base file in JSON format, realizing the transformation from unstructured text to structured data.

[0033] In the above process, the embodiments of the present invention use a predefined regular expression pattern library and a business keyword thesaurus to drive the field extraction engine to perform multi-pattern matching on unstructured interview texts. At the same time, the risk thesaurus is used to automatically label the records with semantic tags, so that the key business information that was originally scattered in the free text is accurately extracted and formed into a structured record in a unified format. This provides the basis for eliminating the illusion of a large model from the source of the data and realizes the complete transformation of unstructured data into a structured knowledge base.

[0034] Step 120: Traverse each record in the knowledge base, read the field values ​​of each dimension in each record as the index key, and build a multi-dimensional inverted index using the record ID as the index value.

[0035] In one possible implementation, each structured record in the knowledge base is traversed, and for each record, the values ​​of the organization dimension field, department dimension field, interviewer dimension field, anomaly marker dimension field, and keyword dimension field are read from the record respectively.

[0036] In one possible implementation, the organization dimension field value is used as the key for the organization dimension index, the department dimension field value is used as the key for the department dimension index, the interviewer dimension field value is used as the key for the interviewer dimension index, the anomaly marker dimension field value is used as the key for the anomaly marker dimension index, and the keyword dimension field value is used as the key for the keyword dimension index. Each record's unique identifier is used as the index value, and five key-value pairs are constructed and written into the five-dimensional inverted index structure to form a five-dimensional inverted index.

[0037] The five-dimensional inverted index is used to enable each record to be located directly by field values ​​in five dimensions; the dimensions include organization dimension, department dimension, interviewer dimension, anomaly marker dimension, keyword dimension, etc., which are not limited here.

[0038] Specifically, the system loads the structured knowledge base file and automatically initiates the construction process of the multi-dimensional inverted index when the knowledge base is loaded. The system traverses each structured record in the knowledge base, reading all the field information contained in each record one by one, preparing for the subsequent extraction of index keys and the construction of the index structure.

[0039] Furthermore, for each record encountered, the values ​​of the institution dimension field, department dimension field, interviewer dimension field, anomaly marker dimension field, and keyword dimension field are retrieved from that record. These field values ​​correspond to different dimensions of business attribute information in the interview record, including the bank institution to which the record belongs, the department to which it belongs, the interviewer of the record, whether it contains abnormal risks, and business keywords extracted from the text. The above five dimensions cover the most core retrieval dimensions of the interview data.

[0040] Furthermore, using the organization dimension field value as the key for the organization dimension index, the department dimension field value as the key for the department dimension index, the interviewer dimension field value as the key for the interviewer dimension index, the anomaly marker dimension field value as the key for the anomaly marker dimension index, and the keyword dimension field value as the key for the keyword dimension index, and using the unique identifier of each record as the index value, five key-value pairs are constructed and written into the inverted index structures of the five dimensions, forming a five-dimensional inverted index. This five-dimensional inverted index allows each record to be directly located through field values ​​in the five dimensions of organization, department, interviewer, anomaly marker, and keyword, realizing a fast mapping from field values ​​to record IDs.

[0041] In the above process, the embodiments of the present invention construct a multi-dimensional inverted index by extracting the field values ​​of five core business dimensions in the structured record as index keys and the record ID as index value, so that the key-value matching can be performed directly in the index during the query, providing the precise positioning capability with O(1) time complexity, realizing the replacement of vector approximate retrieval with structured precise matching, and fundamentally eliminating the semantic drift problem.

[0042] Step 130: Receive the query language, use a large language model to identify the intent of the query language and generate the corresponding query code, and use a code interpreter to perform key-value matching based on the knowledge base and inverted index to locate the corresponding record ID and corresponding field data.

[0043] In one possible implementation, a natural language query request is received from the user, a large language model is used as the intent understanding engine to analyze the query request, identify the intent type, select the corresponding template from the predefined code templates according to the intent type, and extract the key parameters required for the intent type from the query request.

[0044] In one possible implementation, key parameters are filled into the corresponding variable positions in the template to generate query code. The query code is received by a code interpreter, and after syntactic preprocessing, the knowledge base and inverted index are loaded in an isolated environment to execute the query code. Key-value matching is performed in the inverted index to locate the list of record identifiers that meet the conditions, and all field data of the corresponding record is read from the knowledge base as the query result and returned.

[0045] The intent types include interviewee search, bank search, region search, keyword search, anomaly detection, competitor analysis, cross-industry topic analysis, price analysis, and personnel change analysis, etc. The key parameters include interviewee name, bank name, and search keywords, etc., none of which are specified here.

[0046] Specifically, the system receives natural language query requests from users and uses a large language model as its intent understanding engine to analyze the requests and identify the intent type of the query. Intent types include various business scenarios such as interviewee queries, bank queries, region queries, keyword searches, anomaly detection, competitor analysis, cross-industry topic analysis, price analysis, and personnel change analysis. The large language model also extracts key parameters required for the intent type from the query request, including the interviewee's name, bank name, and search keywords, to prepare necessary data for code generation.

[0047] Furthermore, based on the identified intent type, the large language model selects a template from a set of predefined code templates that corresponds to the current intent type. Each predefined code template corresponds to a query intent type and contains the core code logic framework required to complete that type of query. The large language model then fills the corresponding variable positions in the selected template with the key parameters extracted from the user query, generating complete structured query code. This process is governed by code constraint mechanisms: the knowledge base path is fixed, field names are consistent with the JSON data structure, and statistical outputs must be complete and cannot be omitted.

[0048] Furthermore, after receiving the generated query code, the code interpreter performs syntax preprocessing on the code before execution to correct any syntax anomalies that the large language model might introduce during code generation. Subsequently, the code interpreter loads the knowledge base file from step one and the inverted index file from step two in an isolated environment and executes the query code. During execution, the code interpreter performs exact key-value matching in the inverted index based on the structured field matching conditions in the code, directly locating the list of record identifiers that meet the conditions, and then reads all field data of the corresponding record from the knowledge base as the query result.

[0049] Furthermore, the actual statistical data returned by the code interpreter is passed as context to the large language model for in-depth analysis and report generation. Based on the user's query intent, the large language model automatically selects the corresponding report generation template to generate a structured analysis report. Report templates include templates for cross-bank in-depth analysis, templates for single-column regional or bank in-depth analysis, competitor analysis, price or quotation analysis, and personnel change analysis. The large language model infers and summarizes based on the actual statistical data returned by the code interpreter, rather than on the memory stored in its internal parameters; each conclusion can be traced back to the original interview records through source information.

[0050] In the above process, the embodiments of the present invention use a large language model to identify the intent of natural language queries and generate code. After the code interpreter loads the knowledge base and inverted index, it performs an exact key-value matching query and returns the real data to the large language model to generate a report. This allows the large language model to be responsible only for task understanding, code generation, and report generation based on real data. It provides a mechanism to fundamentally eliminate the possibility of the large model fabricating data, and realizes the complete elimination of data illusion in the retrieval process and a significant reduction in token consumption.

[0051] Step 140: Obtain the remote file list and perform set difference operation with the local processed file list to identify new files. Download the new files and parse them into structured records. Calculate the content identifier for each record and compare it with the identifier set in the knowledge base. Add the records that do not match to the knowledge base and insert them into the inverted index.

[0052] In one possible implementation, an object storage service is connected via a compatible interface. Files in the bucket are listed in pages based on a specified directory prefix to construct a remote file list. The remote file list is then compared with the locally processed file list using a set difference operation to identify files that exist in the remote list but not in the locally processed list as new files.

[0053] In one possible implementation, if no new files are added, the synchronization is skipped. If new files are added, the new files are normalized through the object storage interface and downloaded to the local temporary directory. The data in each column of the new files is mapped to the corresponding fields of the structured records according to the predefined column mapping relationship, and converted into records consistent with the knowledge base.

[0054] In one possible implementation, a string is concatenated with some characters from the original content of each record and the field value, and a hash value is calculated as the content identifier. This hash value is then compared with the set of content identifiers for all records in the knowledge base. If no match is found, the new record is written to the knowledge base file, and the field values ​​in the new record are inserted into the inverted index.

[0055] Specifically, the system connects to the object storage service via an S3-compatible interface, listing files in the bucket paginated by a specified directory prefix, with two hundred files listed per page and support for traversing all pages using pagination tokens. Excel-formatted files are then selected from the listing results to construct a complete list of remote files, reflecting the current state of all pending source files in the object storage.

[0056] Furthermore, a local list of processed files is loaded, which records the identifiers of all files downloaded and imported into the knowledge base downstream. The remote file list and the local processed file list are then compared using a set difference operation to identify files that exist remotely but not in the local processed list as new files. If no new files are found, the synchronization is skipped; otherwise, the subsequent download and processing flow begins.

[0057] Furthermore, new files are downloaded to a local temporary directory via an object storage interface. Before downloading, file identifiers are standardized, removing workspace prefixes and retaining relative paths for file location. A spreadsheet processing library is used to read the downloaded Excel file, mapping each column of data in the Excel file to corresponding fields of structured records according to predefined column mapping relationships. Simultaneously, structured subfields and business keywords are extracted from the original text using regular expressions, and each record is converted into a JSON format record consistent with the knowledge base structure.

[0058] Furthermore, for each transformed new record, a portion of the original content is concatenated with the values ​​of the interviewee, bank type, and department fields to form a string. A hash value is calculated for this concatenated string to serve as the record's content identifier. The existing knowledge base's set of content identifiers for all records is loaded. The new record's content identifier is compared one by one with this set. If a match is found, the record is considered to already exist in the knowledge base and processing is skipped; otherwise, it is considered a new record. The new record that did not match is appended to the knowledge base file. Simultaneously, the field values ​​of this new record are inserted into the inverted indexes for the organization, department, interviewee, and keyword dimensions to incrementally update the inverted indexes. The updated knowledge base file, inverted index file, and statistics file are persisted back to disk, and the identifiers of the processed files are appended to the local list of processed files. In addition, the above process supports adaptive switching between full and incremental modes. When the local knowledge base file does not exist, the system automatically switches to full reconstruction mode, downloading and merging all Excel files in object storage before performing complete field extraction, keyword extraction, and full inverted index construction.

[0059] In the above process, the embodiments of the present invention connect to object storage through an S3 compatible interface to obtain a remote file list, accurately identify new files through set difference operation, achieve accurate deduplication at the content level through hash comparison, and incorporate new records into the inverted index through incremental reconstruction. This enables the knowledge base to be automatically synchronized and updated as business data continues to be generated, providing a continuous data entry capability without manual intervention, and realizing real-time maintenance of knowledge base data and automated incremental updates with zero maintenance cost.

[0060] Through the above process, this embodiment of the invention first uses a predefined regular expression pattern library and a business keyword thesaurus to drive a field extraction engine, performing multi-pattern matching and field location on the original interview text to extract metadata fields such as organization name, department name, interviewer, and date. Simultaneously, a risk thesaurus is used to semantically label the records, transforming the unstructured interview text into a structured knowledge base containing metadata fields, content fields, and tag fields, achieving a transformation from unstructured to structured data at the data source. Based on this, each record in the knowledge base is traversed, and the field values ​​of five dimensions—organization, department, interviewer, anomaly marker, and keywords—are read as index keys and the record ID as index values ​​to construct a multi-dimensional inverted index, enabling direct location based on field values. Upon receiving a user query, a large language model is used to identify the query intent and generate corresponding query code. A code interpreter loads the knowledge base and inverted index to execute the code for key-value matching, locating records that meet the conditions and returning the corresponding field data. Simultaneously, a remote file list is obtained through an object storage interface and compared with the locally processed file list using a set difference operation to identify newly added files. After downloading, the files are parsed and converted into structured records, and content identifiers are calculated. These identifiers are then compared with the identifier set in the knowledge base. Records that do not match are appended to the knowledge base and inserted into the inverted index, achieving automated incremental updates to the knowledge base. This invention solves the data illusion problem that occurs when large models directly read raw text through structured preprocessing, inverted index exact matching, and code interpreter execution mechanisms. It also significantly reduces token consumption, substantially improves retrieval accuracy, and enables automated continuous updates to the knowledge base.

[0061] In one exemplary embodiment, such as Figure 2 As shown, the architecture diagram of interview data retrieval and analysis is divided into a knowledge base layer, a data processing layer, an intent understanding layer, and a user layer from bottom to top. Each layer interacts with the other through standardized interfaces, together forming a complete interview data retrieval and analysis system.

[0062] The knowledge base layer comprises two core components: a local knowledge base and a multi-dimensional inverted index. The local knowledge base persistently stores pre-processed, structured interview records in JSON format. Each record contains metadata fields, content fields, and tag fields. The multi-dimensional inverted index is built upon the structured fields in the knowledge base, covering five dimensions: organization, department, interviewer, anomaly marker, and keyword. It uses the field values ​​of each dimension as keys and a list of record IDs as values, enabling a rapid mapping from field values ​​to records.

[0063] The data processing layer comprises three functional modules: a code interpreter and its code preprocessing, code execution, and query inverted index. The code interpreter runs in a physically isolated sandbox environment. Before executing the query code, it first performs syntax preprocessing to fix syntax anomalies that may be introduced during the generation of the large language model. Then, it loads the knowledge base and inverted index in the isolated environment to execute the code. It locates records that meet the conditions in the inverted index through key-value exact matching, reads the corresponding field data from the knowledge base, and returns the actual statistical results.

[0064] The intent understanding layer uses a large language model as its intent understanding engine, responsible for receiving user queries and performing intent recognition, parameter extraction, and code generation. The large language model analyzes the intent type of the user query, including interviewee queries, bank queries, region queries, keyword searches, anomaly detection, competitor analysis, cross-industry topic analysis, price analysis, and personnel change analysis. Based on the intent type, it selects the corresponding template from predefined code templates, fills the key parameters extracted from the query into the template variable positions to generate complete Python query code, and finally receives real statistical data returned by the code interpreter for in-depth analysis and generates a structured report.

[0065] The user layer provides a natural language query input interface and a structured analysis report output interface. Users input query requests in natural language, and the system ultimately presents the analysis results to users in the form of a structured analysis report.

[0066] Specifically, conducting interview data retrieval and analysis based on this architecture may include the following steps: Step 1: Structured parsing and knowledge base construction of unstructured interview texts.

[0067] The system first receives the raw, unstructured interview transcripts and loads a predefined regular expression pattern library and a business keyword thesaurus. The regular expression pattern library includes date, amount, and personnel title patterns, while the business keyword thesaurus includes bank name, department name, and business direction thesaurus. Based on these rules and the thesaurus, the field extraction engine performs multi-pattern matching and field location on the raw interview text, automatically identifying and extracting structured metadata fields such as bank name, department name, interviewer, date, and amount. Simultaneously, a predefined risk thesaurus is input into the field extraction engine, which scans and matches the raw text content of each record. The risk thesaurus includes keywords such as risk, anomaly, problem, difficulty, challenge, complaint, dispute, litigation, and violation. The engine automatically determines whether a record contains abnormal or risk information based on whether these keywords are matched in the raw text and outputs the corresponding semantic tag fields. All extracted structured metadata fields, semantic tag fields, and raw interview text content are assembled according to a predefined data structure and persistently stored in JSON format in a local knowledge base file at the knowledge base layer.

[0068] like Figure 3 The diagram illustrates the complete processing flow of transforming raw unstructured interview transcripts into a structured knowledge base in this invention. The process begins with the input of the raw unstructured interview transcripts. The system first performs preprocessing operations on the input text, including encoding detection and format standardization, to ensure that the subsequent parsing stage can correctly handle various text formats. After preprocessing, the process enters two parallel parsing channels. The first channel is regular expression pattern matching, including date pattern matching, amount pattern matching, and personnel pattern matching. Date pattern matching is used to identify date information in the text; amount pattern matching is used to identify monetary value information in the text; and personnel pattern matching is used to identify the titles of the interviewees. The second channel is field location driven by a business thesaurus. The system loads a bank name thesaurus, a department name thesaurus, and a business direction thesaurus. The bank name thesaurus covers the full and abbreviations of the five major banks and joint-stock banks, the department name thesaurus contains information on subsidiaries and regions, and the business direction thesaurus covers business directions such as archives, credit, and operations. Business-related fields are located by performing thesaurus matching on the raw text.

[0069] The outputs from the two parsing channels are input into the structured field extraction module, and the system automatically extracts core structured metadata fields from the text, such as the interviewee, department, bank type, visit target, communication content, and business opportunities.

[0070] While extracting structured fields, the process concurrently performs anomaly and risk semantic tagging. The system inputs a predefined list of anomaly and risk keywords into the extraction engine, which scans and matches the original text. The list contains keywords such as risk, complaint, and anomaly. Based on whether the original text matches any of these keywords, the system automatically determines whether the record contains anomaly or risk information. If any keyword is matched, an anomaly tag is added; if no keyword is matched, a normal tag is added.

[0071] Finally, all extracted structured metadata fields and semantic tag annotation results are assembled according to a predefined data structure and persistently stored in a local knowledge base file in JSON format, completing the full transformation from unstructured interview text to a structured knowledge base.

[0072] Step 2: Constructing a multi-dimensional inverted index.

[0073] After the knowledge base is built, the system automatically initiates the construction process of a multi-dimensional inverted index when the knowledge base is loaded. It iterates through each structured record in the knowledge base, reading the values ​​of the organization, department, interviewee, anomaly marker, and keyword dimensions from each record. Using the organization dimension value as the key for the organization dimension index, the department dimension value as the key for the department dimension index, the interviewee dimension value as the key for the interviewee dimension index, the anomaly marker dimension value as the key for the anomaly marker dimension index, and the keyword dimension value as the key for the keyword dimension index, and using the unique identifier of each record as the index value, five key-value pairs are constructed and written into the inverted index structures of the five dimensions respectively. The completed multi-dimensional inverted index is persistently stored in the knowledge base layer.

[0074] like Figure 4 The diagram illustrates the construction process and structure of a multi-dimensional inverted index. The process begins with a knowledge base data source containing 52,789 structured records. Each record includes structured fields such as bank type, department, interviewer, anomaly tag, and keywords. After loading the knowledge base, the index building engine iterates through each structured record, reading the field values ​​for each dimension, including institution, department, interviewer, anomaly tag, and keyword dimensions. Using each field value as the index key and the record ID as the index value, the key-value pairs are written into the corresponding inverted index structure.

[0075] The completed inverted index comprises five independent dimension indexes. The bank dimension index uses the bank type field as the key and the corresponding record ID list as the value, supporting precise querying by bank name. The department dimension index uses the department field as the key and the corresponding record ID list as the value, supporting precise querying by department. The interviewee dimension index uses the interviewee name field as the key and the corresponding record ID list as the value, supporting precise querying by interviewee. The exception tag dimension index uses the exception tag field as the key and the corresponding record ID list as the value, supporting precise querying by exception status. The keyword full-text index uses extracted keywords from the text as the key and the corresponding record ID list as the value, supporting precise querying by keyword.

[0076] The inverted indexes in the above five dimensions all achieve precise matching and location with O(1) time complexity. That is, no matter how many records there are in the knowledge base, the query for any field value can directly locate the corresponding record ID list through a single hash lookup, thereby reading the complete record data from the knowledge base. When the knowledge base undergoes incremental updates, the inverted index automatically performs incremental reconstruction, inserting the field values ​​of the newly added records into the corresponding index structure, without the need for manual maintenance.

[0077] Step 3: Intent recognition and precise retrieval based on code interpreter.

[0078] Users input natural language query requests through the user layer. The large language model in the intent understanding layer acts as the intent understanding engine, analyzing the query request, identifying the intent type of the query, and extracting key parameters. Based on the identified intent type, the large language model selects a corresponding template from predefined code templates, fills the extracted key parameters into the corresponding variable positions in the template, and generates complete Python query code. After receiving the query code, the code interpreter in the data processing layer first performs syntax preprocessing to correct any syntax anomalies that the large language model may have introduced during code generation. Then, it loads the knowledge base file and inverted index file from the knowledge base layer in a physically isolated sandbox environment and executes the query code. During execution, the code interpreter performs key-value exact matching in the inverted index based on the structured field matching conditions in the code, directly locating the list of record identifiers that meet the conditions. It then reads all field data of the corresponding record from the knowledge base and returns the actual statistical results to the intent understanding layer. The large language model performs inference and summarization based on the actual statistical data returned by the code interpreter, generates a structured analysis report according to the corresponding report generation template, and finally presents it to the user through the user layer.

[0079] like Figure 5The diagram illustrates the complete process of implementing anti-hallucination query and analysis based on a code interpreter. The process begins with the user entering a natural language query request at the interface layer. This request is passed to a large language model, which acts as the intent understanding engine to analyze the query. The large language model first identifies the intent of the query, determining its business intent type, including interviewer queries, bank queries, keyword searches, anomaly detection, and competitor analysis. Simultaneously, the large language model extracts the key parameters required for that intent type from the user query. After completing intent identification and parameter extraction, the large language model generates the corresponding Python query code based on a predefined code template framework.

[0080] The generated Python query code crosses the physical isolation boundary and is submitted to the code interpreter running in the sandbox environment. Before execution, the code interpreter performs code preprocessing to fix potential code anomalies, including handling excessively long strings and unclosed quotes spanning multiple lines. Specifically, this involves replacing excessively long strings with string multiplication expressions and merging unclosed quotes into single lines with escape sequences. After preprocessing, the code interpreter compiles and executes the query code, capturing the standard output.

[0081] During code execution, the code interpreter performs precise matching queries based on the matching conditions in the query code within the multi-dimensional inverted index constructed in step S2. Queries can be filtered by bank, department, interviewee, full-text matching by keywords, and anomaly tags. Simultaneously, the code interpreter performs statistical calculations based on the query results, including counting, sorting, and truncation. The key-value matching of the multi-dimensional inverted index ensures that all query operations are completed within O(1) time complexity.

[0082] After the code execution is complete, the code interpreter returns real statistical data as the query result, which is then passed back to the large language model across the physical isolation boundary. The large language model performs in-depth analysis based on the real statistical data returned by the code interpreter and generates a structured analysis report according to the scenario template corresponding to the user query. The final system output is a structured analysis report containing statistical data, in-depth analysis, and source annotations. Each conclusion can be traced back to the original interview transcript, achieving the goal of eliminating data illusions from the data source.

[0083] like Figure 6The diagram illustrates the multi-scenario structured report generation process based on a large language model in this invention. The process begins with real statistical data returned by the code interpreter, which is then passed to the large language model. The large language model first identifies the user's query intent type. The system predefined intent types include five business scenarios: topic analysis, region or bank analysis, competitor analysis, price or quotation analysis, and personnel change analysis. Based on the identified intent type, the large language model selects the corresponding template from a predefined report template library to generate the report.

[0084] When the intent type is topic analysis, the large language model calls the topic cross-bank in-depth analysis template, displays relevant records from each bank grouped by bank, annotates source information for each record, and finally generates a cross-bank comparison table. When the intent type is region or bank analysis, it calls the single-column region or bank in-depth analysis template, displays visit records grouped by business direction, and generates a direction status table. When the intent type is competitor analysis, it calls the competitor analysis template, performs frequency statistics on competitor keywords to generate rankings, and proposes competitive strategy suggestions based on this. When the intent type is price or quotation analysis, it calls the price or quotation analysis template, generates price range distribution and bank quotation comparison results, and proposes quotation suggestions based on this. When the intent type is personnel change analysis, it calls the personnel change analysis template, generates change distribution statistics and business impact analysis results, and proposes response suggestions based on this.

[0085] All reports generated from the scenario templates follow the same output format, and the report content includes three core components: the first part is a complete display of statistical data, including the total number of records and the distribution statistics of each dimension; the second part is a structured in-depth analysis, including classification details organized by scenario template and comparative conclusions; the third part is source annotation, with each conclusion annotated with traceable original interview record source information. Finally, the structured analysis report is returned to the user, ensuring that the analysis results are supported by a complete statistical foundation and are traceable.

[0086] Step 4: Incremental update of the knowledge base based on object storage.

[0087] The system connects to the object storage service via an S3-compatible interface. It lists files in the storage bucket paginated by a specified directory prefix, filtering out Excel-formatted files to construct a remote file list. It loads the locally processed file list and performs a set difference operation between the remote file list and the locally processed file list to identify new files. If a new file exists, it is downloaded to a local temporary directory via the object storage interface. A spreadsheet processing library reads the Excel file and maps each column to the corresponding fields of a structured record according to a predefined column mapping relationship. Simultaneously, regular expressions are used to extract structured subfields and business keywords from the original text. For each transformed new record, a portion of the original content is concatenated with the values ​​of the interviewee, bank type, and department fields to form a string, and a hash value is calculated as the content identifier. This hash value is compared with the content identifier set of all records in the knowledge base. If no match is found, the new record is appended to the knowledge base file. Simultaneously, the field values ​​of the new record are inserted into the inverted indexes of the organization, department, interviewee, and keyword dimensions to achieve incremental index updates. If the local knowledge base file does not exist, the system automatically switches to full reconstruction mode, downloads all Excel files in object storage, merges them, and performs complete field extraction, keyword extraction, and full inverted index construction.

[0088] like Figure 7 The diagram illustrates the automated incremental update process for a knowledge base based on object storage. The process begins with the remote file discovery phase. The system connects to the object storage service via an S3-compatible interface, listing all Excel files in the bucket based on a specified directory prefix, thus constructing a remote file list. Simultaneously, the system loads a local list of processed files, which records the identifiers of all files downloaded and imported into the knowledge base downstream. The remote file list is then compared with the local list to determine if any new files have been added. If the remote and local lists are identical, indicating no new files, the synchronization is skipped, and the knowledge base remains up-to-date. If new files have been added, the system proceeds to the file download and parsing phase.

[0089] During the file download and parsing phase, the system downloads new files to a local temporary directory via an object storage interface. After downloading, a spreadsheet processing library reads the Excel file content and converts the data in each column into a knowledge base JSON format according to predefined column mapping relationships. These column mapping relationships include mapping activity record content columns to raw text fields, mapping publisher columns to interviewer fields, mapping the first-level department column to department fields, and mapping internal row category columns to bank type fields.

[0090] After the conversion is complete, the system determines whether the local knowledge base is being built for the first time. If the knowledge base file does not exist, the system automatically switches to full reconstruction mode, downloads all Excel files from object storage, merges them, performs complete field extraction, keyword extraction, and full inverted index construction, and persistently saves the completed knowledge base. If the knowledge base already exists, the system enters incremental update mode.

[0091] In incremental update mode, the system performs content deduplication comparison on each transformed record. Deduplication is achieved by performing an exact match on the original content, comparing the new record with each record in the existing knowledge base to determine if duplicates exist. If a record is found to be duplicated, it is skipped and not processed. If a record is identified as new, it is appended to the knowledge base. After all records have been processed, the system saves the updated knowledge base file, updates the list of processed files by adding the identifiers of the processed files, and automatically performs incremental reconstruction of the inverted index, inserting the field values ​​of the newly added records into the respective dimension index structures, ultimately forming the updated complete knowledge base.

[0092] In the above process, the embodiments of the present invention achieve the transformation from unstructured interview text to structured knowledge base through the collaborative cooperation between the various layers of the architecture, accurate matching of multi-dimensional inverted index, anti-illusion query mechanism executed by code interpreter, and automatic incremental update of knowledge base. This allows the large language model to be responsible only for task understanding, code generation, and report generation based on real data, eliminating the generation of data illusion from the data source, greatly reducing token consumption, significantly improving retrieval accuracy, and realizing automatic continuous update of knowledge base.

[0093] Through the above process, this embodiment of the invention achieves intelligent processing of unstructured interview data across the entire process using a four-layer architecture from bottom to top: a knowledge base layer, a data processing layer, an intent understanding layer, and a user layer. The knowledge base layer relies on structured parsing to convert unstructured text into a JSON-formatted knowledge base and constructs a five-dimensional inverted index for precise matching. The data processing layer executes query code through a physically isolated code interpreter, completing syntax preprocessing, index lookup, and statistical calculations in a sandbox environment, returning real data. The intent understanding layer uses a large language model as its core for intent recognition, code generation, and report generation based on real data, completely eliminating data illusions. This four-layer architecture works in synergy, ensuring the authenticity and traceability of the analysis results from the data source.

[0094] The following are embodiments of the apparatus of the present invention, which can be used to execute the interview data retrieval and analysis method involved in the present invention. For details not disclosed in the embodiments of the apparatus of the present invention, please refer to the method embodiments of the interview data retrieval and analysis method involved in the present invention.

[0095] Please see Figure 8This invention provides an interview data retrieval and analysis device 800.

[0096] The interview data retrieval and analysis device 800 includes, but is not limited to: a data structuring parsing module 810, an inverted index construction module 830, an intent understanding and retrieval module 850, and a knowledge base incremental update module 870.

[0097] Among them, the data structuring and parsing module 810 is used to obtain the original interview records, perform multi-pattern matching and field positioning on the text in the interview records based on a predefined vocabulary and pattern matching rule base to obtain metadata fields, and perform semantic tagging on the interview records through a risk vocabulary to obtain tag fields, and build a structured knowledge base by combining the metadata fields.

[0098] The inverted index building module 830 is used to traverse each record in the knowledge base, read the field values ​​of each dimension in each record as the index key, and build a multi-dimensional inverted index with the record ID as the index value. The dimensions include organization dimension, department dimension, interviewer dimension, anomaly marker dimension, and keyword dimension.

[0099] The intent understanding and retrieval module 850 is used to receive query language, use a large language model to identify the intent of the query language and generate corresponding query code, and use a code interpreter to perform key-value matching based on the knowledge base and inverted index to locate the corresponding record ID and corresponding field data.

[0100] The knowledge base incremental update module 870 is used to obtain a list of remote files, perform set difference operation with the local processed file list to identify new files, download the new files and parse them into structured records, calculate the content identifier for each record, compare it with the identifier set in the knowledge base, and append the records that do not match to the knowledge base and insert them into the inverted index.

[0101] It should be noted that the interview data retrieval and analysis provided in the above embodiments are only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed. That is, the internal structure of the interview data retrieval and analysis device will be divided into different functional modules to complete all or part of the functions described above.

[0102] Furthermore, the interview data retrieval and analysis device and the interview data retrieval and analysis method provided in the above embodiments belong to the same concept. The specific way each module performs its operation has been described in detail in the method embodiments, and will not be repeated here.

[0103] Figure 9 A schematic diagram of the structure of an electronic device according to an exemplary embodiment is shown.

[0104] It should be noted that this electronic device is merely an example adapted to the present invention and should not be construed as providing any limitation on the scope of use of the present invention. Furthermore, this electronic device should not be interpreted as requiring or depending on having... Figure 9 One or more components of the exemplary electronic device 2000 shown.

[0105] The hardware structure of electronic devices 2000 can vary significantly due to differences in configuration or performance, such as... Figure 9 As shown, the electronic device 2000 includes: a power supply 210, an interface 230, at least one memory 250, and at least one central processing unit (CPU) 270.

[0106] Specifically, power supply 210 is used to provide operating voltage for various hardware devices on electronic device 2000.

[0107] Interface 230 includes at least one wired or wireless network interface 231 for interacting with external devices. Of course, in other examples adapted to this invention, interface 230 may further include at least one serial-to-parallel conversion interface 233, at least one input / output interface 235, and at least one USB interface 237, etc. Figure 9 As shown, this does not constitute a specific limitation.

[0108] The memory 250 serves as a carrier for resource storage and can be a read-only memory, random access memory, disk, or optical disk, etc. The resources stored on it include the operating system 251, application programs 253, and data 255, etc., and the storage method can be temporary storage or permanent storage.

[0109] The operating system 251 is used to manage and control the various hardware devices and application programs 253 on the electronic device 2000, so as to enable the central processing unit 270 to perform calculations and processing on the massive data 255 in the memory 250. It can be Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0110] Application 253 is a computer-readable instruction based on operating system 251 that performs at least one specific task, and may include at least one module ( Figure 9 (Not shown), each module may contain computer-readable instructions for the electronic device 2000. For example, the interview data retrieval and analysis device can be considered as application program 253 deployed on the electronic device 2000.

[0111] Data 255 may be signal information, etc., and is stored in memory 250.

[0112] The central processing unit 270 may include one or more processors and is configured to communicate with the memory 250 via at least one communication bus to read computer-readable instructions stored in the memory 250, thereby enabling the computation and processing of massive amounts of data 255 in the memory 250. For example, an interview data retrieval and analysis method may be implemented by the central processing unit 270 reading a series of computer-readable instructions stored in the memory 250.

[0113] Furthermore, the present invention can also be implemented through hardware circuits or a combination of hardware circuits and software. Therefore, the implementation of the present invention is not limited to any specific hardware circuit, software, or combination thereof.

[0114] Please see Figure 10 This invention provides an electronic device 4000, which may include: a desktop computer, a laptop computer, a server, etc., with sensor recognition capabilities.

[0115] exist Figure 10 In this context, the electronic device 4000 includes at least one processor 4001 and at least one memory 4003.

[0116] The data interaction between the processor 4001 and the memory 4003 can be achieved through at least one communication bus 4002. This communication bus 4002 may include a path for transmitting data between the processor 4001 and the memory 4003. The communication bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The communication bus 4002 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 10 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0117] Optionally, the electronic device 4000 may further include a transceiver 4004, which can be used for data interaction between the electronic device and other electronic devices, such as sending and / or receiving data. It should be noted that in practical applications, the transceiver 4004 is not limited to one type, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of the present invention.

[0118] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this invention. Processor 4001 may also be a combination that implements computing functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.

[0119] The memory 4003 may be a ROM (Read Only Memory) or other type of static storage device capable of storing static information and instructions, RAM (Random Access Memory) or other type of dynamic storage device capable of storing information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program instructions or code in the form of instructions or data structures and accessible by the electronic device 4000, but not limited thereto.

[0120] The memory 4003 stores computer-readable instructions, and the processor 4001 can read the computer-readable instructions stored in the memory 4003 through the communication bus 4002.

[0121] The computer-readable instructions are executed by one or more processors 4001 to implement the interview data retrieval and analysis methods in the above embodiments.

[0122] Furthermore, this embodiment of the invention provides a storage medium storing computer-readable instructions, which are executed by one or more processors to implement the interview data retrieval and analysis method described above.

[0123] This invention provides a computer program product, which includes computer-readable instructions stored in a storage medium. One or more processors of an electronic device read the computer-readable instructions from the storage medium, load and execute the computer-readable instructions, thereby enabling the electronic device to implement the interview data retrieval and analysis method described above.

[0124] Compared with related technologies, the beneficial effects of the present invention are: 1. This invention fundamentally eliminates the data illusion problem in interview data analysis using large language models. By pre-parseing unstructured interview text into a structured knowledge base containing metadata, content, and tag fields, and constructing a multi-dimensional inverted index to achieve precise matching based on field values, the code interpreter can directly locate records by performing key-value matching in the inverted index during queries. The large language model is only responsible for task understanding, code generation, and report generation based on the real data returned by the code interpreter, rather than reasoning based on the memory in its internal parameters. This completely eliminates the possibility of large models fabricating non-existent data, incorrectly citing sources, or confusing the content of different records. This ensures that every conclusion in the analysis report can be traced back to the original interview record through source information, guaranteeing the authenticity and verifiability of the analysis results.

[0125] 2. This invention can significantly reduce the token consumption of large language models in the process of interview data analysis. By preprocessing unstructured text into a structured knowledge base, and building a multi-dimensional inverted index on top of the knowledge base, subsequent queries do not require inputting the complete original text of the interview record into the large language model. The code interpreter can directly perform key-value matching in the index to complete the data retrieval. Only the retrieval results are passed to the large language model as context for in-depth analysis and report generation. The token consumption of a single query is reduced from tens of thousands in the original technical solution to thousands, and the overall token consumption is reduced by about 90%, which significantly saves computing resources and operating costs.

[0126] 3. This invention can significantly improve the query accuracy of interview data retrieval and eliminate semantic drift problems. By constructing an inverted index covering five dimensions of organization, department, interviewee, anomaly marker and keyword, the code interpreter can perform precise matching based on structured field values ​​rather than vector approximation retrieval, achieving accurate positioning with O(1) time complexity. This completely avoids the problem of inaccurate retrieval caused by semantic drift in vector retrieval schemes. At the same time, it supports combination queries and deep data perspectives of any dimension such as organization, department, interviewee, keyword, anomaly tag, etc., enabling analysts to quickly locate the required data according to the precise business dimensions, meeting the strict requirements of the financial industry for query accuracy.

[0127] 4. This invention enables automated incremental updates of the knowledge base without manual intervention. It connects to an object storage service via an S3-compatible interface to obtain a remote file list, performs a set difference operation with the locally processed file list to accurately identify new files, calculates a multi-field combination content identifier for each record in the new file, and compares it with the identifier set of existing records in the knowledge base to achieve accurate deduplication. Only new records that are not matched are appended to the knowledge base, and the inverted index is incrementally rebuilt. It also supports adaptive switching between full and incremental updates, allowing the knowledge base to automatically and synchronously update as business data continues to be generated. This eliminates the need for manual maintenance of the index structure, significantly reducing the operational costs of the knowledge base and ensuring the real-time performance and completeness of data query results.

[0128] 5. This invention can adaptively cover various business analysis scenarios and provide structured decision support. By predefining various intent types and corresponding report generation templates in the large language model, such as topic-based cross-bank in-depth analysis, single-column regional or bank in-depth analysis, competitor analysis, price or quotation analysis, and personnel change analysis, the large language model automatically generates structured analysis reports according to the corresponding templates after the code interpreter returns real statistical data. Each record in the report is marked with source information and a cross-bank comparison table is generated, enabling users to obtain decision support reports with a unified format and traceable source for different business needs. It covers the core business scenarios of financial interview data analysis and effectively supports financial institutions' competitive intelligence analysis, compliance risk control data insight, and knowledge management.

[0129] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.

[0130] The above description is only a partial embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A method for retrieving and analyzing interview data, characterized in that, The method includes: The original interview records are obtained. Based on a predefined vocabulary and pattern matching rule base, the text in the interview records is subjected to multi-pattern matching and field positioning to obtain metadata fields. The interview records are then semantically labeled using a risk vocabulary to obtain tag fields. A structured knowledge base is constructed by combining the metadata fields. Traverse each record in the knowledge base, read the field values ​​of each dimension in each record as the index key, and construct a multi-dimensional inverted index using the record ID as the index value; the dimensions include organization dimension, department dimension, interviewer dimension, anomaly marker dimension, and keyword dimension; The system receives natural language query requests input by users, uses a large language model as an intent understanding engine to analyze the query requests, and identifies the intent type. The intent types include interviewee query, bank query, region query, keyword search, anomaly detection, competitor analysis, cross-industry topic analysis, price analysis, and personnel change analysis. Based on the intent type, a corresponding template is selected from the predefined code templates, and key parameters required for the intent type are extracted from the query request; the key parameters include the interviewee's name, the bank's name, and the search keywords. The key parameters are filled into the corresponding variable positions of the template to generate query code. The query code is received by the code interpreter and preprocessed with syntax. The knowledge base and inverted index are loaded in the isolated environment to execute the query code. Key-value matching is performed in the inverted index to locate the list of record identifiers that meet the conditions. All field data of the corresponding record is read from the knowledge base and returned as the query result. Obtain a list of remote files and perform a set difference operation with the list of locally processed files to identify newly added files. Download the newly added files and parse them into structured records. Calculate the content identifier for each record and compare it with the identifier set in the knowledge base. Add the records that do not match to the knowledge base and insert them into the inverted index.

2. The interview data retrieval and analysis method as described in claim 1, characterized in that, The process of obtaining the original interview transcript involves performing multi-pattern matching and field location on the text in the interview transcript based on a predefined vocabulary and pattern matching rule base to obtain metadata fields, including: The system receives raw, unstructured interview records and loads a predefined regular expression pattern library and a business keyword dictionary. The regular expression pattern library includes a bank name dictionary, a department dictionary, date pattern regular expressions, amount pattern regular expressions, and personnel title regular expressions. The business keyword dictionary includes a bank name dictionary, a department name dictionary, and a business direction dictionary. The field extraction engine performs multi-pattern matching and field location on the text in the interview records based on the regular expression pattern library and business keyword thesaurus, and automatically identifies and extracts structured metadata fields, including bank name, department name, interviewer, date, and amount.

3. The interview data retrieval and analysis method as described in claim 1, characterized in that, The step of semantically tagging the interview records using a risk terminology to obtain tag fields includes: A predefined risk term list is input into the field extraction engine, which then scans and matches the original text content of each interview record. The risk term list includes risk, anomaly, problem, difficulty, challenge, complaint, dispute, litigation, and violation. The field extraction engine searches the original text of the interview records to see if the above keywords are matched, automatically determines whether the corresponding records contain abnormal or risk information, and outputs the corresponding semantic tag field as the annotation result for each record.

4. The interview data retrieval and analysis method as described in claim 3, characterized in that, The construction of a structured knowledge base by combining the metadata fields includes: The metadata fields, semantic tag fields, and interview transcript text content are assembled according to a predefined data structure to obtain a structured record, which is then persistently stored in a local knowledge base file in JSON format. The data structure includes metadata fields, content fields, and tag fields. The metadata fields include the interviewer, their department, and bank type. The content fields include the original text and structured subfields extracted from the original text. The tag fields include anomaly tags and a list of keywords.

5. The interview data retrieval and analysis method as described in claim 1, characterized in that, The process involves traversing each record in the knowledge base, reading the field values ​​of each dimension in each record as the index key, and constructing a multi-dimensional inverted index using the record's ID as the index value, including: Iterate through each structured record in the knowledge base, and for each record, read the values ​​of the organization dimension field, department dimension field, interviewer dimension field, anomaly marker dimension field, and keyword dimension field respectively from the record; The values ​​of the organization dimension field are used as the keys for the organization dimension index, the values ​​of the department dimension field are used as the keys for the department dimension index, the values ​​of the interviewee dimension field are used as the keys for the interviewee dimension index, and the values ​​of the anomaly marker dimension field are used as the keys for the anomaly marker dimension index. Using the keyword dimension field value as the key of the keyword dimension index, and using the unique identifier of each record as the index value, five key-value pairs are constructed and written into the inverted index structure of the five dimensions respectively, forming a five-dimensional inverted index; the five-dimensional inverted index is used to enable each record to be directly located by field value in the five dimensions.

6. The interview data retrieval and analysis method as described in claim 1, characterized in that, The process of obtaining a remote file list, performing a set difference operation with the locally processed file list to identify new files, downloading the new files and parsing them into structured records, calculating a content identifier for each record, comparing it with the identifier set in the knowledge base, and appending records that do not match to the knowledge base and inserting them into the inverted index includes: Connect to the object storage service through a compatible interface, and list the files in the storage bucket in pages based on a specified directory prefix to build a remote file list. Perform a set difference operation between the remote file list and the local processed file list to identify files that exist in the remote list but not in the local processed list as new files. If no new files are added, the synchronization is skipped. If new files are added, the new files are normalized through the object storage interface and downloaded to the local temporary directory. The data in each column of the new files is mapped to the corresponding fields of the structured records according to the predefined column mapping relationship and converted into records consistent with the knowledge base. Concatenate some characters from the original content of each record with the field value to form a string, calculate the hash value as the content identifier, and compare it one by one with the content identifier set of all records in the knowledge base. If no match is found, write the new record to the knowledge base file and insert the field value of the new record into the inverted index.

7. An interview data retrieval and analysis device, characterized in that, The apparatus is applied to the interview data retrieval and analysis method according to claim 1, and the apparatus comprises: The data structuring and parsing module is used to obtain the original interview records, perform multi-pattern matching and field positioning on the text in the interview records based on a predefined vocabulary and pattern matching rule library to obtain metadata fields, and perform semantic tagging on the interview records through a risk vocabulary to obtain tag fields, and construct a structured knowledge base by combining the metadata fields; The inverted index building module is used to traverse each record in the knowledge base, read the field values ​​of each dimension in each record as the index key, and build a multi-dimensional inverted index with the ID of the record as the index value; the dimensions include organization dimension, department dimension, interviewer dimension, anomaly marker dimension, and keyword dimension; The intent understanding and retrieval module is used to receive query language, perform intent recognition on the query language using a large language model and generate corresponding query code, and use a code interpreter to perform key-value matching based on the knowledge base and inverted index according to the query code to locate the corresponding record ID and corresponding field data. The knowledge base incremental update module is used to obtain a list of remote files, perform set difference operation with the local processed file list to identify new files, download the new files and parse them into structured records, calculate the content identifier for each record, compare it with the identifier set in the knowledge base, and append the records that do not match to the knowledge base and insert them into the inverted index.

8. An electronic device, characterized in that, include: At least one processor and at least one memory, wherein, The memory stores computer-readable instructions; The computer-readable instructions are executed by one or more of the processors, causing the electronic device to implement the interview data retrieval and analysis method as described in any one of claims 1 to 6.

9. A storage medium having computer-readable instructions stored thereon, characterized in that, The computer-readable instructions are executed by one or more processors to implement the interview data retrieval and analysis method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Query function development method and system based on large language model

    CN122132019A

  • Ontology for use with a system, method, and computer readable medium for retrieving information and response to a query

    US20130041921A1