Natural language processing method and device
By combining hybrid retrieval algorithms, RRF algorithms, and large language models, multi-level semantic recognition is performed, solving the accuracy and reliability problems of natural language processing in existing technologies and achieving more efficient semantic understanding and recognition.
Patent Information
- Application Number
- CN202511392204.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-26
- Publication Date
- 2026-01-13
AI Technical Summary
Existing natural language processing methods are prone to factual errors or relevance biases when faced with tasks supported by deep professional knowledge databases, leading to inaccurate semantic recognition.
A hybrid retrieval algorithm combining the RRF algorithm and a pre-trained large language model is used to perform multi-level semantic recognition on natural language data. The final recognition result is determined by fusing semantic association information through a dynamic weight allocation algorithm.
It improves the accuracy and reliability of natural language semantic recognition, overcomes the comprehension bias in existing technologies, and achieves more accurate semantic recognition.
Smart Images

Figure CN121328554A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of natural language processing and intelligent information systems, and in particular to a method for processing natural language. Background Technology
[0002] In the field of natural language processing, in order for natural language processing methods to be widely used in scenarios such as intelligent customer service, academic research assistance, and enterprise knowledge base question answering, high requirements are placed on the ability to deeply understand and accurately extract natural language information.
[0003] In existing technologies, natural language processing methods mainly revolve around language model autonomous generation and external knowledge enhancement. These methods only process natural language once, determining the final recognition result from the various results obtained. However, with the advancement of technology, natural language, as the core carrier of information exchange, has become increasingly diverse, complex, and hierarchical in its semantics. Therefore, this places higher demands on the accurate processing of natural language. For example, when faced with natural language processing tasks that require deep professional knowledge databases, existing methods are limited by their lack of deep semantic understanding of natural language, which can easily lead to factual misunderstandings or biases in the understanding of relevance, resulting in the inability to obtain accurate semantic recognition results. Summary of the Invention
[0004] This invention provides a natural language processing method to solve the technical problems of factual errors or relevance deviations that easily occur in the natural language processing of existing technologies, so as to achieve semantic recognition with accuracy, flexibility and reliability.
[0005] To address the aforementioned technical problems, embodiments of the present invention provide a natural language processing method, the method comprising:
[0006] Obtain the initial natural language data input by the user;
[0007] If the initial natural language data is detected to be target language data, the target language data is processed based on a hybrid retrieval algorithm to obtain various candidate results;
[0008] The candidate results are processed based on the RRF algorithm to obtain a first recognition result corresponding to each candidate result; the candidate results are processed based on a pre-trained large language model to obtain a second recognition result corresponding to each candidate result.
[0009] Analyze the first semantic association information between the first identification result and each of the candidate results, and analyze the second semantic association information between the second identification result and each of the candidate results. Based on the first semantic association information and the second semantic association information, determine the third identification result corresponding to each of the candidate results.
[0010] The recognition result of the initial natural language data is determined from the third recognition result.
[0011] As a preferred embodiment, before detecting that the initial natural language data is target language data, the method further includes:
[0012] The initial natural language data is evaluated, including:
[0013] First-level features are extracted from the initial natural language data to obtain first-level recognition results of the first-level features. The type corresponding to the initial natural language data is determined based on the first-level recognition results. The type includes at least the target language data. The first-level features include at least a first semantic feature corresponding to a multi-intent problem, a second semantic feature corresponding to a problem requiring external knowledge support, or a third semantic feature corresponding to a tool invocation problem.
[0014] As a preferred embodiment, before processing the target language data based on the hybrid retrieval algorithm, the method further includes:
[0015] Secondary features of the target language data are extracted to obtain secondary recognition results of the secondary features. The task type corresponding to the target language data is determined based on the secondary recognition results. The task type is either a first subtask that requires tool invocation, a second subtask that requires content generation, or a third subtask that requires external knowledge.
[0016] As a preferred embodiment, before processing the target language data based on the hybrid retrieval algorithm, the method further includes:
[0017] Secondary features of the target language data are extracted to obtain secondary recognition results of the secondary features. The task type corresponding to the target language data is determined based on the secondary recognition results. The task type consists of at least two of the following three task types: a first subtask that requires tool invocation, a second subtask that requires content generation, or a third subtask that requires external knowledge.
[0018] As a preferred embodiment, the process of processing the target language data based on a hybrid retrieval algorithm to obtain various candidate results includes:
[0019] If the target language data corresponds to the third subtask that requires external knowledge;
[0020] The third subtask is searched and sorted using a dense vector retrieval algorithm to obtain dense vector results, and the third subtask is searched and sorted using a sparse vector retrieval algorithm to obtain sparse vector results. The hybrid retrieval algorithm is constructed from the dense vector retrieval algorithm and the sparse vector retrieval algorithm.
[0021] The dense vector results and the sparse vector results are fused to obtain the candidate results.
[0022] As a preferred embodiment, the process of processing the target language data based on a hybrid retrieval algorithm to obtain various candidate results includes:
[0023] If the target language data corresponds to the first subtask that requires tool invocation and the third subtask that requires external knowledge;
[0024] Based on a predefined tool library, the first subtask is invoked and processed to obtain the tool invocation result;
[0025] The third subtask is processed based on the hybrid retrieval algorithm to obtain each of the candidate results.
[0026] As a preferred embodiment, determining the third identification result corresponding to each of the candidate results using the first semantic association information and the second semantic association information includes:
[0027] The candidate results are normalized to obtain the processing results to be assigned.
[0028] Based on the processing result to be assigned, the first identification result is subjected to dynamic weight allocation processing to obtain the first semantic association information; based on the processing result to be assigned, the second identification result is subjected to dynamic weight allocation processing to obtain the second semantic association information.
[0029] By combining the first semantic association information and the second semantic association information, the third identification result corresponding to each of the candidate results is obtained.
[0030] As a preferred embodiment, determining the recognition result of the initial natural language data from the third recognition result includes:
[0031] If the target language data corresponds to the third subtask that requires external knowledge;
[0032] The third recognition result of each candidate result is sorted, and the candidate result at the top is taken as the recognition result of the initial natural language data.
[0033] As a preferred embodiment, determining the recognition result of the initial natural language data from the third recognition result includes:
[0034] If the target language data corresponds to the first subtask that requires tool invocation and the third subtask that requires external knowledge;
[0035] The tool call result and the third identification result of each candidate result are fused together to obtain the sorting result of each candidate result;
[0036] The candidate results are sorted, and the candidate result at the top is taken as the recognition result of the initial natural language data.
[0037] Another embodiment of the present invention provides a natural language processing apparatus, comprising:
[0038] The data acquisition module is used to acquire the initial natural language data input by the user;
[0039] The data preprocessing module is used to process the target language data based on a hybrid retrieval algorithm to obtain various candidate results if the initial natural language data is detected as target language data.
[0040] The data recognition module is used to process each of the candidate results based on the RRF algorithm to obtain a first recognition result corresponding to each of the candidate results; and to process each of the candidate results based on a pre-trained large language model to obtain a second recognition result corresponding to each of the candidate results.
[0041] The data association analysis module is used to analyze the first semantic association information between the first identification result and each of the candidate results, and to analyze the second semantic association information between the second identification result and each of the candidate results, and to determine the third identification result corresponding to each of the candidate results based on the first semantic association information and the second semantic association information.
[0042] The data generation module is used to determine the recognition result of the initial natural language data from the third recognition result.
[0043] Compared with the prior art, the beneficial effects of the embodiments of the present invention are at least one of the following:
[0044] This scheme, based on the hybrid retrieval algorithm for natural language semantic recognition, introduces the RRF algorithm and a pre-trained large language model to perform deep semantic recognition processing on the results of the hybrid retrieval algorithm, providing data support for obtaining accurate natural language recognition results. By using a dynamic weight allocation algorithm, it introduces the correlation information of the natural language semantic recognition results and performs final hierarchical processing on the semantic recognition results. This overcomes the shortcomings of existing technologies in understanding natural language semantics when facing natural language processing tasks that require deep professional knowledge database support, and improves the accuracy and reliability of natural language semantic recognition. Attached Figure Description
[0045] Figure 1 This is a schematic diagram of the structure of a natural language processing method in one embodiment of the present invention;
[0046] Figure 2 This is a flowchart of a natural language processing method in one embodiment of the present invention;
[0047] Figure 3 This is a schematic diagram of a natural language processing device structure in one embodiment of the present invention;
[0048] Figure label:
[0049] Among them, 11 is the data acquisition module, 12 is the data preprocessing module, 13 is the data identification module, 14 is the data correlation analysis module, and 15 is the data generation module. Detailed Implementation
[0050] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The purpose of providing these embodiments is to make the disclosure of the present invention more thorough and comprehensive. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0051] In the description of this application, the terms "first," "second," "third," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined with "first," "second," "third," etc., may explicitly or implicitly include one or more of that feature. In the description of this application, unless otherwise stated, "a plurality of" means two or more.
[0052] In the description of this application, it should be noted that the term "and / or" as used herein includes any and all combinations of one or more of the associated listed items. Those skilled in the art will understand the specific meaning of the above terms in this application based on the specific circumstances.
[0053] In the description of this application, it should be noted that, unless otherwise defined, all technical and scientific terms used in this invention have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in this specification is for the purpose of describing specific embodiments only and is not intended to limit the invention. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.
[0054] It should be noted that in the field of Natural Language Processing (NLP), in order for NLP methods to be widely applied in scenarios such as intelligent customer service, academic research assistance, and enterprise knowledge base question answering, high demands are placed on the ability to deeply understand and accurately extract natural language information. Existing NLP methods mainly revolve around methods such as autonomous generation of language models and external knowledge enhancement. This approach only processes the natural language in one round, determining the final recognition result from the various results obtained. However, with the advancement of technology, natural language, as the core carrier of information exchange, has become increasingly diverse, complex, and layered in its semantics. Therefore, higher demands are placed on the accurate processing of natural language. For example, when facing NLP tasks that require deep professional knowledge databases, existing methods are limited by their lack of deep semantic understanding of natural language, easily leading to factual misunderstandings or biases in the understanding of relevance, resulting in inaccurate semantic recognition results.
[0055] One embodiment of the present invention provides a natural language processing method; for details, please refer to [link to specific documentation]. Figure 1 , Figure 1 The diagram shown illustrates the structure of a natural language processing method according to one embodiment of the present invention, the method comprising steps S1 to S5:
[0056] S1. Obtain the initial natural language data input by the user;
[0057] S2. If the initial natural language data is detected to be target language data, the target language data is processed based on the hybrid retrieval algorithm to obtain various candidate results;
[0058] S3. Process each of the candidate results based on the RRF algorithm to obtain a first recognition result corresponding to each of the candidate results; process each of the candidate results based on a pre-trained large language model to obtain a second recognition result corresponding to each of the candidate results;
[0059] S4. Analyze the first semantic association information between the first identification result and each of the candidate results, and analyze the second semantic association information between the second identification result and each of the candidate results. Based on the first semantic association information and the second semantic association information, determine the third identification result corresponding to each of the candidate results.
[0060] S5. Determine the recognition result of the initial natural language data from the third recognition result.
[0061] In the above embodiments, a natural language processing method includes deep understanding of natural language information, accurate extraction of semantic keywords, and generation of relevant content. Specifically, in step S1, the initial natural language data input by the user includes at least instructions carrying the user's core needs and questions, semantic information reflecting the user's identity characteristics and domain background, and related information supplementing the single-round query. The acquisition can be performed by an electronic device with computing capabilities, such as a terminal or server. The user can operate a user terminal to input the initial natural language data, and the user terminal can then send the initial natural language data to the server for processing.
[0062] Furthermore, in step S2, before detecting that the initial natural language data is target language data, it is necessary to first judge the received initial natural language data. The judgment criteria include preliminary semantic understanding and multi-intent recognition. The subsequent corresponding type is selected according to the judged natural language data features. The natural language data features at least correspond to the first semantic features of the multi-intent problem, the second semantic features of the problem requiring external knowledge support, or the third semantic features of the problem of tool invocation. The subsequent corresponding type includes at least target language data and simple language data.
[0063] Furthermore, in the above embodiments, if the type corresponding to the natural language data features is detected to be simple language data, the pre-trained large language model directly performs semantic recognition to generate the corresponding result and outputs it. If the type corresponding to the natural language data features is detected to be target language data, a hierarchical decomposition strategy is adopted to extract features from the target language data. Based on the feature extraction results, the subsequent task type corresponding to the target language data is determined. The task type corresponds to a first sub-task that requires tool invocation, a second sub-task that requires content generation, or a third sub-task that requires external knowledge. Preferably, the task type can also consist of at least two of the above three task types.
[0064] Furthermore, in the above embodiments, if the target language data subsequently corresponds to a third subtask requiring external knowledge, a hybrid retrieval algorithm is constructed. This hybrid retrieval algorithm is jointly constructed from dense vector retrieval and sparse vector retrieval algorithms. First, the query for the third subtask is rewritten or expanded, refining the colloquial content. Second, using a dense vector retrieval algorithm based on a deep learning model, the semantic similarity between the query vector in the third subtask and the candidate result vectors in the database is calculated. By encoding the entire document of the third subtask as a whole, each semantic unit (token) is ensured to receive sufficient contextual information within the entire document context. The entire document is divided into blocks according to predefined semantic boundaries, and average pooling is performed on the tokens within each text block to generate a unified vector representation of that text block. The core calculation formula of the dense vector retrieval algorithm is shown below:
[0065] Let the query vector of the third subtask be q∈R. d The candidate result vector is d i ∈R d The similarity calculation method is shown in formula (1):
[0066]
[0067] Where: q·d i The vector dot product operation is shown in formula (2); ||q|| 2 The L2 norm of the query vector is represented as shown in formula (3); ||d i || 2 Let L2 norm represent the candidate result vector, as shown in Equation (4).
[0068] Furthermore, a sparse vector retrieval algorithm based on statistical learning-based word matching technology is used to achieve accurate keyword matching in the third subtask. The keyword matching technology is implemented using the Best Matching (BM25) algorithm. The core calculation formula of the sparse vector retrieval algorithm is shown below:
[0069] Let the query vector of the third subtask be q∈R. d Includes terms {t1,t2,…,t m}, candidate result d i The sparse vector retrieval score calculation method is shown in formulas (5) and (6):
[0070]
[0071] Among them, t kq represents the k-th term in the query vector q; k1 is a parameter that controls the term saturation, with empirical values typically between 1.2 and 2.0. The larger the value, the more significant the impact on the sparse vector retrieval score calculation result; b is a parameter that controls the normalization of the candidate result length, with an empirical value typically of 0.75; avgdl is the average length of all candidate results in the candidate results.
[0072] Finally, the candidate results are obtained by combining the dense vector retrieval results and the sparse vector retrieval results.
[0073] If the target language data subsequently corresponds to a task consisting of a first subtask requiring tool invocation and a third subtask requiring external knowledge, then according to a predefined tool library, the first subtask is invoked to obtain the tool invocation result, and the third subtask is processed based on a hybrid retrieval algorithm to obtain various candidate results. For details, please refer to [link to relevant documentation]. Figure 2 , Figure 2 The diagram shown is a flowchart of a natural language processing method according to one embodiment of the present invention.
[0074] Furthermore, in step S3, since the Reverse Rank Fusion Algorithm (RRF) is simple and efficient and does not depend on the size of the original score, the RRF algorithm is used to calculate the score of each candidate result to obtain the first recognition result of each candidate result. The calculation method is shown in formula (7), where the candidate result with the higher ranking has a higher recognition result score.
[0075]
[0076] Where k represents a constant in the RRF algorithm, used to reduce the impact of low-ranked candidate results; typically k is 60; R(d i ) indicates a ranking list.
[0077] The pre-trained large language model is used to evaluate the deep semantic relevance between each candidate result and the query vector. Therefore, the query vector and each candidate result are used as input data. The large language model processes the data according to the semantic understanding ability of the pre-training and obtains a standardized semantic relevance score (second recognition result) for each candidate result. The calculation method is shown in formula (8):
[0078]
[0079] Where Agent(q,d) i ) is a complex nonlinear function, determined by the internal parameters and architecture of the large language model; q represents the input query data; d i This represents each candidate result; its value range is [0,1], where 1 indicates complete correlation and 0 indicates complete non-correlation.
[0080] Furthermore, in step S4, the first semantic association information is a quantitative indicator of the quality of each candidate result based on the first recognition result. Similarly, the second semantic association information is a quantitative indicator of the quality of each candidate result based on the second recognition result. Specifically, a candidate result with a high-quality quantitative indicator is usually characterized by a few top candidate results having significantly higher scores than other candidate results. A candidate result with a low-quality quantitative indicator is characterized by a generally low score for the top candidate results, or a flat score distribution without a clear "leader". In a mixed retrieval scenario, it is necessary to merge the scores of different retrieval methods. Since the score ranges of different methods are different, standardization is required first. The standardization method for dense vector retrieval algorithms is shown in formula (9), and the standardization method for sparse vector retrieval algorithms is shown in formula (10).
[0081]
[0082] In this context, θ is the average of all BM25 scores in the current query results (e.g., if the average score of a query is 15.3, then θ = 15.3); τ is generally set to a fixed value between 2 and 4 (τ = 3 is recommended). Specifically, θ is chosen based on the average score so that the center point of the sigmoid function is located exactly in the median of the score distribution. This maps documents with scores above the average to the interval [0.5, 1], and documents with scores below the average to the interval [0, 0.5], achieving natural score stratification. τ controls the steepness of the sigmoid curve: the smaller the value, the steeper the curve (score differences are amplified), and the larger the value, the flatter the curve (score differences are compressed). Empirically, τ = 3 maintains score differentiation while avoiding excessive score polarization. It avoids making the differences between documents with similar scores too large, and it also avoids making the scores completely flat, making it a well-balanced choice in most retrieval scenarios.
[0083] The standardized score S′ dense (d i ) and S′ sparse (d i Formula (11) is obtained by weighted summation. Then, semantic confidence is calculated on the weighted summation result, as shown in Formula (12).
[0084] S coarse (d i )=α·S′ sparse (d i )+β·S′ dense (d i (11)
[0085]
[0086] Where α and β are weighting factors, and α + β = 1, α and β are usually set to a fixed value of 0.5; d i This represents the candidate results; the normalize function can map the input data to the interval [0,1]. If C conf When the value is close to 1, it indicates that the candidate results are of high quality and the keyword matching is likely to be very successful. In this case, the RRF algorithm should be trusted. If C conf When the value is close to 0, it indicates that the candidate result is of low quality and may have problems such as high noise or semantic ambiguity, requiring a pre-trained large language model for deep analysis.
[0087] Preferably, λ is introduced as a control parameter, as shown in formulas (13) and (14):
[0088] w Agent =(1-λ)·(1-C conf )+λ·0.5(13)
[0089] w RRF =1-w Agent (14)
[0090] When λ = 0, the weights are entirely determined by semantic confidence; if C conf =1, then the second semantic association information w Agent If C is 0, conf =0, then the first semantic association information w RRF When λ = 0, the first semantic association information w is 0; when λ = 1, the first semantic association information w is RRF Second semantic association information w Agent Each is 0.5, which degenerates into a fixed average weighted average.
[0091] Using the first semantic association information and the second semantic association information, a third identification result corresponding to each of the candidate results is determined. Specifically, before obtaining the third identification result, the first identification result S needs to be... RRF(d) Second recognition result S Agent(d) Normalization is performed to obtain the first normalized recognition result S. RRF(d) ′ and the normalized second recognition result S Agent(d) Finally, the third identification result is obtained by weighted summation, and the calculation method of weighted summation is shown in formula (15):
[0092]
[0093] Further, in step S5, if the target language data is a third subtask requiring external knowledge, the third recognition results of each candidate result are sorted, and the candidate result at the top is used as the initial natural language data recognition result and output as the final result. If the target language data consists of a first subtask requiring tool invocation and a third subtask requiring external knowledge, the tool invocation result of the first subtask is fused with the third recognition results of each candidate result to obtain a result to be sorted. This result is then sorted, and the candidate result at the top is used as the initial natural language recognition result and output as the final result. Preferably, if the user intervenes in the recognition result before determining the initial natural language recognition result, the user intervention result is used as the final recognition result and output.
[0094] Another embodiment of the present invention provides a natural language processing device; for details, please refer to [link to relevant documentation]. Figure 3 , Figure 3 The diagram shown is a schematic representation of a natural language processing device according to one embodiment of the present invention. The device includes:
[0095] The data acquisition module is used to acquire the initial natural language data input by the user;
[0096] The data preprocessing module is used to process the target language data based on a hybrid retrieval algorithm to obtain various candidate results if the initial natural language data is detected as target language data.
[0097] The data recognition module is used to process each of the candidate results based on the RRF algorithm to obtain a first recognition result corresponding to each of the candidate results; and to process each of the candidate results based on a pre-trained large language model to obtain a second recognition result corresponding to each of the candidate results.
[0098] The data association analysis module is used to analyze the first semantic association information between the first identification result and each of the candidate results, and to analyze the second semantic association information between the second identification result and each of the candidate results, and to determine the third identification result corresponding to each of the candidate results based on the first semantic association information and the second semantic association information.
[0099] The data generation module is used to determine the recognition result of the initial natural language data from the third recognition result.
[0100] Compared with the prior art, the beneficial effects of the embodiments of the present invention are at least one of the following:
[0101] (1) Based on the hybrid retrieval algorithm for natural language semantic recognition, this scheme introduces the RRF algorithm and a pre-trained large language model to perform deep semantic recognition processing on the results of the hybrid retrieval algorithm again, providing data support for obtaining accurate natural language recognition results. By using the dynamic weight allocation algorithm, the associated information of the natural language semantic recognition results is introduced, and the semantic recognition results are finally processed hierarchically. This overcomes the shortcomings of existing technologies in understanding natural language semantics when facing natural language processing tasks that require deep professional knowledge database support, and improves the accuracy of natural language semantic recognition.
[0102] (2) This scheme introduces the λ control parameter, which can achieve a balance between fully dynamic and fixed weights, avoiding the semantic confidence from depending entirely on one side in extreme cases, thereby improving the reliability of natural language processing tasks.
[0103] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of this patent should be determined by the appended claims.
Claims
1. A method of processing natural language, characterized by, The method comprises: acquiring initial natural language data input by a user; if it is detected that the initial natural language data is target language data, processing the target language data based on a hybrid retrieval algorithm to obtain each candidate result; processing each candidate result based on an RRF algorithm to obtain a first recognition result corresponding to each candidate result; processing each candidate result based on a pre-trained large language model to obtain a second recognition result corresponding to each candidate result; analyzing first semantic association information between the first recognition result and each candidate result, and analyzing second semantic association information between the second recognition result and each candidate result, to determine a third recognition result corresponding to each candidate result based on the first semantic association information and the second semantic association information; determining a recognition result of the initial natural language data from the third recognition result.
2. The method of claim 1, wherein, Before the step of detecting whether the initial natural language data is target language data, the method further comprises: judging the initial natural language data, comprising: extracting first-level features of the initial natural language data to obtain a first-level recognition result of the first-level features, and determining a type corresponding to the initial natural language data according to the first-level recognition result, wherein the type at least includes the target language data, and the first-level features at least include first semantic features corresponding to multi-intent questions, second semantic features corresponding to questions requiring external knowledge support, or third semantic features corresponding to tool invocation questions.
3. The method of claim 1, wherein, Before the step of processing the target language data based on the hybrid retrieval algorithm, the method further comprises: extracting second-level features of the target language data to obtain a second-level recognition result of the second-level features, and determining a task type corresponding to the target language data according to the second-level recognition result, wherein the task type is a first sub-task corresponding to tool invocation, a second sub-task corresponding to content generation, or a third sub-task corresponding to external knowledge.
4. The method of claim 1 or 3, wherein, Before the step of processing the target language data based on the hybrid retrieval algorithm, the method further comprises: extracting second-level features of the target language data to obtain a second-level recognition result of the second-level features, and determining the task type corresponding to the target language data according to the second-level recognition result, wherein the task type is composed of at least two of the following three task types: the first sub-task corresponding to tool invocation, the second sub-task corresponding to content generation, or the third sub-task corresponding to external knowledge.
5. The natural language processing method as described in claim 3, characterized in that, The step of processing the target language data based on the hybrid retrieval algorithm to obtain each candidate result comprises: if the target language data corresponds to the third sub-task requiring external knowledge; performing retrieval and sorting processing on the third sub-task based on a dense vector retrieval algorithm to obtain a dense vector result, and performing retrieval and sorting processing on the third sub-task based on a sparse vector retrieval algorithm to obtain a sparse vector result, wherein the hybrid retrieval algorithm is constructed by the dense vector retrieval algorithm and the sparse vector retrieval algorithm; The dense vector result and the sparse vector result are fused to obtain each candidate result.
6. The natural language processing method as described in claim 4, characterized in that, The target language data is processed based on the hybrid retrieval algorithm to obtain each candidate result, including: If the target language data corresponds to the first subtask requiring tool calling and the third subtask requiring external knowledge; The first subtask is called based on a predefined tool library to obtain a tool calling result; The third subtask is processed based on the hybrid retrieval algorithm to obtain each candidate result.
7. The method of claim 1, wherein, The first semantic association information and the second semantic association information are used to determine a third recognition result corresponding to each candidate result, including: Each candidate result is normalized to obtain a result to be allocated; The first recognition result is dynamically weighted and allocated based on the result to be allocated to obtain first semantic association information, and the second recognition result is dynamically weighted and allocated based on the result to be allocated to obtain second semantic association information; The first semantic association information and the second semantic association information are combined to obtain the third recognition result corresponding to each candidate result.
8. The natural language processing method as described in claim 5, characterized in that, The third recognition result corresponding to each candidate result is sorted, and the candidate result in the first place is taken as the recognition result of the initial natural language data. The third recognition result corresponding to each candidate result is sorted, and the candidate result in the first place is taken as the recognition result of the initial natural language data. The third recognition result corresponding to each candidate result is sorted, and the candidate result in the first place is taken as the recognition result of the initial natural language data.
9. The method of processing natural language of claim 6, wherein, The third recognition result corresponding to each candidate result is sorted, and the candidate result in the first place is taken as the recognition result of the initial natural language data. The third recognition result corresponding to each candidate result is sorted, and the candidate result in the first place is taken as the recognition result of the initial natural language data. The third recognition result corresponding to each candidate result is sorted, and the candidate result in the first place is taken as the recognition result of the initial natural language data. The third recognition result corresponding to each candidate result is sorted, and the candidate result in the first place is taken as the recognition result of the initial natural language data.
10. A natural language processing device, characterized by The third recognition result corresponding to each candidate result is sorted, and the candidate result in the first place is taken as the recognition result of the initial natural language data. The third recognition result corresponding to each candidate result is sorted, and the candidate result in the first place is taken as the recognition result of the initial natural language data. The third recognition result corresponding to each candidate result is sorted, and the candidate result in the first place is taken as the recognition result of the initial natural language data. The third recognition result corresponding to each candidate result is sorted, and the candidate result in the first place is taken as the recognition result of the initial natural language data. The third recognition result corresponding to each candidate result is sorted, and the candidate result in the first place is taken as the recognition result of the initial natural language data. The third recognition result corresponding to each candidate result is sorted, and the candidate result in the first place is taken as the recognition result of the initial natural language data. The third recognition result corresponding to each candidate result is sorted, and the candidate result in the first place is taken as the recognition result of the initial natural language data. The third recognition result corresponding to each candidate result is sorted, and the candidate result in the first place is taken as the recognition result of the initial natural language data. The third recognition result corresponding to each candidate result is sorted, and the candidate result in the first place is taken as the recognition result of the initial natural language data. The third recognition result corresponding to each candidate result is sorted, and the candidate result in the first place is taken as the recognition result of the initial natural language data. The third recognition result corresponding to each candidate result is sorted, and the candidate result in the first place is taken as the recognition result of the initial natural language data. The third recognition result corresponding to each candidate result is sorted, and the candidate result in the first place is taken as the recognition result of the initial natural language data. The third recognition result corresponding to each candidate result is sorted, and the candidate result in the first place is taken as the recognition result of the initial natural language data. The third recognition result corresponding to each candidate result is sorted, and the candidate result in the first place is taken as the recognition result of the initial natural language data. The third recognition result corresponding to each candidate result is sorted, and the candidate result in the first place is taken as the recognition result of the initial natural language data. The third recognition result corresponding to each candidate result is sorted, and the candidate result in the first place is taken as the recognition result of the initial natural language data. The third recognition result corresponding to each candidate result is sorted, and the candidate result in the first place is taken as the recognition result of the initial natural language data. The third recognition result corresponding to each candidate result is sorted, and the candidate result in the first place is taken as the recognition result of the initial natural language data. The third recognition result corresponding to each candidate result is sorted, and the candidate result in the first place is taken as the recognition result of the initial natural language data. The third recognition result corresponding to each candidate result is sorted, and the candidate result in the first place is taken as the recognition result of the initial natural language data. The third recognition result corresponding to each candidate result is sorted, and the candidate result in the first place is taken as the recognition result of the initial natural language data. The third recognition result corresponding to each candidate result is sorted, and the candidate result in the first place is taken as the recognition result of the initial natural language data. The third recognition result corresponding to each candidate result is sorted, and the candidate result in the first place is taken as the recognition result of the initial natural language data. The third recognition result corresponding to each candidate result is sorted, and the candidate result in the first place is taken as the recognition result of the initial natural language data. The third recognition result corresponding to each candidate result is sorted, and the candidate result in the first place is taken as the recognition result of the initial natural language data. The third recognition result corresponding to each candidate result is sorted, and the candidate result in the first place is taken as the recognition result of the initial natural language data. The third recognition result corresponding to each candidate result is sorted, and the candidate result in the first place is taken as the recognition result of the initial natural language data. The third recognition result corresponding to each candidate result is sorted, and the candidate result in the first place is taken as the recognition result of the initial natural language data. The third recognition result corresponding to each candidate result is sorted, and the candidate result in the first place is taken as the recognition result of the initial natural language data. The third recognition result corresponding to each candidate result is sorted, and the candidate result in the first place is taken as the recognition result of the initial natural language data. The third recognition result corresponding to each candidate result is sorted, and the candidate result in the first place is taken as the recognition result of the initial natural language data. The third recognition result corresponding to each candidate result is sorted, and the candidate result in the first place is taken as the recognition result of the initial natural language data. The third recognition result corresponding to each candidate result is sorted, and the candidate result in the first place is taken as the recognition result of the initial natural language data. The third recognition result corresponding to each candidate result is sorted, and the candidate result in the first place is taken as the recognition result of the initial natural language data. The third recognition result corresponding to each candidate result is sorted, and the candidate result in the first place is taken as the recognition result of the initial natural language data. The third recognition result corresponding to each candidate result is sorted, and the candidate result in the first place is taken as the recognition result of the initial natural language data. The third recognition result corresponding to each candidate result is sorted, and the candidate result in the first place is taken as the recognition result of the initial natural language data. The third recognition result corresponding to each candidate result is sorted, and the candidate result in the first place is taken as the recognition result of the initial natural language data. The third recognition result corresponding to each candidate result is sorted, and the candidate result in the first place is taken as the recognition result of the initial natural language data. The third recognition result corresponding to each candidate result is sorted, and the candidate result in the first place is taken as the recognition result of the initial natural language data. The third recognition result corresponding to each candidate result is sorted, and the candidate result in the first place is taken as the recognition result of the initial natural language data. The third recognition result corresponding to each candidate result is sorted, and the candidate result in the first place is taken as the recognition result of the initial natural language data. The third recognition result corresponding to each candidate result is sorted, and the candidate result in the first place is taken as the recognition result of the initial natural language data. The third recognition result corresponding to each candidate result is sorted, and the candidate result in the first place is taken as the recognition result of the initial natural language data. The third recognition result corresponding to each candidate result is sorted, and the candidate result in the first place is taken as the recognition result of the initial natural language data. The third recognition result corresponding to each candidate result is sorted, and the candidate result in the first place is taken as the recognition result of the initial natural language data. The third recognition result corresponding to each candidate result is sorted, and the candidate result in the first place is taken as the recognition result of the initial natural language data. The third recognition result corresponding to each candidate result is sorted, and the candidate result in the first place is taken as the recognition result of the initial natural language data. The third recognition result corresponding to each candidate result is sorted, and the candidate result in the first place is taken as the a data association analysis module, configured to analyze first semantic association information between the first recognition result and each of the candidate results, and analyze second semantic association information between the second recognition result and each of the candidate results, and determine, according to the first semantic association information and the second semantic association information, a third recognition result corresponding to each of the candidate results; a data generation module, configured to determine, from the third recognition result, a recognition result of the initial natural language data.