Multi-level document retrieval method
By using the problem state classification model and lag impact evaluation model of the SSM convolution module in the dialogue system, we can identify and deal with potential lag risks and adaptive correction index decay strategy, and solve the knowledge retrieval errors of traditional dialogue systems in multiple rounds of dialogues. and resource consumption issues improve retrieval accuracy and user experience.
Patent Information
- Application Number
- CN202510035545.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-09
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2045-01-09
AI Technical Summary
Traditional dialogue systems rely on exponential decay strategies of time dimensions in multiple rounds of conversations, and cannot accurately capture key information in the far rounds, resulting in knowledge retrieval errors, increasing computing resource consumption, delay in response time, and affecting user interaction experience.
The problem status classification model based on the SSM convolution module is used to identify the user's single-round questions, and a single-round search knowledge set is obtained using different knowledge retrieval strategies, and a lag impact assessment model is constructed to identify potential lag potential risks. When there is a potential for lag, adaptively correct the preset exponential decay strategy to ensure accurate extraction of key information in real-time dialogue scenarios.
It improves the accuracy and efficiency of knowledge retrieval in multiple rounds of dialogue scenarios, reduces the effectiveness loss of historical information, optimizes resource usage, reduces response time, and improves user interaction experience.
Smart Images

Figure CN119415482A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of multi-level document retrieval, and more specifically, to a multi-level document retrieval method. Background Art
[0002] With the continuous development of artificial intelligence technology, especially in the field of natural language processing (NLP), multi-round dialogue systems have gradually become an important part of human-computer interaction. Such systems can understand and process continuous input from users and provide efficient communication experience through appropriate responses. However, traditional dialogue systems often face the challenge of knowledge retrieval, especially in scenarios where multi-round dialogues need to be combined with contextual information. An exponential decay strategy based on the time dimension is often used to update the multi-round retrieval knowledge set. Over-reliance on the exponential decay strategy based on the time dimension may not accurately capture the key information of distant rounds, resulting in a gradual decrease in the effectiveness of key information in distant rounds, and errors in the final knowledge retrieval. For example, a user has a conversation with a customer service robot and begins to ask about a problem with a certain mobile phone in the company. As early as the first round of the conversation, the user mentioned the specific model of the mobile phone and asked related fault information. In the sixth round, the user suddenly mentioned the fault-related issue again, but this time the question was about the accessory warranty policy. Due to the exponential decay strategy based on the time dimension, the system significantly reduced the conversation weight of the first round. Therefore, in the sixth round, the system could not effectively trace back to the specific model information of the first round, resulting in the retrieved warranty policy not matching the phone model. The final reply to the user could not solve the user's problem. In addition, the exponential decay strategy based on the time dimension will significantly increase the system's computing resource consumption in real-time conversation scenarios and when it comes to convolution operations and retrieval of large-scale historical information, which may cause delays in the retrieval response time or even freezes. Since it is impossible to provide more accurate retrieval-related knowledge for the user's question, the user's interactive experience is seriously affected. As a result, the user may leave the platform, resulting in a reduction in the platform's trust. Summary of the invention
[0003] In order to overcome the above-mentioned defects of the prior art, an embodiment of the present invention provides a multi-level document retrieval method to solve the problems raised in the above-mentioned background technology.
[0004] To achieve the above object, the present invention provides the following technical solutions: A multi-level document retrieval method comprises the following steps: Step S1, identifying the question state of a single-round question of a user according to a question state classification model based on an SSM convolutional module, obtaining the question state, and adopting different knowledge retrieval strategies according to the question state to obtain a single-round retrieval knowledge set corresponding to the question state; Step S2, obtaining multiple information of the problem state classification model for the problem state identification process, constructing a jamming impact assessment model, generating a jamming impact assessment index, and determining whether the problem state classification model has a jamming risk; Step S3: when the problem status classification model does not have the risk of freezing, multiple rounds of knowledge rolling updates are performed on the single-round retrieval knowledge set, a preset exponential decay strategy is used to obtain the knowledge influence coefficient, and the knowledge is comprehensively ranked in combination with the knowledge importance ranking coefficient within the round to obtain a knowledge ranking table for display to the user; Step S4: When the problem state classification model has a hidden danger of freezing, the preset exponential decay strategy is adaptively corrected.
[0005] In a preferred embodiment, in step S1, the text of the current round of questions asked by the user is first preprocessed, the question text is segmented, and each word is converted into a corresponding word vector to obtain a semantic vector of the current round of questions; at the same time, the text of the user's historical multiple rounds of questions and the corresponding round of retrieval knowledge set are preprocessed and segmented to convert into word vectors to obtain the semantic vectors of the historical multiple rounds of questions and the semantic vector matrix of the retrieval knowledge set respectively; Based on the semantic vector of the current round of questions and the semantic vectors of multiple rounds of questions in the past, a question text semantic vector matrix is constructed, and the question text semantic vector matrix is input into the question SSM convolution module, and the question text semantic vector matrix is convolved according to the convolution kernel of the question SSM convolution module; The semantic vector matrix of the retrieval knowledge set is input into the retrieval knowledge SSM convolution module, and the semantic vector matrix of the question text is convolved according to the convolution kernel of the retrieval knowledge SSM convolution module; The convolution output feature vectors extracted from the question SSM convolution module and the retrieval knowledge SSM convolution module are horizontally spliced to obtain the final output feature vector, and the final output feature vector after horizontal splicing is passed to the fully connected layer to obtain the fully connected layer output; The output of the fully connected layer is passed into the Softmax activation function to obtain the probability value of the problem state. The expression is as follows: ,in Indicates that the question asked by the user in the current round belongs to the question state The probability value of , Represents the output of the fully connected layer; Issue Status Indicates new issues of independence; Problem state M2 means it is not independent and is the details of the previous round of problems; Problem state M3 means it is not independent and has intersection with the previous round of problems; According to the probability value output by the Softmax activation function, the status of the question asked by the user in the current round is classified as follows: like > and > , then the question status of the user's current round of questions is marked as M1, the semantic vector of the user's current round of questions is obtained, and the semantic similarity is matched with the semantic vector of the existing knowledge in the knowledge base. The existing knowledge in the knowledge base is sorted from large to small according to the semantic similarity, and the top_k pieces of knowledge are selected as the single-round retrieval knowledge set; like > and > , then the question status of the user's current round is marked as M2, and the retrieval knowledge set of the previous round of questions is directly used as the single-round retrieval knowledge set of the current round; like > and > , then the question status of the user's current round of questions is marked as M3, the previous round of questions are concatenated with the current round of questions, the semantic vector of the concatenated text is obtained, and then the semantic similarity is matched with the semantic vector of the existing knowledge in the knowledge base. The existing knowledge in the knowledge base is sorted from large to small according to the semantic similarity, and the top_k pieces of knowledge are selected as the single-round retrieval knowledge set.
[0006] In a preferred embodiment, in step S2, the multiple pieces of information of the problem status identification process include the model execution time abnormality coefficient, the resource consumption status coefficient, the convolution layer number abnormal fluctuation coefficient, and the user churn rate.
[0007] In a preferred embodiment, the logic for obtaining the model execution time anomaly coefficient is as follows: Get the execution inference time of the question status classification model for each question asked by the user , g represents the number of times the user asks a question, g={1,2,...,G}, G is a positive integer; Calculate the average execution time , the expression is as follows , calculate the standard deviation of the execution reasoning time based on the average execution reasoning time , the expression is as follows ; Compare each execution reasoning time with the execution reasoning time standard deviation, and mark the execution reasoning time as abnormal. When the execution reasoning time is greater than or equal to the execution reasoning time standard deviation, the execution reasoning time greater than or equal to the execution reasoning time standard deviation is marked as abnormal execution reasoning time. Calculate the model execution time anomaly coefficient , the expression is as follows , where represents the execution reasoning time of the hth exception, h={1,2,...,H}, where H is a positive integer.
[0008] In a preferred embodiment, the logic for obtaining the resource consumption state coefficient is as follows: Obtain resource consumption data of the problem status classification model during operation, including but not limited to CPU usage, GPU usage, memory usage, and disk I / O usage; The obtained CPU usage, GPU usage, memory usage, and disk I / O usage need to be normalized, and the resource consumption state coefficient is calculated based on the normalized CPU usage, GPU usage, memory usage, and disk I / O usage. , the expression is as follows , where They represent the normalized CPU usage, GPU usage, memory usage, and disk I / O usage, respectively. , , , They represent the maximum acceptable expected values of CPU usage, GPU usage, memory usage, and disk I / O usage, respectively. Respectively The preset scaling factor of Both are greater than 0.
[0009] In a preferred embodiment, the logic for obtaining the abnormal fluctuation coefficient of the number of convolution layers is as follows: Get the convolution layer data set of the problem state classification model when performing convolution operation, and mark the convolution layer data set as , Represents the convolution layer value when the problem state classification model performs the convolution operation for the rth time, r={1,2,...,R}, R is a positive integer; extract the unique convolution layer value from the convolution layer data set to obtain a unique value set , Represents the unique value of the kth convolutional layer value in the convolutional layer data set, k={1,2,...,K}, K is a positive integer; traverse the convolutional layer values in the convolutional layer data set, and count each Number of occurrences ; Calculate the probability of unique values for each convolutional layer value , the expression is as follows ; Calculate the entropy value of the convolution layer , the expression is as follows ; Calculate the abnormal fluctuation coefficient of the number of convolution layers , expressed as follows , where Represents the standard deviation of the convolutional layer values in the convolutional layer data set. The expression is as follows , Represents the average value of the convolution layer in the convolution layer data set. The expression is as follows .
[0010] In a preferred embodiment, the logic for obtaining the user churn rate is as follows: Record the total number of active users within a preset fixed time period ZT and the number of users who stopped using the question status classification model , calculate the user churn rate , the expression is as follows .
[0011] In a preferred embodiment, the acquired model execution time abnormality coefficient, resource consumption state coefficient, convolution layer abnormal fluctuation coefficient, and user churn rate are normalized, and a jamming impact assessment model is constructed based on the normalized model execution time abnormality coefficient, resource consumption state coefficient, convolution layer abnormal fluctuation coefficient, and user churn rate to generate a jamming impact assessment index. The formula for evaluating the impact of lag is as follows: , where They represent the model execution time anomaly coefficient, resource consumption state coefficient, convolution layer abnormal fluctuation coefficient, and preset proportional coefficient of user churn rate, respectively. All are greater than 0; Compare the jam impact assessment index with the preset jam impact assessment index threshold to determine whether the problem status classification model has jam risks, as follows: If the jamming impact assessment index is greater than the jamming impact assessment index threshold, a jamming potential risk signal is generated; if the jamming impact assessment index is less than or equal to the jamming impact assessment index threshold, a model operation stability signal is generated.
[0012] In a preferred embodiment, in step S3, a preset exponential decay strategy is used to obtain the knowledge influence coefficient, as follows: Get the retrieval knowledge set of the user's historical multiple rounds of questions, sort the retrieval knowledge set of historical multiple rounds of questions in chronological order from far to near, and record the earliest round as , the current round is , , L is a positive integer; for the number of rounds , which participates in multiple rounds of knowledge rolling updates Knowledge influence coefficient of round retrieval knowledge set The calculation formula is as follows ; For each round of retrieval of knowledge in the knowledge set, we no longer rely solely on semantic similarity scores, but use the intra-round knowledge importance ranking coefficient based on semantic similarity ranking to evaluate the knowledge. The calculation expression of the knowledge importance ranking coefficient in the round l of retrieval knowledge set is as follows: ,in Indicates The retrieval knowledge set of rounds, Indicates The number of knowledge in the retrieval knowledge set of the round, if the knowledge In the The retrieval knowledge of the round is concentrated, then Representing Knowledge exist Middle ranking; The knowledge influence coefficient and the knowledge importance ranking coefficient within the round are normalized, and the comprehensive ranking value of knowledge is obtained according to the normalized knowledge influence coefficient and the knowledge importance ranking coefficient within the round. The expression for obtaining the value is as follows: ,in It represents the comprehensive ranking value of knowledge, and sorts the knowledge from large to small according to the comprehensive ranking value of knowledge to obtain a knowledge ranking table for display to users.
[0013] In a preferred embodiment, in step S4, when the problem state classification model has a hidden danger of freezing, the preset exponential decay strategy is adaptively modified as follows: Get knowledge zs in the first The frequency of being mentioned in the retrieval knowledge set of the round ; According to the similarity measurement method, the Round Questioning and Current Round Questioning The semantic similarity between ; Put knowledge zs in the The frequency of being mentioned in the retrieval knowledge set of the round and Round Questioning and Current Round Questioning The semantic similarity between As a correction factor for the degree of influence of knowledge The correction function expression is as follows , where represents the modified knowledge influence coefficient, Respectively indicate frequency , semantic similarity The preset scaling factor of Both are greater than 0.
[0014] Technical effects and advantages of the present invention: In a single-round knowledge retrieval, the present invention first determines the state of the problem, and then executes a corresponding retrieval strategy according to the state to obtain a retrieval knowledge set based on the current round of problems, and obtains multiple information of the problem state identification process in the problem state classification model, constructs a jamming impact assessment model, generates a jamming impact assessment index, determines whether the problem state classification model has a jamming risk, timely identifies potential jamming risks, optimizes resource usage, reduces response time, and improves user interaction experience. When the problem state classification model does not have a jamming risk, the single-round retrieval knowledge set is updated with multiple rounds of knowledge rolling, and a preset exponential decay strategy is used to obtain the knowledge influence coefficient and comprehensively sort the knowledge in combination with the knowledge importance ranking coefficient within the round to obtain a knowledge sorting table for display to users, thereby improving the accuracy and efficiency of knowledge retrieval in multi-round dialogue scenarios. By accurately identifying the problem state and combining historical dialogue information, dynamic optimization and updating of the knowledge retrieval set are realized. When the problem state classification model has a jamming risk, the preset exponential decay strategy is adaptively corrected to ensure that key information can still be accurately extracted in a real-time dialogue scenario and reduce the effectiveness loss of historical information. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to facilitate understanding by those skilled in the art, the present invention is further described below in conjunction with the accompanying drawings; Figure 1 Schematic diagram of the structure of the method of the embodiment of the present invention. DETAILED DESCRIPTION
[0016] 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.
[0017] Example: Figure 1 The present invention provides a multi-level document retrieval method, comprising the following steps: Step S1, identifying the question state of a single-round question of a user according to a question state classification model based on an SSM convolutional module, obtaining the question state, and adopting different knowledge retrieval strategies according to the question state to obtain a single-round retrieval knowledge set corresponding to the question state; Step S2, obtaining multiple information of the problem state classification model for the problem state identification process, constructing a jamming impact assessment model, generating a jamming impact assessment index, and determining whether the problem state classification model has a jamming risk; Step S3: when the problem status classification model does not have the risk of freezing, multiple rounds of knowledge rolling updates are performed on the single-round retrieval knowledge set, a preset exponential decay strategy is used to obtain the knowledge influence coefficient, and the knowledge is comprehensively ranked in combination with the knowledge importance ranking coefficient within the round to obtain a knowledge ranking table for display to the user; Step S4, when the problem state classification model has a hidden danger of freezing, adaptively correct the preset exponential decay strategy; Step S1, identifying the question state of a single-round question of a user according to a question state classification model based on an SSM convolutional module, obtaining the question state, and adopting different knowledge retrieval strategies according to the question state to obtain a single-round retrieval knowledge set corresponding to the question state; First, the text of the user's current question is preprocessed, including removing stop words and punctuation marks to standardize the question text, segment the question text, and convert each word into a corresponding word vector to obtain the semantic vector of the current question. Common word vector generation methods include the context-based word embedding method BERT and the static word embedding method Word2Vec or GloVe. At the same time, the text of the user's historical multi-round questions and the corresponding round of retrieval knowledge set are preprocessed and word segmentation and word vector conversion operations are performed to obtain the semantic vector of the historical multi-round questions and the semantic vector matrix of the retrieval knowledge set respectively; Construct the question text semantic vector matrix based on the semantic vector of the current question and the semantic vector of multiple historical questions ,in Represents the semantic vector of the current round of questions, Represents the semantic vector of historical multi-round questions, where ={1,2,..., }; The question text semantic vector matrix is input into the question SSM convolution module, and the convolution kernel of the question SSM convolution module is used. Convolution is performed on the semantic vector matrix of the question text as follows , where The convolution output feature vector representing the question is used to represent the relationship between the current round of questions and the historical rounds of questions. The convolution kernel By multi-layer state transition matrix ( , , , )composition, is the state transition matrix, which controls how the historical state is associated with the current state. is the input matrix, which indicates how the current question affects the state of the module. and The output matrix controls how the convolution kernel combines the semantic features of each question; The semantic vector matrix of the retrieval knowledge set is input into the retrieval knowledge SSM convolution module, and the convolution kernel of the retrieval knowledge SSM convolution module is used to generate the semantic vector matrix of the retrieval knowledge set. Convolution is performed on the semantic vector matrix of the question text as follows , where The convolution output feature vector representing the retrieved knowledge; The convolution output feature vector extracted from the question SSM convolution module and the retrieval knowledge SSM convolution module is and Perform horizontal splicing to obtain the final output feature vector , the final output feature vector after horizontal splicing is passed to the fully connected layer to obtain the output of the fully connected layer. The function of this layer is to further linearly combine and extract the comprehensive features after splicing. The fully connected layer converts the high-dimensional feature vector into a low-dimensional feature representation through linear transformation: ,in represents the weight matrix of the fully connected layer, is the bias term, is the output of the fully connected layer; The output of the fully connected layer Pass in the Softmax activation function to obtain the probability value of the problem state. The expression is as follows: ,in Indicates that the question asked by the user in the current round belongs to the question state The probability value of , Represents the output of the fully connected layer; The output of the fully connected layer Converted into a probability distribution, the role of Softmax is to convert the output into the probability of three states (M1, M2, M3); Issue Status Indicates new issues of independence; Problem state M2 means it is not independent and is the details of the previous round of problems; Problem state M3 means it is not independent and has intersection with the previous round of problems; According to the probability value output by the Softmax activation function, the status of the question asked by the user in the current round is classified as follows: like > and > , then the question status of the user's current round of questions is marked as M1, the semantic vector of the user's current round of questions is obtained, and the semantic similarity is matched with the semantic vector of the existing knowledge in the knowledge base. The existing knowledge in the knowledge base is sorted from large to small according to the semantic similarity, and the top_k pieces of knowledge are selected as the single-round retrieval knowledge set; It should be noted that the semantic similarity matching with the semantic vectors of existing knowledge in the knowledge base is carried out. Commonly used similarity measurement methods, including cosine similarity and Euclidean distance, can be used to calculate the similarity between the semantic vector of the user's question and the semantic vector of each knowledge in the knowledge base, which will not be elaborated here; like > and > , then the question status of the user's current round is marked as M2, and the retrieval knowledge set of the previous round of questions is directly used as the single-round retrieval knowledge set of the current round; like > and > , then the question status of the user's current round of questions is marked as M3, the previous round of questions are concatenated with the current round of questions, the semantic vector of the concatenated text is obtained, and then the semantic similarity is matched with the semantic vector of the existing knowledge in the knowledge base, and the existing knowledge in the knowledge base is sorted from large to small according to the semantic similarity, and the top_k pieces of knowledge are selected as the single-round retrieval knowledge set; Step S2, obtaining multiple information of the problem state classification model for the problem state identification process, constructing a jamming impact assessment model, generating a jamming impact assessment index, and determining whether the problem state classification model has a jamming risk; The multiple pieces of information in the problem state identification process include model execution time abnormality coefficient, resource consumption state coefficient, convolution layer abnormal fluctuation coefficient, and user churn rate; The model execution time anomaly coefficient is used to measure the degree of deviation between the time required for the problem status classification model to classify the problem status of each user question and the expected execution time. By evaluating the execution reasoning time of the model under different circumstances, it is possible to determine whether its execution efficiency is stable and whether there is a potential risk of jamming. It mainly reflects the difference between the actual execution reasoning time and the expected execution reasoning time. When the model execution reasoning time is significantly higher or lower than the expected value, the system may cause response delays or efficiency abnormalities due to insufficient computing resources, excessive model complexity, sudden increase in data volume, etc. By obtaining the model execution time anomaly coefficient, an early warning can be issued when the model execution reasoning time is abnormal, and further resource optimization or model adjustment measures can be taken; the larger the model execution time anomaly coefficient, the higher the probability that the problem status classification model has a hidden danger of jamming; The logic for obtaining the model execution time anomaly coefficient is as follows: Get the execution inference time of the question status classification model for each question asked by the user , g represents the number of times the user asks a question, g={1,2,...,G}, G is a positive integer; Calculate the average execution time , the expression is as follows , calculate the standard deviation of the execution reasoning time based on the average execution reasoning time , the expression is as follows ; Compare each execution reasoning time with the execution reasoning time standard deviation, and mark the execution reasoning time as abnormal. When the execution reasoning time is greater than or equal to the execution reasoning time standard deviation, the execution reasoning time greater than or equal to the execution reasoning time standard deviation is marked as abnormal execution reasoning time. Calculate the model execution time anomaly coefficient , the expression is as follows , where represents the execution reasoning time of the hth exception, h={1,2,...,H}, H is a positive integer; The resource consumption state coefficient is used to measure the difference and pressure between the computing resources consumed by the problem state classification model during operation and the available resources. It mainly reflects whether the CPU / GPU usage rate, memory usage and other resources consumed by the model have reached the system's tolerance limit when reasoning and processing user questions, and evaluates whether the model has hidden dangers of jamming due to resource overload. When the resource consumption state coefficient is higher, it indicates that the difference between the computing resources consumed by the problem state classification model during operation and the available resources is smaller, the pressure is greater, and the probability of jamming in the problem state classification model is higher; The logic for obtaining the resource consumption status coefficient is as follows: Obtain resource consumption data of the problem status classification model during operation, including but not limited to CPU usage, GPU usage, memory usage, and disk I / O usage; It should be noted that resource consumption data can be obtained in real time through performance monitoring tools such as top, Prometheus, and Grafana. These tools can provide detailed information about resource consumption. Normalize the obtained CPU usage, GPU usage, memory usage, and disk I / O usage, and calculate the resource consumption state coefficient based on the normalized CPU usage, GPU usage, memory usage, and disk I / O usage , the expression is as follows , where They represent the normalized CPU usage, GPU usage, memory usage, and disk I / O usage, respectively. , , , They represent the maximum acceptable expected values of CPU usage, GPU usage, memory usage, and disk I / O usage, respectively. Respectively The preset scaling factor of All are greater than 0; It should be noted that Set it according to the actual situation. For example, adopt the expert empowerment method, that is, invite experts in related fields to determine the preset proportion coefficients of various indicators through professional opinion surveys and comprehensive evaluations; The abnormal fluctuation coefficient of the number of convolution layers is used to measure the abnormal fluctuation degree of the number of convolution layers when the problem state classification model performs convolution operations. By obtaining the abnormal fluctuation coefficient of the number of convolution layers, the impact of the abnormal fluctuation of the number of convolution layers on the running performance of the problem state classification model can be identified in time, thereby providing constructive suggestions for optimizing the problem state classification model. The larger the abnormal fluctuation coefficient of the number of convolution layers, the greater the abnormal fluctuation degree of the number of convolution layers when the problem state classification model performs convolution operations, the deeper the impact on the running performance of the problem state classification model, and the higher the probability that the problem state classification model has hidden dangers of jamming; The logic for obtaining the abnormal fluctuation coefficient of the number of convolution layers is as follows: Get the convolution layer data set of the problem state classification model when performing convolution operation, and mark the convolution layer data set as , Represents the convolution layer value when the problem state classification model performs the convolution operation for the rth time, r={1,2,...,R}, R is a positive integer; extract the unique convolution layer value from the convolution layer data set to obtain a unique value set , Represents the unique value of the kth convolutional layer value in the convolutional layer data set, k={1,2,...,K}, K is a positive integer; traverse the convolutional layer values in the convolutional layer data set, and count each Number of occurrences ; Calculate the probability of unique values for each convolutional layer value , the expression is as follows ; Calculate the entropy value of the convolution layer , the expression is as follows ; The entropy value of the number of convolutional layers is used to measure the complexity and uncertainty of changes in the problem state classification model, reflecting the degree of fluctuation of the number of convolutional layers, and is used to evaluate the impact of these fluctuations on the performance of the problem state classification model. If the entropy value is large, it means that there is a significant abnormal fluctuation in the number of convolutional layers, which may affect the stability and performance of the model. The higher the probability that the problem state classification model has hidden dangers of jamming; Calculate the abnormal fluctuation coefficient of the number of convolution layers , expressed as follows , where Represents the standard deviation of the convolutional layer values in the convolutional layer data set. The expression is as follows , Represents the average value of the convolution layer in the convolution layer data set. The expression is as follows ; The user churn rate is used to measure the proportion of users who stop using the problem status classification model within a certain period of time. This indicator reflects the user's satisfaction with the performance and response speed of the problem status classification model, as well as the attractiveness and reliability of the problem status classification model in the user interaction process. A high user churn rate may indicate that the problem status classification model has different degrees of lag risks; The logic for obtaining the user churn rate is as follows: Record the total number of active users within a preset fixed time period ZT and the number of users who stopped using the question status classification model , calculate the user churn rate , the expression is as follows ; It should be noted that the preset fixed time period can be set by a person skilled in the art according to the user's usage habits and interaction frequency, as well as reference historical data and the performance benchmark of the problem status classification model to set an expected time period; The obtained model execution time abnormality coefficient, resource consumption state coefficient, convolution layer abnormal fluctuation coefficient, and user churn rate are normalized, and a jamming impact assessment model is constructed based on the normalized model execution time abnormality coefficient, resource consumption state coefficient, convolution layer abnormal fluctuation coefficient, and user churn rate to generate a jamming impact assessment index. The formula for evaluating the impact of lag is as follows: , where They represent the model execution time anomaly coefficient, resource consumption state coefficient, convolution layer abnormal fluctuation coefficient, and preset proportional coefficient of user churn rate, respectively. All are greater than 0; It should be noted that Set it according to the actual situation. For example, adopt the expert empowerment method, that is, invite experts in relevant fields to determine the preset proportion coefficients of various indicators through professional opinion surveys and comprehensive evaluations; From the above calculation expression, it can be seen that the larger the model execution time abnormality coefficient, the larger the resource consumption state coefficient, the larger the abnormal fluctuation coefficient of the number of convolution layers, and the larger the user churn rate, the larger the jamming impact assessment index, indicating that the probability of the problem state classification model having jamming hidden dangers is higher. Conversely, the smaller the model execution time abnormality coefficient, the smaller the resource consumption state coefficient, the smaller the abnormal fluctuation coefficient of the number of convolution layers, and the smaller the user churn rate, the smaller the jamming impact assessment index, indicating that the probability of the problem state classification model having jamming hidden dangers is lower. Compare the jam impact assessment index with the preset jam impact assessment index threshold to determine whether the problem status classification model has jam risks, as follows: If the jamming impact assessment index is greater than the jamming impact assessment index threshold, it indicates that the problem state classification model has jamming risks, and a jamming risk signal is generated; if the jamming impact assessment index is less than or equal to the jamming impact assessment index threshold, it indicates that the problem state classification model does not have obvious jamming risks, and a model operation stability signal is generated; Step S3: when the problem status classification model does not have the risk of freezing, multiple rounds of knowledge rolling updates are performed on the single-round retrieval knowledge set, a preset exponential decay strategy is used to obtain the knowledge influence coefficient, and the knowledge is comprehensively ranked in combination with the knowledge importance ranking coefficient within the round to obtain a knowledge ranking table for display to the user; The preset exponential decay strategy is used to obtain the knowledge influence coefficient, as follows: Get the retrieval knowledge set of the user's historical multiple rounds of questions, sort the retrieval knowledge set of historical multiple rounds of questions in chronological order from far to near, and record the earliest round as , the current round is , , L is a positive integer; for the number of rounds , which participates in multiple rounds of knowledge rolling updates Knowledge influence coefficient of round retrieval knowledge set The calculation formula is as follows ; For each round of retrieval of knowledge in the knowledge set, we no longer rely solely on semantic similarity scores, but use the intra-round knowledge importance ranking coefficient based on semantic similarity ranking to evaluate the knowledge. The calculation expression of the knowledge importance ranking coefficient in the round l of retrieval knowledge set is as follows: ,in Indicates The retrieval knowledge set of rounds, Indicates The number of knowledge in the retrieval knowledge set of the round, if the knowledge In the The retrieval knowledge of the round is concentrated, then Representing Knowledge exist Middle ranking; The knowledge influence coefficient and the knowledge importance ranking coefficient within the round are normalized, and the comprehensive ranking value of knowledge is obtained according to the normalized knowledge influence coefficient and the knowledge importance ranking coefficient within the round. The expression for obtaining the value is as follows: ,in Indicates the comprehensive ranking value of knowledge, and sorts the knowledge from large to small according to the comprehensive ranking value of knowledge to obtain a knowledge ranking table for display to users; Step S4: When the problem state classification model has a hidden danger of freezing, the preset exponential decay strategy is adaptively modified as follows: Get knowledge zs in the The frequency of being mentioned in the retrieval knowledge set of the round ; According to the similarity measurement method, the Round Questioning and Current Round Questioning The semantic similarity between ; It should be noted that commonly used similarity measurement methods include cosine similarity, Euclidean distance, etc. This application uses the cosine similarity calculation method as an implementation method to calculate the first Round Questioning and Current Round Questioning The semantic similarity between , its calculation expression is as follows , where Indicates Semantic vector representation of the round question, Indicates the current round of questions The semantic vector representation of express and The dot product operation, Indicates The Euclidean norm of the semantic vector of the question, Indicates the current round of questions The Euclidean norm of the semantic vector of ; Put knowledge zs in the The frequency of being mentioned in the retrieval knowledge set of the round and Round Questioning and Current Round Questioning The semantic similarity between As a correction factor for the degree of influence of knowledge The correction function expression is as follows , where represents the modified knowledge influence coefficient, Respectively indicate frequency , semantic similarity The preset scaling factor of All are greater than 0; It should be noted that according to the frequency , semantic similarity right Before making corrections, the frequency , semantic similarity Normalization is performed. Common normalization methods include Min-Max normalization, Z-Score normalization, etc. Set it according to the actual situation, which will not be elaborated here; In a single-round knowledge retrieval, the present invention first determines the state of the problem, and then executes a corresponding retrieval strategy according to the state to obtain a retrieval knowledge set based on the current round of problems, and obtains multiple information of the problem state identification process in the problem state classification model, constructs a jamming impact assessment model, generates a jamming impact assessment index, determines whether the problem state classification model has a jamming risk, timely identifies potential jamming risks, optimizes resource usage, reduces response time, and improves user interaction experience. When the problem state classification model does not have a jamming risk, the single-round retrieval knowledge set is updated with multiple rounds of knowledge rolling, and a preset exponential decay strategy is used to obtain the knowledge influence coefficient and comprehensively sort the knowledge in combination with the knowledge importance ranking coefficient within the round to obtain a knowledge sorting table for display to the user, thereby improving the accuracy and efficiency of knowledge retrieval in a multi-round dialogue scenario. By accurately identifying the problem state and combining historical dialogue information, dynamic optimization and updating of the knowledge retrieval set are realized. When the problem state classification model has a jamming risk, the preset exponential decay strategy is adaptively corrected to ensure that key information can still be accurately extracted in a real-time dialogue scenario and reduce the effectiveness loss of historical information. The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters in the formula are set by technicians in this field according to actual conditions.
[0018] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0019] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A multi-level document retrieval method, characterized in that: The steps include: Step S1, identifying the question state of a single-round question of a user according to a question state classification model based on an SSM convolutional module, obtaining the question state, and adopting different knowledge retrieval strategies according to the question state to obtain a single-round retrieval knowledge set corresponding to the question state; Step S2, obtaining multiple information of the problem state classification model for the problem state identification process, constructing a jamming impact assessment model, generating a jamming impact assessment index, and determining whether the problem state classification model has a jamming risk; Step S3: when the problem status classification model does not have the risk of freezing, multiple rounds of knowledge rolling updates are performed on the single-round retrieval knowledge set, a preset exponential decay strategy is used to obtain the knowledge influence coefficient, and the knowledge is comprehensively ranked in combination with the knowledge importance ranking coefficient within the round to obtain a knowledge ranking table for display to the user; Step S4, when the problem state classification model has a hidden danger of freezing, adaptively correct the preset exponential decay strategy; In step S3, a preset exponential decay strategy is used to obtain the knowledge influence coefficient, as follows: Get the retrieval knowledge set of the user's historical multiple rounds of questions, sort the retrieval knowledge set of historical multiple rounds of questions in chronological order from far to near, and record the earliest round as , the current round is , , L is a positive integer; for the number of rounds , which participates in multiple rounds of knowledge rolling updates Knowledge influence coefficient of round retrieval knowledge set The calculation formula is as follows .
2. A multi-level document retrieval method according to claim 1, characterized in that: In step S1, the text of the user's current round of questions is first preprocessed, the question text is segmented, and each word is converted into a corresponding word vector to obtain the semantic vector of the current round of questions; at the same time, the text of the user's historical multiple rounds of questions and the corresponding round of retrieval knowledge set are preprocessed and segmented to convert into word vectors, respectively obtaining the semantic vectors of the historical multiple rounds of questions and the semantic vector matrix of the retrieval knowledge set; Based on the semantic vector of the current round of questions and the semantic vectors of multiple rounds of questions in the past, a question text semantic vector matrix is constructed, and the question text semantic vector matrix is input into the question SSM convolution module, and the question text semantic vector matrix is convolved according to the convolution kernel of the question SSM convolution module; The semantic vector matrix of the retrieval knowledge set is input into the retrieval knowledge SSM convolution module, and the semantic vector matrix of the question text is convolved according to the convolution kernel of the retrieval knowledge SSM convolution module; The convolution output feature vectors extracted from the question SSM convolution module and the retrieval knowledge SSM convolution module are horizontally spliced to obtain the final output feature vector, and the final output feature vector after horizontal splicing is passed to the fully connected layer to obtain the fully connected layer output; The output of the fully connected layer is passed into the Softmax activation function to obtain the probability value of the problem state. The expression is as follows: ,in Indicates that the question asked by the user in the current round belongs to the question state The probability value of , Represents the output of the fully connected layer; Issue Status Indicates new issues of independence; Problem state M2 means it is not independent and is the details of the previous round of problems; Problem state M3 means it is not independent and has intersection with the previous round of problems; According to the probability value output by the Softmax activation function, the status of the question asked by the user in the current round is classified as follows: like > and > , then mark the question status of the user's current round of questions as M1, obtain the semantic vector of the user's current round of questions, and match the semantic vectors of the existing knowledge in the knowledge base for semantic similarity. According to the semantic similarity, sort the existing knowledge in the knowledge base from large to small, and select the top_k pieces of knowledge as the single-round retrieval knowledge set; like > and > , then the question status of the user's current round is marked as M2, and the retrieval knowledge set of the previous round of questions is directly used as the single-round retrieval knowledge set of the current round; like > and > , then the question status of the user's current round of questions is marked as M3, the previous round of questions are concatenated with the current round of questions, the semantic vector of the concatenated text is obtained, and then the semantic similarity is matched with the semantic vector of the existing knowledge in the knowledge base. The existing knowledge in the knowledge base is sorted from large to small according to the semantic similarity, and the top_k pieces of knowledge are selected as the single-round retrieval knowledge set.
3. A multi-level document retrieval method according to claim 1, characterized in that: In step S2, the multiple pieces of information of the problem status identification process include the model execution time abnormality coefficient, the resource consumption status coefficient, the convolution layer abnormal fluctuation coefficient, and the user churn rate.
4. A multi-level document retrieval method according to claim 3, characterized in that: The logic for obtaining the model execution time anomaly coefficient is as follows: Get the execution inference time of the question status classification model for each question asked by the user , g represents the number of times the user asks a question, g={1,2,...,G}, G is a positive integer; Calculate the average execution time , the expression is as follows , calculate the standard deviation of the execution reasoning time based on the average execution reasoning time , the expression is as follows ; Compare each execution reasoning time with the execution reasoning time standard deviation, and mark the execution reasoning time as abnormal. When the execution reasoning time is greater than or equal to the execution reasoning time standard deviation, the execution reasoning time greater than or equal to the execution reasoning time standard deviation is marked as abnormal execution reasoning time. Calculate the model execution time anomaly coefficient , the expression is as follows , where represents the execution reasoning time of the hth exception, h={1,2,...,H}, where H is a positive integer.
5. A multi-level document retrieval method according to claim 3, characterized in that: The logic for obtaining the resource consumption status coefficient is as follows: Obtain resource consumption data of the problem status classification model during operation, including but not limited to CPU usage, GPU usage, memory usage, and disk I / O usage; The obtained CPU usage, GPU usage, memory usage, and disk I / O usage need to be normalized, and the resource consumption state coefficient is calculated based on the normalized CPU usage, GPU usage, memory usage, and disk I / O usage. , the expression is as follows , where They represent the normalized CPU usage, GPU usage, memory usage, and disk I / O usage, respectively. , , , They represent the maximum acceptable expected values of CPU usage, GPU usage, memory usage, and disk I / O usage, respectively. Respectively The preset scaling factor of Both are greater than 0.
6. A multi-level document retrieval method according to claim 3, characterized in that: The logic for obtaining the abnormal fluctuation coefficient of the number of convolution layers is as follows: Get the convolution layer data set of the problem state classification model when performing convolution operation, and mark the convolution layer data set as , Represents the convolution layer value when the problem state classification model performs the convolution operation for the rth time, r={1,2,...,R}, R is a positive integer; extract the unique convolution layer value from the convolution layer data set to obtain a unique value set , Represents the unique value of the kth convolutional layer value in the convolutional layer data set, k={1,2,...,K}, K is a positive integer; traverse the convolutional layer values in the convolutional layer data set, and count each Number of occurrences ; Calculate the probability of unique values for each convolutional layer value , the expression is as follows ; Calculate the entropy value of the convolution layer , the expression is as follows ; Calculate the abnormal fluctuation coefficient of the number of convolution layers , expressed as follows , where Represents the standard deviation of the convolutional layer values in the convolutional layer data set. The expression is as follows , Represents the average value of the convolution layer in the convolution layer data set. The expression is as follows .
7. A multi-level document retrieval method according to claim 3, characterized in that: The logic for obtaining the user churn rate is as follows: Record the total number of active users within a preset fixed time period ZT and the number of users who stopped using the question status classification model , calculate the user churn rate , the expression is as follows .
8. A multi-level document retrieval method according to claim 3, characterized in that: The obtained model execution time abnormality coefficient, resource consumption state coefficient, convolution layer abnormal fluctuation coefficient, and user churn rate are normalized, and a jamming impact assessment model is constructed based on the normalized model execution time abnormality coefficient, resource consumption state coefficient, convolution layer abnormal fluctuation coefficient, and user churn rate to generate a jamming impact assessment index. The formula for evaluating the impact of lag is as follows: , where They represent the model execution time anomaly coefficient, resource consumption state coefficient, convolution layer abnormal fluctuation coefficient, and preset proportional coefficient of user churn rate, respectively. All are greater than 0; Compare the jam impact assessment index with the preset jam impact assessment index threshold to determine whether the problem status classification model has jam risks, as follows: If the jamming impact assessment index is greater than the jamming impact assessment index threshold, a jamming potential risk signal is generated; if the jamming impact assessment index is less than or equal to the jamming impact assessment index threshold, a model operation stability signal is generated.
9. A multi-level document retrieval method according to claim 1, characterized in that: For each round of retrieval of knowledge in the knowledge set, we no longer rely solely on semantic similarity scores, but use the intra-round knowledge importance ranking coefficient based on semantic similarity ranking to evaluate the knowledge. The calculation expression of the knowledge importance ranking coefficient in the round l of retrieval knowledge set is as follows: ,in Indicates The retrieval knowledge set of rounds, Indicates The number of knowledge in the retrieval knowledge set of the round, if the knowledge In the The retrieval knowledge of the round is concentrated, then Representing Knowledge exist Middle ranking; The knowledge influence coefficient and the knowledge importance ranking coefficient within the round are normalized, and the comprehensive ranking value of knowledge is obtained according to the normalized knowledge influence coefficient and the knowledge importance ranking coefficient within the round. The expression for obtaining the value is as follows: ,in It represents the comprehensive ranking value of knowledge, and sorts the knowledge from large to small according to the comprehensive ranking value of knowledge to obtain a knowledge ranking table for display to users.
10. A multi-level document retrieval method according to claim 1, characterized in that: In step S4, when the problem state classification model has a hidden danger of freezing, the preset exponential decay strategy is adaptively modified as follows: Get knowledge zs in the first The frequency of being mentioned in the retrieval knowledge set of the round ; According to the similarity measurement method, the Round Questioning and Current Round Questioning The semantic similarity between ; Put knowledge zs in the The frequency of being mentioned in the retrieval knowledge set of the round and Round Questioning and Current Round Questioning The semantic similarity between As a correction factor for the degree of influence of knowledge The correction function expression is as follows , where represents the modified knowledge influence coefficient, Respectively indicate frequency , semantic similarity The preset scaling factor of Both are greater than 0.
Citation Information
Patent Citations
Machine reading understanding method for guiding attention based on knowledge
CN111241807A
Method and system for detecting abnormal operation state of gateway electric energy metering device
CN116819423A
Power system data tampering attack detection method and system
CN118503973A
Service knowledge base management system and method based on knowledge big model
CN118917390A
3D exhibition hall effect visual experience platform
CN119027624A