Protocol content query method and device, computer equipment and readable storage medium

By generating rewritten query text and converting it into query vectors, and combining historical query databases and vector databases, the problem of insufficient accuracy of LLM in 3GPP protocol queries is solved, and efficient and accurate protocol content queries are achieved.

CN121144482APending Publication Date: 2025-12-16CHINA TELECOM CORP LTD TECHNOLOGY INNOVATION CENTER +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511214251.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-28
Publication Date
2025-12-16

AI Technical Summary

Technical Problem

Traditional Large Language Models (LLMs) lack a deep understanding of 3GPP protocol knowledge, making it difficult to accurately query 3GPP protocol documents, resulting in inaccurate query results.

Method used

By generating rewritten query text, transforming it into the latest query vector, and performing similarity calculations with the historical query database, reusing highly similar historical query results as context, generating prompt words to input into the large language model, or obtaining target protocol content and location information from the vector database, the accuracy and efficiency of the query are ensured.

Benefits of technology

It improves query accuracy, reduces the need for repetitive searches of massive amounts of protocol documents, alleviates the problem of low search efficiency, and ensures that query results meet user needs and have traceable protocol basis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121144482A_ABST
    Figure CN121144482A_ABST
Patent Text Reader

Abstract

The invention relates to a protocol content query method and device, computer equipment and a readable storage medium. The method comprises the steps of generating a corresponding rewritten query text for an input query text used for querying protocol content, determining a latest query vector corresponding to the rewritten query text, and determining the similarity between the latest query vector and each historical query vector in a historical query database, under the condition that the target historical query vector with the similarity greater than or equal to a set threshold exists, taking the target historical query vector and the corresponding historical query result information as context information of the latest query vector, generating a corresponding cue word, and under the condition that the similarity is less than the set threshold, generating a corresponding cue word; and obtaining the target protocol content and the positioning information corresponding to the latest query vector from the query vector database, generating a corresponding cue word, and obtaining a query result output by the large language model for the cue word. The problem that a protocol content query result is inaccurate can be effectively solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to a method, apparatus, computer device, and readable storage medium for querying protocol content. Background Technology

[0002] In today's rapidly evolving communication technology landscape, the 3GPP (3rd Generation Partnership Project) protocol, as the core basis for global mobile communication standards, boasts a vast and complex documentation system, covering a wealth of content from basic architecture to cutting-edge technologies. The 5G (5th Generation Mobile Communication Technology) specifications comprise hundreds of technical reports and specification documents, with continuous version iterations and updates. This complexity presents a significant challenge to retrieving standard documents.

[0003] Traditional Large Language Models (LLMs) lack a deep understanding of 3GPP protocol knowledge, making it difficult to obtain accurate query content. Summary of the Invention

[0004] Therefore, it is necessary to provide a method, apparatus, computer device, computer-readable storage medium, and computer program product for querying protocol content that can effectively solve the problem of inaccurate query results for protocol documents, in response to the above-mentioned technical problems.

[0005] Firstly, this application provides a method for querying agreement content, including:

[0006] For the input query text used to query the protocol content, generate the corresponding rewritten query text;

[0007] Determine the vector corresponding to the rewritten query text as the latest query vector;

[0008] The similarity between the latest query vector and each historical query vector in the historical query database is determined; the historical query database is used to store historical query information for a pre-built vector database, and the historical query information includes historical query vectors and historical query result information corresponding to each historical query vector; the vector database is constructed based on multiple protocol contents;

[0009] If a target historical query vector with a similarity greater than or equal to a set threshold exists, the target historical query vector and its corresponding historical query result information are used as the context information of the latest query vector, and corresponding prompt words are generated.

[0010] If the similarity is less than the set threshold, the vector database is queried to obtain the target protocol content corresponding to the latest query vector and the location information of the target protocol content in multiple protocol contents. The target protocol content and the location information are used as the context information of the latest query vector, and corresponding prompt words are generated.

[0011] The prompt word is used as input to a large language model to obtain the query results output by the large language model in response to the prompt word.

[0012] In one embodiment, querying the vector database to obtain the target protocol content corresponding to the latest query vector and the location information of the target protocol content among multiple protocol contents includes:

[0013] Predict the target category to which the latest query vector belongs; the target category includes at least one of the following: wireless access network category, core network and terminal category, and service and system architecture category;

[0014] Candidate clusters in the vector database are determined based on the target category. The candidate clusters are obtained by clustering multiple text blocks of the target category, and the text blocks are obtained by dividing multiple protocol contents.

[0015] Based on the first similarity between the latest query vector and the summary vectors of each candidate cluster, the candidate cluster with the highest first similarity is determined as the target cluster.

[0016] Based on the second similarity between the latest query vector and each text block vector of the target cluster, a set number of text block vectors with the highest second similarity are determined as candidate text block vectors, and the text block content and file name corresponding to each candidate text block vector are retrieved from the vector database;

[0017] Based on the text block content and file name corresponding to the candidate text block vector, the target protocol content corresponding to the latest query vector and the location information of the target protocol content in multiple protocol contents are obtained.

[0018] In one embodiment, the vector database is constructed in the following ways:

[0019] Multiple protocol documents are divided into text blocks to obtain multiple text blocks, and the text vector corresponding to each text block is determined.

[0020] Convert the charts and / or formulas in the multiple protocol documents into corresponding chart vectors and / or formula vectors;

[0021] The vector database is constructed based on the chart vectors and / or formula vectors, as well as the text vectors.

[0022] The storage structure of the vector database is "content-vector-filename-type-version number". The content represents the natural language content of the text block, the vector represents the vector corresponding to the content, the filename represents the name and / or chapter title of the protocol document, the type includes at least one of text, chart and formula, and the version number represents the version of the protocol document.

[0023] In one embodiment, the step of segmenting multiple protocol documents into text blocks to obtain multiple text blocks includes:

[0024] The multiple protocol documents are divided into hierarchical blocks and fixed-size blocks to obtain multiple text blocks;

[0025] The hierarchical segmentation representation is based on the chapter and subheading structure of the protocol document to split the text; the fixed-size segmentation representation is based on a preset segmentation size, which further divides each block after hierarchical segmentation into smaller blocks with partial overlap.

[0026] In one embodiment, the protocol content query method further includes:

[0027] When the protocol document is updated, the file name and version number of the existing protocol document in the vector database are compared to identify the updated content;

[0028] The updated content is preprocessed, including: dividing the updated content into text blocks to obtain multiple new text blocks, and converting the new text blocks into new text vectors; parsing the chart area and / or formula area in the updated content, and converting the chart area and / or the formula area into a new vector representation;

[0029] The preprocessed updated content is stored in the vector database in the structure of "content-vector-filename-type-version number", and the corresponding historical version data in the vector database is retained and marked as historical status.

[0030] In one embodiment, generating corresponding rewritten query text for the input query text used to query protocol content includes:

[0031] Obtain the input query text used to query the protocol content;

[0032] The query text is rewritten and / or semantically completed based on a pre-built knowledge graph to obtain the rewritten query text; the knowledge graph is a knowledge graph built based on communication protocol documents, and the entity nodes of the knowledge graph include: protocol abbreviations, terminology definitions and protocol entities, and the edges of the knowledge graph include: protocol process relationships and dependencies between entities.

[0033] In one embodiment, the step of rewriting and / or semantically completing the query text based on a pre-built knowledge graph to obtain the rewritten query text includes:

[0034] Parse the key entity words and descriptive phrases in the query text;

[0035] The identified key entity words and descriptive phrases are used to calculate semantic similarity with entity nodes in the knowledge graph in order to match relevant graph entities.

[0036] Supplementary information is generated based on the terminology definitions, attributes, and associations of the matched graph entities within the knowledge graph.

[0037] The supplementary information is integrated into the query text according to predefined rules to generate the rewritten query text.

[0038] In one embodiment, generating corresponding rewritten query text for the input query text used to query protocol content further includes:

[0039] The intent analysis is performed on the input query text used to query the protocol content based on multi-round interactive queries, and the content of the query text is dynamically adjusted during the multi-round interactive query process to obtain the rewritten query text.

[0040] Secondly, this application also provides a protocol content query device, comprising:

[0041] The text generation module is used to generate corresponding rewritten query text based on the input query text used to query the protocol content.

[0042] The vector determination module is used to determine the vector corresponding to the rewritten query text, which is then used as the latest query vector.

[0043] A similarity confirmation module is used to determine the similarity between the latest query vector and each historical query vector in the historical query database; the historical query database is used to store historical query information for a pre-built vector database, the historical query information including historical query vectors and historical query result information corresponding to each historical query vector; the vector database is constructed based on multiple protocol contents;

[0044] The prompt word confirmation module is used to, when there is a target historical query vector with a similarity greater than or equal to a set threshold, use the target historical query vector and its corresponding historical query result information as the context information of the latest query vector, and generate corresponding prompt words;

[0045] The prompt word confirmation module is further configured to, when the similarity is less than the set threshold, query the vector database to obtain the target protocol content corresponding to the latest query vector and the location information of the target protocol content in multiple protocol contents, and use the target protocol content and the location information as the context information of the latest query vector to generate corresponding prompt words;

[0046] The result acquisition module is used to take the prompt word as input to the large language model and acquire the query results output by the large language model in response to the prompt word.

