Intelligent assistant system and method based on AI technology

By integrating BERT model, hash index, Markov logic network and reinforcement learning algorithms in the intelligent assistant system, the technical challenges of existing intelligent assistant systems in knowledge processing, logical reasoning and decision generation are solved, and more efficient Accurate and adaptive smart assistant features.

CN119443292AInactive Publication Date: 2025-02-14BEIJING MINGYA INSURANCE BROKERS

Patent Information

Application Number
CN202510038583.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-10
Publication Date
2025-02-14
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing intelligent assistant systems have significant technical challenges in knowledge processing, logical reasoning and decision generation, including difficulty in accurately capturing user intentions, insufficient knowledge coverage, inaccurate responses and poor timeliness, rigid inference patterns and difficult to dynamically adjust.

Method used

It adopts an intelligent assistant system based on AI technology, including user interaction module, knowledge graph module, natural language processing module and reasoning and decision-making module. The natural language processing module uses the BERT model for semantic understanding and intent recognition. The reasoning and decision module integrate a rule-based and machine learning model, and use hash index, Markov logic network and reinforcement learning algorithm for efficient retrieval, logical reasoning and decision optimization. .

Benefits of technology

It achieves a more accurate understanding of user intentions, expands the breadth of knowledge coverage, improves the accuracy and timeliness of responses, and provides more accurate and personalized answers or suggestions in complex situations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119443292A_ABST
    Figure CN119443292A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of intelligent assistant systems, and discloses an intelligent assistant system and method based on an AI technology, and the system comprises a user interaction module, a knowledge graph module, a natural language processing module, and a reasoning and decision module. The user interaction module realizes input and output interaction with a user; the knowledge graph module constructs a multi-domain knowledge system; the natural language processing module uses a BERT model to understand user intentions; and the reasoning and decision-making module fuses rule reasoning and machine learning prediction to realize accurate response. Particularly, an index construction unit is arranged in the reasoning and decision-making module to improve the retrieval efficiency, a reasoning engine adopts a Markov logic network to carry out logical reasoning, and a decision-making optimization unit continuously optimizes a decision-making strategy through reinforcement learning. The AI technology is comprehensively applied, so that the knowledge coverage, the response accuracy, the logical reasoning ability and the decision intelligent level of the intelligent assistant system are remarkably improved, and more efficient and convenient intelligent assistant services are provided for users.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of intelligent assistant systems, and specifically to an intelligent assistant system and method based on AI technology. Background Art

[0002] With the rapid development of information technology, artificial intelligence (AI) technology is being integrated into our daily life and work at an unprecedented speed. As one of the important applications of AI technology, intelligent assistant systems have gradually become a key tool for people to obtain information, solve problems and assist in decision-making. However, although the existing intelligent assistant systems have demonstrated their convenience and practicality in many scenarios, they still face significant technical challenges in knowledge processing, logical reasoning and decision-making.

[0003] Most existing intelligent assistant systems rely on simple keyword matching or predefined rule bases for knowledge representation and retrieval. This approach often fails to accurately capture the user's true intentions when dealing with complex and ever-changing user queries, and fails to efficiently locate and integrate relevant information in a broad and deep knowledge base. This not only limits the breadth of knowledge coverage of the intelligent assistant system, but also affects the accuracy and timeliness of its responses.

[0004] In terms of logical reasoning and decision-making, existing systems usually lack flexibility and adaptability. They often reason according to a preset logical path and are difficult to dynamically adjust and optimize based on context or user feedback. This rigid reasoning model often makes it difficult to give satisfactory answers or suggestions when faced with complex situations or tasks that require deep thinking. Summary of the invention

[0005] The purpose of the present invention is to provide an intelligent assistant system and method based on AI technology to solve the problems raised in the above background technology.

[0006] To achieve the above-mentioned purpose, the present invention provides the following technical solution: an intelligent assistant system based on AI technology, the system comprising: The user interaction module is used to receive user input information and feed back the processing results to the user in the form of visualization or voice; The knowledge graph module is used to build and maintain a knowledge graph that contains multi-domain knowledge, skills, and services. Knowledge is represented in the form of nodes and edges. Nodes represent entities or concepts, and edges represent the relationships between entities or concepts. The natural language processing module uses the BERT model based on deep learning to understand the semantics and recognize the intent of user input and convert user input into structured queries; The reasoning and decision-making module integrates rule-based reasoning and machine learning-based prediction models to retrieve relevant information in the knowledge graph based on user queries, perform logical reasoning, and generate the optimal response strategy; Wherein, the reasoning and decision module further includes: The index building unit uses hashing algorithms to index nodes and edges in the knowledge graph to improve retrieval efficiency; The reasoning engine uses a reasoning algorithm based on Markov logic networks to perform logical reasoning based on the retrieved information; The decision optimization unit uses reinforcement learning algorithms to continuously optimize decision strategies based on historical interaction data and user feedback.

