A method and system for intelligent session state management

By combining the Rete algorithm and the Hopfield neural network, an intelligent session state management system was constructed, which solved the problems of state recognition delay and poor robustness in complex communication environments, achieved efficient state recognition and adaptive adjustment, and improved the stability and scalability of the communication system.

CN121284085BActive Publication Date: 2026-02-17SHALLBRIGHT HEALTHTECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511832751.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-08
Publication Date
2026-02-17
Estimated Expiration
2045-12-08

AI Technical Summary

Technical Problem

Existing session state management technologies lack context adaptation capabilities in complex and dynamically changing communication environments, resulting in state recognition delays, synchronization lags, and poor robustness, making it difficult to achieve automatic state repair and reconstruction under abnormal conditions.

Method used

The Rete algorithm is used to construct a rule matching graph structure, and a state energy function model is established by combining it with a Hopfield neural network. Through context data matching, state vector construction and energy convergence evolution, dynamic identification, adaptive adjustment and consistency maintenance of multi-node session states are realized.

Benefits of technology

It improves the accuracy and efficiency of state recognition, enhances the system's self-healing ability and robustness, and improves the stability and scalability of the communication system under high concurrency and weak connection conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121284085B_ABST
    Figure CN121284085B_ABST
Patent Text Reader

Abstract

The application discloses a kind of intelligent conversation state management method and system, including the following steps: construct the rule graph structure based on Rete algorithm, realize the efficient matching of context condition;Collect the real-time running data of communication node, generate initial state matching result, and construct multidimensional state vector set;Vector input Hopfield neural network, establish energy function model, perform iteration calculation to realize state convergence;By comparing initial state and convergence state, calculate structural consistency and feedback adjustment matching threshold in rule graph;When consistency meets set condition, output final stable conversation state set.The application fuses rule drive and energy optimization mechanism of neural network, supports intelligent conversation state management under complex environment.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of communication technology, and in particular to a method and system for intelligent session state management. BACKGROUND

[0002] With the rapid development of complex communication scenarios such as edge computing, intelligent terminal cooperation and Internet of Vehicles, the multi-node session state management in the communication system has become a core technical requirement to ensure the stability of the connection and the continuity of the service. At present, the management of the session state generally relies on the logical judgment mode based on static rule table or finite state machine, and the node state is identified and converted through the preset conditions, and the state synchronization and coordination are combined with the centralized controller.

[0003] The existing session state management technology has obvious deficiencies in dealing with complex and dynamic communication environment. On the one hand, the traditional rule table-based state judgment lacks context adaptive ability and cannot dynamically adjust the matching logic according to the real-time running data and environmental characteristics of the node, which easily leads to state recognition delay, mismatch or improper resource scheduling. On the other hand, the state synchronization relies on the centralized server or master node for state coordination, which is difficult to effectively support autonomous cooperation between nodes in a distributed network, and is prone to synchronization lag, state drift or consistency failure. The existing method lacks effective intelligent convergence mechanism and is difficult to realize the automatic repair and reconstruction of the state under abnormal conditions such as partial state information loss, communication anomaly or node disconnection, resulting in poor robustness of the overall communication system.

[0004] Therefore, how to provide a method and system for intelligent session state management is a problem that those skilled in the art need to solve. SUMMARY

[0005] One object of the present application is to provide a method and system for intelligent session state management. The present application combines the Rete algorithm to construct an efficient rule matching graph structure, and uses the Hopfield neural network to establish a state energy function model. Through context data matching, state vector construction, energy convergence evolution and feedback regulation, the dynamic identification, adaptive adjustment and consistency maintenance of the multi-node session state in the communication system are realized, which has the advantages of stable structure, strong self-repairing ability and high state synchronization precision.

[0006] According to the method and system for intelligent session state management of the embodiment of the present application, the method comprises the following steps:

[0007] Constructing a rule graph structure, defining the mapping relationship between the rule nodes and the condition nodes based on the Rete algorithm, and forming an executable rule matching graph;

[0008] Real-time context data of each node in the communication system is acquired, the real-time context data is input to a rule matching graph, a conditional traversal and matching operation is performed, and an initial state matching result set is output;

[0009] A matching state label and a corresponding context feature parameter are extracted from the initial state matching result set, and a multi-dimensional state vector set is constructed in combination with an operating index of the communication node;

[0010] A Hopfield neural network is initialized, the multi-dimensional state vector set is taken as input, a connection weight matrix and a bias vector are configured, and an energy function model based on the Hopfield neural network is established;

[0011] An iterative calculation of the energy function model is performed, the multi-dimensional state vector set is updated in each round of iteration, and an energy descent trajectory is recorded until the state converges;

[0012] A converged state output vector is acquired, corresponding mapping comparison is performed with the initial state matching result set, a structure consistency identifier and a difference index are calculated;

[0013] Based on the difference index, a related rule threshold in the rule matching graph is adjusted, and a final stable conversation state set is output after the structure consistency identifier meets the condition.

[0014] Optionally, forming an executable rule matching graph comprises:

[0015] All conversation rules to be processed are parsed, a premise part of each conversation rule is parsed into an ordered atomic condition set, and each atomic condition in the atomic condition set is defined as a condition node, and all conversation rules are defined as rule nodes as a whole;

[0016] A mapping relationship between the rule nodes and the condition nodes is defined, and the mapping relationship is represented as a directed dependency edge established from the condition node to the corresponding rule node;

[0017] A rule graph structure is constructed according to the mapping relationship, the rule graph structure is a directed graph, including a condition node layer, a rule node layer and a directed edge set therebetween, and each path in the graph represents a logical condition flow of a rule;

[0018] Based on the rule graph structure, an alpha network is generated, each alpha network node corresponds to a condition node, a condition matching function is configured to receive context data input by the communication system and perform matching judgment, output matching data objects that meet the conditions, and outputs of all alpha network nodes are collected to form a condition matching result set;

[0019] The conditional matching result set is input, conflict prediction pre-layering is performed, specifically including constructing a trigger frequency matrix between conditional nodes, performing clustering analysis on the trigger frequency matrix to obtain a conditional node clustering set, setting a node level index according to the clustering structure, and generating a level connection table;

[0020] A β network is constructed based on the level connection table, each β network node of the β network performs a conditional combination operation, the left input of the β network node is a partial matching path result output by a previous layer β network node, the right input is a conditional matching result output by a current layer α network node, and when the combination condition is met, the β network node outputs a new intermediate matching path result;