[0047] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of any protocol content query method embodiment.

[0048] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of any protocol content query method embodiment.

[0049] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any protocol content query method embodiment.

[0050] The aforementioned protocol content query methods, devices, computer equipment, computer-readable storage media, and computer program products, by generating rewritten query text, can correct potential semantic ambiguity, vague descriptions, or misunderstandings of abbreviations in the input query, improving query accuracy and ensuring precise matching of protocol-related content. The rewritten query text is converted into the latest query vector, and its similarity is calculated with vectors in the historical query database. When the similarity meets the standard, historical query results are directly reused as context, significantly reducing the need for repeated retrieval of the vector database, reducing the retrieval space of massive protocol documents, improving retrieval efficiency, and avoiding the inefficiency of searching through complex documents one by one. When the similarity does not meet the standard, the target protocol content and location information are obtained from the query vector database, ensuring accurate and relevant protocol information from a vector database built based on multiple protocol contents, providing a reliable basis for subsequent prompt word generation. Finally, prompt words containing accurate contextual information are input into the large language model, supplementing the LLM with in-depth knowledge of the corresponding protocol domain, effectively avoiding the generation of hollow or poorly matched response content by traditional LLMs, making the output query results more relevant to user needs. Attached Figure Description

[0051] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0052] Figure 1 This is an application environment diagram of the protocol content query method in one embodiment;

[0053] Figure 2 This is a flowchart illustrating a protocol content query method in one embodiment;

[0054] Figure 3 This is a flowchart illustrating a sub-step of step 201 in one embodiment;

[0055] Figure 4 This is a flowchart illustrating a sub-step of step 205 in one embodiment;

[0056] Figure 5 This is an overall flowchart of a protocol content query method in one embodiment;

[0057] Figure 6 This is a structural block diagram of a protocol content query device in one embodiment;

[0058] Figure 7 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0059] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0060] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.

[0061] The protocol content query method provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or placed on a cloud or other network server. Terminal 102 is used to generate corresponding rewritten query text for the input query text used to query protocol content, determine the vector corresponding to the rewritten query text as the latest query vector, determine the similarity between the latest query vector and each historical query vector in the historical query database, generate corresponding prompt words based on the similarity, use the prompt words as input to a large language model, and obtain the query results output by the large language model for the prompt words. Server 104, upon receiving the instruction from terminal 102 to call the large language model, runs the large language model, outputs query results for the prompt words, and feeds back the query results to terminal 102. Server 104 can also be used to construct a vector database from several protocol documents and store the vector database. Terminal 102 queries the vector database based on its interaction with server 104. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, drones, low-altitude aircraft, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, and projection equipment. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted displays. Head-mounted displays can be virtual reality (VR) devices, augmented reality (AR) devices, and smart glasses. Server 104 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.

[0062] In one exemplary embodiment, such as Figure 2 As shown, a method for querying protocol content is provided, which can be applied to... Figure 1 Taking the terminal in the example, the explanation includes the following steps 201 to 206. Wherein:

[0063] Step 201: Generate the corresponding rewritten query text for the input query text used to query the protocol content.

[0064] Query text refers to the original input content initiated by the user to obtain protocol-related information. It may contain semantic ambiguity, incomplete terminology, or brief descriptions, and serves as the basis for the rewriting operation. For example, if a user enters "RAN (Radio Access Network) protocol flow," this content does not specify the specific scenario (such as physical layer, data link layer) or version of the RAN-related protocols, and is a typical query text.

[0065] In some embodiments, the query text input for retrieving protocol content is user input from the 3GPP protocol domain, aimed at obtaining protocol specifications (such as technical indicators, architecture design, process definitions, etc.). It must be associated with the 3GPP protocol knowledge system and distinguish it from non-protocol queries. For example, a user inputting "core network security mechanism in 5G SA (Service and System Aspects) scenarios" explicitly refers to the core network security specifications in the SA domain of the 3GPP protocol, and thus falls under the category of "query text for retrieving protocol content."

[0066] Rewriting query text involves using RAG (Retrieval-Augmented Generation) technology to semantically complete and correct fuzzy expressions in the original query text, resulting in a precise query content. This rewritten content must meet the expectations of the retrieval system, accurately express the user's true intent, and resolve issues of unclear terminology and incomplete information in the original query. In one embodiment, the original query text can be semantically completed and fuzzy expressions corrected based on a knowledge graph corresponding to the protocol to obtain precise query content. For example, if the original query text is "RAN access procedure," matching "RAN includes physical layer and data link layer protocols" and "access procedure involves mechanisms such as Random Access Channel (RACH)" using the knowledge graph might result in "3GPP 5G RAN Physical Layer Random Access Channel Procedure Specification," supplementing the protocol version, specific layer, and technical terminology, thus improving query accuracy.

[0067] In one embodiment, suppose a user needs to query content related to mobility management of the core network and terminals in the 3GPP protocol. For example, the original input query text is "CT mobility management process" (with issues such as unclear abbreviation "CT" and ambiguous scope of "mobility management process"). First, the input text is identified as "query text used to query protocol content" (focusing on the CT domain of the 3GPP protocol); then, the 3GPP protocol knowledge graph is invoked to parse the keyword "CT" to correspond to "Core Network and Terminals", and the "mobility management process" is associated with nodes in the knowledge graph such as "CT domain includes mobility management protocol, attach / detach process", etc.; finally, the original query is rewritten to generate the rewritten query text "Specification of Terminal Attach and Detach Mobility Management Process in the CT Domain of 3GPP Protocol". This rewritten text clarifies the terminology definitions and specific process types, eliminates the ambiguity of the original query, and provides accurate basis for subsequent retrieval.

[0068] In the above embodiments, generating rewritten query text from the input protocol query text can effectively solve the problems of numerous technical terms and abbreviations in protocol documents, and the ease with which users may encounter semantically unclear or vaguely described queries. By relying on the node relationships of the protocol knowledge graph, the original query is supplemented with terms and ambiguous expressions are corrected, transforming the user's potentially brief and vague original query into a precise query text containing complete terminology definitions and clearly defining the protocol domain and technical scope. Querying based on the rewritten query text can significantly improve the matching degree between the query text and the protocol content, avoiding situations where incomplete original query information leads to locating irrelevant documents or missing key specifications during subsequent searches.

[0069] Step 202: Determine the vector corresponding to the rewritten query text as the latest query vector.

[0070] The latest query vector refers to the numerical vector representation obtained by processing the rewritten query text generated in step 201 through a preset embedding model. It is the core data format for subsequent similarity calculations with the historical query database and vector database, and must accurately map the semantic information of the rewritten query text. For example, the embedding model may include one or more of the following: text-embedding-3-large, text-embedding-ada-002, and BGE-M3.

[0071] In one embodiment, if the rewritten query text generated in step 201 is “3GPP 5G RAN Physical Layer Random Access Channel (RACH) Procedure Specification”, the “text-embedding-3-large” embedding model is selected to semantically encode the text, transforming key semantics such as “5G RAN”, “physical layer”, and “RACH procedure” in the text into a high-dimensional numerical vector (such as a 1536-dimensional vector). This vector is the latest query vector, which can be used for subsequent similarity calculations with historical query vectors and document vectors in the vector database.

[0072] In the above embodiments, by transforming the rewritten precise query text into the latest query vector, the query text is transformed from natural language semantics to a machine-computable numerical form. This provides a standardized data foundation for subsequent similarity comparison with historical query databases and vector databases, effectively solving the problem that natural language queries are difficult to directly perform precise quantitative matching.

[0073] Step 203: Determine the similarity between the latest query vector and each historical query vector in the historical query database.

[0074] The historical query database stores historical query information for a pre-built vector database. This information includes historical query vectors and their corresponding historical query results. The vector database is constructed based on multiple protocol documents. For example, the historical query database stores information related to past queries initiated against the 3GPP protocol vector database. It is a core data carrier for reusing historical query results and reducing redundant searches. Its stored content must match the retrieval logic of the vector database to support rapid retrieval of historical query vectors and their corresponding results. For instance, the historical query database may store historical query records related to user queries against the vector database within the last six months. When a new query is semantically similar to a historical query, the results of that record can be directly retrieved without re-searching the vector database.

[0075] Historical query vectors are vectors stored in the historical query database, generated from rewritten past query text through an embedding model. Their embedding logic is consistent with the latest query vector (e.g., both use the text-embedding-3-large model), and they are the core comparison objects for calculating similarity. For example, if a past query text was "3GPP 5GSA security mechanism specification", and after processing by the text-embedding-3-large model, a 1536-dimensional numerical vector was generated, this vector is the historical query vector, and its similarity can be calculated with the latest query vector.

[0076] In this embodiment, the vector database is constructed based on multiple protocol contents. It stores protocol text blocks, diagrams, and formula vectors in a "content-vector-filename-type-version number" structure. It serves as the retrieval object for historical queries and the latest queries (when similarity does not meet the standard), and supports incremental updates and version tracking. For example, this vector database stores RAN domain physical layer text block vectors, SA domain security mechanism flowchart vectors, and CT domain mobility management formula vectors from 3GPP R17, and labels them with corresponding filenames (such as "3GPP TS 38.211"), types (text / diagram / formula), and version numbers (R17).

