Artificial intelligence-based retrieval methods, devices, electronic equipment, and storage media
By using structured parsing and multi-vector matching, user queries are decomposed into multiple sub-intent vectors. Orthogonal perturbations and structure-sensitive weights are introduced to solve the problems of insufficient recall and decreased relevance of search results in existing technologies, and achieve high-quality multi-scenario search results.
Patent Information
- Application Number
- CN202511483678.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-17
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2045-10-17
AI Technical Summary
Existing technologies struggle to effectively decompose and model the multi-dimensional intent of users' complex queries, resulting in insufficient recall and decreased relevance of search results, and unstable performance across multiple scenarios.
By employing an AI-based approach, multiple sub-intent vectors are generated through structured parsing and completion of user queries. Orthogonal perturbations and structure-sensitive weights are introduced to perform multi-vector matching and ranking fusion, thereby achieving refined expression and high-quality retrieval of complex queries.
It enables refined expression and high-quality retrieval of complex queries, and is suitable for e-commerce search, intelligent question answering and professional knowledge base retrieval. It solves the problems of insufficient intent coverage, weight imbalance and opaque structure, and improves the accuracy and consistency of retrieval results.
Smart Images

Figure CN120950630B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of artificial intelligence technology, and particularly relates to retrieval methods, devices, electronic devices and storage media based on artificial intelligence. Background Technology
[0002] As information retrieval needs become increasingly diverse, user queries are no longer singular targets but rather complex expressions encompassing multiple attributes and conditions, such as natural language queries that simultaneously include time, purpose, function, and object. Traditional keyword-based or overall semantic vector-based retrieval methods typically simplify these queries into a single representation, failing to capture the user's complete, multi-dimensional intent, leading to insufficient recall or decreased relevance of search results. While existing deep learning-based semantic retrieval methods can map queries and documents uniformly to a vector space for similarity calculation, the lack of sub-intent-level modeling often means they only capture the dominant semantics, neglecting other implicit conditions and failing to meet the needs of complex query scenarios.
[0003] Furthermore, current matching mechanisms are mostly based on single-vector to document similarity calculations, making it difficult to distinguish and utilize the collaborative relationships between multiple semantic units within a query. This can easily lead to score imbalances or over-reliance on partial intents. Even when some systems introduce weighted fusion strategies, they often only perform simple weighting during the ranking stage, failing to achieve structured control throughout the entire process from modeling and matching to ranking. In addition, different scenarios (such as e-commerce retrieval, legal and regulatory retrieval, and intelligent question answering) have different requirements for semantic interpretation and intent structure, making it difficult for existing solutions to maintain stable and controllable performance across multiple scenarios.
[0004] Therefore, how to achieve structured decomposition of queries, independent modeling of sub-intents, multi-vector matching of documents, and final structured ranking and fusion during the retrieval process has become a key issue that current intelligent semantic retrieval systems urgently need to overcome. Summary of the Invention
[0005] The purpose of this invention is to design an artificial intelligence-based retrieval method, device, electronic device, and storage medium. It introduces structured control methods throughout the entire chain from query parsing, semantic encoding, matching modeling to result ranking, and realizes the fine expression of complex queries and high-quality retrieval output. It is especially suitable for scenarios with high requirements for multi-condition combination retrieval, such as e-commerce search, intelligent question answering, and professional knowledge base retrieval. It overcomes the shortcomings of existing methods in terms of insufficient intent coverage, weight imbalance, and structural opacity.
[0006] To achieve the above objectives, a retrieval method based on artificial intelligence is provided in the first aspect of the present invention, the method comprising the following steps:
[0007] S1. Obtain the original query data input by the user;
[0008] S2. The original query data is cleaned by characters and the phrases are initially segmented based on grammar rules to obtain a preliminary phrase set. The preliminary phrase set is input into a pre-built bidirectional gated loop model, which outputs the probability that the corresponding phrase is identified as a sub-intent. Phrases with a probability greater than a set threshold are extracted as preliminary sub-intent fragments. The preliminary sub-intent fragments are completed to obtain a sub-intent expression set and the sequential index of each completed sub-intent in the original query data.
[0009] S3. Input the set of sub-intent expressions into the sub-word embedding model to generate corresponding sub-intent vectors, and perform orthogonal perturbation on the sub-intent vectors with similarity greater than a preset threshold to obtain a set of sub-intent semantic vectors and a sequential index;
[0010] S4. Obtain candidate documents, calculate the point-to-point similarity response between the sub-intent semantic vector set and the candidate documents using cosine similarity, obtain the sub-intent document matching matrix, and calculate the aggregate matching score between the current document and the entire sub-intent set based on the sub-intent document matching matrix.
[0011] S5. Combine the aggregated matching scores of all the documents with the entire sub-intent set and the final ranking score of the sub-intent document matching matrix, and sort the candidate documents in descending order according to the final ranking score. Output the top K search results and the corresponding candidate document sub-intent document matching vector and ranking score.
[0012] Furthermore, the character cleaning step involves removing unrecognizable characters and redundant punctuation.
[0013] The grammatical rules mentioned above are verb phrases, prepositional phrases, and subject-verb-object boundaries;
[0014] The step of inputting the initial phrase set into a pre-constructed bidirectional gated recurrent model and outputting the probability that the corresponding phrase is identified as a sub-intention specifically includes:
[0015] Obtain the semantic representation of the preliminary phrase set in the gated structure model. The input is the word vector sequence of the current phrase, and the word vector dimension is set to 128.
[0016] The linear mapping function represents the semantics as a label score, and then the normalized exponential function is used to calculate the binary classification probability to determine whether the phrase belongs to a sub-intent segment, and output the probability that the current phrase is identified as a sub-intent;
[0017] The completion of the preliminary sub-intention fragment specifically includes:
[0018] For each sub-intent in the initial sub-intent fragment, each sub-intent is input to the word completion module based on the context prediction structure. The word completion module introduces a position masking marker in the fragment and predicts the most likely completion phrase at that position through the context to generate a completed sub-intent with a completed expression.
[0019] Furthermore, S2 also includes:
[0020] When completing the preliminary sub-intent fragment, a semantic consistency judgment mechanism is also introduced. The semantic consistency judgment mechanism judges the semantic offset between the completed expression and the original expression based on vector similarity. If the semantic offset is greater than 0.4, it is determined that the completion result deviates from the original meaning, and the sub-intent of the preliminary sub-intent fragment is used to replace the completed content. Otherwise, the semantic vector of the completed sub-intent is used as the final sub-intent expression, and the completed sub-intent and the sub-intent expression set are generated.
[0021] Furthermore, S3 specifically includes:
[0022] Obtain the set of sub-intent expressions and their corresponding order indices;
[0023] Each complete sub-intent of the sub-intent expression set is input into the sub-word embedding model and mapped to an embedding sequence of no more than 10 characters in length. The embedding sequence is then input into a multi-head attention structure and then into a gated recurrent unit to integrate contextual information and output a context fusion vector.
[0024] The context fusion vector is encoded and enhanced to obtain a sub-intent vector;
[0025] Construct sub-intent vectors for all completed sub-intents, and then calculate the similarity between pairs of sub-intent vectors; if a pair of vectors has a similarity greater than a preset threshold, perform angular orthogonal perturbation on it, and finally generate a set of sub-intent semantic vectors.
[0026] Furthermore, the encoding enhancement of the context fusion vector is calculated based on the local semantic center of the current query, the cosine similarity between the local semantic center of the current query and the center vector, and the context fusion vector.
[0027] Furthermore, including:
[0028] Retrieve candidate documents;
[0029] For any candidate document, the system calculates the similarity between the candidate document and all sub-intent vectors to obtain the point-to-point similarity response between the current document and the i-th sub-intent.
[0030] A sub-intent document matching matrix is constructed based on the point-to-point similarity response to represent the point-to-point similarity response between the current candidate document and all sub-intents;
[0031] Based on the point-to-point similarity response between the current candidate document and the i-th sub-intent and the point-to-point similarity response between the current candidate document and the k-th sub-intent, combined with the... With the The aggregation matching score is calculated using the inter-intent collaboration distance tensor and structure-sensitive weights between sub-intents; the structure-sensitive weights are calculated based on the sequential index.
[0032] Further, S5 includes:
[0033] The response balance of each candidate document is calculated based on the point-to-point similarity response between the current document and the i-th sub-intent, combined with the average similarity response level.
[0034] The final ranking score is calculated by combining the response balance and the aggregated matching score.
[0035] The candidate documents are sorted in descending order according to the final sorting score, and the top K search results, along with the sub-intent document matching vectors and sorting scores of the corresponding candidate documents, are output.
[0036] A second aspect of the invention provides a control device comprising:
[0037] The query data acquisition module is used to acquire the raw query data input by the user;
[0038] The query data analysis module is used to clean the characters of the original query data and perform initial phrase segmentation based on grammar rules to obtain a preliminary phrase set. The preliminary phrase set is input into a pre-constructed bidirectional gated loop model, which outputs the probability that the corresponding phrase is identified as a sub-intent. Phrases with a probability greater than a set threshold are extracted as preliminary sub-intent fragments. The preliminary sub-intent fragments are completed to obtain a sub-intent expression set and the sequential index of each completed sub-intent in the original query data.
[0039] The sub-intent generation module is used to input the sub-intent expression set into the sub-word embedding model to generate corresponding sub-intent vectors, and to perform orthogonal perturbation on sub-intent vectors with similarity greater than a preset threshold to obtain a set of sub-intent semantic vectors and a sequence index.
[0040] The sub-intent matching module is used to obtain candidate documents, calculate the point-to-point similarity response between the sub-intent semantic vector set and the candidate documents using cosine similarity, obtain the sub-intent document matching matrix, and calculate the aggregate matching score between the current document and the entire sub-intent set based on the sub-intent document matching matrix.
[0041] The retrieval output module is used to combine the aggregated matching scores of all the documents with the entire sub-intent set and the final ranking score of the sub-intent document matching matrix, and sort the candidate documents in descending order according to the final ranking score, and output the top K retrieval results and the corresponding candidate document sub-intent document matching vector and ranking score.
[0042] A third aspect of the present invention provides an electronic device comprising:
[0043] A memory and a processor, wherein the memory stores a computer program that, when executed by the processor, performs any of the aforementioned retrieval methods.
[0044] In a fourth aspect, the invention provides a storage medium storing a computer program that can be executed by one or more processors and can be used to implement the retrieval method described in any of the preceding claims.
[0045] The beneficial technical effects of the present invention are at least as follows:
[0046] This invention proposes a semantic retrieval method and system for multiple sub-intents to address the aforementioned problems. First, through structured parsing and completion, the user query is decomposed into multiple sub-intent units, preventing the overall representation from obscuring multidimensional needs. Then, each sub-intent is uniformly encoded and its expression enhanced, introducing a center attraction and similarity suppression mechanism to ensure both semantic consistency and expressive diversity. In the document matching stage, a multi-sub-vector driven matching strategy is adopted, combined with structure-sensitive weights and redundancy penalty terms, to perform fine-grained modeling of the response relationship between documents and sub-intents, effectively solving the problems of insufficient multi-intent collaboration and duplicate scoring in traditional methods. In the ranking stage, this invention designs a fusion mechanism based on the sub-intent response balance, relying not only on the overall document score but also introducing sub-intent coverage to regulate the final ranking, ensuring that the results more comprehensively cover the user's query intent.
[0047] This invention introduces structured control methods across the entire chain from query parsing, semantic encoding, matching modeling to result ranking, enabling refined expression of complex queries and high-quality retrieval output. It is particularly suitable for scenarios with high requirements for multi-condition combination retrieval, such as e-commerce search, intelligent question answering, and professional knowledge base retrieval, and overcomes the shortcomings of existing methods in terms of insufficient intent coverage, weight imbalance, and structural opacity. Attached Figure Description
[0048] The present invention will be further described with reference to the accompanying drawings, but the embodiments in the drawings do not constitute any limitation on the present invention. For those skilled in the art, other drawings can be obtained based on the following drawings without creative effort.
[0049] Figure 1 This is a flowchart of the artificial intelligence-based retrieval method of the present invention.
[0050] Figure 2 This is a framework diagram of an interactive control device according to the present invention.
[0051] Figure 3 This is a schematic diagram of an electronic device according to the present invention. Detailed Implementation
[0052] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0053] In one or more embodiments, such as Figure 1 As shown, an artificial intelligence-based retrieval method is disclosed, which includes the following steps S1-S5:
[0054] S1. Obtain the raw query data input by the user.
[0055] Specifically, query data originates from end-user natural language input, often characterized by complex syntactic structures, severe semantic compression, and complex intent expressions. For example, the query "Recommend waterproof shoes suitable for autumn commuting" implicitly contains multiple semantic dimensions such as time (season), purpose, function, and item category. If encoded as a whole, it is highly susceptible to problems such as vector aliasing and semantic distortion. Therefore, it is essential to perform structured decomposition and expression enhancement of the query before model encoding.
[0056] S2. Clean the original query data by characters and perform initial phrase segmentation based on grammar rules to obtain a preliminary phrase set; input the preliminary phrase set into a pre-built bidirectional gated loop model, output the probability that the corresponding phrase is identified as a sub-intent, and extract the phrases with a probability greater than a set threshold as preliminary sub-intent fragments, complete the preliminary sub-intent fragments, and obtain a sub-intent expression set and the sequential index of each completed sub-intent in the original query data.
[0057] Specifically, let the queried data be denoted as This is data in string format, with a maximum length of 128 characters, passed in from the front-end input interface (e.g., search box, speech recognition and conversion module). The system first processes... Basic character cleaning is performed to remove unrecognizable characters and redundant punctuation, and then the process proceeds to structured parsing.
[0058] Furthermore, structured parsing comprises two core processes: first, initial phrase segmentation based on grammatical rules; and second, sub-intent recognition based on a lightweight discriminative model. In the first stage, the system uses the dependency parsing module to process the query. Grammatical segmentation is performed, and a preliminary phrase set is generated based on grammatical rules such as verb phrases, prepositional phrases, and subject-verb-object boundaries. For example, after segmenting "Recommend waterproof shoes suitable for autumn commuting", the possible phrase sequence is: ["Recommend", "Suitable for autumn", "Commuting", "Waterproof shoes"].
[0059] The next stage is sub-intent recognition. This stage uses a one-layer bidirectional gated loop structure model to encode each phrase and determine whether it can exist independently as a sub-intent. Let... For the first The semantic representation of a phrase in a gated structure model is given by inputting a sequence of word vectors for that phrase, with a word vector dimension of 128. We use a linear mapping function to map these vectors to label scores, and then use a normalized exponential function to calculate binary classification probabilities to determine whether the phrase belongs to a sub-intent segment. The expression is as follows:
[0060] ;
[0061] in: Indicates phrase The probability of being identified as a sub-intent vector; For phrase The context semantic vector is derived from the concatenation of the forward and backward gating structures, with a dimension of 128; This is a linear mapping weight vector with a dimension of 128; This is the bias term, with a dimension of 1.
[0062] The terms in the above expression are combinations of vector dot products and numerical mapping functions, and the calculation process maintains dimensional consistency. Since the function outputs a normalized probability, it does not involve changes in physical dimensions, and is logically consistent.
[0063] Furthermore, all Phrases exceeding a set threshold (e.g., 0.7) Extracted as a preliminary sub-intent segment, denoted as And record the sequential index of each sub-intent in the original query. .
[0064] Furthermore, considering the ellipsis and semantic compression phenomena in natural language expressions, this step introduces a context-based semantic completion module. For each sub-intent... The input is fed into a context-predictive word completion module, which introduces position masking markers into the fragment and predicts the most likely completion phrase at that position based on the context, generating the completed expression. For example, if For example, instead of "suitable for autumn," the system might complete it as "lightweight shoes suitable for autumn." The completion process is controlled to limit the maximum length of completed words to no more than 10 words to avoid redundancy.
[0065] To control the accuracy of semantic completion, a semantic consistency judgment mechanism is introduced. This mechanism judges the semantic offset between the completed expression and the original expression based on vector similarity. Let... Let be the semantic vector representation function of the subphrase, and let be the semantic offset of the completion result.
[0066] ;
[0067] in: Indicating sub-intention The semantic vector representation; Indicates the intention to complete the sub-intention The semantic vector representation;
[0068] dot product operation And modulus operation This occurs in a unified vector space, where the vectors have been normalized. This represents the semantic distance between the original phrase and the completed phrase, with the result ranging from [value missing]. , is a dimensionless quantity.
[0069] like The system determines that the completion result deviates from the original meaning and uses the original sub-intention. Replace the completed content; otherwise, complete the sub-intent. This serves as the final sub-intent expression, and generates a set of sub-intent expressions. .
[0070] S3. Input the set of sub-intent expressions into the sub-word embedding model to generate corresponding sub-intent vectors, and perform orthogonal perturbation on the sub-intent vectors with similarity greater than a preset threshold to obtain the set of sub-intent semantic vectors and their order index.
[0071] Specifically, this step follows the output of the previous step, and its main task is to represent the structured set of sub-intents. Encoded as a set of semantic vectors that can be used for vector space retrieval And maintain its structural order information. This is for subsequent sorting. This step is not only a formal vectorization process, but also a highly innovative bridging step in the semantic retrieval scheme of this invention. Its task is to transform the multi-dimensional sub-intent structure expressed in human natural language into a unified, standardized and comparable vector representation, while enhancing the synergy between sub-intents and improving the stability and structural expressiveness of the semantic space.
[0072] Unlike traditional retrieval methods, this invention does not represent the entire query as a single vector. Instead, it employs a structured multi-sub-intent parallel encoding approach to support parallel retrieval of multiple intents. However, the multi-vector structure also presents new challenges, namely, potential semantic space shifts, inconsistencies, and redundancy between different sub-intents. Therefore, this step, based on fundamental semantic encoding, designs two innovative enhancement mechanisms for patent scenarios: first, a semantic aggregation regularization term to improve structural consistency between different sub-intent vectors; and second, a similarity suppression constraint term to prevent redundant sub-intents from causing vectors to overfit to a particular semantic dimension, thereby enhancing the system's ability to discriminate multi-target queries.
[0073] Furthermore, the input includes a set of sub-intent expressions. and sequential index set Each completion sub-intention Generated from the previous step, the text length does not exceed 10 words, and it uses sequential indexing. It is a non-negative integer, recording the original word order.
[0074] Each First, a word vector transformation process is performed, using a unified sub-word embedding model. Map it to an embedding sequence of length no more than 10, with dimension . The embedded sequence is input into a multi-head attention structure, and then through a gated recurrent unit to integrate contextual information, outputting a context fusion vector. To ensure that the encoded vector both expresses the features intended by the query and maintains consistency with the overall query structure, we introduce the following encoding enhancement expression:
[0075] ;
[0076] in: Indicates the first The context fusion vector obtained by the encoder for each sub-intention; Represents the sub-intent vector; Indicates the local semantic center of the current query; The primary semantic preservation coefficient typically takes a value of 100%. This is used to balance individual characteristics with global consistency; These are substructure residual vectors randomly selected from the original embedding sequence to increase expressive diversity; for The cosine similarity with the center vector controls the residual injection ratio; This is the regularization adjustment coefficient, used to limit the magnitude of the offset; it is generally set to a certain value. the following.
[0077] This expression incorporates individual characteristics. Semantic center and structural residuals This not only improves the stability of the representation but also enhances its discriminative power. Regarding computational dimensions, all vector dimensions are unified, and residual terms are processed using a unified vectorization model, maintaining overall computational logic consistency and avoiding issues of inconsistent units.
[0078] Furthermore, since some sub-intents may exhibit repetitive or semantically similar content in multi-sub-intent modeling, to prevent these sub-vectors from overemphasizing a particular semantic dimension in subsequent retrievals, thus leading to a bias towards a single result, we introduce a similarity suppression term. In all After construction, the system calculates the similarity between vector pairs. If a certain pair of vectors... If the similarity is greater than a preset threshold (e.g., 0.9), an orthogonal perturbation is applied to enhance its discriminative power in subsequent spatial operations. This perturbation uses unit orthogonal vectors. The final expression is constructed as follows:
[0079] ;
[0080] in: The atomic intention vector; For other sub-intent vectors that are too similar to it; The inner product of two vectors (unnormalized); To and An orthogonal unit vector is constructed by first calculating... exist Projection on Then take the residual Finally, it is normalized to . This is the disturbance control coefficient, typically set to 0.05, used for fine-tuning the spatial distribution.
[0081] The above operations will only be performed if the following conditions are met. Execute at time (e.g.) This ensures that the disturbance term does not frequently interfere with the normal expression. In terms of dimensions, due to... It is a unit vector. With smaller values, the perturbation term will not disrupt the overall semantic expression, thus maintaining the stability of local perturbations in the expression.
[0082] Ultimately, the resulting set of semantic vectors All have been normalized to a unit modulus, possessing a unified expression dimension, comparable similarity, and structural consistency.
[0083] The output of this step includes: the final set of semantic vectors. All have been normalized to a unit modulus, possessing a unified expression dimension, comparable similarity, and structural consistency. Sub-intent order index : Used for structural position feature modeling in subsequent sorting mechanisms.
[0084] S4. Obtain candidate documents, calculate the point-to-point similarity response between the sub-intent semantic vector set and the candidate documents using cosine similarity, obtain the sub-intent document matching matrix, and calculate the aggregate matching score between the current document and the entire sub-intent set based on the sub-intent document matching matrix.
[0085] Specifically, this step occupies a crucial position in the overall technical process, serving as a bridge between the preceding and following steps. Its core task is to receive the set of sub-intent semantic vectors output from the previous step. and the corresponding set of sequential numbers and combine it with a vectorized document collection A semantic matching relationship is established, and the matching score between the document and the multi-sub-intent structure is output. In the "AI-based multi-sub-intent semantic retrieval" scenario focused on by this invention, each user query is structured into multiple sub-intents, each of which is independently encoded and has semantic coordination and structural order relationships with each other. This directly determines whether the relevance score of the subsequent document can truly reflect the user's complex query intent. Therefore, the traditional "query-document single-vector matching" mechanism cannot meet the structural requirements of this scenario, nor can it support the expression of multiple objectives and multiple semantic dimensions.
[0086] Unlike the "vector representation construction" in S3, the focus of this step is to design a matching strategy. This strategy not only needs to achieve matching between vectors, but also needs to introduce a structural modeling and sub-intent collaborative regularization mechanism at the matching layer to solve the problems of information redundancy, weight imbalance, and lack of structural constraints when "multiple sub-intents participate in decision-making simultaneously". In other words, this step is the decisive step in whether the structured representation in this invention is truly transformed into retrieval capability.
[0087] First, the matching process is based on the calculation of cosine similarity in the semantic vector space. For any candidate document... The system calculates its relationship with all sub-intent vectors. Similarity between them:
[0088] ;
[0089] in: It is the first The semantic vector of each sub-intention is derived from step two; Cosine similarity represents the document similarity. With the i-th sub-intention The point-to-point similarity response between them, i.e., the sub-intent document matching vector; Candidate document The semantic vectors are obtained in advance by an encoder with the same structure; the cosine similarity is calculated as a dimensionless vector space operation, and the dimensionality consistency has been maintained by normalization; all vectors have the same dimension, which is 128.
[0090] Furthermore, the above operations can form a sub-intent document matching matrix. , indicating document The matrix represents the point-to-point similarity response between all sub-intents. However, this matrix itself is merely a "numerical match" and cannot truly express the semantic role and importance of each sub-intent in the entire query, nor can it reflect whether the document truly responds to multiple intents. Therefore, we designed a matching aggregation function with structural bias modeling capabilities, which introduces two innovative mechanisms into the matching process:
[0091] Structure-sensitive weights : Combining the order of sub-intents in the query Construct a joint weight for the semantic layer and the structural layer.
[0092] Multi-intent redundancy penalty term: By introducing the inter-intent cooperative distance tensor In matching aggregation, redundant intentions to "repeatedly score" the same document are dynamically suppressed to avoid score explosion.
[0093] The final document relevance scoring function is as follows:
[0094] ;
[0095] in: Document Aggregate match score with the entire set of sub-intents; ,in For the static importance of the sub-intention, It is indexed sequentially. As the central location, Control structure bias; For structure-sensitive weights; Indicates the first With the The inter-intention collaboration distance tensor between individual intentions is defined as follows: , range ; Document With the Point-to-point similarity response between individual intentions; This is the redundancy suppression coefficient, used to control the intensity of the collaborative penalty; its value generally does not exceed [a certain value]. .
[0096] This scoring function has three innovative features: First, it integrates structural order features and the sparsity of semantic information to construct weights. First, it dynamically expresses the impact of each sub-intent on the matching decision; second, it introduces the distance between intents. The construction of a similar intent penalty item effectively prevents multiple similar intents from scoring a document repeatedly; thirdly, this structure allows the matching function to retain a higher degree of freedom of expression under multiple intent expressions, while evaluating the document response from multiple dimensions, making it more suitable for expressing complex query intents.
[0097] Furthermore, to further improve the system's stability and the distinguishing ability of the sorting layer, in the scoring results... After generation, the system processes all candidate documents using a uniform normalization function, ensuring that the final score distribution remains stable. The interval also possesses cross-query comparability. This normalization is a standard linear mapping operation, which will not be elaborated upon here.
[0098] The output of this step includes: a set of matching scores. : Global sorting for the next step; Sub-intent document matching matrix It can be used for interpretable display, log analysis, and debug tracing.
[0099] This step, as the core of the entire patent's matching process, proposes a structure-sensitive weight modeling function and a sub-intent redundancy penalty term. This not only solves the problem that traditional single-vector retrieval cannot adapt to multiple sub-intents, but also addresses the problem of collaborative interference and response overlap between sub-intents from an algorithmic perspective. This enables the multi-target retrieval system to truly possess structural parsing capabilities and is the methodological foundation and system key to realizing the "structured intelligent retrieval" of this invention.
[0100] S5. Combine the aggregated matching scores of all the documents with the entire sub-intent set and the final ranking score of the sub-intent document matching matrix, and sort the candidate documents in descending order according to the final ranking score. Output the top K search results and the corresponding candidate document sub-intent document matching vector and ranking score.
[0101] Specifically, this step is the final stage of the semantic retrieval process of this invention, and its main task is to process the matching score set output from the previous step. Sub-intent matching matrix Perform fusion ranking and output the final list of search result documents. Unlike the "direct ranking and matching score" in traditional semantic retrieval, this step introduces a fusion ranking mechanism for multi-sub-intent structures during the ranking process, which is particularly suitable for cases where the preceding query has been structured into multiple sub-intent vectors.
[0102] The input data consists of two parts: one is a set of document scores. Each of them Indicates candidate documents The aggregate relevance score to the overall query is output by S4; the second is the sub-intent document matching matrix. Each of them Document For the The sub-intent document matching vector of each sub-intent, with dimension [missing information]. The goal of this step is to calculate the final ranking score for the documents based on these inputs. and output the sorted first One document.
[0103] Furthermore, due to Having already achieved strong matching expressive power through structured aggregation modeling in S4, this step does not introduce a new structure modeling mechanism. Instead, it designs a structure regulation function for the ranking layer to enhance the control of the structural response balance in the final score. Considering that in multi-sub-intent scenarios, some documents may exhibit an imbalanced matching phenomenon of "strong response to some sub-intents but lack of response to others," leading to... The response rate is too high, but the actual recall value is low. Therefore, we introduce a sub-intent response balance index. It is used to correct structural imbalances during the sorting process.
[0104] This invention first defines each document Response balance The inverse form of the standard deviation of the score for the child's intentional response:
[0105] ;
[0106] in: Document For the Point-to-point similarity response of individual intentions; This represents the average similarity response level of the document; the denominator is the standard deviation plus 1 to avoid division by zero. The closer to 1, the more balanced the sub-intent responses; the smaller the value, the more the document is biased towards certain sub-intents, resulting in an unbalanced response distribution.
[0107] Next, the aggregated score from step three will be used. With this response balance The results are then merged to obtain the final ranking score. :
[0108] ;
[0109] The aforementioned fusion strategy is a ranking mechanism based on structural balance adjustment. It moderately suppresses documents that score highly in only a few sub-intents but have an uneven overall distribution, while giving ranking boosts to documents that respond evenly to multiple sub-intents.
[0110] The mechanism has three advantages: (1) it does not introduce new external models and ensures structural closure; (2) it is calculated entirely based on existing matching matrices and has high reproducibility; (3) the response balance is a special sorting strategy designed for the “structured multi-sub-intent” retrieval process of this invention, which strengthens the system’s structural alignment capability.
[0111] The final system will include all candidate documents according to Sort in descending order and select the first few. Output the results, among which To preset the maximum number of documents to return (e.g.) Output all candidate documents simultaneously. Sub-intent document matching vector and its ranking score It is used for user display, sorting explanations, or system log recording.
[0112] Based on the foregoing embodiments, this application provides a control device. The modules and units included in the device can be implemented by a processor in a computer device; of course, they can also be implemented by specific logic circuits. In the implementation process, the processor can be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP), or a field programmable gate array (FPGA), etc.
[0113] This application provides a control device. Figure 2 This is a schematic diagram of the structure of a control device provided in an embodiment of this application, as shown below. Figure 2 As shown, the control device includes:
[0114] The query data acquisition module 101 is used to acquire the raw query data input by the user;
[0115] The query data analysis module 102 is used to clean the characters of the original query data and perform initial phrase segmentation based on grammar rules to obtain a preliminary phrase set; input the preliminary phrase set into a pre-constructed bidirectional gated loop model, output the probability that the corresponding phrase is identified as a sub-intent, extract the phrases with a probability greater than a set threshold as preliminary sub-intent fragments, complete the preliminary sub-intent fragments, and obtain a sub-intent expression set and the sequential index of each completed sub-intent in the original query data;
[0116] The sub-intent generation module 103 is used to input the sub-intent expression set into the sub-word embedding model to encode the corresponding sub-intent vector, and to perform orthogonal perturbation on the sub-intent vectors with similarity greater than a preset threshold to obtain a set of sub-intent semantic vectors and a sequence index.
[0117] The sub-intent matching module 104 is used to obtain candidate documents, calculate the point-to-point similarity response between the sub-intent semantic vector set and the candidate documents using cosine similarity, obtain the sub-intent document matching matrix, and calculate the aggregate matching score between the current document and the entire sub-intent set based on the sub-intent document matching matrix.
[0118] The retrieval output module 105 is used to combine the aggregated matching scores of all the documents with the entire sub-intent set and the final ranking score of the sub-intent document matching matrix, and sort the candidate documents in descending order according to the final ranking score, and output the top K retrieval results and the corresponding candidate document sub-intent document matching vector and ranking score.
[0119] It should be noted that, in the embodiments of this application, if the above-described control method is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiments of this application, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), magnetic disks, or optical disks. Thus, the embodiments of this application are not limited to any specific hardware and software combination.
[0120] Accordingly, this application provides a storage medium storing a computer program thereon, characterized in that the computer program, when executed by a processor, implements the steps in the control method provided in the above embodiments.
[0121] This application provides an electronic device; Figure 3 This is a schematic diagram of the composition structure of the electronic device provided in the embodiments of this application, such as... Figure 3 As shown, the electronic device 300 includes: a processor 301, at least one communication bus 302, a user interface 303, at least one external communication interface 304, and a memory 305. The communication bus 302 is configured to enable communication between these components. The user interface 303 may include a display screen, and the external communication interface 304 may include standard wired and wireless interfaces. The processor 301 is configured to execute a program of a control method stored in the memory to implement the steps of the control method provided in the above embodiment.
[0122] It should be noted that the descriptions of the above storage medium and electronic device embodiments are similar to the descriptions of the above method embodiments, and have similar beneficial effects. For technical details not disclosed in the storage medium and device embodiments of this application, please refer to the descriptions of the method embodiments of this application for understanding.
[0123] It should be understood that the phrase "one embodiment" or "an embodiment" throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of this application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. It should be understood that in the various embodiments of this application, the sequence numbers of the above-described processes do not imply a sequential 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 this application. The sequence numbers of the above-described embodiments are merely descriptive and do not represent the superiority or inferiority of the embodiments.
[0124] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, object, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, object, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, object, or apparatus that includes that element.
[0125] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple units or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or units can be electrical, mechanical, or other forms.
[0126] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units. They may be located in one place or distributed across multiple network units. Some or all of the units may be selected to achieve the purpose of this embodiment according to actual needs.
[0127] In addition, each functional unit in the various embodiments of this application can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the integrated unit can be implemented in hardware or in the form of hardware plus software functional units.
[0128] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media that can store program code, such as mobile storage devices, read-only memory (ROM), magnetic disks, or optical disks.
[0129] Alternatively, if the integrated units described above are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a controller to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROMs, magnetic disks, or optical disks.
[0130] The above description is merely an embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. An artificial intelligence-based search method, characterized by, The method comprises the following steps: S1, obtaining the original query data input by the user; S2, performing character cleaning on the original query data, and performing phrase initial segmentation based on a syntax rule to obtain a preliminary phrase set; inputting the preliminary phrase set into a pre-constructed bidirectional gate recurrent model to output the probability that the corresponding phrase is identified as a sub-intent, and extracting the phrase with a probability greater than a set threshold as a preliminary sub-intent segment, and performing completion on the preliminary sub-intent segment to obtain a sub-intent expression set and an order index of each completed sub-intent in the original query data; S3, inputting the sub-intent expression set into a sub-word embedding model to encode and generate corresponding sub-intent vectors, and performing orthogonal perturbation on sub-intent vectors with a similarity greater than a preset threshold to obtain a sub-intent semantic vector set and an order index; S4, obtaining a candidate document, calculating the point-to-point similarity response of the sub-intent semantic vector set and the candidate document by using cosine similarity, obtaining a sub-intent document matching matrix, and calculating the aggregate matching score of the current document and the entire sub-intent set based on the sub-intent document matching matrix; S5, combining the aggregate matching scores of all the documents and the entire sub-intent set and the final ranking score of the sub-intent document matching matrix, and arranging the candidate documents in descending order of the final ranking score to output the top K retrieval results and the corresponding sub-intent document matching vector and ranking score of the candidate document; Wherein, the S4 comprises: obtaining a candidate document; For any candidate document, the system calculates the similarity between the candidate document and all sub-intent vectors to obtain the point-to-point similarity response between the current document and the i-th sub-intent; Based on the point-to-point similarity response, a sub-intent document matching matrix is constructed to represent the point-to-point similarity response between the current candidate document and all sub-intents; Based on the point-to-point similarity response between the current candidate document and the i-th sub-intention and the point-to-point similarity response between the current candidate document and the k-th sub-intention, combined with the inter-intention collaborative distance tensor between the i-th sub-intention and the k-th sub-intention, a structure-sensitive weight is calculated to obtain an aggregated matching score; wherein the structure-sensitive weight is calculated based on the sequential index. Based on the point-to-point similarity response between the current candidate document and the i-th sub-intention and the point-to-point similarity response between the current candidate document and the k-th sub-intention, combined with the inter-intention collaborative distance tensor between the i-th sub-intention and the k-th sub-intention, a structure-sensitive weight is calculated to obtain an aggregated matching score; wherein the structure-sensitive weight is calculated based on the sequential index. Based on the point-to-point similarity response between the current candidate document and the i-th sub-intention and the point-to-point similarity response between 2.The artificial intelligence-based search method of claim 1, wherein, The step of character cleaning is to remove unrecognizable characters and redundant punctuation marks; The syntax rule is a verb phrase, a preposition structure, and a subject-predicate-object boundary; The step of inputting the preliminary phrase set into the pre-constructed bidirectional gate recurrent model to output the probability that the corresponding phrase is identified as a sub-intent specifically comprises: obtaining the semantic representation of the preliminary phrase set in the gating structure model, inputting the word vector sequence of the current phrase, and setting the word vector dimension to 128; A linear mapping function maps the semantic representation to a label score, and then a normalized exponential function is used to calculate the binary classification probability to determine whether the phrase belongs to a sub-intent segment, and output the probability that the current phrase is identified as a sub-intent; The step of completing the preliminary sub-intent segment specifically comprises: For each sub-intent in the preliminary sub-intent segment, input the each sub-intent into a word completion module based on context prediction structure, the word completion module introduces a position shielding mark in the segment, predicts the most likely completion phrase at this position through context, and generates a completion sub-intent of the completion expression. 3.The artificial intelligence-based search method of claim 2, wherein, The S2 further comprises: In the process of completing the preliminary sub-intention picture segment, a semantic consistency judgment mechanism is introduced; the semantic consistency judgment mechanism judges the semantic deviation between the completed expression and the original expression based on vector similarity; if the semantic deviation is greater than 0.4, it is determined that the completion result deviates from the original intention, and the sub-intention of the preliminary sub-intention picture segment is used to replace the completion content; otherwise, the sub-intention semantic vector of the completed expression is used as the final sub-intention expression, and a completed sub-intention and a sub-intention expression set are generated. 4.The artificial intelligence-based search method of claim 1, wherein, The S3 specifically comprises: Obtaining the sub-intention expression set and the corresponding order index; Each completed sub-intention of the sub-intention expression set is input into a sub-word embedding model to be mapped into an embedding sequence with a length of no more than 10; the embedding sequence is input into a multi-head attention structure to integrate context information through a gate recurrent unit, and a context fusion vector is output; The context fusion vector is encoded and enhanced to obtain a sub-intention vector; The sub-intention vectors of all completed sub-intentions are constructed, and the similarity between the sub-intention vectors is calculated; if a pair of vectors satisfies the similarity greater than a preset threshold, angle orthogonal disturbance processing is performed on the pair of vectors, and finally a sub-intention semantic vector set is generated. 5.The artificial intelligence-based search method of claim 4, wherein, The encoding and enhancement of the context fusion vector is based on the local semantic center of the current query, the cosine similarity between the local semantic center of the current query and the center vector, and the context fusion vector. 6.The artificial intelligence-based search method of claim 1, wherein, The S5 comprises: Calculating the response balance degree of each candidate document based on the point-to-point similarity response between the current document and the i-th sub-intention combined with the average similarity response level; Calculating the final ranking score by combining the response balance degree and the aggregated matching score; Arranging the candidate documents in descending order of the final ranking score, and outputting the top K retrieval results and the sub-intention document matching vector and the ranking score of the corresponding candidate document.
7. A retrieval device characterized by, It comprises: A query data acquisition module for obtaining original query data input by a user; A query data analysis module for performing character cleaning and phrase initial segmentation based on grammar rules on the original query data to obtain a preliminary phrase set; Inputting the preliminary phrase set into a pre-constructed bidirectional gate recurrent model to output the probability that the corresponding phrase is identified as a sub-intention, and extracting the phrase with a probability greater than a set threshold as a preliminary sub-intention picture segment, completing the preliminary sub-intention picture segment to obtain a sub-intention expression set and the order index of each completed sub-intention in the original query data; A sub-intention generation module for inputting the sub-intention expression set into a sub-word embedding model to generate corresponding sub-intention vectors, and performing orthogonal disturbance on the sub-intention vectors with a similarity greater than a preset threshold to obtain a sub-intention semantic vector set and an order index; A sub-intention matching module for obtaining candidate documents, calculating the point-to-point similarity response between the sub-intention semantic vector set and the candidate documents by using cosine similarity, obtaining a sub-intention document matching matrix, and calculating the aggregated matching score of the current document and the entire sub-intention set based on the sub-intention document matching matrix; The retrieval output module is configured to combine all the documents with the aggregated matching scores of the entire set of sub-intents and the sub-intent document matching matrix document final ranking scores, and arrange candidate documents in descending order of the final ranking scores, output the top K retrieval results and the corresponding candidate document sub-intent document matching vectors and ranking scores. The sub-intent matching module is configured to perform the following steps: Obtain candidate documents; For any candidate document, the system calculates the similarity between the candidate document and all sub-intent vectors to obtain a point-to-point similarity response between the current document and the i-th sub-intent; Construct a sub-intent document matching matrix based on the point-to-point similarity response to represent the point-to-point similarity response between the current candidate document and all sub-intents; Based on the point-to-point similarity response between the current candidate document and the i-th sub-intention and the point-to-point similarity response between the current candidate document and the k-th sub-intention, combined with the inter-intention collaborative distance tensor between the i-th sub-intention and the k-th sub-intention, a structure-sensitive weight is calculated to obtain an aggregated matching score; wherein the structure-sensitive weight is calculated based on the sequential index. and the k-th sub-intention, combined with the inter-intention collaborative distance tensor between the i-th sub-intention and the k-th sub-intention, a structure-sensitive weight is calculated to obtain an aggregated matching score; wherein the structure-sensitive weight is calculated based on the sequential index. 8. An electronic device, comprising: The memory and the processor, wherein the memory stores a computer program, and the computer program is executed by the processor to perform the retrieval method according to any one of claims 1 to 6. The storage medium stores a computer program, which can be executed by one or more processors, and can be used to implement the retrieval method according to any one of claims 1 to 6.
9. A storage medium, characterized by The storage medium stores a computer program, which can be executed by one or more processors, and can be used to implement the retrieval method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Intelligent question auxiliary decision-making method and system based on AI large model
CN118445398A
Semantic Analysis-Based Query Result Retrieval for Natural Language Procedural Queries
US20190392066A1