[0021] A memory unit of the α network is configured for the α network node, used for storing original conditions of current matching success, and a memory unit of the β network is configured for the β network node, used for buffering intermediate matching path results, so that incremental processing of changing facts is realized;

[0022] A terminal rule node is established at the end of each path of the rule graph structure, the terminal node receives a complete matching path output from the last layer of the β network, identifies that a corresponding rule node is activated, and outputs a final executable rule matching graph.

[0023] Optionally, generating the initial state matching result set includes:

[0024] Real-time context data of each node in the communication system is collected, and the real-time context data includes communication delay, packet loss rate, bandwidth utilization, cache occupancy, node connection state, data packet timestamp and round-trip delay;

[0025] The collected real-time context data is preprocessed according to the node dimension, and a context data structure is established;

[0026] The context data structure is input into the α network in the rule matching graph, each α network node corresponds to a conditional node, the α network node receives the context data structure and performs a conditional traversal operation according to the bound conditional matching function, and the conditional traversal operation includes reading a field value in the context data structure, and performing interval comparison and state flag matching on the field value;

[0027] The α network node that meets the matching rule is marked as a matching success result, and a conditional-data pair is formed by a conditional node and a corresponding data record of the matching success result;

[0028] All conditional-data pairs are classified according to a mapping relationship between conditional nodes and rule nodes defined in the rule graph structure, and are converged into respective rule paths;

[0029] Count the number of condition nodes that match successfully on each rule path, and identify the rule path with at least one condition node that matches successfully as an initial matching path;

[0030] According to the matching of all initial matching paths, generate an initial state matching result set containing rule identification, condition hit state and corresponding context data.

[0031] Optionally, constructing a multi-dimensional state vector set includes:

[0032] Read the matching record of each rule path from the initial state matching result set, identify the condition nodes that match successfully, and extract the context data fields associated with the condition nodes, including communication delay, packet loss rate, bandwidth utilization, cache occupancy, connection stability, data packet transmission interval and round-trip delay;

[0033] Generate a matching state tag according to the matching record of the condition node, and each matching state tag contains condition node identification, matching condition type and matching time index;

[0034] For each matching state tag, extract parameter values from the corresponding context data field, perform normalization and interval coding operations on the extracted parameter values to obtain parameter standardization results, and combine them in field order to form a single condition node state feature vector;

[0035] Concatenate all condition node state feature vectors under the same rule path in matching order to generate a rule path level initial state vector;

[0036] Collect the running indicators of each node in the communication system, including CPU usage, memory occupancy, cache hit rate, interface call frequency and connection holding time, and perform uniform quantization and standardization processing on the running indicators to obtain a node running indicator vector;

[0037] According to the mapping relationship between the rule nodes and the condition nodes, match and concatenate the node running indicators with the rule path level initial state vector corresponding to the node to form a node level composite state vector;

[0038] Arrange all node level composite state vectors in order of communication priority to construct a multi-node state vector matrix;

[0039] Format the multi-node state vector matrix for encoding, and output a uniform structure multi-dimensional state vector set.

[0040] Optionally, establishing an energy function model includes:

[0041] The constructed multi-dimensional state vector set is input into the Hopfield neural network, each dimension of the multi-dimensional state vector set corresponding to a neuron node, for representing the structured features of the current session state;

[0042] A Hopfield neural network structure is constructed, in which a neuron node is created for each dimension of the multi-dimensional state vector, and a bidirectional symmetric connection relationship is established between all nodes to form a symmetric fully connected topology structure;

[0043] According to the historical joint distribution between each dimension of the multi-dimensional state vector, the connection weight value between each pair of neurons is calculated to generate a connection weight matrix;

[0044] The bias value of each node is calculated in combination with the activation distribution of each neuron node in the historical state evolution, and a bias vector is constructed;

[0045] Each value in the input multi-dimensional state vector is assigned to the corresponding neuron node as the initial state, and normalization processing is performed on all state values to generate a standardized initial network state;

[0046] Based on the established connection weight matrix, bias vector and standardized initial network state, an energy function model is constructed.

[0047] Optionally, the iterative calculation of the energy function model is performed until the state converges, including:

[0048] The constructed energy function model is loaded, and the standardized initial network state is taken as input to initialize the iteration parameters of the Hopfield neural network, including the maximum number of iterations, the energy change threshold and the state stability determination condition;

[0049] The current state vector of all neuron nodes is extracted from the standardized initial network state, and an iteration loop structure is established, in which the neuron nodes are selected one by one according to the asynchronous update strategy in each iteration;

[0050] For the selected neuron node, the local input signal is calculated, which is determined by the current state of the other neurons connected to the corresponding neuron node, the corresponding connection weight and the bias value of the corresponding neuron node;

[0051] The state value of the neuron node is updated according to the calculated local input signal, and the updated state is written into the current multi-dimensional state vector set, and the unselected neuron nodes remain unchanged, forming a network state vector;

[0052] When all neuron nodes complete state update in a round of iteration, the energy function model is called to calculate the overall network energy value, the new overall network energy value is compared with the previous overall network energy value, and the energy change result is recorded;

[0053] The overall network energy value after each round of iteration, the overall network energy difference value, and the corresponding multi-dimensional state vector are stored in the energy descent trajectory table;

[0054] The neuron state update and energy value calculation are repeatedly executed until the energy change amplitude is lower than the preset threshold, and it is determined that the network reaches the convergence condition;

[0055] When the convergence condition is met, the network state vector of the last round of iteration in the energy descent trajectory table is extracted to generate the converged state output vector.

[0056] Optionally, the structure consistency identification and difference index calculation include:

[0057] The rule path record in the initial state matching result set generated by the rule matching graph is extracted, the condition nodes and their corresponding context data fields that match successfully in each rule path are obtained, and a rule path field set is formed;

[0058] The final state output vector is extracted from the state output vector of the energy function model, the index order and field meaning of each dimension in the state output vector are analyzed, and a corresponding table between the dimension index and the field label is established;

[0059] According to the corresponding table between the dimension index and the field label, a field mapping relationship between the initial state matching result set and the state output vector is established, and each rule path field and the corresponding dimension in the state output vector establishes a one-to-one mapping pair;

[0060] After the mapping relationship is established, the corresponding data values of each mapping pair are read in sequence, the numerical difference calculation is performed on the continuous type field, the state consistency judgment is performed on the logical type field, and the encoding matching verification is performed on the symbolic type field, and the comparison result of each field is recorded as a matching mark;

[0061] The matching marks of all rule paths are counted, the proportion of the number of matching successful fields to the total number of fields is calculated, and the structure consistency identification of the rule path is formed;

