Man-machine interaction system based on open source large model

Through a human-computer interaction system based on an open source large model, we use context interception algorithms and semantic embedding models to identify user intentions, and combine dynamic token caching and labeled variable injection rules to solve the problems of poor accuracy and interface binding of independent large models, and achieve efficient and secure multi-platform access and response consistency.

CN120706560AActive Publication Date: 2025-09-26DONGGUAN ZHONGKE ZHIHUI INFORMATION TECHNOLOGY CO LTD

Patent Information

Application Number
CN202510819248.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-18
Publication Date
2025-09-26
Estimated Expiration
2045-06-18

AI Technical Summary

Technical Problem

Independently built large language models lag behind the large models of mainstream Internet companies in terms of accuracy, and the problem of strong interface binding is difficult to solve.

Method used

Through a human-computer interaction system based on an open source large model, a context interception algorithm and a semantic embedding classification model are used to identify user intentions. Dynamic token caching and labeled variable injection rules are combined to unify heterogeneous platform interfaces. An exponential backoff retry algorithm and a JSON path extraction function are used to process responses. A context closed-loop update and binding relationship mapping mechanism are introduced to improve knowledge base management and state maintenance.

Benefits of technology

It achieves high-precision user intent recognition and intelligent agent binding, unifies multi-platform interface access, ensures response semantic consistency and knowledge relevance, and improves the maintainability and security of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120706560A_ABST
    Figure CN120706560A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of artificial intelligence, in particular to a man-machine interaction system based on an open source large model. The method comprises the following steps: a user request unit receives multi-round dialogue input of a user based on a context interception algorithm and an intention recognition mechanism, and generates a context prompt word and a target agent identifier; the response processing unit receives the standardized request generated by the platform scheduling unit based on an exponential backoff retry algorithm and a JSON path extraction function, extracts a target field and converts the target field into a structured answer; and the knowledge management and state maintenance unit updates each round of questions and answers to a historical context based on a context closed-loop updating mechanism and a binding relation mapping mechanism, and feeds back the updated context to the user request unit. Based on a context interception algorithm and a semantic embedding classification model, multiple rounds of conversations of a user are converted into semantic cues, target agent identifier mapping and intention affiliation reasoning are automatically completed, and high-precision identification of a request intention and dynamic binding of the agents are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a human-computer interaction system based on an open source large model. Background Art

[0002] Currently, artificial intelligence is developing rapidly, and companies are building independent large-scale AI models to meet daily business needs. However, due to factors such as knowledge bases, training results, and technical issues, independently built large-scale language models may have a certain degree of accuracy gap compared to the large-scale models currently used by mainstream internet companies. Therefore, how to use mature large-scale models from third-party platforms to supplement the intelligence of their own business systems has become a pain point for many software development teams.

[0003] In order to solve this problem and avoid the problem of strong binding to a large model company interface, this method and device realize the interface configuration function of the third-party company through a flexible configuration method, including its account management, token management, space management, knowledge base management, intelligent body management, interface management, order management, token management and other modules. These configuration functions realize the integration effect of the third intelligent platform to meet the shortcomings of the local large model and ultimately realize the human-computer interaction system. In view of this, a human-computer interaction system based on an open source large model is designed. Summary of the Invention

[0004] The purpose of this invention is to provide a human-computer interaction system based on an open source large model to solve the problem in related technologies that, due to factors such as knowledge base, training effect or technology, independently built large language models may have a gap in accuracy compared with the large models of current mainstream Internet companies.

[0005] To achieve the above objectives, the present invention provides a human-computer interaction system based on an open source large model, including a user request unit that receives multiple rounds of user dialogue input based on a context interception algorithm and an intent recognition mechanism, generates context prompt words and a target agent identifier, and is used to extract context content and determine its intent attribution;

[0006] A platform scheduling unit, which dynamically configures platform authentication parameters based on the target agent identifier based on a dynamic token cache mechanism combined with labeled variable injection rules, unifies the API structure of heterogeneous platforms, and generates standardized interface requests;

[0007] A response processing unit, which receives the standardized request generated by the platform scheduling unit based on the exponential backoff retry algorithm and the JSON path extraction function, extracts the target field from the multi-layer nested structure, and converts it into a structured answer for achieving consistent extraction and standard output of data semantics;