[0077] Historical query information comprises two core components: historical query vectors and historical query results. It serves as the basis for determining whether a new query can reuse historical results. For example, a complete historical query record may include: a historical query vector (corresponding to the 1536-dimensional vector of the "3GPP 5G RAN Random Access Procedure") and historical query results.

[0078] Historical query results information refers to the retrieval results data corresponding to historical query vectors within the historical query information. This includes relevant protocol content context and corresponding filenames obtained from the vector database (or historical reuse) during the historical query. It is core data that can be directly used as the context for the latest query when the similarity meets the standard. For example, the historical query results information corresponding to a certain historical query vector might include: Top-K1 context ("In the 3GPP protocol CT domain, the terminal attachment process needs to complete authentication and session establishment through the Mobility Management Entity (MME)") and Top-K1 filename ("3GPPTS 23.401 V16.5.0"). This information can directly provide context support for similar latest queries; where Top-K1 refers to the top K1 retrieval results in terms of similarity.

[0079] In one embodiment, the terminal determines the similarity between the latest query vector and each historical query vector in the historical query database. For example, a cosine similarity algorithm is used to calculate the cosine similarity between the latest query vector and each historical query vector in the historical query database one by one. Finally, the similarity calculation of all historical query vectors is completed, and the similarity score between each historical query vector and the latest query vector is obtained, providing data support for subsequent judgment on whether to reuse historical results.

[0080] In the above embodiments, by calculating the similarity between the latest query vector and each historical query vector in the historical query database, the query resources of the vector database in the past are effectively utilized, avoiding repeated retrieval of massive protocol content. When there is a historical query vector with a similarity that meets the standard, its corresponding historical query result information can be directly reused without having to re-enter the vector database for retrieval, which greatly reduces the efficiency loss caused by the huge retrieval space of protocol documents and reduces the user's query waiting time. At the same time, it ensures the accuracy of similarity calculation, can accurately identify historical records that are semantically similar to the latest query, and avoids matching deviations caused by model differences.

[0081] Step 204: If there is a target historical query vector with a similarity greater than or equal to a set threshold, use the target historical query vector and its corresponding historical query result information as the context information of the latest query vector, and generate corresponding prompt words.

[0082] The similarity refers to the degree of matching between the latest query vector calculated in step 203 and all historical query vectors in the historical query database. For example, it can be obtained by the cosine similarity algorithm. When all such values ​​are less than the set threshold, the vector database query process in step 205 is triggered, which is the basis for determining whether the vector database needs to be searched again.

[0083] Setting a threshold is a dynamic criterion used to determine whether the similarity between the latest query vector and historical query vectors meets the required standard. It can be adjusted according to user needs (prioritizing recall or precision) and serves as the basis for deciding whether to reuse historical query results. For example, a threshold α = 0.7. In one embodiment, the threshold is a dynamic threshold, and its setting method can include: dynamically adjusting the threshold size according to user search needs; for example, when user needs tend to retrieve more relevant content, lowering the threshold to improve the recall rate of the large language model; when user needs tend to obtain precisely matched content, increasing the threshold to improve the precision of the large language model.

[0084] The target historical query vector is a historical query vector in the historical query database whose similarity to the latest query vector is greater than or equal to a set threshold. It is the direct source for reusing historical query result information, and it is necessary to ensure that the corresponding historical query result information is highly consistent with the semantic requirements of the latest query.

[0085] The contextual information of the latest query vector is supplementary information composed of the target historical query vector and its corresponding historical query result information in the scenario of reusing historical results. It is used to assist the large language model in understanding the query intent. It must include the protocol content context and source identifier related to the latest query to ensure semantic coherence and verifiability.

[0086] The prompts are input content from a large language model constructed according to a preset structure, based on contextual information from the latest query vector. The prompts must explicitly guide the LLM to generate accurate results as a domain expert, and must indicate the source of the content. The preset structure can include role setting, latest query, context, filename, and output format. For example, the prompts generated based on the above context information might be: "Role setting: You are a 3GPP protocol domain expert and need to generate accurate answers based on the provided protocol content. Latest query: 3GPP 5G CT domain terminal detach procedure specification. Top-K1 context: In 3GPP TS 23.401 V17.0.0, the terminal detach procedure is divided into normal detach and abnormal detach, requiring the MME to release session resources. Top-K1 filename: 3GPP TS 23.401 V17.0.0. Output format: Explain the core steps of the procedure in natural language bullet points, and indicate the source of the reference."

[0087] In one embodiment, assuming that step 203 has calculated a similarity of 0.85 between the latest query vector and a historical query vector in the historical query database, and a threshold α = 0.7 (0.85 ≥ 0.7) is set, then this historical query vector is the target historical query vector. First, the historical query result information corresponding to the target historical query vector is extracted. For example, the Top-K1 context is "In 3GPP TS 23.401 V17.0.0, the terminal detach process requires the terminal to initiate a detach request first. After receiving the request, the MME verifies the terminal's identity, then releases the user plane bearer and session context, and finally sends a detach notification to the HSS (Home Subscriber Server) to update the user status"; the Top-K1 file name is "3GPP TS23.401 V17.0.0 (Core Network and Terminal Domain Mobility Management Specification)". Next, the target historical query vector and the aforementioned historical query result information are integrated into the context information of the latest query vector, ensuring coverage of the core steps and sources of the "detach process". Finally, following the preset structure of the prompt word project, the following prompt words are generated: "Role setting: Please generate an accurate and evidence-based answer based on the provided protocol content, acting as a 3GPP protocol CT domain expert. Latest query: Terminal detach mobility management process specification in the CT domain of the 3GPP protocol. Top-K1 context: In 3GPP TS 23.401 V17.0.0, the terminal detach process requires the terminal to initiate a detach request first. After receiving the request, the MME verifies the terminal's identity, then releases the user plane bearer and session context, and finally sends a detach notification to the HSS to update the user state. Top-K1 file name: 3GPP TS 23.401V17.0.0. Output format: Describe the complete steps of the detach process in natural language. Each step should briefly explain the main operation and core actions, and indicate the referenced document name and version number at the end of the answer." This completes the prompt word generation, preparing for subsequent input into the large language model.

[0088] In the above embodiments, when there are target historical query vectors with a similarity greater than or equal to a set threshold, the context of the latest query is constructed by reusing the corresponding historical query result information and prompt words are generated. This effectively avoids repeated staged retrieval of the vector database and significantly shortens the response time of protocol queries. Especially for common protocol content frequently queried by users, the retrieval basis can be quickly generated directly based on historical resources, solving the problem of large retrieval space and low efficiency of massive protocol documents. At the same time, the generated prompt words strictly follow the preset structure of prompt word engineering, including the role setting of relevant domain experts, accurate context information and clear source identification (file name, version number), which supplements the large language model with deep domain knowledge and avoids the generation of empty or mismatched content by traditional LLM due to lack of protocol knowledge understanding. This ensures that the query results output by LLM are both in line with user intent and have traceable protocol basis.

[0089] Step 205: If the similarity is less than the set threshold, query the vector database to obtain the target protocol content corresponding to the latest query vector and the location information of the target protocol content in multiple protocol contents. Use the target protocol content and location information as the context information of the latest query vector and generate corresponding prompt words.

[0090] The target protocol content corresponding to the latest query vector refers to the protocol content that the vector database obtains through retrieval after receiving the latest query vector. This content is highly related to the semantics of the latest query and includes text blocks, structured descriptions of charts, formula text descriptions, etc. It must conform to the storage structure of "content-vector-filename-type-version number" and is the core material for constructing the latest query context.

[0091] Location information refers to the specific location identifier of the target protocol content in multiple protocol documents. It is associated with the "file name" and "version number" in the vector database storage structure, which clearly identifies the document name, chapter title and protocol version to which the target protocol content belongs. It is key information for subsequent prompts to indicate the source and facilitate users to trace the original document.

[0092] In one embodiment, assuming that step 203 calculates that the highest similarity between the latest query vector and all historical query vectors in the historical query database is 0.62, while the current threshold is set to 0.7, all similarities are less than the threshold, triggering step 205. First, the latest query vector is input into the vector database, the search is initiated, the vector database is queried, the target protocol content corresponding to the latest query vector and the location information of the target protocol content in multiple protocol contents are obtained, and the target protocol content and location information are used as the context information of the latest query vector, and then prompt words are generated according to the preset structure of the prompt word project.

[0093] In the above embodiments, when the similarity between the latest query vector and the historical query vector is less than a set threshold, the target protocol content and location information are obtained by querying the vector database and retrieving them. This ensures that even if there are no similar historical queries to reuse, the content matching the query requirements can still be accurately located from the vector database built based on multiple protocols. This effectively solves the problem of "difficult retrieval when there is no historical reference" caused by the large and complex protocol document system and avoids the situation where accurate queries cannot be responded to due to the lack of historical results.

[0094] Step 206: Use the prompt words as input to the large language model and obtain the query results output by the large language model in response to the prompt words.

[0095] Among them, the large language model refers to a deep learning model trained on large-scale text data that has the ability to understand context, answer questions in specific domains, and generate text. For example, the large language model needs to generate accurate responses based on 3GPP protocol domain information (such as role settings, context, and source identifiers) in the prompt words, and needs to conform to the professional specifications of the 3GPP protocol to avoid generating empty or biased content.