[0062] During the comparison process, all fields that are determined to be unmatched are extracted, the numerical offset is calculated, and the result is aggregated to form the difference index.

[0063] Optionally, the generation of the final stable conversation state set includes:

[0064] The receiving structure consistency identifier is judged whether to meet the stability threshold condition, and the stability threshold condition is that the number of matching fields in the structure consistency identifier accounts for no less than a preset proportion threshold;

[0065] When the structure consistency identifier is less than the preset proportion threshold, all unmatched fields recorded in the difference index are extracted, and the field types are combined to locate the corresponding condition nodes and the rule paths thereof in the rule matching graph;

[0066] The rule threshold adjustment operation is performed according to the field difference type, specifically including: the continuous field is adjusted to a narrowed numerical tolerance range of condition matching, the logical field is adjusted to an improved state judgment sensitivity, and the symbolic field is adjusted to update the symbolic matching function in the condition node;

[0067] The adjusted rule threshold is written into the corresponding condition node, and the local update of the target rule path in the rule matching graph is completed;

[0068] The matching process is re-executed based on the updated rule matching graph, a new initial state matching result set is generated, and the structure consistency identifier is recalculated;

[0069] When the recalculated consistency identifier is greater than or equal to the stability threshold condition, the rule path corresponding to the rule matching structure, the context data field and the final state output vector are extracted, and are combined to form a session state structure item;

[0070] All session state structure items meeting the consistency threshold condition are summarized to generate a final stable session state set and are output.

[0071] Optionally, the system comprises the following modules:

[0072] A rule matching graph construction module is configured to parse session rules and generate a rule graph structure containing a mapping relationship between rule nodes and condition nodes, to form an executable rule matching graph;

[0073] A context collection and preprocessing module is configured to collect real-time context data of communication delay, packet loss rate, bandwidth utilization rate and cache occupancy rate from a communication system, and establish a context data structure according to node dimensions;

[0074] A rule matching execution module is configured to input the context data structure into the rule matching graph, perform condition matching and path construction through α network nodes and β network nodes, and generate an initial state matching result set;

[0075] A state vector construction module is configured to extract matching state labels and context feature parameters based on the initial state matching result set, and generate a multi-dimensional state vector set in combination with node running indexes;

[0076] An energy model construction module is configured to establish a connection weight matrix and a bias vector based on a Hopfield neural network, construct an energy function model, and initialize a neural network structure;

[0077] An energy convergence calculation module is configured to perform iterative calculation of the energy function model, update a neuron state using an asynchronous update strategy, and generate a final converged state vector and an energy descent trajectory;

[0078] A consistency comparison module is configured to perform field-level mapping comparison between the converged state vector and an initial state matching result set, output a structural consistency identifier and a difference indicator;

[0079] A rule feedback adjustment module is configured to adjust a matching threshold parameter of a related rule path in the rule matching graph according to the difference indicator;

[0080] A session state output module is configured to output a final stable session state set when the structural consistency identifier meets a preset condition.

[0081] The present application has the following advantages:

[0082] (1) The present application constructs a rule matching graph structure based on the Rete algorithm, combines conditional traversal and hierarchical clustering optimization of context data, and realizes efficient session state recognition under complex communication conditions, significantly improving the accuracy and execution efficiency of state recognition in a multi-node environment.

[0083] (2) The present application introduces a Hopfield neural network into the session state management process, constructs an energy function model by establishing a connection weight matrix and a bias vector, supports state convergence and recovery in the case of communication node abnormalities or state loss, and enhances the self-repairing ability and state stability of the system.

[0084] (3) The present application combines the structural consistency comparison mechanism between the initial state and the converged state, adjusts the matching threshold in the rule matching graph in conjunction with the difference indicator feedback, realizes the bidirectional collaboration of rule logic and state evolution, has the ability of dynamic adjustment and adaptive optimization, and effectively improves the robustness and scalability of the communication system under high concurrency and weak connection conditions. BRIEF DESCRIPTION OF DRAWINGS

[0085] The accompanying drawings are included to provide a further understanding of the present application, and constitute a part of the specification, together with the embodiments of the present application, to explain the present application, and do not constitute a limitation on the present application. In the drawings:

[0086] Fig. 1 A flowchart of a method and system for intelligent session state management according to the present application is shown;

[0087] Fig. 2A flowchart of a process for constructing a rule matching graph structure based on a Rete algorithm. DETAILED DESCRIPTION

[0088] The application will now be described further while referring to the appended drawings. These drawings are simplified schematic diagrams which show the basic structure of the application in a schematic manner only and therefore only show those components which are relevant to the present application.

[0089] REFERENCE Figs. 1-2 A method and system for intelligent conversational state management, the method comprising the following steps:

[0090] Constructing a rule graph structure, defining a mapping relationship between rule nodes and condition nodes based on a Rete algorithm, and forming an executable rule matching graph;

[0091] Obtaining real-time context data of each node in a communication system, inputting the real-time context data into the rule matching graph, performing condition traversal and matching operations, and outputting an initial state matching result set;

[0092] Extracting matching state labels and corresponding context feature parameters from the initial state matching result set, and constructing a multi-dimensional state vector set in combination with running indicators of communication nodes;

[0093] Initializing a Hopfield neural network, taking the multi-dimensional state vector set as input, configuring a connection weight matrix and a bias vector, and establishing an energy function model based on the Hopfield neural network;

[0094] Performing iterative calculation of the energy function model, updating the multi-dimensional state vector set in each iteration, and recording an energy descent trajectory until the state converges;

[0095] Obtaining a converged state output vector, performing corresponding mapping comparison with the initial state matching result set, and calculating a structural consistency identifier and a difference indicator;

[0096] Adjusting related rule thresholds in the rule matching graph based on the difference indicator, and outputting a final stable conversational state set after the structural consistency identifier meets the conditions.

[0097] In this embodiment, forming an executable rule matching graph includes:

[0098] Parsing all conversational rules to be processed, parsing the antecedent part of each conversational rule into an ordered atomic condition set, defining each atomic condition in the atomic condition set as a condition node, and defining all conversational rules as a whole as a rule node;

[0099] The mapping relationship between the rule nodes and the condition nodes is defined, and the mapping relationship is represented as a directed dependency edge established from a condition node to a corresponding rule node, indicating that the rule is established depending on the simultaneous satisfaction of the set of conditions;

[0100] A rule graph structure is constructed according to the mapping relationship, and the rule graph structure is a directed graph including a condition node layer, a rule node layer and a set of directed edges therebetween. Each path in the graph represents a logical condition flow of a rule.