[0008] The knowledge management and state maintenance unit updates each round of questions and answers to the historical context based on the context closed-loop update mechanism and the binding relationship mapping mechanism, builds a continuously evolving dialogue state chain, and feeds the updated context back to the user request unit for constructing the next round of prompt words.

[0009] As a further improvement of the present technical solution, the user request unit includes a user request receiving and preprocessing module and an agent selection and intention routing module;

[0010] The user request receiving and preprocessing module receives the user request u based on the context interception algorithm. t With historical context information Construct context clue word P t , used to improve the accuracy of subsequent intent recognition;

[0011] Specifically, a sliding window is used to intercept the latest n rounds of dialogue and splice them into the context prompt word P t ;

[0012] The agent selection and intention routing module converts the context prompt word P input by the user into t Converted into a semantic embedding vector x, and finally output the target agent identifier b t .

[0013] As a further improvement of this technical solution, the semantic embedding and classification model outputs the target agent identifier b t The specific steps involved are:

[0014] Based on the language embedding model φ, the context prompt word P t The mapping generates a semantic embedding vector x, and introduces a classifier σ(Wx) to reason about the semantic vector through the weight matrix W to obtain the intent category Generate the corresponding target agent identifier b through the mapping function ψ t .

[0015] As a further improvement of this technical solution, the platform scheduling unit includes a platform parameter scheduling module and an interface specification assembly module;

[0016] The platform parameter scheduling module is based on a dynamic token cache mechanism and is based on the target agent identifier b t Parse the platform identifier p;

[0017] Adopting buffer system Extract platform token p ;

[0018] The interface specification assembly module is based on the context prompt word P t and platform tokens p , adapt the interface template by injecting labelled variables into the rules to generate a standard API request structure

[0019] As a further improvement of this technical solution, a standard API request structure is generated The specific steps involved are:

[0020] Generate cache key k based on platform identifier p, and pass platform token token p Save to Inject tag #k into HTTP request header;

[0021] The context prompt word P t The query parameter is bound to the API request body as a fixed value;

[0022] Based on the selected platform interface template and variable mapping sets Use labeled variable injection rules to inject cache values ​​into template parameters to build a standard API request structure

[0023] As a further improvement of the present technical solution, the response processing unit includes an interface execution and response module and a JSON response parsing module;

[0024] The interface execution and response module receives the standard API request structure generated by the interface assembly module. Initiate an HTTP request and use an exponential backoff retry algorithm to perform retries when the request fails until the platform response result R is returned, and output the original JSON response R;

[0025] The JSON response parsing module uses the JSON path extraction function to perform step-by-step field extraction based on the predefined field path based on the original JSON response R to obtain the final parsed value. and will As a structured answer, returns a default value if the field path is missing.

[0026] As a further improvement of this technical solution, the knowledge management and state maintenance unit includes a response output module, a knowledge base management module and an agent management module;

[0027] The response output module receives the structured answer Based on the context closed-loop update mechanism, the current user request u t With structured answers Splice into question-answer pairs, store the current question-answer pair and update the historical context information

[0028] The updated historical context information Feedback to the user request unit is used to generate the next round of prompt words.

[0029] As a further improvement to this technical solution, the knowledge base management module retrieves the knowledge fragments most relevant to the semantics of the current user request based on a semantic vector matching mechanism, and introduces a context-enhanced splicing strategy to fuse the retrieved knowledge fragments with the current prompt word to construct an enhanced prompt word. This is used to improve the task comprehension and knowledge relevance of the downstream large model response generation, and at the same time improve the model's contextual comprehension ability in vertical domain tasks.

[0030] The agent management module establishes the target agent identifier b based on the binding relationship mapping mechanism. t The mapping relationship with the knowledge base ID outputs the binding relationship data, which is used to guide the intent routing module to call the corresponding knowledge context and realize the association binding mechanism between the knowledge base and the intelligent agent.

[0031] As a further improvement of this technical solution, the specific steps involved in the knowledge base management module are:

[0032] Preprocess the local knowledge document D and construct the embedding set K;

[0033] The user request receiving and preprocessing module generates context prompt words P t back;

[0034] By calculating the user request semantic vector q t Calculate similarity with the embedding set K and select the most relevant knowledge fragment k * , and the most relevant knowledge fragment k * and context clue word P t Splicing to form enhanced prompt words Enhanced prompt words Serves as input to the platform scheduling unit and response processing unit to improve the knowledge relevance of downstream response generation;