[0096] The query results refer to the response content output by LLM based on the input prompts, which directly corresponds to the protocol query requirements. It must contain accurate protocol knowledge (such as technical specifications, process steps, formula explanations, etc.), indicate the source of the reference (file name, version number), conform to the output format defined in the prompts, and is the final response content output to the user.

[0097] In one embodiment, the terminal has received a prompt word generated according to the preset structure of the prompt word project. First, the prompt word is input into a preset large language model (such as an LLM fine-tuned from the 3GPP protocol corpus to ensure a deep understanding of SA domain terminology and architecture). After receiving the prompt word, the LLM first parses the role setting (SA domain expert), then extracts the core requirements of the latest query (network slicing service architecture design specifications), and then combines the protocol content of the Top-K1 context (network slice selection function, architecture layering, interaction process, etc.) with the source information to organize the language according to the output format. Finally, the query result is generated: "The core components of the 3GPP 5G SA domain network slicing service architecture are as follows: 1. Functional components: including Network Slice Selection Function (NSSF), Access and Mobility Management Function (AMF), and Unified Data Management Function (Unified Data)." Network Slicing Management (UDM), with the NSSF as the core component, responsible for slice instance selection and allocation. The UDM stores the slice permission data subscribed by the user. 2. Layered Architecture: Divided into slice subnets (such as RAN slice subnets and core network slice subnets) and end-to-end slices (composed of multiple slice subnets working together, covering the complete service link from the terminal to the core network). Reference: 3GPP TS 23.501 V17.0.0 (5G System Architecture), Chapter 5.6 Network Slicing Architecture. Key steps in the 5G SA network slice service interaction process: 1. The terminal (UE) sends a network slice service request to the AMF, carrying the service type and slice requirements; 2. After receiving the request, the AMF triggers an NSSF call and sends a slice selection request to the NSSF; 3. The NSSF queries the UDM for the slice permissions subscribed by the user and available slice instance information; 4. The UDM returns the user's subscription data, and the NSSF selects a suitable slice instance based on the service requirements and subscription data; 5. The NSSF feeds back the slice instance information to the AMF, and the AMF guides the terminal to access the target slice instance. Reference: 3GPP TS23.501 Version 17.0.0 (5G System Procedures for the 5G Core Network), Section 4.2.1 "Network Slicing Service Triggering Process", completes the acquisition of query results and outputs them to the user for 3GPP protocol-related work.

[0098] In one embodiment, the prompt words are used as input to a large language model. After obtaining the query results output by the large language model for the prompt words, user evaluations and feedback based on the query results are obtained. User evaluations include user assessments of the accuracy and relevance of the query results, while user feedback includes user feedback on the optimization effect of the multi-turn interaction system, the speed of query response, and the degree of matching between the document and the output query results.

[0099] In the above embodiments, by inputting prompt words containing precise information about a specified protocol domain into the large language model, the LLM can generate professional results that match the user's query needs based on the role settings, context (target protocol content), and source identifiers (filename, version number) in the prompt words. This effectively makes up for the shortcomings of traditional LLMs, which generate empty or mismatched content due to a lack of in-depth knowledge of relevant protocols. It ensures that the output query results have both the accuracy and authority of protocol specifications, and can be traced and verified through clear source annotations, adapting to the characteristics of the large-scale and rapidly iterating system of relevant protocol documents. At the same time, the structured output of LLM based on prompt words makes the query results clearer and easier to understand, reducing the cost for users to extract key information from complex protocol content.

[0100] The aforementioned protocol content query method, by generating rewritten query text, can correct potential semantic ambiguity, vague descriptions, or misunderstandings of abbreviations in the input query, improving query accuracy and ensuring precise matching of protocol-related content. The rewritten query text is transformed into the latest query vector, and its similarity is calculated with vectors in the historical query database. When the similarity meets the standard, historical query results are directly reused as context, significantly reducing the need for repeated retrieval of the vector database, reducing the retrieval space of massive protocol documents, improving retrieval efficiency, and avoiding the inefficiency of searching through complex documents one by one. When the similarity does not meet the standard, the target protocol content and location information are obtained from the query vector database, ensuring accurate and relevant protocol information from a vector database built based on multiple protocol contents, providing a reliable basis for subsequent prompt word generation. Finally, prompt words containing accurate contextual information are input into the large language model, supplementing the LLM with in-depth knowledge of the corresponding protocol domain, effectively avoiding the generation of hollow or poorly matched responses by traditional LLMs, making the output query results more relevant to user needs.

[0101] In an exemplary embodiment, the construction of the vector database described above may include: dividing multiple protocol documents into text blocks to obtain multiple text blocks, determining the text vector corresponding to each text block, converting the charts and / or formulas in the multiple protocol documents into corresponding chart vectors and / or formula vectors, and constructing a vector database based on the chart vectors and / or formula vectors and the text vectors; wherein the storage structure in the vector database is "content-vector-filename-type-version number", where content represents the natural language content of the text block, vector represents the vector output by the embedding model, filename represents the name and / or chapter title of the protocol document, type includes at least one of text, chart, and formula, and version number represents the version of the protocol document. A text block is the smallest unit of information obtained by preprocessing the corresponding protocol document, containing text, structured descriptions of charts, text descriptions of formulas, etc., and is the basic unit for vector database storage and clustering.

[0102] For example, a terminal can acquire multiple 3GPP protocol documents and perform text segmentation on these documents, including hierarchical segmentation and fixed-size segmentation. Hierarchical segmentation represents text splitting based on the chapter and subheading structure of the 3GPP protocol documents, while fixed-size segmentation represents further dividing each segmented block into smaller, partially overlapping blocks based on a preset block size. This partial overlap helps prevent text information distortion. After hierarchical and fixed-size segmentation, multiple text blocks are obtained. These text blocks can be processed into corresponding vectors using the aforementioned embedding model and stored in a vector database. The storage structure in the vector database is "content-vector-filename-type-version number". When processing highly specialized and complex technical documents like 3GPP documents, choosing an appropriate embedding model is crucial for processing effectiveness and efficiency. For example, the embedding model can be one or more of the aforementioned text-embedding-3-large, text-embedding-ada-002, and BGE-M3. When summarizing 3GPP documents, since the main requirement is to quickly extract the core content without overly complex feature extraction, a lightweight text-embedding-ada-002 embedding model can be used to improve processing efficiency. However, when segmenting 3GPP documents, in order to more accurately capture the semantic relationships between texts and ensure the logic and completeness of the segmentation, using a high-dimensional text-embedding-3-large or multilingual BGE-M3 embedding model can effectively improve accuracy and better adapt to the needs of multilingual scenarios and complex technical expressions in 3GPP documents.

[0103] In one embodiment, when a protocol document is updated, the filenames and version numbers of existing protocol documents in the vector database are compared to identify the updated content. The updated content is then preprocessed, including: dividing the updated content into text blocks to obtain multiple new text blocks, and converting the new text blocks into new text vectors; parsing the chart areas and / or formula areas in the updated content, and converting the chart areas and / or formula areas into new vector representations; storing the preprocessed updated content in the vector database in the structure of "content-vector-filename-type-version number", retaining the corresponding historical version data in the vector database and marking it as a historical state.

[0104] For example, when a terminal or server detects a new 3GPP protocol document, it indicates that the 3GPP protocol document has been updated. Then, by comparing the filename and version number of existing protocol documents in the vector database, the updated content is identified, and preprocessed. The preprocessed updated content is stored in the vector database in a structure of "content-vector-filename-type-version number". The preprocessing includes: segmenting the updated content into text blocks, such as the aforementioned hierarchical segmentation and fixed-size segmentation, resulting in multiple new text blocks. These new text blocks can be processed into corresponding vectors using the aforementioned embedding model; parsing the graph and / or formula regions in the updated content, and converting these regions into new vector representations. For example, CNN can be used to detect and segment the graph regions in the updated content, OCR (Optical Character Recognition) can be used to extract text information from the updated content, and Transformer can be used to detect the formula regions in the updated content. After recognition and parsing, the formula regions are converted into text descriptions and then new vector representations are generated. In one embodiment, for historical version data that is updated and replaced, its complete record stored in the vector database is retained and marked as "historical" for version tracing; when performing a search on the vector database, users can select to search for a specific version of the content, and if the user does not specify, the latest version is searched by default; an automatic synchronization task is triggered according to user settings to compare the latest version of the 3GPP protocol document with the content stored in the vector database.

[0105] Please see Figure 3 , Figure 3 This is a flowchart illustrating a sub-step of step 201 in one embodiment; in an exemplary embodiment, the specific process of "generating corresponding rewritten query text for the input query text used to query protocol content" in step 201 may further include the following sub-steps:

[0106] Step 2011: Obtain the input query text used to query the protocol content.

[0107] The protocol content refers to the core information contained in the communication protocol document, covering technical specifications, process definitions, terminology explanations, entity relationships, etc. It is the retrieval target of the query text and also the data source for constructing the knowledge graph. For example, the "RAN Physical Layer Random Access Channel (RACH) Procedure Steps" and "CT Domain Terminal Attachment Authentication Specification" in the 3GPP protocol both belong to the protocol content.