[0101] On the basis of the rule graph structure, an alpha network is generated, in which each alpha network node corresponds to a condition node. A condition matching function is configured to receive context data input by a communication system and perform matching judgment, and output a matching data object satisfying the condition. The outputs of all alpha network nodes are collected to form a condition matching result set.

[0102] The condition matching result set is taken as input to perform conflict prediction and pre-layering. Specifically, a trigger frequency matrix between condition nodes is constructed, clustering analysis is performed on the trigger frequency matrix to obtain a condition node clustering set, a node level index is set according to the clustering structure, and a level connection table is generated to guide the legal path range of node combination in beta network construction.

[0103] A beta network is constructed based on the level connection table. Each beta network node of the beta network performs a condition combination operation. The left input of the beta network node is a partial matching path result output by a previous layer beta network node, and the right input is a condition matching result output by a current layer alpha network node. When the combined conditions are satisfied, the beta network node outputs a new intermediate matching path result and passes it to a next layer beta network node.

[0104] A memory unit of the alpha network is configured for the alpha network node to store original conditions of a current matching success, and a memory unit of the beta network is configured for the beta network node to cache an intermediate matching path result, thereby realizing incremental processing of changing facts.

[0105] A terminal rule node is established at the end of each path of the rule graph structure. The terminal node receives a complete matching path output from the last layer of the beta network, identifies that a corresponding rule node is activated, and outputs a final executable rule matching graph.

[0106] The alpha network node layer, the hierarchical index structure, the beta network structure, the terminal rule node layer and their connection relationship jointly constitute a final executable rule matching graph. The matching graph takes communication context data as input, completes state path analysis, rule determination and outputs a structured state matching result.

[0107] In the embodiment, generating an initial state matching result set includes:

[0108] Collecting real-time context data of each node in the communication system, the real-time context data including communication delay, packet loss rate, bandwidth utilization, cache occupancy, node connection state, data packet timestamp and round-trip delay;

[0109] Preprocessing the collected real-time context data according to node dimension, establishing a context data structure, each context data structure corresponding to the state description of a node in the current communication period;

[0110] Inputting the context data structure into the alpha network in the rule matching graph, each alpha network node corresponding to a condition node, the alpha network node receiving the context data structure and performing condition traversal operation according to the bound condition matching function, the condition traversal operation including reading the field value in the context data structure, performing interval comparison and state flag matching on the field value, and determining whether the data meets the matching rule of the corresponding condition node;

[0111] Reading the field value in the context data structure and performing condition matching operation, including the following implementation modes:

[0112] The system first maps the real-time context data uploaded by each node according to the preset communication structure template, each context data structure containing multiple fields, such as communication delay, packet loss rate, bandwidth utilization, connection state identifier, cache occupancy, and packet arrival timestamp; the alpha network node calls the condition field bound to itself from the structured data, for example, the alpha network node A1 corresponds to the field "delay", and its matching function is defined as "delay between 10ms and 100ms"; the system will extract the current value of the field and perform interval comparison; if the value falls within the specified range, the matching is successful and is marked as "satisfied", otherwise it is marked as "not satisfied"; for logical fields (such as connection state established), the matching function is a state flag comparison, and the system judges whether the field value is consistent with the preset state. All matching judgments are executed in parallel on the local node, and the matching results of each condition node are output after execution;

[0113] Outputting the alpha network node that meets the matching rule as a matching success result, and forming a condition-data pair of the condition node and its corresponding data record of the matching success result;

[0114] Classifying all condition-data pairs according to the mapping relationship between condition nodes and rule nodes defined in the rule graph structure, and gathering them into respective rule paths;

[0115] Counting the number of condition nodes that match successfully on each rule path, and identifying the rule path with at least one condition node matching successfully as an initial matching path;

[0116] According to the matching of all initial matching paths, an initial state matching result set containing rule identification, condition hit state and corresponding context data is generated.

[0117] In this embodiment, constructing a multi-dimensional state vector set includes:

[0118] From the initial state matching result set, the matching records of each rule path are read, the successfully matched condition nodes are identified, and the context data fields associated with the condition nodes are extracted, including communication delay, packet loss rate, bandwidth utilization, cache occupancy, connection stability, data packet transmission interval and round-trip delay;

[0119] According to the matching records of the condition nodes, matching state tags are generated, each of which contains condition node identification, matching condition type and matching time index, for uniquely identifying the current matching state;

[0120] For each matching state tag, the parameter values are extracted from the corresponding context data fields, the normalized and interval coding operations are performed on the extracted parameter values, the parameter standardization results are obtained, and the single-condition node state feature vectors are formed by combining them in field order;

[0121] The normalized and interval coding operations include performing linear normalization processing on the original values according to the preset maximum and minimum value intervals, converting them to decimal values in the range of [0, 1] for the extracted context feature parameters such as communication delay, packet loss rate, bandwidth utilization, etc.; then according to the application requirements, set a fixed interval (such as 0-0.2, 0.2-0.4, etc.), map the normalized results to the corresponding interval tags, and convert them to fixed-dimensional vector representation using one-hot encoding method;

[0122] All condition node state feature vectors under the same rule path are sequentially spliced according to the matching order to generate a rule path-level initial state vector, which records the parameter states of all matching conditions in the rule path;

[0123] The specific implementation of the matching order sequential splicing is: for the multiple condition nodes that have been successfully matched in the same rule path, they are numbered according to their original arrangement order in the rule setting, such as C1, C2, C3 from left to right or from top to bottom. The system reads the state feature vectors corresponding to each condition node in this order and splices them in the order of numbering, i.e. taking the vector of C1 as the starting point, connecting the vectors of C2 and C3 in turn, forming a continuous high-dimensional vector sequence as the complete initial state vector under the rule path;

[0124] The running indexes of each node in the communication system are collected, the running indexes include CPU usage, memory occupancy, cache hit rate, interface call frequency and connection holding time, and the running indexes are uniformly quantified and standardized to obtain a node running index vector;

[0125] The specific implementation of the uniform quantification and standardization processing is that, for each numerical data in the communication node running index, linear scaling processing is performed according to a preset business range threshold to uniformly map the original value to the interval [0, 1]; for classification or state type indexes, fixed discrete coding is used for quantification, for example, normal, overload and abnormal are respectively coded as [1, 0, 0], [0, 1, 0] and [0, 0, 1]; all the standardized and quantified results are arranged in a fixed order according to the field to form a running index vector with consistent structure;

[0126] According to the mapping relationship between the rule nodes and the condition nodes, the running index of the node is matched and spliced with the rule path level initial state vector corresponding to the node to form a node level composite state vector;