[0007] Preferably, the step of converting the user input into a structured query by the natural language processing module comprises: Convert the original text input by the user into an input format acceptable to the BERT model, including adding special tags [CLS] and [SEP], as well as performing word segmentation and encoding. The multi-layer Transformer structure in the BERT model is used to deeply encode the input text to capture the contextual relationship and semantic information between words. The semantic representation vector of the text is obtained through the output layer of the BERT model. The semantic representation vector is input into the fully connected layer or classifier to identify the user's intent and output the intent category of the user's query. Use the pre-training capability of the BERT model or fine-tune it to identify named entities in the text; based on entity extraction, further analyze the relationship between entities in the text and construct structured information; Construct structured queries based on the identified intents, entities, and relationships.

[0008] Preferably, the implementation steps of the index building unit include: Step 1: Data preprocessing: traverse the nodes and edges in the knowledge graph to extract the identifier ID, attributes, and edge information of each node; Step 2: Feature extraction, generating a feature vector for each node, which contains the node ID, the hash value of the attribute, and the statistical information of the number and type of edges connected to it; Step 3: Hash index construction, using the consistent hashing algorithm to map the feature vector of each node into a fixed-size hash table to generate the hash index of the node; wherein the formula of the consistent hashing algorithm is: hash(key) = (a * key + b) % N, where key is the feature vector of the node, a and b are constant parameters, N is the size of the hash table, and % represents the modulo operation; Step 4: Index storage and optimization: Store the generated hash index in the data cache and use Bloom filters to reduce hash conflicts. The steps of constructing the Bloom filter include: initializing a bit array and multiple hash functions; for each node, calculating its position in the bit array through multiple hash functions, and setting these positions to 1; when querying, calculating the position of the query node in the bit array through the same hash function, if all positions are 1, it is considered that the node may exist, otherwise it must not exist.

[0009] Preferably, the data cache uses a Redis cache tool.

[0010] Preferably, the implementation steps of the inference engine include: Step 1: Represent the nodes, edges and relationships in the knowledge graph as first-order logic formulas to form a knowledge base; Step 2: Construct a Markov logic network and assign a weight to each first-order logic formula to indicate the probability that the formula is true, thereby forming a set of weighted logic rules; Step 3: Convert the Markov logic network into an equivalent Markov random field, where the nodes represent the variables in the logic formula and the edges represent the dependencies between the variables; the formula of the Markov logic network is expressed as:

[0011] in, represents a set of random variables, express A possible value of Indicates The weight of a logical formula, Indicates when At that time, An indicator function of whether a logical formula is true, if it is true, it is 1, otherwise it is 0; Step 4: Reasoning calculation, using approximate reasoning algorithm, probabilistic reasoning on Markov random field, and calculating the probability of each logical formula being true; Step 5: Based on the reasoning results, interpret the semantics of the user query and generate the corresponding response strategy.

[0012] Preferably, the approximate inference algorithm adopts Gibbs sampling, and the formula of Gibbs sampling is:

[0013] in, Indicated in Variables in iterations The value of Indicated in In the iteration The values ​​of all variables except Indicates sampling according to probability distribution.

[0014] Preferably, the decision optimization unit selects a deep Q network DQN algorithm as a reinforcement learning algorithm.

[0015] Preferably, the implementation steps of the decision optimization unit include: S1: Define the state space and action space, where the state space contains the context information of the user query, the current knowledge graph state, and the output results of the inference engine, and the action space contains all possible response strategies; S2: Initialize the policy network and build a deep neural network as the policy network. The input is the representation of the state space and the output is the probability distribution of each action in the action space. S3: Design a reward function to evaluate the quality of each action based on user feedback, accuracy of system response, efficiency, and user satisfaction factors; S4: Collect tuples of state, action, reward, and next state through interaction with users to form experience samples; S5: Use the DQN algorithm to train the policy network using experience samples and update network parameters to maximize long-term cumulative rewards; S6: Decision generation. For a given user query, the current state is input into the trained policy network, and the optimal response strategy is selected based on the output action probability distribution.