[0108] In one embodiment, assuming a user needs to query the mobility management related content of the core network and terminal in the 3GPP protocol, the terminal can obtain the query text input by the user for querying the protocol content as "CT mobility management process".

[0109] Step 2012: Rewrite and / or semantically complete the query text based on the pre-built knowledge graph to obtain the rewritten query text.

[0110] The entity nodes of the knowledge graph include protocol abbreviations, terminology definitions, and protocol entities. The edges of the knowledge graph include protocol process relationships and dependencies between entity nodes. The knowledge graph is a structured knowledge network built upon communication protocol documents. It stores protocol-related information in the form of nodes and edges. When extracting process relationships from communication protocol documents, natural language processing technology is used to identify communication protocol interaction steps and map them as temporally ordered relationship edges. This intuitively presents the relationships between protocol knowledge and is a core tool for query rewriting and semantic completion. For example, in the 3GPP protocol knowledge graph, "RAN" is a node, "contains" is an edge, "physical layer" and "data link layer" are child nodes connected to "RAN," and "RACH process" is an associated node of "physical layer," forming a relationship chain of "RAN-contains-physical layer-associated-RACH process." A pre-built knowledge graph refers to a stable and usable protocol knowledge graph that has been constructed before query processing. Its data comes from historical communication protocol documents and includes pre-defined content such as protocol abbreviations, terminology definitions, protocol entities, protocol process relationships, and dependencies between entities, eliminating the need for temporary construction during querying. For example, the communication protocol could be a 3GPP protocol document.

[0111] In one embodiment, rewriting and / or semantically completing the query text based on a pre-built knowledge graph to obtain rewritten query text may include: parsing key entity words and descriptive phrases in the query text using natural language processing techniques; calculating the semantic similarity between the identified key entity words and descriptive phrases and entity nodes in the knowledge graph to match relevant graph entities; generating supplementary information based on the term definitions, attributes, and associations of the matched graph entities in the knowledge graph; and integrating the supplementary information into the query text according to predefined rules to complete the clarification of keywords and the semantic completion of ambiguous descriptions, thereby generating rewritten query text.

[0112] For example, assuming the query text received by the terminal is "RAN access procedure", the pre-built 3GPP protocol knowledge graph is invoked for rewriting and / or semantic completion processing. First, the query keywords were analyzed: two core keywords, "RAN" and "access procedure," were identified. "RAN" is an abbreviation for a protocol, while "access procedure" is vaguely defined. Next, abbreviation and terminology matching was performed: semantic similarity calculations were conducted between the identified key entities and entity nodes in the knowledge graph. The full name of "RAN," "Radio Access Network," was matched against the protocol entities "Random Access Channel (RACH) Procedure" and "Handover Access Procedure" corresponding to "access procedure." Based on the mainstream application scenarios of 3GPP 5G, the core associated procedure was determined to be "RACH Procedure." Then, semantic completion and rewriting were performed: supplementary information was generated based on the relationship chain "RAN-includes-physical layer-associated-RACH Procedure" and "RACH Procedure-home-3GPP 5G" in the knowledge graph. This supplementary information was used to complete the original query and integrated into the query text according to predefined rules, ultimately generating the rewritten query text "3GPP 5G RAN (Radio Access Network) Physical Layer Random Access Channel (RACH) Procedure Specification." This rewritten query text was used for subsequent searches.

[0113] In the above embodiments, the combination of natural language processing technology and knowledge graphs significantly improves the accuracy and completeness of query text. By parsing key entity words and descriptive phrases and calculating semantic similarity with entity nodes in the knowledge graph, potential related information in the user's intent can be mined. This process clarifies originally vague keywords, completes ambiguous descriptions, and makes the rewritten query text more closely match the user's true intent and the knowledge graph architecture. Consequently, when retrieving protocol content in the future, it can greatly improve retrieval efficiency and result accuracy, avoid retrieval deviations caused by ambiguous query text, and help users quickly obtain the accurate protocol information they need.

[0114] In another embodiment, rewriting and / or semantically completing the query text based on a pre-built knowledge graph to obtain rewritten query text may include: performing intent analysis on the input query text used to query protocol content based on multi-round interactive queries, and dynamically adjusting the content of the query text during the multi-round interactive queries to obtain rewritten query text. For example, assuming the user's initial input query text for querying protocol content is "SA's security mechanism," the terminal initiates multi-round interactive queries for intent analysis and dynamic adjustment, the specific process of which is as follows:

[0115] In the first round of interaction, the terminal, based on the pre-built 3GPP protocol knowledge graph (including entities such as "network security", "user data security", and "signaling security" associated with "security mechanisms" in the SA domain), recognizes that although "SA" in the query text is clearly "Service and System Aspects", the scope of "security mechanisms" is vague. Therefore, it clarifies to the user: "Does the security mechanism in the SA domain that you are querying focus on one of the following categories: network architecture security, user data transmission security, or signaling interaction security?"

[0116] The second round of interaction: The user feedback was "want to understand the security mechanisms related to user data transmission". The terminal combined the entity relationship in the knowledge graph "SA-User Data Transmission Security-Association-Encryption Algorithm, Integrity Protection" to further refine the query scope: "User data transmission security in the SA field of the 3GPP protocol involves data encryption and integrity protection. Do you need to understand the specifications of specific encryption algorithms (such as AES-256) or integrity protection mechanisms (such as HMAC-SHA256)?"

[0117] The third round of interaction: The user adds "relevant content on encryption algorithms in the latest version", and the terminal confirms the update information of user data encryption algorithms in the SA domain in the latest version of 3GPP (such as R17) through the knowledge graph. Finally, the query text content is dynamically adjusted to generate a rewritten query text "3GPP R17 SA (Service and System Aspects) Domain User Data Transmission Security Encryption Algorithm Specification".

[0118] In the above embodiments, intent analysis is performed on the input query text used to query protocol content based on multi-round interactive queries. The query text is dynamically rewritten by adjusting its content during the multi-round interactive query process. This gradually guides users to clarify their intent, more accurately analyzes their true needs, effectively avoids inaccurate or irrelevant search results due to vague initial user statements, improves search efficiency, reduces user waiting time, and greatly enhances user experience, allowing users to feel the system's deep understanding and attention to their needs. Simultaneously, by dynamically adjusting the query text, the query can more accurately match with entity nodes in the knowledge graph, uncovering more potential related information, thereby providing users with more comprehensive and relevant protocol content.

[0119] Please see Figure 4 , Figure 4 The following is a flowchart illustrating a sub-step of step 205 in one embodiment; in an exemplary embodiment, the specific process of "querying the vector database to obtain the target protocol content corresponding to the latest query vector and the location information of the target protocol content in multiple protocol contents" in step 205 may further include the following sub-steps:

[0120] Step 2051: Predict the target category to which the latest query vector belongs.

[0121] The target category refers to the sub-category of the protocol core domain to which the latest query vector belongs, as predicted by the model. For example, the sub-categories of the 3GPP protocol core domain include at least one of RAN (Radio Access Network), CT (Core Network and Terminals), and SA (Services and System Architecture).

[0122] In one embodiment, the terminal can perform initial localization of the target category to which the latest query vector belongs: using a multi-class cross-entropy loss function and a convolutional neural network (CNN) trained based on supervised learning for prediction, inputting the vector representation of the latest query into the CNN, and outputting the probability distribution of the preset category labels corresponding to the latest query vector, the preset category labels including RAN, CT, and SA; taking the category corresponding to the highest probability as the target category to which the latest query vector belongs, and using it to narrow the subsequent search scope to the document set of the corresponding category.

[0123] Step 2052: Based on the target category, determine the candidate clusters in the vector database, and based on the first similarity between the latest query vector and the summary vectors of each candidate cluster, determine the candidate cluster with the highest first similarity as the target cluster.

[0124] The candidate clusters are obtained by clustering multiple text blocks of the target category, and the text blocks are obtained by dividing multiple protocol contents. The candidate clusters are groups of text blocks under the target category in the vector database, formed by clustering algorithms (such as K-means clustering and Gaussian mixture model). Each cluster contains text blocks with similar semantics. For example, if the target category is "Radio Access Network Category", the text blocks under this category cover physical layer, data link layer, and network layer protocol contents. After K-means clustering, candidate clusters such as "RAN Physical Layer Channel Coding" and "RAN Data Link Layer HARQ Mechanism" are formed.

[0125] Text blocks are the smallest units of information obtained from the preprocessing of the corresponding protocol document. They are divided using a "hierarchical block division + fixed-size block division" approach. Hierarchical block division represents text splitting based on the chapter and subheading structure of the corresponding protocol document. Fixed-size block division represents further subdividing each block after hierarchical block division into smaller, partially overlapping blocks based on a preset block size. These blocks contain text, structured descriptions of diagrams and charts, formula text descriptions, etc., and serve as the basic unit for vector database storage and clustering. For example, hierarchically dividing the 3GPP document "RAN Physical Layer Control Channel Protocol" by the chapter subheading "5.1 RACH Procedure" and then further dividing it into fixed-size blocks with a 500-character limit results in smaller, partially overlapping text blocks such as "5.1.1 RACH Preamble Transmission" and "5.1.2 RAR Reception".