[0127] All node level composite state vectors are arranged in a communication priority order to construct a multi-node state vector matrix;

[0128] The specific implementation of the communication priority order arrangement is that the system assigns a communication priority identifier according to the role weight of each communication node in the session, the data forwarding frequency or the historical communication importance, for example, the priority of the master node is set as P1, the priority of the key relay node is set as P2, and the priority of the edge node is set as P3; when constructing the multi-node state vector matrix, the composite state vectors corresponding to the nodes are sorted according to the priority identifier, the node vectors with high priority are arranged in the front, and the node vectors with low priority are arranged in the back, to form an ordered vector matrix;

[0129] The multi-node state vector matrix is formatted and encoded to output a multi-dimensional state vector set with a uniform structure.

[0130] In the embodiment, the energy function model includes:

[0131] The constructed multi-dimensional state vector set is input into the Hopfield neural network, each dimension of the multi-dimensional state vector set corresponds to a neuron node, and is used to represent the structured features of the current session state;

[0132] The Hopfield neural network structure is constructed, a neuron node is created for each multi-dimensional state vector dimension in the Hopfield neural network, and a bidirectional symmetric connection relationship is established between all the nodes to form a symmetric fully connected topology structure;

[0133] The connection weight matrix is generated by calculating the connection weight value between each pair of neurons according to the historical joint distribution between each dimension in the multi-dimensional state vector, and the symmetry and non-self-connection requirements of the connection weight matrix are ensured by symmetrization processing;

[0134] The historical joint distribution between each dimension in the multi-dimensional state vector refers to the probability relationship of any two state dimensions appearing simultaneously in the same state in a plurality of historical state samples. The specific implementation includes: the system counts the number of times each pair of dimensions appears simultaneously in the same state (such as high value or low value) in the set of historical converged state vectors, calculates the co-occurrence frequency, and compares it with the independent activation frequency to form a joint probability matrix; the joint distribution is used to measure the state correlation between each dimension, and then used as a calculation basis for constructing the connection weight matrix, to reflect the cooperative change strength between neurons;

[0135] The bias vector is constructed by combining the activation distribution of each neuron node in the historical state evolution;

[0136] The activation distribution in the historical state evolution refers to the frequency distribution of a certain neuron node being activated (i.e. taking a high state value) in a plurality of historical state vectors. The specific implementation includes: the system records the activation times of each neuron corresponding to the dimension in the converged state during the training or reasoning process, and counts the proportion of the neuron in the activated state (such as greater than a set threshold) in all input samples to form an activation probability distribution; the distribution is used to determine the bias value of the node, and a higher bias value indicates that the node is more inclined to activate, which is used to adjust the local stability reference in the energy function during network structure initialization;

[0137] Each value in the input multi-dimensional state vector is assigned to the corresponding neuron node as the initial state, and normalization processing is performed on all state values to generate a standardized initial network state;

[0138] Based on the established connection weight matrix, bias vector and standardized initial network state, an energy function model is constructed, which is used to measure the energy level of the current neural network structure under the state combination, and serves as a basic evaluation function for subsequent state evolution and convergence determination.

[0139] In this embodiment, the iterative calculation of the energy function model is performed until the state converges, which includes:

[0140] The constructed energy function model is loaded, the standardized initial network state is taken as the input, and the iteration parameters of the Hopfield neural network are initialized, including the maximum number of iterations, the energy change threshold and the state stability determination condition;

[0141] Extract the current state vector of all neuron nodes from the standardized initial network state, establish an iterative loop structure, and in each iteration, select neuron nodes in turn according to the asynchronous update strategy;

[0142] The asynchronous update strategy refers to selecting only one neuron node for state calculation and update in each iteration during the state update process of the Hopfield neural network, rather than updating all nodes simultaneously. The specific implementation includes: at the beginning of each iteration, selecting a node from all neuron nodes according to a predetermined order or through a pseudo-random algorithm; calculating the local input signal currently received by the node, and determining whether the node needs to flip its state according to the signal and the set threshold; immediately writing the updated state vector after updating, and then selecting the next node to repeat the process until all nodes in this round are updated in turn;

[0143] For the selected neuron node, calculate its local input signal, which is determined by the current state of other neurons connected to the corresponding neuron node, the corresponding connection weight, and the bias value of the corresponding neuron node;

[0144] Update the state value of the neuron node according to the calculated local input signal, write the updated state into the current multi-dimensional state vector set, and keep the original state of the unselected neuron node unchanged to form the network state vector;

[0145] When all neuron nodes in a round of iteration have completed state update, call the energy function model to calculate the network overall energy value, compare the new network overall energy value with the previous network overall energy value, and record the energy change result;

[0146] Store the network overall energy value, network overall energy difference, and corresponding multi-dimensional state vector after each iteration into the energy descent trajectory table, which is used to record the energy evolution process and state change sequence of each iteration;

[0147] Repeat the neuron state update and energy value calculation until the energy change amplitude is lower than the preset threshold, and determine that the network has reached the convergence condition;

[0148] When the convergence condition is met, extract the network state vector of the last iteration in the energy descent trajectory table to generate the converged state output vector.

[0149] In this embodiment, the calculation of structural consistency identification and difference index includes:

[0150] Extract the rule path record in the initial state matching result set generated by the rule matching graph, obtain the condition nodes and their corresponding context data fields that match successfully in each rule path, and form a rule path field set;

[0151] extracting a final state output vector from the state output vector of the energy function model, analyzing the index order of each dimension and the field meaning in the state output vector, and establishing a correspondence table between the dimension index and the field label;

[0152] According to the correspondence table between the dimension index and the field label, a field mapping relationship between the initial state matching result set and the state output vector is established, and each rule path field and the corresponding dimension in the state output vector establishes a one-to-one mapping pair;

[0153] After the mapping relationship is established, the corresponding data value of each mapping pair is read in sequence, the numerical difference calculation is performed on the continuous type field, the state consistency judgment is performed on the logic type field, and the encoding matching verification is performed on the symbolic type field. The comparison result of each field is recorded as a matching mark;

[0154] The specific way of performing numerical difference calculation on the continuous type field is to extract the numerical value of the corresponding field in the rule matching result and the convergence state, calculate the absolute value of the difference between the two, and compare the value with the set tolerance threshold, which is used to determine whether there is a deviation. The way of performing state consistency judgment on the logic type field is to compare the Boolean value or multi-value state of the two fields one by one, and only when the state is completely the same is considered consistent. The way of performing encoding matching verification on the symbolic type field is to convert the field value into a unified format of discrete encoding through a preset encoding table, and compare whether the encoding is equal to judge the matching situation;