[0035] At the same time, enhance the prompt word Output the updated historical context of the module based on the response Extracting long-term and short-term clues from h t , jointly participate in similarity retrieval.

[0036] As a further improvement of this technical solution, based on the binding relationship mapping mechanism, the target agent identifier b is established. t The specific steps involved in the mapping relationship with the knowledge base ID are:

[0037] Submit the local knowledge document collection to the third-party platform, complete preprocessing and index construction through the knowledge base upload interface, and receive the knowledge base identifier KBID returned by the platform t ;

[0038] Identify the target agent as b t Knowledge Base Identifier KBID t Perform mapping binding and generate mapping relationships

[0039] Persist the mapping results in the system knowledge index database;

[0040] When the user requests, the target agent identifier b is parsed through the intent routing module t , and according to the mapping function Retrieve its corresponding knowledge base ID.

[0041] Compared with the prior art, the present invention has the following beneficial effects:

[0042] 1. A human-computer interaction system based on an open-source large model, using a contextual interception algorithm and a semantic embedding classification model, converts multiple rounds of user conversations into semantic prompts, automatically completes target agent identification mapping and intent attribution reasoning, and achieves high-precision recognition of request intent and dynamic binding of agents;

[0043] At the same time, by combining the dynamic token caching mechanism with the labeled variable injection rules, the interface structure of the heterogeneous large model platform is unified, and a reusable standard API request template is built to achieve efficient scheduling and dynamic permission configuration of multi-platform access.

[0044] 2. A human-computer interaction system based on an open source large model, using an exponential backoff retry algorithm and a JSON path extraction function, automatically resends requests with fault tolerance and accurately extracts target fields from nested response structures, achieving consistent extraction and standardized conversion of response semantics;

[0045] By introducing a context closed-loop update mechanism and a question-answer pair splicing strategy, we continuously build an evolutionary dialogue chain and dynamically feed back the structured results to the input module, realizing cross-round context state memory and semantic coherence maintenance.

[0046] 3. A human-computer interaction system based on an open-source large-scale model uses semantic vector matching and context-enhanced splicing strategies to retrieve the most relevant knowledge fragments from the bound knowledge base and fuse them with the current prompt words to generate enhanced prompt words, significantly improving the downstream large-scale model's ability to understand tasks and the relevance of responses.

[0047] Furthermore, through the structured cache system and template variable injection rules, secure mapping and runtime binding of interface templates and platform tokens are achieved, ensuring that the system has good maintainability, scalability and security control capabilities. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 It is a flowchart of the overall process of the present invention.

[0049] The meaning of each number in the figure is:

[0050] 1. User request unit; 11. User request reception and preprocessing module; 12. Agent selection and intention routing module;

[0051] 2. Platform scheduling unit; 21. Platform parameter scheduling module; 22. Interface specification assembly module;

[0052] 3. Response processing unit; 31. Interface execution and response module; 32. JSON response parsing module;

[0053] 4. Knowledge management and status maintenance unit; 41. Response output module; 42. Knowledge base management module; 43. Intelligent agent management module. DETAILED DESCRIPTION

[0054] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0055] Example: See Figure 1 As shown, a human-computer interaction system based on an open source large model is provided, including a user request unit 1, which receives multiple rounds of user dialogue input based on a context interception algorithm and an intention recognition mechanism, generates context prompt words and a target intelligent agent identifier, and is used to extract context content and determine its intention attribution;

[0056] The user request unit 1 includes a user request receiving and pre-processing module 11 and an agent selection and intention routing module 12;

[0057] The user request receiving and preprocessing module 11 receives the user request u based on the context interception algorithm. t With historical context information Construct context clue word P t , used to improve the accuracy of subsequent intent recognition;

[0058] Specifically, a sliding window is used to intercept the latest n rounds of dialogue and splice them into the context prompt word P t ;