[0126] The summary vector is a vector generated by calculating the weighted average of all text block vectors within each candidate cluster, and it can represent the core semantics of that cluster.

[0127] In one embodiment, the terminal can perform coarse localization of the target category to determine the target cluster to which the latest query vector in the vector database belongs. First, text blocks within the target category document set are clustered, and a corresponding document summary is generated for each cluster. Specifically, this includes: clustering each text block vector using K-means clustering or a Gaussian mixture model to obtain multiple text block clusters; calculating a weighted average of the text block content within each cluster to generate a summary vector; calculating the cosine similarity (first similarity) between the latest query vector and the summary vectors of each cluster; and selecting the candidate cluster with the highest cosine similarity as the target cluster, which serves as the candidate text block range for the next stage of fine localization.

[0128] Step 2053: Based on the second similarity between the latest query vector and each text block vector of the target cluster, determine the set number of text block vectors with the highest second similarity as candidate text block vectors, and retrieve the text block content and file name corresponding to each candidate text block vector in the vector database.

[0129] Among them, the text block vector is a numerical vector generated by the text block through the embedding model, which is stored in the vector database and associated with the "content-filename-type-version number" of the text block.

[0130] The second similarity is the similarity between the latest query vector and the text block vectors within the target cluster. The cosine similarity algorithm can be used to select the text blocks that best match the semantics of the latest query vector from the target cluster.

[0131] The set quantity is the number of text block vectors with the second highest similarity selected, which can be adjusted according to user needs.

[0132] The text block content corresponding to the candidate text block vector is the original text information that the candidate text block vector is associated with and stored in the vector database, including the natural language content of the text block, the structured description of the chart, or the text description of the formula.

[0133] In one embodiment, the terminal can perform precise localization of the target category to determine the text block content and filename corresponding to the candidate text block vectors corresponding to the latest query vector in the vector database. Specifically, this includes: calculating the cosine similarity (second similarity) between each text block vector within the selected target cluster and the latest query vector; sorting the text block vectors from high to low based on the cosine similarity; selecting the Top-K1 (K1 sets of first-ordered text block vectors) as candidate text block vectors; and for each candidate text block vector, retrieving the corresponding text block content (Top-K1 context content) and filename (Top-K1 filename) from the vector database.

[0134] Step 2054: Based on the text block content and file name corresponding to the candidate text block vector, obtain the target protocol content corresponding to the latest query vector and the location information of the target protocol content in multiple protocol contents.

[0135] Among them, the target protocol content corresponding to the latest query vector refers to the core protocol information retrieved from the vector database that is highly semantically matched with the latest query vector. It is composed of the text block content corresponding to the candidate text block vector, covering text description, chart structured information or formula analysis content, and needs to accurately respond to the needs of the latest query (such as protocol process, technical specifications, functional definition, etc.).

[0136] The location information of the target protocol content among multiple protocol contents refers to the specific location identifier of the protocol document to which the target protocol content belongs. It is generated based on the file name corresponding to the candidate text block vector and includes the document name, chapter title and version number (consistent with the "file name" and "version number" in the "content-vector-file name-type-version number" storage structure of the vector database). It is used by users to trace the original protocol document and ensure the verifiability of the results.

[0137] In one embodiment, assuming two candidate text block vectors have been determined, the terminal first integrates the text block content corresponding to the two candidate text block vectors, including: removing duplicate information, concatenating the core content according to the process sequence, and forming the target protocol content corresponding to the latest query vector, for example: "3GPP 5G CT Domain Terminal Attachment Process Specification: 1. The terminal (UE) sends an attach request to the AMF, carrying the IMSI (International Mobile Subscriber Identity), attach type (such as initial attach), and terminal capability information; 2. The AMF initiates EAP-AKA (Extensible Authentication Protocol - Authentication and Key Agreement) authentication with the UDM to verify the legitimacy of the terminal; 3. After successful authentication, the AMF assigns a GUTI (Globally Unique Temporary UE Identity) to the terminal; 4. The AMF sends an attach acceptance message to the terminal, including the GUTI, default session information, and slice allocation result (if applicable)."

[0138] Subsequently, based on the filenames corresponding to the candidate text block vectors, the location information is extracted: the document name is clearly defined as "3GPPTS 23.401 (5G Core Network and Terminal Domain Mobility Management Technical Specification)", the chapter titles are "5.3 Terminal Attachment Process" and "5.3.1 Attachment Post-Processing", and the version number is "V17.0.0". These are integrated to form the location information of the target protocol content: "Filename: 3GPP TS 23.401, Chapter Title: 5.3 Terminal Attachment Process / 5.3.1 Attachment Post-Processing, Version Number: V17.0.0".

[0139] Finally, the output of step 2054 is obtained: the target protocol content corresponding to the latest query vector (the above-integrated attachment process specification), and the location information of the target protocol content (the above-mentioned document name, chapter and version number), which provides accurate protocol content and source basis for the subsequent generation of prompt words.

[0140] In the above embodiments, by predicting the target category of the latest query vector, candidate clusters are determined, target clusters are filtered, and candidate text blocks are located. Based on the text block content and filename corresponding to the candidate text block vector, the target protocol content and location information corresponding to the latest query vector are obtained. This gradually narrows the retrieval scope of the massive protocol content in the vector database from "the entire database" to "target category → target cluster → a set number of text blocks", significantly reducing the search space for direct retrieval and effectively solving the problem of low retrieval efficiency caused by the large size of the relevant document system. At the same time, relying on the CNN model to accurately predict the target category and based on two similarity filters, it ensures that each step of the retrieval focuses on content that is highly related to the latest query semantics, avoiding interference from irrelevant information and significantly improving the matching accuracy of the target protocol content.

[0141] In one exemplary embodiment, such as Figure 5 As shown, Figure 5 This is an overall flowchart of a protocol content query method in one embodiment; the protocol content query method includes:

[0142] (1) First, the 3GPP document is preprocessed through a terminal or server, including: text segmentation, which is divided into hierarchical segmentation and fixed-size segmentation. After hierarchical segmentation and fixed-size segmentation, multiple text blocks are obtained; multiple text blocks are processed into corresponding vectors using an embedding model and stored in a vector database. The storage structure in the vector database is "content-vector-filename-type-version number"; the embedding model includes one or more of the following: text-embedding-3-large, text-embedding-ada-002, and BGE-M3. In the storage structure "content-vector-filename-type-version number", the content represents the natural language content of the text block, the vector represents the vector output by the embedding model, the filename represents the 3GPP document name and chapter title, the type includes one of text, chart, and formula, and the version number represents the version of the 3GPP document.

[0143] For example, the text chunking process includes: first using hierarchical chunking, and then using fixed-size chunking, wherein hierarchical chunking is splitting according to the subheadings of chapters in the 3GPP document, and fixed-size chunking is further dividing each chunk into smaller, partially overlapping chunks according to chunk size constraints.

[0144] In one embodiment, computer vision techniques and mathematical formula recognition algorithms can be used to convert diagrams and / or formulas in 3GPP documents into vector representations, enabling the diagrams and / or formulas to be embedded together with the text and participate in retrieval. Diagram detection and parsing includes: using a convolutional neural network-based object detection algorithm to detect and segment diagram regions in 3GPP documents, including flowcharts, architecture diagrams, protocol timing diagrams, and tables; applying image segmentation algorithms to extract structural elements from the detected diagram regions, including text labels, arrows, and graphic boundaries; using OCR to extract text information from the diagrams, including field names and process steps; using graph structure reconstruction methods to extract nodes and edges from the diagrams to form a structured diagram representation; and converting the structured diagram information into a text description. Formula detection and parsing includes: using a Transformer formula detection network to detect formula regions in 3GPP documents; using a mathematical formula recognition algorithm to parse the formula structure, extracting the formula's symbols, operators, and layout relationships; using a pre-trained formula embedding Im2Vec model (a deep learning model capable of synthesizing vector graphics) to convert the formula into a text description, and then using a text embedding model to generate a vector representation.

[0145] In one embodiment, the vector database supports incremental updates and version tracking, including: when a new 3GPP document is detected, identifying the updated portion by comparing the filename and version number of the new 3GPP document with those of historical documents; for the identified updated portion, performing the following preprocessing steps: hierarchically segmenting and fixed-size segmenting the updated document paragraphs; generating vectors from the segmented updated content using an embedding model; converting charts and formulas in the document into embeddable vector representations using computer vision techniques and formula parsing algorithms; writing the updated content into the vector database in the structure of "content-vector-filename-type-version number"; for historical version data that has been updated and replaced, retaining its complete record stored in the database and marking its status as "historical" for version tracking; when performing a search, allowing users to select and search for a specific version of the content, or by default searching for the latest version if no user specifies a version; and triggering an automatic synchronization task based on user settings to compare the latest 3GPP protocol document with the content stored in the database.