[0155] All matching marks of each rule path are counted, the proportion of the number of matching successful fields to the total number of fields is calculated, and the structural consistency identifier of the rule path is formed, which is used to reflect the consistency degree of the convergence state and the rule matching structure;

[0156] During the comparison process, all fields judged as not matching are extracted, the numerical value offset is calculated, and the result is aggregated to form a difference index, which records the deviation degree of each field.

[0157] In this embodiment, the generation of the final stable conversation state set includes:

[0158] The structural consistency identifier is received and it is judged whether the stability threshold condition is met, the stability threshold condition being that the proportion of the number of matching fields in the structural consistency identifier is not less than a preset proportion threshold;

[0159] When the structural consistency identifier is less than the preset proportion threshold, all unmatched fields recorded in the difference index are extracted, and combined with the field type, the corresponding condition node and the rule path thereof in the rule matching graph are located;

[0160] The rule threshold adjustment operation is performed according to the field difference type, and specifically includes: adjusting a continuous field to a narrowed numerical tolerance range of condition matching, adjusting a logical field to improve state judgment sensitivity, and adjusting a symbolic field to update a symbol matching function in a condition node;

[0161] The adjusted rule threshold is written into the corresponding condition node, and local update of the target rule path in the rule matching graph is completed;

[0162] The matching process is re-executed based on the updated rule matching graph, a new initial state matching result set is generated, and a structural consistency identifier is recalculated;

[0163] When the recalculated consistency identifier is greater than or equal to a stability threshold condition, a rule path corresponding to a rule matching structure, context data fields and a final state output vector are extracted, and are combined to form a session state structure item;

[0164] All session state structure items satisfying the consistency threshold condition are summarized to generate a final stable session state set and are output.

[0165] In the embodiment, the system includes the following modules:

[0166] A rule matching graph construction module is configured to parse session rules and generate a rule graph structure containing a mapping relationship between rule nodes and condition nodes, to form an executable rule matching graph;

[0167] A context collection and preprocessing module is configured to collect real-time context data of communication delay, packet loss rate, bandwidth utilization rate and cache occupancy rate from a communication system, and establish a context data structure according to a node dimension;

[0168] A rule matching execution module is configured to input the context data structure into the rule matching graph, perform condition matching and path construction through α network nodes and β network nodes, and generate an initial state matching result set;

[0169] A state vector construction module is configured to extract matching state labels and context feature parameters based on the initial state matching result set, and combine node running indexes to generate a multi-dimensional state vector set;

[0170] An energy model construction module is configured to establish a connection weight matrix and a bias vector based on a Hopfield neural network, construct an energy function model and initialize a neural network structure;

[0171] An energy convergence calculation module is configured to perform iterative calculation of the energy function model, update neuron states by using an asynchronous update strategy, and generate a final converged state vector and an energy descent trajectory;

[0172] The consistency comparison module is configured to perform field-level mapping comparison between the convergence state vector and the initial state matching result set, and output a structural consistency identifier and a difference index;

[0173] The rule feedback adjustment module is configured to adjust a matching threshold parameter of a relevant rule path in the rule matching graph according to the difference index.

[0174] The session state output module is configured to output a final stable session state set when the structural consistency identifier meets a preset condition.

[0175] Embodiment 1:

[0176] In order to verify the feasibility of the application in implementation, the application is applied to a multi-node cooperative communication network, and the specific implementation manner and technical features of the intelligent session state management method are demonstrated.

[0177] In this application scenario, the communication system is composed of a plurality of physical communication nodes, each of which undertakes device access, state synchronization and instruction scheduling and other tasks. With the increase in the number of access devices and the instability of the communication environment, the session state between nodes frequently loses synchronization, abnormally recovers slowly, and has low state reconstruction efficiency. Therefore, the intelligent session state management mechanism is introduced to improve the robustness and adaptive ability of the overall communication system.

[0178] A rule matching graph structure based on the Rete algorithm is constructed. Specifically, the state management rules in the communication system configuration are parsed, the rule antecedent is disassembled into an atomic condition set, which is mapped to a condition node, and the entire rule is taken as a rule node, and a directed dependency edge is established to form a mapping relationship between the condition node and the rule node. Subsequently, an alpha network and a beta network are constructed, wherein the alpha network nodes correspond to the condition nodes, a matching function is configured to process real-time context data, and the beta network nodes are used for condition combination and path construction, and finally an executable rule matching graph is formed.

[0179] Real-time context data of the communication nodes are collected, including communication delay, bandwidth utilization, packet loss rate, cache occupancy, connection state, data transmission interval and other indicators, and are organized into a context data structure according to the node dimension. The data is input into the rule matching graph, triggering the condition matching of the alpha network node, and the successfully matched conditions and context parameters form a condition-data pair, which is aggregated according to the rule path to generate an initial state matching result set.

[0180] Based on the matching result, the matching state label and the associated context field are extracted, and a standardized feature vector is constructed through normalization and interval coding. A plurality of feature vectors under the same rule path are sequentially spliced to form a rule path-level initial state vector, and the node-level composite state vector is spliced by combining the node running indicators, and a multi-node state vector matrix is constructed.

[0181] The state vector matrix is input into the Hopfield neural network model, each dimension corresponds to a neuron, and a symmetric fully connected structure is constructed. The connection weight matrix and the bias vector are calculated in combination with the historical joint distribution to establish an energy function model. After initializing the neuron state, the state is updated iteratively node by node using an asynchronous update strategy, and the energy change trajectory and state set are recorded after each iteration until convergence.

[0182] After the energy function converges, the system outputs the matching result set of the converged state vector and the initial state and performs field mapping comparison. The continuous field performs numerical difference judgment, the logical field judges whether the state is consistent, and the symbolic field is verified by encoding matching. The matching field proportion in each rule path is counted to generate a structure consistency identifier, and the difference index is aggregated to form a difference index.

[0183] If the structure consistency is insufficient, the matching threshold of the related condition node in the rule matching graph is adjusted according to the difference index, the rule matching condition is updated, and the matching calculation is triggered again; if the consistency index meets the set threshold, the current converged state vector is mapped to a stable session state set and is synchronized to each node, and the following data is recorded during system operation:

[0184] Table 1 Comparison of state synchronization efficiency

[0185]

[0186] Table 2 Number of times of automatic recovery of abnormal state

[0187]

[0188] Table 3 Inconsistent state duration

[0189]