[0059] The agent selection and intention routing module 12 converts the context prompt word P input by the user into t Converted into a semantic embedding vector x, and finally output the target agent identifier b t (The target agent represents the intelligent service node (a model specifically for a certain type of task; such as question-answering, search, and recommendation) selected according to the intent of the user's request. It is responsible for accepting, understanding, and processing the dialogue request in this round, realizing the dynamic calling of functional modules and unified management of interfaces. The selection of the target agent is completed through semantic embedding and classification models. It is a routing result after intent recognition. The corresponding resources (such as authentication tokens, interface templates, knowledge base IDs, etc.) are dynamically scheduled based on the target agent identifier.

[0060] Furthermore, the semantic embedding and classification model outputs the target agent identity b t The specific steps involved are:

[0061] Based on the language embedding model φ, the context prompt word P t The mapping generates a semantic embedding vector x, and introduces a classifier σ(Wx) to reason about the semantic vector through the weight matrix W to obtain the intent category Generate the corresponding target agent identifier b through the mapping function ψ t ;

[0062] In this embodiment,

[0063] Semantic embedding vector x = φ(P t );

[0064] Calculate the intent category through the classifier σ(Wx)

[0065] Mapped to the target agent identity through the mapping function ψ

[0066] Where, P t is the context prompt word, which is concatenated from the latest n rounds of dialogue; φ(·) represents the language embedding model (such as the BERT model), which is used to map the input text into a low-dimensional semantic embedding vector; x is the semantic embedding vector, which represents the current context prompt word P t The corresponding semantic embedding vector has a dimension of d; and W∈R m×d is the weight matrix of the intent classifier, where m is the number of intent categories and d is the embedding vector dimension; ψ(·) represents the mapping function from intent to agent, which converts intent categories into Mapped to the corresponding target agent identifier; b tIndicates the target agent ID corresponding to the current request.

[0067] The human-computer interaction system based on the open source large model also includes a platform scheduling unit 2. The platform scheduling unit 2 dynamically configures platform authentication parameters according to the target intelligent agent identifier based on the dynamic token cache mechanism combined with the label variable injection rule, unifies the API structure of the heterogeneous platform and generates standardized interface requests;

[0068] Furthermore, the platform scheduling unit 2 includes a platform parameter scheduling module 21 and an interface specification assembly module 22;

[0069] The platform parameter scheduling module 21 is based on the dynamic token cache mechanism and the target agent identifier b t Parse the platform identifier p;

[0070] Adopting buffer system Extract platform token p :

[0071]

[0072] Where, Represents the platform token buffer system, which is used to cache access tokens and authentication parameters of multiple third-party platforms; p token Represents the token key corresponding to the target platform identifier p, which is used to retrieve the access token of the corresponding platform from the cache system; token p Represents the access token of the target platform p, which is used for subsequent API request authentication and permission verification; p represents the target intelligent entity identifier b t The corresponding platform identifier is parsed by the platform parameter scheduling module;

[0073] The interface specification assembly module 22 prompts the word P according to the context t and platform tokens p , adapt the interface template by injecting labelled variables into the rules to generate a standard API request structure

[0074] In this embodiment, a standard API request structure is generated The specific steps involved are:

[0075] Generate cache key k based on platform identifier p, and pass platform token token p Save to Inject the tag #k into the HTTP request header, where the cache key k is generated to satisfy: k = p + _token, where p represents the platform token and _token represents the predefined suffix.

[0076] The context prompt word P tThe query parameter is bound to the API request body as a fixed value;

[0077] Based on the selected platform interface template and variable mapping sets (where k i Indicates the field tag key name in the template, v i Represents the label variable of the field in the template, which is in placeholder form. j Represents each actual value to be injected (such as the access token value corresponding to the cache key, context prompt word, target platform identifier, user ID, task parameters, timestamp and other runtime variables); Represents a set of all variable values ​​to be injected, used to replace placeholders in the template), uses labeled variable injection rules to inject cached values ​​(or fixed values) into template parameters, and builds a standard API request structure

[0078] In this embodiment, the interface specification assembly module 22 dynamically generates a complete API request structure based on a preset interface template and parameter reference variables, wherein the label variable injection rules are as follows:

[0079] Buffer system Process interface templates one by one Each parameter item in , each parameter item consists of a key (key) and a value (value);

[0080] When the parameter value v is detected i When it starts with a pound sign (#) (for example, #user id ), the system recognizes it as a variable reference string after the pound sign (#) (such as user id ) is the variable name;

[0081] Perform whitelist verification and verification (like Then the process is terminated and a security exception is returned, where x represents the original input variable name (extracted from the template parameter value). Represents a variable name whitelist, which is a pre-configured set of legal variable name whitelists used to limit the scope of cache variables allowed to be accessed, and is dynamically configured through the management interface);

[0082] For identified variable references, Query the actual value corresponding to the variable name;

[0083] Replace the variable reference placeholder in the template with the actual value found (if the template value is #account and account in the cache corresponds to A12345, it will be replaced with A12345);

[0084] When the parameter value does not begin with a pound sign, it is determined to be a fixed constant and the original value is retained;

[0085] After the above processing, all parameter values ​​are either replaced with actual variable values ​​or retained as original constant values, and finally a standard API request structure is generated.

[0086] The human-computer interaction system based on the open source big model also includes a response processing unit 3. The response processing unit 3 receives the standardized request generated by the platform scheduling unit 2 based on the exponential backoff retry algorithm and the JSON path extraction function, extracts the target field from the multi-layer nested structure, and converts it into a structured answer for achieving consistent extraction and standard output of data semantics;

[0087] The response processing unit 3 includes an interface execution and response module 31 and a JSON response parsing module 32;

[0088] Specifically, the interface execution and response module 31 receives the standard API request structure generated by the interface assembly module Initiate an HTTP request and use an exponential backoff retry algorithm to perform retries when the request fails until the platform response result R is returned or the maximum number of retries N is reached, and output the original JSON response R;

[0089] In this embodiment, when an exception or response delay occurs during the call process of the large model interface scheduled by the platform scheduling unit 2, the system introduces a retry mechanism based on the exponential backoff retry algorithm to ensure call stability; after successfully obtaining a response, the JSON path extraction function is used to parse the response content, where the exponential backoff retry algorithm is specifically as follows:

[0090] The initial waiting time is Δt0, the maximum number of retries is N, and the delay of the i-th time is Δt i =Δt0·2 i ;

[0091] Where i = 0, 1, 2, ..., N; Δt i represents the delay of the i-th time;

[0092] If the call is successful, terminate; otherwise, retry until the upper limit is reached;

[0093] The JSON response parsing module 32 uses the JSON path extraction function based on the original JSON response R according to the predefined field path p=[k1,…,k m ] Perform level-by-level field extraction to obtain the final parsed value and will As a structured answer, if the field path is missing, the default value is returned, and the JSON response parsing module 32 outputs the structured answer through the JSON path extraction function Used to achieve standardized output of response data;

[0094] In this embodiment, the function is extracted by JSON path Extracting multi-layer nested JSON fields:

[0095]

[0096] Where R represents the original JSON response object (usually a nested dictionary structure); Represents a predefined JSON field path, used to extract nested field values ​​layer by layer; k m Indicates the field key name at level m, which indicates the field name at level m in the nested hierarchy of JSON; Represents a JSON path extraction function used to extract the path from a nested JSON structure Visit each layer of fields in turn until the target value is returned;

[0097] If the path does not exist, a default value (such as null or an empty string) is returned;

[0098] Based on the exponential backoff retry algorithm and JSON path extraction function, the standardized request generated by the platform scheduling unit 2 is received, and the target field is extracted from the multi-layer nested structure and converted into a structured answer to achieve consistent extraction and standard output of data semantics. The multi-layer nested structure refers to the standardized JSON response body returned by the platform API interface, which contains multiple nested field levels, specifically refers to the multi-layer hierarchical semantic results returned by the large model interface requested by the platform scheduling unit 2, whose structure includes nested intent objects, entity labels and answer candidate sets.

[0099] The human-computer interaction system based on the open source large model also includes a knowledge management and state maintenance unit 4. The knowledge management and state maintenance unit 4 updates each round of questions and answers to the historical context based on the context closed-loop update mechanism and the binding relationship mapping mechanism, builds a continuously evolving dialogue state chain, and feeds back the updated context to the user request unit 1 for constructing the next round of prompt words.

[0100] The knowledge management and state maintenance unit 4 includes a response output module 41, a knowledge base management module 42 and an agent management module 43;

[0101] Specifically, the response output module 41 receives the structured answer Based on the context closed-loop update mechanism, the current user request u t With structured answers Splicing into question and answer pairs Set the current question and answer pair Store and update historical context information

[0102] The updated historical context information Feedback to the user request unit 1 is used to generate the next round of prompt words; to support subsequent multiple rounds of dialogue, update the historical context information Feedback is sent to the user request receiving and preprocessing module 11 to build a closed loop of the dialogue state, so as to build a continuously evolving dialogue state chain and maintain the consistency of context semantics.

[0103] Furthermore, the knowledge base management module 42 retrieves the knowledge fragments most relevant to the semantics of the current user request based on the semantic vector matching mechanism, and integrates the retrieved knowledge fragments with the current prompt word by introducing a context-enhanced splicing strategy to construct an enhanced prompt word. This is used to improve the task comprehension ability and knowledge relevance of the response generated by the downstream large model, and at the same time improve the model's contextual comprehension ability in vertical domain tasks.

[0104] The agent management module 43 establishes the target agent identifier b based on the binding relationship mapping mechanism. t The mapping relationship with the knowledge base ID outputs the binding relationship data (the binding relationship data refers to the data structure generated by the agent management module 43 to establish the mapping relationship between the target agent identifier and the knowledge base identifier. It is essentially a key-value pair mapping table used to persistently store the association relationship between the agent and the knowledge base in the system). The agent management module 43 is used to guide the intention routing module 12 to call the corresponding knowledge context to realize the association binding mechanism between the knowledge base and the agent.

[0105] The generation and binding logic of the knowledge base ID is as follows:

[0106] Submit the local knowledge document collection to a third-party platform through the knowledge base upload interface (such as OpenAI) for vectorization, index construction (by calling its open knowledge base upload interface to remotely register the knowledge documents and construct vector indexes) and hosting;

[0107] After the third-party platform successfully processes and creates a knowledge index, it returns a unique knowledge base identifier, namely the knowledge base ID;

[0108] Compare the returned knowledge base ID with the target agent ID b that is preset or dynamically generated in the system. t Perform mapping binding (synchronize the local knowledge base to the third-party platform by calling the knowledge base upload interface, and receive the knowledge base identifier (i.e., knowledge base ID) returned by it, to achieve mapping binding between the intelligent agent and the knowledge base, and provide the source index of the knowledge fragment for the subsequent semantic enhancement prompt word generation).

[0109] Furthermore, the specific steps involved in the knowledge base management module 42 are:

[0110] Preprocess the local knowledge document D (including segmentation and vectorization) and construct the embedding set K;

[0111] Specifically, the local knowledge document D is divided into several segments, and vectorized using a knowledge embedding model (such as BERT) to obtain an embedding set K;

[0112] The user request receiving and preprocessing module 11 generates a context prompt word P t back;

[0113] By calculating the user request semantic vector q t =φ Q (u t ) performs similarity calculation with the embedding set K (introducing historical question-answer clues as auxiliary context when calculating semantic vector similarity), and selects the most relevant knowledge fragment k * , and the most relevant knowledge fragment k * and context clue word P t Splicing to form enhanced prompt words Enhanced prompt words As the input of the platform scheduling unit 2 and the response processing unit 3, it is used to improve the knowledge relevance of downstream response generation;

[0114] Specifically, the natural language request u sent by the user at time t t , user request semantics are vectorized through the request encoder: q t =φ Q (u t ), where φ Q (·) represents the encoder for the request statement; u t represents the natural language request sent by the user at time t; q t Represents the user request semantic vector, which is the user request u at time t t Semantic vector representation after encoder processing;

[0115] Furthermore, the user request semantic vector q is calculated using the cosine similarity algorithm t =φ Q (u t ) with the embedding set K;

[0116] Select the most relevant knowledge fragments Where k * represents the most relevant knowledge fragment (best matching fragment) selected from the knowledge base; argmax represents the parameter that maximizes the objective function (i.e., the most relevant fragment); and d i ∈D,d irepresents the i-th knowledge document fragment, which comes from the knowledge base D, where D is the set of all knowledge fragments; φ D (d i ) means to convert the document fragment d i The semantic vector (representation vector of the knowledge fragment) obtained after inputting the embedding model;

[0117] The essence of the context-enhanced splicing strategy is to combine the most relevant knowledge fragments k * and context clue word P t Splicing to form enhanced prompt words

[0118] Among them, the enhanced prompt word

[0119] Where k * It means that the knowledge base management module extracts the most relevant knowledge fragments from the bound knowledge base; Represents enhanced prompt words, which are used to improve the large model's ability to understand the current task;

[0120] At the same time, enhance the prompt word The historical context updated by the response output module 41 Extracting long-term and short-term clues from h t , jointly participate in similarity retrieval.

[0121] In this embodiment, based on the binding relationship mapping mechanism, the target agent identifier b is established. t The specific steps involved in the mapping relationship with the knowledge base ID are:

[0122] Submit the local knowledge document collection to the third-party platform, complete preprocessing and index construction through the knowledge base upload interface, and receive the knowledge base identifier KBID returned by the platform t ;

[0123] Identify the target agent as b t Knowledge Base Identifier KBID t Perform mapping binding and generate mapping relationships Indicates that the mapping function Identify the target agent as b t Converted to the corresponding knowledge base unique identifier KBID t ;

[0124] Mapping Function

[0125] Where, Represents the set of binding relationships maintained by the system (storing all valid mappings), is the set of agent identifiers (a finite discrete set), represents the knowledge base ID set (finite discrete set); k i Indicates the target knowledge base ID; Indicates a null value (invalid mapping return value, when the target agent identifier b t Returned when no knowledge base is bound), and

[0126] Persist the mapping results in the system knowledge index database;

[0127] When the user requests, the target agent identifier b is parsed by the intention routing module 12. t , and according to the mapping function Retrieve the corresponding knowledge base ID;

[0128] Knowledge Base Identifier KBID t The knowledge base management module 42 is used to retrieve the most relevant knowledge fragment k * and with the contextual prompt word P t To build enhanced prompt words It is called by downstream modules to guide downstream platform scheduling and response generation. The response results are written into historical context information by the response output module. And feedback is sent to the user request unit 1 to support the next round of interaction, realizing the closed-loop evolution and continuous update of knowledge context in multiple rounds of dialogue;

[0129] In this embodiment, there are multiple agents, such as a weather query agent, a news agent, and a smart contract agent;

[0130] The smart contract entity is identified as contract agent , bound to the knowledge base ID

[0131] When the intent routing module recognizes the contract agent When the corresponding knowledge base is automatically retrieved Acquire relevant knowledge for semantic enhancement;

[0132] Realize the dynamic association between intelligent agents and knowledge bases to ensure the modularization and precise calling of knowledge management of multi-agent systems.

[0133] The basic principles, main features, and advantages of the present invention are shown and described above. It should be understood by those skilled in the art that the present invention is not limited to the above-described embodiments. The above-described embodiments and descriptions are merely preferred examples of the present invention and are not intended to limit the present invention. Various changes and modifications may be made to the present invention without departing from the spirit and scope of the present invention, and such changes and modifications fall within the scope of the invention claimed.

Claims

1. A human-computer interaction system based on an open source large model, characterized by: include A user request unit (1) receives multiple rounds of user dialogue input based on a context interception algorithm and an intention recognition mechanism, generates context prompt words and a target intelligent agent identifier, and is used to extract context content and determine its intention attribution; A platform scheduling unit (2), wherein the platform scheduling unit (2) dynamically configures platform authentication parameters according to target agent identification based on a dynamic token cache mechanism combined with a label variable injection rule, unifies the API structure of heterogeneous platforms, and generates standardized interface requests; A response processing unit (3) receives the standardized request generated by the platform scheduling unit (2) based on an exponential backoff retry algorithm and a JSON path extraction function, extracts target fields from a multi-layer nested structure, and converts the target fields into a structured answer; The knowledge management and state maintenance unit (4) updates each round of questions and answers to the historical context based on the context closed-loop update mechanism and the binding relationship mapping mechanism, constructs a continuously evolving dialogue state chain, and feeds back the updated context to the user request unit (1) for constructing the next round of prompt words.

2. The human-computer interaction system based on the open source big model according to claim 1, characterized in that: The user request unit (1) includes a user request receiving and pre-processing module (11) and an agent selection and intention routing module (12); Wherein, the user request receiving and preprocessing module (11) receives the user request u based on the context interception algorithm t With historical context information Construct context clue word P t ; The agent selection and intention routing module (12) converts the context prompt word P input by the user into a t Converted into a semantic embedding vector x, and finally output the target agent identifier b t .

3. The human-computer interaction system based on the open source large model according to claim 2 is characterized by: The semantic embedding and classification model outputs the target agent identifier b t The specific steps involved are: Based on the language embedding model, the context prompt word P t The mapping generates a semantic embedding vector x, and introduces a classifier σ(Wx) to reason about the semantic vector through the weight matrix W to obtain the intent category Generate the corresponding target agent identifier b through the mapping function ψ t .

4. The human-computer interaction system based on open source big model according to claim 1, characterized in that: The platform scheduling unit (2) includes a platform parameter scheduling module (21) and an interface specification assembly module (22); The platform parameter scheduling module (21) is based on a dynamic token cache mechanism and is configured according to the target agent identifier b. t Parse the platform identifier p; Adopting buffer system Extract platform token p ; The interface specification assembly module (22) is based on the context prompt word P t and platform tokens p , adapt the interface template by injecting labelled variables into the rules to generate a standard API request structure 5. The human-computer interaction system based on the open source large model according to claim 4 is characterized in that: Generate standard API request structure The specific steps involved are: Generate cache key k based on platform identifier p, and pass platform token token p Save to Inject tag #k into HTTP request header; The context prompt word P t The query parameter is bound to the API request body as a fixed value; Based on the selected platform interface template and variable mapping sets Use labeled variable injection rules to inject cache values ​​into template parameters to build a standard API request structure 6. The human-computer interaction system based on open source big model according to claim 1, characterized in that: The response processing unit (3) includes an interface execution and response module (31) and a JSON response parsing module (32); The interface execution and response module (31) receives the standard API request structure generated by the interface assembly module. Initiate an HTTP request and use an exponential backoff retry algorithm to perform retries when the request fails until the platform response result R is returned, and output the original JSON response R; The JSON response parsing module (32) uses the JSON path extraction function to perform step-by-step field extraction according to the predefined field path based on the original JSON response R to obtain the final parsed value. and will As a structured answer, returns a default value if the field path is missing.

7. The human-computer interaction system based on open source big model according to claim 1, characterized in that: The knowledge management and state maintenance unit (4) includes a response output module (41), a knowledge base management module (42) and an intelligent agent management module (43); Wherein, the response output module (41) receives the structured answer Based on the context closed-loop update mechanism, the current user request u t With structured answers Splice into question-answer pairs, store the current question-answer pair and update the historical context information The updated historical context information Feedback to the user request unit (1) is used to generate the next round of prompt words.

8. The human-computer interaction system based on open source big model according to claim 7, characterized in that: The knowledge base management module (42) retrieves the knowledge fragments most relevant to the semantics of the current user request based on a semantic vector matching mechanism, and fuses the retrieved knowledge fragments with the current prompt word by introducing a context-enhanced splicing strategy to construct an enhanced prompt word; The agent management module (43) establishes the target agent identifier b based on the binding relationship mapping mechanism. t Mapping relationship with knowledge base ID, output binding relationship data.

9. The human-computer interaction system based on open source big model according to claim 7, characterized in that: The specific steps involved in the knowledge base management module (42) are: Preprocess the local knowledge document D and construct the embedding set K; The user request receiving and preprocessing module (11) generates the context prompt word P t back; By calculating the user request semantic vector q t Calculate similarity with the embedding set K and select the most relevant knowledge fragment k * , and the most relevant knowledge fragment k * and context clue word P t Splicing to form enhanced prompt words At the same time, enhance the prompt word The updated historical context according to the response output module (41) Extracting long-term and short-term clues from h t , jointly participate in similarity retrieval.

10. The human-computer interaction system based on open source big model according to claim 7, characterized in that: Based on the binding relationship mapping mechanism, the target agent identifier b is established. t The specific steps involved in the mapping relationship with the knowledge base ID are: Submit the local knowledge document collection to the third-party platform, complete preprocessing and index construction through the knowledge base upload interface, and receive the knowledge base identifier KBID returned by the platform t ; Identify the target agent as b t Knowledge Base Identifier KBID t Perform mapping binding and generate mapping relationships Persist the mapping results in the system knowledge index database; When the user requests, the target agent identifier b is parsed through the intent routing module (12) t , and according to the mapping function Retrieve its corresponding knowledge base ID.

Citation Information

Patent Citations

  • Distributed data access method and device and computer equipment

    CN112835537A

  • Large model deployment method, device and equipment for heterogeneous platform and program product

    CN119415277A

  • Text robot application system based on large model

    CN119474323A

  • Intelligent scheduling method for computing power network resources based on large model intention awareness

    CN119759598A

  • Urban rail transit intelligent operation management method and device

    CN119784304A

Cited By

  • Multi-model cue word optimization and feedback tuning system fusing context semantics

    CN121636691A

  • A multi-model prompt word optimization and feedback tuning system that integrates contextual semantics

    CN121636691B