[0146] (2) The terminal obtains the query text used to query the protocol content, performs query enhancement on the query text to generate the corresponding rewritten query text. There are two query enhancement methods: First, by integrating the 3GPP protocol knowledge graph, the query text is enhanced to generate the rewritten query text. The query text is rewritten and semantically completed through the node relationships in the graph to generate the rewritten query text that meets the expectations of the retrieval system and accurately expresses the user's intent. For example, the 3GPP protocol knowledge graph includes protocol abbreviations, terminology definitions, protocol entities, protocol processes, and entity relationships. After receiving the query text input by the user, the terminal parses the keywords and fuzzy descriptions in it; matches the abbreviations, terms, and their corresponding definitions related to the query text in the 3GPP protocol knowledge graph; completes the omitted or incomplete expressions in the query text based on the entity relationships in the 3GPP protocol knowledge graph; and generates the rewritten query text that meets the accuracy of the retrieval system based on the input query text and the knowledge graph structure, and directly uses it in the subsequent retrieval process. Second, the query text is used for intent analysis. Multi-round interactive queries are used to dynamically adjust the content of the query text and gradually guide it to the accurate results to generate the rewritten query text. For example, the terminal uses the input query text for intent analysis and employs multi-round interactive queries to dynamically adjust the content of the input query text and gradually guide it to accurate results, including clarifying sub-questions, refining the scope, and focusing on key entities, to generate rewritten query text for use in the retrieval process.

[0147] (3) The rewritten query text is processed into the corresponding vector using the embedding model to obtain the latest query vector, and the similarity s is calculated with the historical query vector in the historical query database. If the similarity score s is greater than or equal to the set threshold α, the Top-K1 context of the rewritten query text and the historical query vector (the text corresponding to the K1 historical query vectors with the highest similarity in the vector database) is output to the prompt word project (used to generate the corresponding prompt words). If the similarity score s is less than the set threshold α, the rewritten query text is output to the vector database, and the corresponding content is retrieved from the vector database as context information.

[0148] In one embodiment, a dynamic threshold is set. The dynamic threshold is used to determine the similarity between the latest query vector corresponding to the rewritten query text and the historical query vectors in the historical query database. In one embodiment, the dynamic threshold is set according to the following criteria: if the user's demand tends to retrieve more relevant content, the dynamic threshold is lowered to improve the recall rate; if the user's demand tends to obtain precisely matched content, the dynamic threshold is increased to improve the precision rate.

[0149] In one embodiment, such as Figure 5As shown, the historical query database is dynamically updated based on queries to the vector database. Specifically, when the target protocol content and location information corresponding to the latest query vector are successfully obtained through querying the vector database, and the query result is finally generated, the terminal considers this query as a valid and successful retrieval. Subsequently, the key information of this query, including the latest query vector, the corresponding rewritten query text, and the target protocol content and location information retrieved from the vector database (together serving as the historical query result information of this query), is stored as a new record entry in the historical query database. In this way, the historical query database can be continuously expanded and enriched, and subsequent similar queries can be preferentially matched with this historical record, thus eliminating the need to query the huge vector database again, significantly improving the overall retrieval efficiency and response speed of the system.

[0150] (4) Due to the existence of a large number of 3GPP documents, when the vector database receives the rewritten query text, it performs a phased search, including the aforementioned initial positioning, coarse positioning and fine positioning, and outputs the rewritten query text, Top-K1 context and Top-K1 file name (the file name corresponding to the K1 historical query vectors with the highest similarity in the vector database).

[0151] For example, the phased retrieval is performed in the following order: initial localization - coarse localization - fine localization, including:

[0152] Initial localization employs a multi-class cross-entropy loss function and a convolutional neural network trained with supervised learning: the input is a vector representation of the rewritten query text, and the output is a probability distribution corresponding to a preset category label, which includes RAN, CT, and SA; the category label corresponding to the highest probability is used as the category to which the rewritten query text belongs, which is used to narrow down the subsequent search scope to the document set of the corresponding category;

[0153] The coarse localization process involves clustering text blocks within the document set belonging to the category of the rewritten query text and generating a corresponding document summary for each cluster. Specifically, this includes: clustering each text block vector using K-means clustering or a Gaussian mixture model to obtain multiple text block clusters; calculating a weighted average of the text block content within each cluster to generate a summary vector; and calculating the cosine similarity between the vector of the rewritten query text and the summary vectors of each cluster, selecting the cluster with the highest similarity as the candidate text block range for the next stage of fine localization.

[0154] The fine-grained localization process performs refined similarity calculations and context tracing on text blocks within the selected clusters. Specifically, it includes: calculating the cosine similarity between the rewritten query text vector and the text block vectors within the selected clusters one by one; sorting the text blocks from high to low similarity and selecting the Top-K1 text blocks as candidate results; for each Top-K1 text block, obtaining the corresponding Top-K1 context by reverse retrieval of the text block content; and finally, the output includes the rewritten query text, Top-K1 context, and Top-K1 filename, which are used to generate prompt words.

[0155] (5) The prompt word engineering is used to generate corresponding prompt words based on the rewritten query text, Top-K1 context and Top-K1 file name. The prompt words are used as input to the Large Language Model (LLM). The LLM generates the final response based on the prompt words. The user evaluates and provides feedback based on the final response.

[0156] In one embodiment, the prompt includes role setting, rewritten query text, Top-K1 context, Top-K1 filename, and output format. Role setting: Specifies that the LLM should respond as a 3GPP protocol domain expert during generation; Rewritten query text: User-rewritten query text enhanced with query enhancement, used to guide the LLM in generating focused answers; Top-K1 context: Retrieved Top-K1 context related to the rewritten query text; Top-K1 filename: Document name and chapter title corresponding to the Top-K1 text block, used to indicate citation sources in the answer; Output format: Defines the form of the LLM output, which may include natural language text output or option mode output;

[0157] In one embodiment, user evaluation includes user assessments of the accuracy and relevance of the final response, and user feedback includes user feedback on the optimization effect of the multi-turn interaction system, the speed of query response, and the degree of matching between the document and the output.

[0158] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to 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 embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.

[0159] Based on the same inventive concept, this application also provides a protocol content querying device for implementing the protocol content querying method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more protocol content querying device embodiments provided below can be found in the limitations of the protocol content querying method described above, and will not be repeated here.

[0160] In one exemplary embodiment, such as Figure 6 As shown, a protocol content query device 600 is provided, including: a text generation module 610, a vector determination module 620, a similarity confirmation module 630, a prompt word confirmation module 640, and a result acquisition module 650, wherein:

[0161] The text generation module 610 is used to generate a corresponding rewritten query text for the input query text used to query the protocol content.

[0162] Vector determination module 620 is used to determine the vector corresponding to the rewritten query text as the latest query vector;

[0163] The similarity confirmation module 630 is used to determine the similarity between the latest query vector and each historical query vector in the historical query database; the historical query database is used to store historical query information for a pre-built vector database, the historical query information including historical query vectors and historical query result information corresponding to each historical query vector; the vector database is constructed based on multiple protocol contents;

[0164] The prompt word confirmation module 640 is used to, when there is a target historical query vector with a similarity greater than or equal to a set threshold, use the target historical query vector and its corresponding historical query result information as the context information of the latest query vector, and generate corresponding prompt words.

[0165] The prompt word confirmation module 640 is further configured to, when the similarity is less than the set threshold, query the vector database to obtain the target protocol content corresponding to the latest query vector and the location information of the target protocol content in multiple protocol contents, and use the target protocol content and the location information as the context information of the latest query vector, and generate corresponding prompt words;

[0166] The result acquisition module 650 is used to take the prompt word as input to the large language model and acquire the query results output by the large language model in response to the prompt word.

[0167] The aforementioned protocol content query device includes a text generation module 610 that generates rewritten query text to correct semantic ambiguity, vague descriptions, or misunderstandings of abbreviations in the input query, thereby improving query accuracy and ensuring precise matching of protocol-related content. A vector determination module 620 converts the rewritten query text into the latest query vector. A similarity confirmation module 630 calculates the similarity with vectors in the historical query database. A prompt word confirmation module 640 reuses historical query results as context when the similarity meets the standard, significantly reducing repeated retrieval of the vector database, reducing the retrieval space of massive protocol documents, improving retrieval efficiency, and avoiding the inefficiency of users searching through numerous documents one by one. When the similarity does not meet the standard, the target protocol content and location information are obtained from the query vector database, ensuring accurate and relevant protocol information from a vector database built based on multiple protocol contents, providing a reliable basis for subsequent prompt word generation. A result acquisition module 650 inputs prompt words containing accurate contextual information into the large language model, supplementing the LLM with in-depth knowledge of the corresponding protocol domain, effectively avoiding the generation of hollow or poorly matched response content by traditional LLM.

[0168] In one embodiment, the prompt word confirmation module 640 is further configured to predict the target category to which the latest query vector belongs; the target category includes at least one of the following: radio access network category, core network and terminal category, and service and system architecture category;

[0169] Candidate clusters in the vector database are determined based on the target category. The candidate clusters are obtained by clustering multiple text blocks of the target category, and the text blocks are obtained by dividing multiple protocol contents.

[0170] Based on the first similarity between the latest query vector and the summary vectors of each candidate cluster, the candidate cluster with the highest first similarity is determined as the target cluster.

[0171] Based on the second similarity between the latest query vector and each text block vector of the target cluster, a set number of text block vectors with the highest second similarity are determined as candidate text block vectors, and the text block content and file name corresponding to each candidate text block vector are retrieved from the vector database;