[0190] In Table 1, the average state synchronization time of the node using the method of the present application is 43 ms, while the average time of the node of the traditional rule table mechanism is as high as 117 ms, indicating that through the combination of the Rete rule graph structure and the Hopfield energy convergence model, the efficiency of session state synchronization is greatly improved, the response speed is faster, and the ability to adapt to high concurrency scenarios is stronger; the number of times of automatic recovery of abnormal state in Table 2 shows that in the same period, the number of times of recovery of the node under the method of the present application is significantly more than that of the traditional mechanism (such as 7 times and 2 times for A03 nodes, respectively), indicating that the system has stronger fault self-recovery ability and can realize rapid detection and repair of session abnormalities.

[0191] The state inconsistency duration in Table 3 further verifies the robustness of the system of the present application: the node state inconsistency duration using the method is controlled within 8 seconds, while the traditional mechanism is mostly more than 30 seconds, and the longest is 32.8 seconds, which shows that through the dynamic adjustment guided by the energy function and the rule feedback mechanism, the system can complete state reconstruction and consistency verification faster.

[0192] In summary, these data fully reflect the effectiveness of the technical solution of the present application in the communication system, especially in the multi-node environment, which has a significant improvement in state recognition, fault handling and consistency maintenance.

[0193] The above describes only the preferred specific embodiments of the present application, but the protection scope of the present application is not limited thereto, any person skilled in the art within the technical range disclosed by the present application, according to the technical solution and the inventive concept of the present application, equivalent replacement or change, should be covered within the protection scope of the present application.

Claims

1. A method of intelligent session state management, characterized by, Comprise: Construct a rule graph structure, define the mapping relationship between rule nodes and condition nodes based on the Rete algorithm, and form an executable rule matching graph; Obtain the real-time context data of each node in the communication system, input the real-time context data into the rule matching graph, perform condition traversal and matching operations, and output an initial state matching result set; Extract the matching state label and corresponding context feature parameters from the initial state matching result set, and construct a multi-dimensional state vector set in combination with the running indicators of the communication nodes; Initialize the Hopfield neural network, input the multi-dimensional state vector set, configure the connection weight matrix and bias vector, and establish an energy function model based on the Hopfield neural network; Perform iterative calculation of the energy function model, update the multi-dimensional state vector set in each iteration, and record the energy descent trajectory until the state converges; Obtain the converged state output vector, and perform corresponding mapping comparison with the initial state matching result set to calculate the structural consistency identifier and difference index; Adjust the related rule threshold in the rule matching graph based on the difference index, and output the final stable conversation state set when the structural consistency identifier meets the conditions.

2. The method of intelligent session state management of claim 1, wherein, Forming an executable rule matching graph includes: Parse all the conversation rules to be processed, parse the antecedent part of each conversation rule into an ordered atomic condition set, and define each atomic condition in the atomic condition set as a condition node, and define all conversation rules as a rule node; Define the mapping relationship between rule nodes and condition nodes, which is represented as a directed dependency edge from a condition node to a corresponding rule node; According to the above mapping relationship, a rule graph structure is constructed, which is a directed graph containing a condition node layer, a rule node layer and a directed edge set therebetween, and each path in the graph represents the logical condition flow of a rule; Based on the rule graph structure, generate an alpha network, where each alpha network node corresponds to a condition node, configure a condition matching function to receive context data input by the communication system and perform matching judgment, output matching data objects that meet the conditions, and the outputs of all alpha network nodes are collected to form a condition matching result set; Take the condition matching result set as input, perform conflict prediction and pre-layering, which specifically includes constructing a trigger frequency matrix between condition nodes, clustering the trigger frequency matrix to obtain a condition node clustering set, setting a node level index according to the clustering structure, and generating a hierarchical connection table; Based on the hierarchical connection table, build a beta network, each beta network node of the beta network performs condition combination operation, the left input of the beta network node is the partial matching path result output by the previous layer beta network node, and the right input is the condition matching result output by the current layer alpha network node. When the combined conditions are met, the beta network node outputs a new intermediate matching path result; Establish a terminal rule node at the end of each path of the rule graph structure, the terminal node receives the complete matching path output from the last layer of the beta network, identifies that the corresponding rule node is activated, and outputs the final executable rule matching graph.

3. The method of intelligent session state management of claim 1, wherein, Generating an initial state matching result set includes: Collecting real-time context data of each node in the communication system, the real-time context data including communication delay, packet loss rate, bandwidth utilization, cache occupancy, node connection state, data packet timestamp and round-trip delay; Pretreating the collected real-time context data according to node dimension, and establishing a context data structure; Inputting the context data structure into an α network in a rule matching graph, each α network node corresponding to a condition node, the α network node receiving the context data structure and performing a condition traversal operation according to a bound condition matching function, the condition traversal operation including reading a field value in the context data structure, and performing interval comparison and state flag matching on the field value; Marking the α network node satisfying the matching rule as a matching success result, and forming a condition-data pair of the condition node and a corresponding data record of the matching success result; Classifying all condition-data pairs according to a mapping relationship between condition nodes and rule nodes defined in the rule graph structure, and converging into respective rule paths; Counting the number of condition nodes matching successfully on each rule path, and identifying a rule path with at least one condition node matching successfully as an initial matching path; Generating an initial state matching result set including a rule identifier, a condition hit state and corresponding context data according to the matching conditions of all initial matching paths.

4. The method of intelligent session state management of claim 1, wherein, Building a multi-dimensional state vector set includes: Reading the matching records of each rule path from the initial state matching result set, identifying the condition nodes matching successfully therein, and extracting context data fields associated with the condition nodes, the context data fields including communication delay, packet loss rate, bandwidth utilization, cache occupancy, connection stability, data packet transmission interval and round-trip delay; Generating a matching state label according to the matching records of the condition nodes, each matching state label including a condition node identifier, a matching condition type and a matching time index; For each matching state label, extracting parameter values from the corresponding context data fields, performing normalization and interval coding operations on the extracted parameter values to obtain parameter standardization results, and combining the parameter standardization results in field order to form a single-condition node state feature vector; Concatenating all condition node state feature vectors under the same rule path in matching order to generate a rule path-level initial state vector; Collecting running indexes of each node in the communication system, the running indexes including CPU usage, memory occupancy, cache hit rate, interface call frequency and connection holding time, and performing unified quantization and standardization processing on the running indexes to obtain a node running index vector; According to the mapping relationship between the rule nodes and the condition nodes, matching and concatenating the node running index and the rule path-level initial state vector corresponding to the node to form a node-level composite state vector; Arranging all node-level composite state vectors in order of communication priority to build a multi-node state vector matrix; Performing format coding on the multi-node state vector matrix to output a multi-dimensional state vector set with a unified structure.