[0016] Preferably, in each round of training, the mean square error (MSE) is used as the performance evaluation indicator of the current round of training. The specific implementation steps include: S501: when executing step S5, according to the sampled experience tuple (s, a, r, s'), the target Q value of each experience tuple is calculated using the target Q network; S502: Calculate the predicted Q value of the main Q network for each state-action pair (s, a) in the experience tuple; S503: Calculate the mean square error (MSE) between the predicted Q value and the target Q value as the loss function value of the current round of iteration. The calculation formula of MSE is:

[0017] Where N is the number of sampled experience tuples, is the target Q value, is the predicted Q value of the main Q network; S504: according to the calculated MSE value, the parameters of the main Q network are updated using a gradient descent algorithm to minimize the MSE value, thereby optimizing the performance of the main Q network; S505: Repeat steps S501 to S504 until the end condition of the current training round is reached, and then enter the next training round.

[0018] Preferably, a method for implementing an intelligent assistant system based on AI technology comprises the following steps: A: Receive user input information through the user interaction module; B: The natural language processing module uses the deep learning-based BERT model to perform semantic understanding and intent recognition on user input, and converts user input into structured queries; C: Use the hash algorithm to index the nodes and edges in the knowledge graph through the index building unit in the reasoning and decision module; then use the reasoning engine to use the reasoning algorithm based on Markov logic network to perform logical reasoning based on the retrieved information; D: The decision optimization unit in the reasoning and decision module uses a reinforcement learning algorithm to generate the optimal response strategy based on historical interaction data and user feedback; E: The processing results are fed back to the user in the form of visualization or voice through the user interaction module.

[0019] Compared with the prior art, the present invention has the following beneficial effects: In terms of knowledge representation and retrieval, the present invention realizes structured representation and efficient storage of knowledge by constructing and maintaining a knowledge graph that includes multi-domain knowledge, skills, and services. Compared with existing keyword matching or predefined rule bases, this system uses the BERT model based on deep learning to perform semantic understanding and intent recognition on user input, which can more accurately capture the user's true intentions and efficiently locate and integrate relevant information in a broad and deep knowledge graph. This not only greatly expands the breadth of knowledge coverage of the intelligent assistant system, but also significantly improves the accuracy and timeliness of its responses.

[0020] In terms of logical reasoning and decision generation, the present invention integrates rule-based reasoning and machine learning-based prediction models to form a powerful reasoning and decision-making module. This module uses a hash algorithm to index nodes and edges in the knowledge graph through an index construction unit, thereby improving retrieval efficiency; the reasoning engine uses a reasoning algorithm based on a Markov logic network to achieve complex logical reasoning; and the decision optimization unit uses a reinforcement learning algorithm to continuously optimize decision strategies based on historical interaction data and user feedback. This flexible and adaptive reasoning and decision-making mechanism enables the system to give more accurate, reasonable, and personalized answers or suggestions when faced with complex situations or tasks that require deep thinking. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 This is a working principle diagram of the intelligent assistant system based on AI technology described in the present invention; Figure 2 This is the implementation flowchart of the natural language processing module based on the BERT model; Figure 3 Diagram of how building a cell for an index works. DETAILED DESCRIPTION

[0022] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. 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 creative work are within the scope of protection of the present invention.

[0023] See also Figure 1-3 The present invention provides a technical solution: an intelligent assistant system based on AI technology, the system comprising: User interaction module: The user interaction module is responsible for receiving user input information and feeding back the system processing results to the user in the form of visualization or voice. In order to achieve this function, the module is designed with a friendly user interface that supports multiple interaction methods such as text input and voice recognition. The information input by the user is captured in real time and converted into a format that can be processed within the system.

[0024] Knowledge Graph Module: The knowledge graph module builds and maintains a knowledge graph that contains multi-domain knowledge, skills, and services. In this graph, knowledge is represented in the form of nodes and edges. Nodes represent entities or concepts, and edges represent the relationship between entities or concepts. By building such a knowledge graph, the system can locate and integrate relevant information more efficiently and provide comprehensive and accurate answers to users' queries.

[0025] Natural language processing module: The natural language processing module uses the BERT model based on deep learning to perform semantic understanding and intent recognition on user input. This module can analyze the text content of user input, extract key information, and convert it into structured queries. In this way, the system can more accurately understand the user's true intention and provide support for subsequent logical reasoning and decision generation.

[0026] Reasoning and Decision-making Module: The reasoning and decision-making module integrates rule-based reasoning and machine learning-based prediction models to retrieve relevant information in the knowledge graph based on user queries, perform logical reasoning, and generate the optimal response strategy. This module further includes the following units: Index construction unit: Use hashing algorithms to index nodes and edges in the knowledge graph to improve retrieval efficiency. By building an efficient index structure, the system can quickly locate knowledge nodes and relationship edges related to user queries, providing a basis for subsequent logical reasoning.

[0027] Reasoning engine: It uses a reasoning algorithm based on Markov logic network to perform logical reasoning based on the retrieved information. Markov logic network combines the advantages of logical rules and probability models and can handle complex and uncertain reasoning tasks. Through this reasoning engine, the system can perform deep reasoning based on user queries and existing knowledge graphs to draw more accurate and reasonable conclusions.

[0028] Decision Optimization Unit: Using reinforcement learning algorithms, the decision strategy is continuously optimized based on historical interaction data and user feedback. The reinforcement learning algorithm optimizes the decision process through trial and error and feedback mechanisms, allowing the system to continuously learn and adapt to user behaviors and preferences. Through this decision optimization unit, the system can gradually improve the accuracy of the response strategy and user satisfaction.

[0029] The present invention realizes efficient, accurate and adaptive intelligent assistant functions by integrating multiple components such as user interaction module, knowledge graph module, natural language processing module, and reasoning and decision-making module.

[0030] The present invention will be further described below in conjunction with Examples 1 to 4:

[0031] Example 1: This example is used to describe in detail the specific implementation of the natural language processing module based on the BERT (Bidirectional Encoder Representations from Transformers) model, and is illustrated with an example of a user query.

[0032] Step 1: Convert the original text input by the user into an input format acceptable to the BERT model. This includes adding special tokens [CLS] and [SEP] at the beginning and end of the text, respectively, and performing word segmentation on the text.

[0033] Example user input: "Please help me find out how to use the BERT model for text classification." The text after tokenization is as follows: “[CLS] Please help me find out how to use the BERT model for text classification [SEP]” Each word segment is mapped to a corresponding word vector, which will be used as input to the BERT model.

[0034] Step 2: Multi-layer Transformer encoding: The multi-layer Transformer structure inside the BERT model deeply encodes the input word vector. Each layer captures the relationship between words through the self-attention mechanism and further processes it through the feedforward neural network. After multi-layer Transformer encoding, each word vector is updated to a representation vector containing rich context and semantic information.

[0035] Step 3, semantic understanding: In the output layer of the BERT model, obtain the semantic representation vector of the text. For this example, the output vector corresponding to the [CLS] tag can be taken as the semantic representation of the entire text. This vector contains the deep semantic information of the text, such as the user wants to understand the application of the BERT model in text classification.

[0036] Step 4: Intent Identification: Input the semantic representation vector into a fully connected layer or classifier to identify the user's intent. For this example, the classifier may output a category label representing the user's intent, such as "Query the BERT model text classification method."

[0037] Step 5: Entity Extraction: Use the pre-training capabilities of the BERT model or fine-tune it to identify key entities in the text. In this example, the entity extraction module may identify "BERT model" and "text classification" as key entities.

[0038] Step 6: Relationship extraction: Based on entity extraction, further analyze the relationship between entities in the text. For this example, the relationship extraction module may identify that the user wants to know the "how to use" relationship between "BERT model" and "text classification".

[0039] Step 7: Query construction: Based on the identified intents, entities, and relationships, a structured query is constructed. For this example, the structured query may look like this: "Query Intent: Understanding the Application of BERT Model in Text Classification Entities involved: BERT model, text classification Relationship Type: Usage Method" This query will serve as input to subsequent reasoning and decision-making modules to retrieve relevant information in the knowledge graph or trigger corresponding processing flows.

[0040] Step 8: Model optimization: To improve the performance of the natural language processing module, especially the accuracy of semantic understanding and intent recognition, the BERT model can be fine-tuned using a dataset containing a large number of user queries and corresponding intent labels. By adjusting the model parameters, the model can be better adapted to the specific needs and scenarios of the intelligent assistant system.

[0041] Through the above steps, the natural language processing module can accurately understand the user's query intention and extract key information from the text to provide support for subsequent reasoning and decision-making.

[0042] Embodiment 2: Index construction unit is used to improve knowledge graph retrieval efficiency. This embodiment is used to describe in detail the implementation of the index construction unit.

[0043] Assume that the knowledge graph contains a large number of nodes, each node represents an entity (such as a person, place, event, etc.), and the nodes are connected by edges to represent the relationship between entities. In order to quickly retrieve information in the knowledge graph, an efficient index needs to be built for each node.

[0044] The implementation steps of the index building unit include: Step 1: Traverse all nodes and edges in the knowledge graph, extract the identifier (ID) of each node, attributes (such as name, type, etc.), and information about the edges connected to it (such as edge type, connected node ID, etc.).

[0045] For the attributes of the node, necessary preprocessing is performed, such as removing spaces, converting to lowercase, etc., and the hash value of the attribute is calculated for subsequent use.

[0046] Step 2: Generate a feature vector for each node. The feature vector contains the node ID, the hash value of the attribute, the number of edges connected to it, and edge type statistics (such as the number of edges of each type).

[0047] For example, for node N, its feature vector may include: N's ID, N's name hash value, N's type hash value, the number of "friend" type edges connected to N, the number of "family" type edges connected to N, etc.

[0048] Step 3: Use the consistent hashing algorithm to build a hash index. The consistent hashing algorithm can evenly distribute nodes in the hash table, reduce hash conflicts, and support dynamic addition and deletion of nodes.

[0049] Set the size N of the hash table (such as 1024, 2048, etc.), and constant parameters a and b (such as a=31, b=7).

[0050] For each node, its feature vector is used as the key, the hash value is calculated through the consistent hashing algorithm, and the hash value is mapped to a certain position in the hash table to form the hash index of the node.

[0051] For example, for the feature vector feature_vector_N of node N, calculate the hash value hash(feature_vector_N) = (31 * feature_vector_N + 7) % 1024, and use the result as the index position of N in the hash table.

[0052] Step 4: Store the generated hash index in an efficient storage structure, such as Redis or Memcached. These storage structures support fast read and write operations and are suitable as storage media for indexes.

[0053] In order to further reduce hash conflicts and improve query efficiency, Bloom Filter is used to optimize the index. Bloom Filter is a highly space-efficient data structure used to determine whether an element exists in a set.

[0054] Initialize a bit array and multiple hash functions (such as 3 or 5). The size of the bit array is determined based on the expected false positive rate and the number of elements.

[0055] For each node, its position in the bit array is calculated through multiple hash functions, and these positions are set to 1. In this way, when a node is queried, its position in the bit array is calculated through the same hash function. If all positions are 1, it is considered that the node may exist (but there is a certain misjudgment rate); if at least one position is 0, it is determined that the node does not exist.

[0056] Embodiment 3: The inference engine of the present invention adopts an inference algorithm based on Markov Logic Networks (MLNs). Markov Logic Networks is a probabilistic logic framework that combines first-order logic with probabilistic graphical models and can handle uncertainty and complex relationships. The specific implementation steps include: Step 1: Define the knowledge base: The nodes, edges and the relationships between them in the knowledge graph are expressed as first-order logic formulas to form a knowledge base. For example, suppose the knowledge graph contains three types of nodes: "person", "place" and "go", and the relationship between them is "person X goes to place Y". The following first-order logic formula can be defined: At(X, Y) → Person(X) ∧ Location(Y) WentTo(X, Y) → Person(X) ∧ Location(Y) Among them, At(X, Y) means "person X is at location Y", WentTo(X, Y) means "person X has been to location Y", Person(X) means "X is a person", and Location(Y) means "Y is a location".

[0057] Step 2: Construct a Markov logic network: Each first-order logic formula is assigned a weight, which indicates the probability that the formula is true. For example, weights w1 and w2 can be assigned to the above two formulas respectively. Then, a set of logic rules with weights is formed, namely, a Markov logic network. The formula of the Markov logic network is expressed as:

[0058] in, represents a set of random variables, express A possible value of Indicates The weight of a logical formula, Indicates when At that time, An indicator function that indicates whether a logical formula is true or not, 1 if it is true, and 0 otherwise.

[0059] Step 3: Model conversion: Convert the Markov logic network into an equivalent Markov random field (MRF). In this process, the variables in the logic formula (such as X and Y) are regarded as nodes in the Markov random field, and the dependencies between the logic formulas are regarded as edges between the nodes. In this way, the Markov random field can represent the complex relationships and uncertainties in the knowledge graph.

[0060] Step 4: Inference calculation: Approximate inference algorithms such as Gibbs Sampling are used to perform probabilistic inference on Markov random fields. Gibbs sampling is a Markov Chain Monte Carlo (MCMC) method that can gradually approach the target probability distribution through iterative sampling. The formula for Gibbs sampling is:

[0061] in, Indicated in Variables in iterations The value of Indicated in In the iteration The values ​​of all variables except Indicates sampling according to probability distribution.

[0062] Take the calculation of the probability of "person X has been to place Y" as an example. Assume that the current knowledge graph contains multiple people and places, as well as the relationship between them. Through Gibbs sampling, the state of each person and place in the Markov random field (i.e., whether they have been to a certain place) can be gradually updated until it converges to a stable probability distribution. Then, based on this probability distribution, the probability of "person X has been to place Y" can be calculated.

[0063] The specific Gibbs sampling process is as follows: Initialize the state of the Markov random field, that is, assign an initial "been there" or "have not been there" state to each person and location.

[0064] Iterate the following steps until convergence: For each person X, calculate the probability that X has been to each location based on the current state of the Markov random field and the set of logical rules.

[0065] According to the calculated probability, a location Y is randomly selected as the location that X has visited.

[0066] Update the state of the Markov random field, setting the "been there" state of X to Y.

[0067] After convergence, the probability of "person X has been to location Y" is calculated based on the state of the Markov random field and the set of logical rules.

[0068] Step 5: Result interpretation: Based on the inference results, the semantics of the user query is interpreted and the corresponding response strategy is generated. For example, when a user queries "Which places has person X been to?", the inference engine can list all the places X has been to and their probability values ​​based on the calculated probabilities, and sort them in descending order of probability values, and then generate the corresponding response strategy and return it to the user.

[0069] Embodiment 4: The following describes in detail the implementation of the decision optimization unit in conjunction with a specific example.

[0070] Example background: Assume that the intelligent assistant system is used to provide weather query services for users. Users can query the current or next few days' weather conditions through voice or text input. The system needs to generate the most appropriate response strategy based on the user's query intent, historical query records, and current weather data.

[0071] The implementation steps of the decision optimization unit include: S1. Define state space and action space: State space: includes the text content of the user's query (such as "What's the weather like today?"), the query time (such as morning, afternoon), the user's historical query records (such as querying tomorrow's weather yesterday), current weather data (such as temperature, humidity, wind speed, etc.), and the semantic understanding results output by the inference engine (such as recognizing that the user wants to query "today's" weather).

[0072] Action space: includes all possible response strategies, such as directly answering the weather conditions, providing a detailed weather forecast, asking the user if they need more information, recommending related activities or clothing suggestions, etc.

[0073] S2. Initialize the policy network: Construct a deep neural network as the policy network. The input layer receives the representation of the state space (text and numerical data can be processed through vectorization, embedding, etc.), the hidden layer performs feature extraction and combination, and the output layer is the probability distribution of each action in the action space.

[0074] Initialize network parameters using random initialization or a pretrained model.

[0075] S3. Design reward function: Design reward function based on factors such as user feedback (such as whether satisfied or not, whether to continue querying), accuracy of system response (such as whether weather data is accurate), efficiency (such as response time), and user satisfaction (such as evaluated through user evaluation or behavior analysis).

[0076] For example, if the user is satisfied and gives positive feedback, a positive reward is given; if the user is dissatisfied or the query result is inaccurate, a negative reward is given; if the response time is too long, an appropriate penalty is given.

[0077] S4. Collect experience samples: By interacting with users, collect tuples of state, action, reward, and next state as experience samples. In practical applications, experience replay technology can be used to store and reuse past experience samples to improve training efficiency.

[0078] S5. Policy update: Use the deep Q network (DQN) algorithm or policy gradient algorithm (such as the Actor-Critic method) to train the policy network. Taking DQN as an example, use the experience sample to update the Q value function, that is, update the parameters in the policy network, so that the action taken in a given state can obtain the maximum expected cumulative reward. In each round of training, the mean square error MSE is used as the performance evaluation indicator of the current round of training. The specific implementation steps include: S501: when executing step S5, according to the sampled experience tuple (s, a, r, s'), the target Q value of each experience tuple is calculated using the target Q network; S502: Calculate the predicted Q value of the main Q network for each state-action pair (s, a) in the experience tuple; S503: Calculate the mean square error (MSE) between the predicted Q value and the target Q value as the loss function value of the current round of iteration. The calculation formula of MSE is:

[0079] Where N is the number of sampled experience tuples, is the target Q value, is the predicted Q value of the main Q network; S504: according to the calculated MSE value, the parameters of the main Q network are updated using a gradient descent algorithm to minimize the MSE value, thereby optimizing the performance of the main Q network; S505: Repeat steps S501 to S504 until the end condition of the current training round is reached, and then enter the next training round.

[0080] During training, you can use the ε-greedy strategy or the softmax strategy to select actions and balance the relationship between exploration and exploitation.

[0081] S6, Decision generation: For a given user query, the current state is input into the trained policy network, and the optimal response strategy is selected based on the output action probability distribution. Decisions can be generated using a greedy strategy (such as selecting the action with the highest probability) or a random strategy (such as sampling actions based on the probability distribution).

[0082] Sample application: When a user queries "What's the weather like today?", the decision optimization unit first generates a state representation based on the text content of the user's query, query time, historical query records, and current weather data. Then, the state representation is input into the policy network to obtain the probability distribution of each response strategy. Finally, the optimal response strategy is selected based on the probability distribution, such as "Today is sunny, the temperature is 20-25℃, suitable for outdoor activities." and the response is returned to the user.

[0083] The present invention also includes a method for implementing an intelligent assistant system based on AI technology, the method comprising the following steps: A: Receive user input information through the user interaction module; B: The natural language processing module uses the deep learning-based BERT model to perform semantic understanding and intent recognition on user input, and converts user input into structured queries; C: Use the hash algorithm to index the nodes and edges in the knowledge graph through the index building unit in the reasoning and decision module; then use the reasoning engine to use the reasoning algorithm based on Markov logic network to perform logical reasoning based on the retrieved information; D: The decision optimization unit in the reasoning and decision module uses a reinforcement learning algorithm to generate the optimal response strategy based on historical interaction data and user feedback; E: The processing results are fed back to the user in the form of visualization or voice through the user interaction module.

[0084] The implementation of this method refers to the above embodiment and will not be described in detail in the specification.

[0085] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.

[0086] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. Intelligent assistant system based on AI technology, characterized by: The system comprises: The user interaction module is used to receive user input information and feed back the processing results to the user in the form of visualization or voice; The knowledge graph module is used to build and maintain a knowledge graph that contains multi-domain knowledge, skills, and services. Knowledge is represented in the form of nodes and edges. Nodes represent entities or concepts, and edges represent the relationships between entities or concepts. The natural language processing module uses the BERT model based on deep learning to understand the semantics and recognize the intent of user input and convert user input into structured queries; The reasoning and decision-making module integrates rule-based reasoning and machine learning-based prediction models to retrieve relevant information in the knowledge graph based on user queries, perform logical reasoning, and generate the optimal response strategy; Wherein, the reasoning and decision module further includes: The index building unit uses hashing algorithms to index nodes and edges in the knowledge graph to improve retrieval efficiency; The reasoning engine uses a reasoning algorithm based on Markov logic networks to perform logical reasoning based on the retrieved information; The decision optimization unit uses reinforcement learning algorithms to continuously optimize decision strategies based on historical interaction data and user feedback.

2. The AI-based intelligent assistant system according to claim 1, characterized in that: The step of converting the user input into a structured query by the natural language processing module includes: Convert the original text input by the user into an input format acceptable to the BERT model, including adding special tags [CLS] and [SEP], as well as performing word segmentation and encoding. The multi-layer Transformer structure in the BERT model is used to deeply encode the input text to capture the contextual relationship and semantic information between words. The semantic representation vector of the text is obtained through the output layer of the BERT model. The semantic representation vector is input into the fully connected layer or classifier to identify the user's intent and output the intent category of the user's query. Use the pre-training capability of the BERT model or fine-tune it to identify named entities in the text; based on entity extraction, further analyze the relationship between entities in the text and construct structured information; Construct structured queries based on the identified intents, entities, and relationships.

3. The intelligent assistant system based on AI technology according to claim 2 is characterized in that: The implementation steps of the index building unit include: Step 1: Data preprocessing: traverse the nodes and edges in the knowledge graph to extract the identifier ID, attributes, and edge information of each node; Step 2: Feature extraction, generating a feature vector for each node, which contains the node ID, the hash value of the attribute, and the statistical information of the number and type of edges connected to it; Step 3: Hash index construction, using the consistent hashing algorithm to map the feature vector of each node into a fixed-size hash table to generate the hash index of the node; wherein the formula of the consistent hashing algorithm is: hash(key) =(a * key + b) % N, where key is the feature vector of the node, a and b are constant parameters, N is the size of the hash table, and % represents the modulo operation; Step 4: Index storage and optimization: Store the generated hash index in the data cache and use Bloom filters to reduce hash conflicts. The steps of constructing the Bloom filter include: initializing a bit array and multiple hash functions; for each node, calculating its position in the bit array through multiple hash functions, and setting these positions to 1; when querying, calculating the position of the query node in the bit array through the same hash function, if all positions are 1, it is considered that the node may exist, otherwise it must not exist.

4. The intelligent assistant system based on AI technology according to claim 3, characterized in that: The data cache uses the Redis cache tool.

5. The intelligent assistant system based on AI technology according to claim 1, characterized in that: The implementation steps of the inference engine include: Step 1: Represent the nodes, edges and relationships in the knowledge graph as first-order logic formulas to form a knowledge base; Step 2: Construct a Markov logic network and assign a weight to each first-order logic formula to indicate the probability that the formula is true, thereby forming a set of weighted logic rules; Step 3: Convert the Markov logic network into an equivalent Markov random field, where the nodes represent the variables in the logic formula and the edges represent the dependencies between the variables; the formula of the Markov logic network is expressed as: ; in, represents a set of random variables, express A possible value of Indicates The weight of a logical formula, Indicates when At that time, An indicator function of whether a logical formula is true, if it is true, it is 1, otherwise it is 0; Step 4: Reasoning calculation, using approximate reasoning algorithm, probabilistic reasoning on Markov random field, and calculating the probability of each logical formula being true; Step 5: Based on the reasoning results, interpret the semantics of the user query and generate the corresponding response strategy.

6. The intelligent assistant system based on AI technology according to claim 5, characterized in that: The approximate inference algorithm adopts Gibbs sampling, and the formula of Gibbs sampling is: ; in, Indicated in Variables in iterations The value of Indicated in In the iteration The values ​​of all variables except Indicates sampling according to probability distribution.

7. The intelligent assistant system based on AI technology according to claim 1, characterized in that: The decision optimization unit selects the deep Q network DQN algorithm as the reinforcement learning algorithm.

8. The AI-based intelligent assistant system according to claim 7, characterized in that: The implementation steps of the decision optimization unit include: S1: Define the state space and action space, where the state space contains the context information of the user query, the current knowledge graph state, and the output results of the inference engine, and the action space contains all possible response strategies; S2: Initialize the policy network and build a deep neural network as the policy network. The input is the representation of the state space and the output is the probability distribution of each action in the action space. S3: Design a reward function to evaluate the quality of each action based on user feedback, accuracy of system response, efficiency, and user satisfaction factors; S4: Collect tuples of state, action, reward, and next state through interaction with users to form experience samples; S5: Use the DQN algorithm to train the policy network using experience samples and update network parameters to maximize long-term cumulative rewards; S6: Decision generation. For a given user query, the current state is input into the trained policy network, and the optimal response strategy is selected based on the output action probability distribution.

9. The AI-based intelligent assistant system according to claim 8, characterized in that: In each round of training, the mean square error (MSE) is used as the performance evaluation indicator for the current round of training. The specific implementation steps include: S501: when executing step S5, according to the sampled experience tuple (s, a, r, s'), the target Q value of each experience tuple is calculated using the target Q network; S502: Calculate the predicted Q value of the main Q network for each state-action pair (s, a) in the experience tuple; S503: Calculate the mean square error (MSE) between the predicted Q value and the target Q value as the loss function value of the current round of iteration. The calculation formula of MSE is: ; Where N is the number of sampled experience tuples, is the target Q value, is the predicted Q value of the main Q network; S504: according to the calculated MSE value, the parameters of the main Q network are updated using a gradient descent algorithm to minimize the MSE value, thereby optimizing the performance of the main Q network; S505: Repeat steps S501 to S504 until the end condition of the current training round is reached, and then enter the next training round.

10. A method for implementing an intelligent assistant system based on AI technology, characterized in that: The method comprises the following steps: A: Receive user input information through the user interaction module; B: The natural language processing module uses the deep learning-based BERT model to perform semantic understanding and intent recognition on user input, and converts user input into structured queries; C: Use the hash algorithm to index the nodes and edges in the knowledge graph through the index building unit in the reasoning and decision module; then use the reasoning engine to use the reasoning algorithm based on Markov logic network to perform logical reasoning based on the retrieved information; D: The decision optimization unit in the reasoning and decision module uses a reinforcement learning algorithm to generate the optimal response strategy based on historical interaction data and user feedback; E: The processing results are fed back to the user in the form of visualization or voice through the user interaction module.

Citation Information

Patent Citations

  • Chronic disease clinical decision support system and construction method

    CN117423470A

  • Multi-relation safety knowledge reasoning method, device, equipment and medium

    CN118095439A

  • Dynamic adaptation question answering system and method based on hierarchical structure and retrieval enhancement

    CN118193714A

  • DQN-based cluster system predictive maintenance decision-making method

    CN118863871A

  • Method for constructing knowledge graph based on large language model and vector library

    CN119129722A

Cited By

  • Intelligent voice interaction method and system of osteoporosis therapeutic apparatus

    CN119626222A

  • AI auxiliary decision-making method and system under process alarm abnormal working condition

    CN120181088A

  • Patent agency whole-process intelligent management method based on artificial intelligence and big data

    CN120235734A

  • Medical peptide quantitative addition parameter optimization method and system based on machine learning

    CN120260731A

  • Machine learning task execution and feedback method and device, equipment and medium

    CN120542570A