[0172] Based on the text block content and file name corresponding to the candidate text block vector, the target protocol content corresponding to the latest query vector and the location information of the target protocol content in multiple protocol contents are obtained.

[0173] In one embodiment, the text generation module 610 is further configured to divide multiple protocol documents into text blocks to obtain multiple text blocks, and determine the text vector corresponding to each text block.

[0174] Convert the charts and / or formulas in the multiple protocol documents into corresponding chart vectors and / or formula vectors;

[0175] The vector database is constructed based on the chart vectors and / or formula vectors, as well as the text vectors.

[0176] The storage structure of the vector database is "content-vector-filename-type-version number". The content represents the natural language content of the text block, the vector represents the vector corresponding to the content, the filename represents the name and / or chapter title of the protocol document, the type includes at least one of text, chart and formula, and the version number represents the version of the protocol document.

[0177] In one embodiment, the text generation module 610 is further configured to perform hierarchical and fixed-size segmentation on the plurality of protocol documents to obtain a plurality of text blocks;

[0178] The hierarchical segmentation representation is based on the chapter and subheading structure of the protocol document to split the text; the fixed-size segmentation representation is based on a preset segmentation size, which further divides each block after hierarchical segmentation into smaller blocks with partial overlap.

[0179] In one embodiment, the text generation module 610 is further configured to identify the updated content by comparing the file name and version number of the existing protocol documents in the vector database when the protocol document is updated.

[0180] The updated content is preprocessed, including: dividing the updated content into text blocks to obtain multiple new text blocks, and converting the new text blocks into new text vectors; parsing the chart area and / or formula area in the updated content, and converting the chart area and / or the formula area into a new vector representation;

[0181] The preprocessed updated content is stored in the vector database in the structure of "content-vector-filename-type-version number", and the corresponding historical version data in the vector database is retained and marked as historical status.

[0182] In one embodiment, the text generation module 610 is further configured to obtain the input query text for querying protocol content;

[0183] The query text is rewritten and / or semantically completed based on a pre-built knowledge graph to obtain the rewritten query text; the knowledge graph is a knowledge graph built based on communication protocol documents, and the entity nodes of the knowledge graph include: protocol abbreviations, terminology definitions and protocol entities, and the edges of the knowledge graph include: protocol process relationships and dependencies between entities.

[0184] In one embodiment, the text generation module 610 is further configured to parse key entity words and descriptive phrases in the query text;

[0185] The identified key entity words and descriptive phrases are used to calculate semantic similarity with entity nodes in the knowledge graph in order to match relevant graph entities.

[0186] Supplementary information is generated based on the terminology definitions, attributes, and associations of the matched graph entities within the knowledge graph.

[0187] The supplementary information is integrated into the query text according to predefined rules to generate the rewritten query text.

[0188] In one embodiment, the text generation module 610 is further configured to perform intent analysis on the input query text for querying protocol content based on multi-round interactive queries, and dynamically adjust the content of the query text during the multi-round interactive query process to obtain the rewritten query text.

[0189] Each module in the aforementioned protocol content query device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0190] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 7 As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a protocol content query method. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.

[0191] Those skilled in the art will understand that Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0192] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0193] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.

[0194] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.

[0195] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0196] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0197] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0198] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for querying protocol content, characterized in that, The method includes: For the input query text used to query the protocol content, generate the corresponding rewritten query text; Determine the vector corresponding to the rewritten query text as the latest query vector; The similarity between the latest query vector and each historical query vector in the historical query database is determined; the historical query database is used to store historical query information for a pre-built vector database, and the historical query information includes historical query vectors and historical query result information corresponding to each historical query vector; the vector database is constructed based on multiple protocol contents; If a target historical query vector with a similarity greater than or equal to a set threshold exists, the target historical query vector and its corresponding historical query result information are used as the context information of the latest query vector, and corresponding prompt words are generated. If the similarity is less than the set threshold, the vector database is queried to obtain the target protocol content corresponding to the latest query vector and the location information of the target protocol content in multiple protocol contents. The target protocol content and the location information are used as the context information of the latest query vector, and corresponding prompt words are generated. The prompt word is used as input to a large language model to obtain the query results output by the large language model in response to the prompt word.

2. The method according to claim 1, characterized in that, The querying of the vector database to obtain the target protocol content corresponding to the latest query vector and the location information of the target protocol content in multiple protocol contents includes: Predict the target category to which the latest query vector belongs; the target category includes at least one of the following: wireless access network category, core network and terminal category, and service and system architecture category; Candidate clusters in the vector database are determined based on the target category. The candidate clusters are obtained by clustering multiple text blocks of the target category, and the text blocks are obtained by dividing multiple protocol contents. Based on the first similarity between the latest query vector and the summary vectors of each candidate cluster, the candidate cluster with the highest first similarity is determined as the target cluster. Based on the second similarity between the latest query vector and each text block vector of the target cluster, a set number of text block vectors with the highest second similarity are determined as candidate text block vectors, and the text block content and file name corresponding to each candidate text block vector are retrieved from the vector database; Based on the text block content and file name corresponding to the candidate text block vector, the target protocol content corresponding to the latest query vector and the location information of the target protocol content in multiple protocol contents are obtained.

3. The method according to claim 1, characterized in that, The construction methods of the vector database include: Multiple protocol documents are divided into text blocks to obtain multiple text blocks, and the text vector corresponding to each text block is determined. Convert the charts and / or formulas in the multiple protocol documents into corresponding chart vectors and / or formula vectors; The vector database is constructed based on the chart vectors and / or formula vectors, as well as the text vectors. The storage structure of the vector database is "content-vector-filename-type-version number". The content represents the natural language content of the text block, the vector represents the vector corresponding to the content, the filename represents the name and / or chapter title of the protocol document, the type includes at least one of text, chart and formula, and the version number represents the version of the protocol document.

4. The method according to claim 3, characterized in that, The process of dividing multiple protocol documents into text blocks results in multiple text blocks, including: The multiple protocol documents are divided into hierarchical blocks and fixed-size blocks to obtain multiple text blocks; The hierarchical segmentation representation is based on the chapter and subheading structure of the protocol document to split the text; the fixed-size segmentation representation is based on a preset segmentation size, which further divides each block after hierarchical segmentation into smaller blocks with partial overlap.

5. The method according to claim 3, characterized in that, The method further includes: When the protocol document is updated, the file name and version number of the existing protocol document in the vector database are compared to identify the updated content; The updated content is preprocessed, including: dividing the updated content into text blocks to obtain multiple new text blocks, and converting the new text blocks into new text vectors; parsing the chart area and / or formula area in the updated content, and converting the chart area and / or the formula area into a new vector representation; The preprocessed updated content is stored in the vector database in the structure of "content-vector-filename-type-version number", and the corresponding historical version data in the vector database is retained and marked as historical status.

6. The method according to claim 1, characterized in that, The process of generating a corresponding rewritten query text based on the input query text used to query protocol content includes: Obtain the input query text used to query the protocol content; The query text is rewritten and / or semantically completed based on a pre-built knowledge graph to obtain the rewritten query text; the knowledge graph is a knowledge graph built based on communication protocol documents, and the entity nodes of the knowledge graph include: protocol abbreviations, terminology definitions and protocol entities, and the edges of the knowledge graph include: protocol process relationships and dependencies between entities.

7. The method according to claim 6, characterized in that, The process of rewriting and / or semantically completing the query text based on a pre-built knowledge graph to obtain the rewritten query text includes: Parse the key entity words and descriptive phrases in the query text; The identified key entity words and descriptive phrases are used to calculate semantic similarity with entity nodes in the knowledge graph in order to match relevant graph entities. Supplementary information is generated based on the terminology definitions, attributes, and associations of the matched graph entities within the knowledge graph. The supplementary information is integrated into the query text according to predefined rules to generate the rewritten query text.

8. The method according to claim 1, characterized in that, The step of generating a corresponding rewritten query text based on the input query text used to query protocol content also includes: The intent analysis is performed on the input query text used to query the protocol content based on multi-round interactive queries, and the content of the query text is dynamically adjusted during the multi-round interactive query process to obtain the rewritten query text.

9. A protocol content query device, characterized in that, The device includes: The text generation module is used to generate corresponding rewritten query text based on the input query text used to query the protocol content. The vector determination module is used to determine the vector corresponding to the rewritten query text, which is then used as the latest query vector. A similarity confirmation module is used to determine the similarity between the latest query vector and each historical query vector in the historical query database; the historical query database is used to store historical query information for a pre-built vector database, the historical query information including historical query vectors and historical query result information corresponding to each historical query vector; the vector database is constructed based on multiple protocol contents; The prompt word confirmation module is used to, when there is a target historical query vector with a similarity greater than or equal to a set threshold, use the target historical query vector and its corresponding historical query result information as the context information of the latest query vector, and generate corresponding prompt words; The prompt word confirmation module is further configured to, when the similarity is less than the set threshold, query the vector database to obtain the target protocol content corresponding to the latest query vector and the location information of the target protocol content in multiple protocol contents, and use the target protocol content and the location information as the context information of the latest query vector to generate corresponding prompt words; The result acquisition module is used to take the prompt word as input to the large language model and obtain the query results output by the large language model in response to the prompt word.

10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 8.

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

12. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8.