5. The method of intelligent session state management of claim 1, wherein, Building an energy function model includes: The constructed multi-dimensional state vector set is input into the Hopfield neural network, each dimension of the multi-dimensional state vector set corresponding to a neuron node, for representing the structured features of the current session state; A Hopfield neural network structure is constructed, in which a neuron node is created for each dimension of the multi-dimensional state vector, and a bidirectional symmetric connection relationship is established between all nodes to form a symmetric fully connected topology structure; According to the historical joint distribution between the dimensions in the multi-dimensional state vector, the connection weight values between each pair of neurons are calculated to generate a connection weight matrix; The bias values of each node are calculated in combination with the activation distribution of each neuron node in the historical state evolution to construct a bias vector; Each value in the input multi-dimensional state vector is assigned to the corresponding neuron node as the initial state, and normalization processing is performed on all state values to generate a standardized initial network state; An energy function model is constructed based on the established connection weight matrix, bias vector and standardized initial network state.

6. The method of intelligent session state management of claim 1, wherein, The iterative calculation of the energy function model is performed until the state converges, including: The constructed energy function model is loaded, the standardized initial network state is taken as input, and the iterative parameters of the Hopfield neural network are initialized, including the maximum number of iterations, the energy change threshold and the state stability judgment condition; The current state vector of all neuron nodes is extracted from the standardized initial network state, and an iterative loop structure is established, in which the neuron nodes are selected one by one in each iteration according to the asynchronous update strategy; For the selected neuron node, its local input signal is calculated, which is determined by the current state of other neurons connected to the corresponding neuron node, the corresponding connection weight and the bias value of the corresponding neuron node; The state value of the neuron node is updated according to the calculated local input signal, and the updated state is written into the current multi-dimensional state vector set, while the states of the unselected neuron nodes remain unchanged to form a network state vector; After all neuron nodes complete state updating in one iteration, the network overall energy value is calculated by calling the energy function model, the new network overall energy value is compared with the previous network overall energy value, and the energy change result is recorded; The network overall energy value, network overall energy difference and corresponding multi-dimensional state vector after each iteration are stored in the energy descent trajectory table; The neuron state updating and energy value calculation are repeatedly performed until the energy change amplitude is lower than the preset threshold, and it is determined that the network reaches the convergence condition; When the convergence condition is met, the network state vector of the last iteration in the energy descent trajectory table is extracted to generate the converged state output vector.

7. The method of intelligent session state management of claim 1, wherein, The structure consistency identification and difference index calculation include: The rule path records in the initial state matching result set generated by the rule matching graph are extracted, the condition nodes and their corresponding context data fields that match successfully in each rule path are obtained, and a rule path field set is formed; Extract the final state output vector from the state output vector of the energy function model, analyze the index order and field meaning of each dimension in the state output vector, and establish a correspondence table between the dimension index and the field label; According to the correspondence table between the dimension index and the field label, the field mapping relationship between the initial state matching result set and the state output vector is established, and each rule path field and the corresponding dimension in the state output vector establishes a one-to-one mapping pair; After the mapping relationship is established, the corresponding data value of each mapping pair is read in turn, the numerical difference calculation is performed on the continuous type field, the state consistency judgment is performed on the logic type field, and the encoding matching verification is performed on the symbolic type field. The comparison result of each field is recorded as a matching mark; All matching marks of each rule path are counted, the proportion of matching successful field number and total field number is calculated, and the structural consistency identifier of the rule path is formed; In the comparison process, all the fields judged as not matching are extracted, the numerical value offset is calculated, and the result is aggregated to form a difference index.

8. The method of intelligent session state management of claim 1, wherein, The generation of the final stable session state set includes: Receiving the structural consistency identifier and judging whether it meets the stability threshold condition, wherein the stability threshold condition is that the proportion of the number of matching fields in the structural consistency identifier is not less than a preset proportion threshold; When the structural consistency identifier is less than the preset proportion threshold, all the unmatched fields recorded in the difference index are extracted, and the corresponding condition node and the rule path thereof are located in the rule matching graph combined with the field type; According to the field difference type, the rule threshold adjustment operation is performed, including: adjusting the continuous type field to narrow the numerical tolerance range of the condition matching, adjusting the logic type field to improve the state judgment sensitivity, and adjusting the symbolic type field to update the symbol matching function in the condition node; Write the adjusted rule threshold into the corresponding condition node to complete the local update of the target rule path in the rule matching graph; Re-execute the matching process based on the updated rule matching graph to generate a new initial state matching result set, and re-calculate the structural consistency identifier; When the recalculated consistency identifier is greater than or equal to the stability threshold condition, the rule path corresponding to the rule matching structure, the context data field and the final state output vector are extracted to form a session state structure item; All session state structure items that meet the consistency threshold condition are summarized to generate the final stable session state set and output.

9. A system for intelligent session state management, characterized by It includes the following modules: A rule matching graph construction module is used to parse the session rules and generate a rule graph structure containing the mapping relationship between rule nodes and condition nodes, forming an executable rule matching graph; A context collection and preprocessing module is used to collect real-time context data of communication delay, packet loss rate, bandwidth utilization rate and cache occupancy rate from a communication system, and establish a context data structure according to node dimensions; A rule matching execution module is used to input the context data structure into the rule matching graph, and perform condition matching and path construction through α network nodes and β network nodes to generate an initial state matching result set; The state vector construction module is configured to extract matching state labels and context feature parameters based on the initial state matching result set, and to generate a multi-dimensional state vector set in combination with node operation indexes; The energy model construction module is configured to establish a connection weight matrix and a bias vector based on a Hopfield neural network, to construct an energy function model, and to initialize a neural network structure; The energy convergence calculation module is configured to perform iterative calculation of the energy function model, to update neuron states using an asynchronous update strategy, and to generate a final converged state vector and an energy descent trajectory; The consistency comparison module is configured to perform field-level mapping comparison between the converged state vector and the initial state matching result set, and to output a structural consistency identifier and a difference index; The rule feedback adjustment module is configured to adjust matching threshold parameters of relevant rule paths in the rule matching graph according to the difference index; The session state output module is configured to output a final stable session state set when the structural consistency identifier satisfies a preset condition.

Citation Information

Patent Citations

  • Task type question and answer interaction system for intelligent control

    CN111666381A

  • Platform security intelligent supervision method and system based on data management

    CN120934860A