Large language model implicit semantic information identification system
By performing semantic processing and feature fusion on the information to be identified using a large language model, the problem of insufficient accuracy in semantic information recognition in existing technologies is solved, achieving more efficient information recognition and security assurance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-09
- Publication Date
- 2026-03-13
AI Technical Summary
In existing technologies, the accuracy of identifying semantic information in input data using keyword matching is poor.
By acquiring the initial feature representation of the information to be identified, semantic processing is performed on it using a large language model, including word substitution, sentence structure rewriting, and tone rewriting. Combined with feature fusion, the target feature representation is determined to improve recognition accuracy.
It improves the accuracy of information recognition, can better identify the semantics of the information to be identified, prevents the misuse and abuse of generative large models, and avoids potential disputes and public opinion controversies.
Smart Images

Figure CN121659946A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, specifically to a system for recognizing implicit semantic information in a large language model. Background Technology
[0002] With the development of artificial intelligence technology, effectively and correctly identifying the semantic information of the model input data is of great significance to the efficiency and security of artificial intelligence model applications.
[0003] In existing technologies, keyword matching is often used to identify the semantic information contained in the input data, but the accuracy of the identification is poor. Summary of the Invention
[0004] This application provides a system for recognizing implicit semantic information in a large language model.
[0005] In a first aspect, this application provides a method comprising:
[0006] Obtain the first information of the information to be identified, which is the information after processing the initial feature representation of the information to be identified;
[0007] Based on the information to be identified and the first information, the second information is determined, and the second information is used to characterize the target feature representation of the information to be identified.
[0008] Based on the second information, the target identification information of the information to be identified is determined.
[0009] Secondly, this application provides a system comprising:
[0010] The information acquisition module is used to acquire the first information of the information to be identified. The first information is the information after processing the initial feature representation of the information to be identified.
[0011] The information determination module is used to determine second information based on the information to be identified and the first information. The second information is used to characterize the target feature representation of the information to be identified.
[0012] The information recognition module is used to determine the target recognition information of the information to be recognized based on the second information.
[0013] Thirdly, this application also provides an apparatus comprising:
[0014] One or more processors;
[0015] Memory; and
[0016] One or more applications, wherein the applications are stored in memory and configured to be executed by a processor to implement the methods of any one of the first aspects.
[0017] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, the computer program being loaded by a processor to perform the steps of the method in any of the first aspects. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a schematic diagram of a scenario for the information recognition system provided in an embodiment of the present invention;
[0020] Figure 2 This is a flowchart of an embodiment of the information recognition method provided by the present invention;
[0021] Figure 3 This is a flowchart illustrating a specific embodiment of obtaining first information provided by the present invention;
[0022] Figure 4 This is a flowchart illustrating a specific embodiment of determining the second information provided in this invention.
[0023] Figure 5 This is a flowchart illustrating a specific embodiment of determining target identification information provided in this invention.
[0024] Figure 6 This is a schematic diagram of the information recognition system provided in an embodiment of the present invention;
[0025] Figure 7 This is a schematic diagram of an embodiment of the computer device provided in this invention. Detailed Implementation
[0026] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0027] In the description of this application, it should be understood that the terms "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicating orientation or positional relationships based on the orientation or positional relationships shown in the accompanying drawings, are used only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this application. Furthermore, 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 technical features indicated. Thus, features defined with "first," "second," "third," etc., may explicitly or implicitly include one or more of the stated features.
[0028] In this application, the term "exemplary" is used to mean "used as an example, illustration, or description." Any embodiment described as "exemplary" in this application is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is provided to enable any person skilled in the art to make and use this application. Details are set forth in the following description for purposes of explanation. It should be understood that those skilled in the art will recognize that this application can be made without using these specific details. In other instances, well-known structures and processes are not described in detail to avoid obscuring the description of this application with unnecessary detail. Therefore, this application is not intended to be limited to the embodiments shown, but is consistent with the broadest scope of the principles and features disclosed in this application.
[0029] It should be noted that since the method in this application embodiment is executed in a computer device, the processing objects of each computer device exist in the form of data or information, such as time, which is essentially time information. It is understood that if size, quantity, position, etc. are mentioned in subsequent embodiments, they are all corresponding data that exist so that the computer device can process them. Specific details will not be elaborated here.
[0030] This application provides an information identification method, system, computer device, and computer-readable storage medium, which will be described in detail below.
[0031] Please see Figure 1 , Figure 1 This is a schematic diagram of a scenario for the information recognition system provided in an embodiment of this application. The information recognition system may include a computer device 100, which integrates the information recognition system, such as... Figure 1 Computer equipment in the country.
[0032] In this embodiment, the computer device 100 is mainly used to acquire first information of the information to be identified, wherein the first information is information after processing the initial feature representation of the information to be identified; based on the information to be identified and the first information, second information is determined, wherein the second information is used to characterize the target feature representation of the information to be identified; based on the second information, the target identification information of the information to be identified is determined. The first information of the information to be identified can be combined to perform semantic recognition of the information to be identified, thereby improving the accuracy of information recognition.
[0033] In this embodiment, the computer device 100 can be a standalone server, a server network, or a server cluster. For example, the computer device 100 described in this embodiment includes, but is not limited to, a computer, a network host, a single network server, a set of multiple network servers, or a cloud server composed of multiple servers. The cloud server is composed of a large number of computers or network servers based on cloud computing.
[0034] It is understood that the computer device 100 used in the embodiments of this application can be a device that includes both receiving and transmitting hardware, that is, a device having receiving and transmitting hardware capable of performing bidirectional communication on a bidirectional communication link. Such a device may include: cellular or other communication devices having a single-line display, a multi-line display, or a cellular or other communication device without a multi-line display. Specifically, the computer device 100 may be a desktop terminal or a mobile terminal, and may also be one of a mobile phone, tablet computer, laptop computer, etc.
[0035] Those skilled in the art will understand that Figure 1 The application environment shown is merely one application scenario of the solution in this application and does not constitute a limitation on the application scenario of the solution in this application. Other application environments may include those that are more specific to this application. Figure 1 The number of computer devices shown is more or less, for example Figure 1 Only one computer device is shown in the document. It is understood that the information identification system may also include one or more other services, which are not limited here.
[0036] In addition, such as Figure 1 As shown, the information recognition system may also include a memory 200 for storing data, such as first information, including first processing information, second processing information, third processing information, etc., such as second information, first fusion feature information, second fusion feature information, etc.
[0037] It should be noted that, Figure 1The schematic diagram of the information recognition system shown is merely an example. The information recognition system and scenario described in this application are for the purpose of more clearly illustrating the technical solutions of this application and do not constitute a limitation on the technical solutions provided in this application. As those skilled in the art will know, with the evolution of information recognition systems and the emergence of new business scenarios, the technical solutions provided in this application are also applicable to similar technical problems.
[0038] First, this application provides an information identification method, system, computer device, and computer-readable storage medium. The information identification method is executed by an information identification system, which is applied to a computer device. The information identification method includes: acquiring first information of information to be identified; determining second information based on the information to be identified and the first information; and determining target identification information of the information to be identified based on the second information.
[0039] like Figure 2 The diagram shown is a flowchart of an embodiment of the information recognition method in this application. The information recognition method may include the following steps S201 to S203, as detailed below:
[0040] S201. Obtain the first information of the information to be identified.
[0041] The information to be identified is the information that requires semantic recognition. This information can be in various forms, such as voice, text, or images. For example, it could be audio information input by the user, text information input by the user, or image information input by the user (such as pictures or videos). For instance, an image might contain text, totems, or identifiers representing a certain meaning. This embodiment does not impose any limitations on this. The information to be identified can consist of only one piece of information or can be composed of multiple pieces of information. For example, the information to be identified could be only a sentence currently input by the user, or it could be information resulting from multiple rounds of dialogue input by the user. For example, in a human-computer dialogue scenario, the first round input text x1, the second round input text x2, ..., and the last round input text x... n The information to be identified is x = x1 + x2 + ... + x n The information to be identified can also be multimodal information input simultaneously. For example, a single request input by a user can simultaneously include information of different modalities such as image information and text information. In addition, the "semantics" of the information to be identified represents the meaning contained in the information to be identified, which corresponds to the feature representation in the computer.
[0042] The first information is the information obtained after processing the initial feature representation of the information to be identified. It can be semantic processing information (i.e., information obtained after semantic processing of the information to be identified), which is a replacement text that is similar in form to the information to be identified but may have different semantics. The semantic processing methods include, but are not limited to, synonym replacement, syntactic structure transformation, tone rewriting, etc. In addition, the initial feature representation of the information to be identified refers to the information features of the information to be identified that can be recognized by a computer (such as vectors, matrices, eigenvalues, etc.). In this embodiment, the first information of the information to be identified is obtained, and semantic feature recognition is performed on the information to be identified based on the first information. This can uncover the hidden features of the information to be identified and improve the accuracy of information recognition.
[0043] In a specific implementation, such as Figure 3 As shown, obtaining the first information of the information to be identified in step S201 above may include steps S301 to S302, as follows:
[0044] S301. Based on the information to be identified, determine the corresponding information to be processed.
[0045] In one specific embodiment, the information to be processed is the word information in the information to be identified that needs to undergo word replacement processing. The information to be processed can be represented as {L={s1,s2,…,s…} r}},s1,s2,…,s r The word to be identified is the word that needs to be replaced. r represents the number of words to be replaced in the information to be identified. Word replacement can include synonym replacement, near-synonym replacement, antonym replacement, and random word replacement.
[0046] In one specific embodiment, the step of determining the corresponding information to be processed based on the information to be identified specifically includes: performing masking processing on each word in the information to be identified to obtain masked text information corresponding to each word; determining the score information corresponding to each word based on the masked text information corresponding to each word; and filtering the words in the information to be identified based on the score information to obtain the information to be processed.
[0047] Masking each word in the information to be identified means marking each word in the information as a null value or replacing it with a random word. For example, the information to be identified is represented as x = [w1, ..., w i-1 ,w i ,w i+1 ,…,w n ], the i-th word w in the information to be identified i Masking refers to masking the i-th word w in the information to be identified. i If the value is marked as null [UNK], then the i-th word w i The corresponding mask text information can be represented as x′ i=[w1,…,w i-1 ,[UNK],w i+1 ,…,w n The scoring information can be used to characterize the importance of corresponding words in the information to be identified. The importance of a word indicates its significance to the semantics of the information to be identified. That is, if changing a word (such as replacing or deleting it) can significantly change the semantics of the information to be identified, then the word is of greater importance; if changing a word results in a minor change to the semantics of the information to be identified, then the word is of lesser importance.
[0048] In one specific embodiment, the step of determining the score information corresponding to each word based on the mask text information corresponding to each word specifically includes: classifying the information to be identified using a classification processing model to obtain first category information; classifying the mask text information using a classification processing model to obtain second category information corresponding to each word; and calculating the first category information and the second category information to obtain the score information corresponding to each word.
[0049] The first category information can be the category probability information corresponding to the information to be identified, which represents the probability that the information to be identified is predicted by the classification processing model to be its corresponding true category. The second category information can be the category probability information corresponding to the masked text information, which represents the probability that the masked text information corresponding to each word is predicted by the text classification model to be the true category corresponding to the information to be identified.
[0050] In one specific embodiment, the step of calculating and processing the first category information and the second category information to obtain the score information corresponding to each word specifically includes: subtracting the first category information and the second category information to obtain the score information corresponding to each word. Optionally, the process of determining the score information can be expressed as: w represents the i-th word in the information to be identified. i The score information, P(y) true |x) represents the first category of information, P(y) true |x′ i ) represents the i-th word w in the information to be identified. i The second category of information, x represents the information to be identified, y true x′ represents the true category corresponding to the information to be identified. i This represents the masked text information corresponding to the i-th word. Additionally, the first category information and the second category information can be divided to obtain the score information for each word.
[0051] It should be noted that since the masked text information corresponding to each word lacks the semantics of the position corresponding to each word, if the importance of a word is higher, the difference between the first category information and the second category information corresponding to that word will be greater, that is, the higher the score of that word. Therefore, the score information of each word can characterize the importance of the corresponding word in the information to be identified.
[0052] In one specific embodiment, when filtering words in the information to be identified based on score information, the words can be sorted in descending order of score information, and then at least one word at the top of the sorted list can be selected as the information to be processed. Alternatively, words with scores higher than a score threshold can be selected as the information to be processed. This embodiment does not limit the specific choice. For example, the words in the information to be identified can be sorted in descending order of score information, and then the top 20% of the sorted words can be selected as the information to be processed.
[0053] S302. Based on the information to be processed and the information processing request, determine the first information of the information to be identified.
[0054] In this embodiment, the information processing request can be a pre-set prompt message used to guide the language model to rewrite the information to be processed. The information processing request can also be a request message corresponding to a certain fixed information processing method (such as a processing method that removes modifiers from a sentence and retains only the subject, predicate, and object). In a specific embodiment, the first information includes at least one of the first processing information, the second processing information, and the third processing information, and the information processing request includes at least one of the first processing request, the second processing request, and the third processing request. The step of determining the first information of the information to be identified based on the information to be processed and the information processing request specifically includes: replacing the target words corresponding to the information to be identified based on the information to be processed and the first processing request to obtain the first processing information; and / or rewriting the sentence structure based on the second processing request to obtain the second processing information; and / or rewriting the sentence in the information to be identified based on the third processing request to obtain the third processing information.
[0055] Optionally, when performing replacement processing on the target words corresponding to the information to be identified based on the information to be processed and the first processing request, the information to be processed, the first processing request, and the information to be identified can be input into a Large Language Model (LLM), and the LLM outputs the first processing information. For example, the first processing request can be "Given the following sentence: "{x}", and the list of words to be replaced in the sentence "{L={s1,s2,…,s rYour task is as follows: First, generate a synonym for each word in L based on the sentence context. Second, given that you have generated r synonyms, find their positions in the sentence, iterate through the original words, and replace them in combination, outputting the replaced sentence. This involves replacing one, two, ..., positions at a time, until all r positions are replaced. Replacing k positions will generate... The number of replacement texts, and the final number of first-processed information generated, are: Step 3: Organize and number each piece of first-processing information you generate, and record each one as a CT. j ".
[0056] Optionally, when rewriting the sentence structure in the information to be identified based on the second processing request, the second processing request and the information to be identified can be input into a large language model, and the large language model can output the second processing information. For example, the second processing request can be "Please rewrite this sentence using two different sentence organization structures". Since the same phrase expressed in different orders may produce different meanings, this embodiment rewrites the sentence structure in the information to be identified based on the second processing request, which can expose the deep semantics hidden in the carefully designed syntax or language organization order, thereby improving the accuracy of semantic recognition.
[0057] In one specific embodiment, when rewriting sentences in the information to be identified based on a third processing request, the third processing request and the information to be identified can be input into a large language model. The large language model then outputs the third processing information. For example, the third processing request could be, "Please rewrite this sentence using calm, anxious, and cheerful tones respectively, and output them in order." This embodiment, by rewriting sentences in the information to be identified based on a third processing request, allows for the rewriting of sentences in the information to be identified using different tones, thereby uncovering more possible semantics of the text and improving the accuracy of semantic recognition.
[0058] S202. Based on the information to be identified and the first information, determine the second information.
[0059] The second information is used to characterize the target feature representation of the information to be identified. The second information is the fused feature information obtained by fusing the information to be identified and the first information. The fusion method may include combination, merging and other data calculation methods (such as the combined use of one or more of the addition, subtraction, multiplication and division methods). In this embodiment, the second information is determined based on the information to be identified and the first information, and then semantic recognition is performed based on the second information. The first information of the information to be identified can be combined to perform semantic recognition on the information to be identified, thereby improving the accuracy of information recognition.
[0060] In a specific implementation, such as Figure 4As shown, in step S202 above, determining the second information based on the information to be identified and the first information may include steps S401 to S403, as follows:
[0061] S401. Extract features from the information to be identified to obtain the first feature information.
[0062] The first feature information is the feature information extracted from the information to be identified. For example, a pre-trained transformer model can be used to encode the features of the information to be identified, thereby obtaining the first feature information.
[0063] S402. Extract features from the first information to obtain the second feature information.
[0064] The first information includes multiple processing information items. Feature extraction of the first information refers to extracting features from each processing information item to obtain the second feature information corresponding to each processing information item. For example, regarding the first processing information... Feature extraction can yield second feature information. Feature extraction of the second processed information {b1, b2} yields the second feature information {F}. b1 F b2}, feature extraction of the third processed information {a1, a2, a3} yields the second feature information {F}. a1 F a2 ,F a3}
[0065] S403. Based on the first feature information and the second feature information, determine the second information.
[0066] In one specific embodiment, the step of determining the second information based on the first feature information and the second feature information specifically includes: determining at least one combined feature information based on the first feature information and the second feature information; performing feature prediction on the at least one combined feature information to obtain prediction information corresponding to each combined feature information; and determining the second information based on the at least one combined feature information and the prediction information corresponding to each combined feature information.
[0067] The step of determining at least one combined feature information based on the first feature information and the second feature information specifically includes: fusing the second feature information and the first feature information to obtain the first fused feature information; and performing feature combination processing on the first fused feature information to obtain at least one combined feature information.
[0068] In one specific embodiment, when fusing the second feature information and the first feature information, each second feature information is combined with the first feature information to obtain the first fused feature information corresponding to each second feature information. For example, the second feature information... With the first feature information F x By performing feature merging, the first fused feature information can be obtained. Second feature information {F b1 F b2} and the first feature information F x By performing feature merging, we can obtain the first fused feature information m2 = {F} b1 F b2 ,F x}, second feature information {F a1 F a2 ,F a3} and the first feature information F x By performing feature merging, we can obtain the first fused feature information m3 = {F} a1 F a2 ,F a3 ,F x}
[0069] In one specific embodiment, performing feature combination processing on the first fused feature information refers to combining the feature information in the first fused feature information, for example, taking from the first fused feature information m1. Take F from the first fused feature information m2 b1 F is taken from the first fused feature information m3 a1 By combining features, combined feature information is obtained. Take from the first fused feature information m1 Take F from the first fused feature information m2 b2 F is taken from the first fused feature information m3 a2 By combining features, combined feature information is obtained. By traversing all the feature information in the first fused feature information m1, m2, and m3, we can obtain 2 r *3*4 combined feature information.
[0070] In one specific embodiment, each combined feature information includes at least one third feature information. Feature prediction on at least one combined feature information means performing feature prediction (which can be semantic prediction) on each of the third feature information within the at least one combined feature information, thereby obtaining prediction information that includes the feature value information corresponding to each third feature information. For example, using combined feature information... For example, the prediction information corresponding to this combination of feature information is {y}. CT1 y b1 ,y a1}, y CT1 Representing the third feature information The corresponding predicted value information, yb1 Representing the third feature information F b1 The corresponding predicted value information, y a1 Representing the third feature information F a1 The corresponding predicted value information.
[0071] In one specific embodiment, the step of determining the second information based on at least one combined feature information and the prediction information corresponding to each combined feature information specifically includes: fusing the third feature information and the feature value information corresponding to the third feature information in each combined feature information to obtain at least one second fused feature information; each second fused feature information includes at least one fourth feature information; fusing the fourth feature information in each second fused feature information to obtain the second information.
[0072] For example, using combined feature information For example, the prediction information corresponding to this combination of feature information is: Combined feature information By fusing the third feature information and the corresponding feature value information in the data, combined feature information can be obtained. The corresponding second fusion feature information The second fused feature information includes the fourth feature information. and F a1 +y a1 For the fourth feature information F b1 +y b1 and F a1 +y a1 By performing fusion processing, a second piece of information can be obtained. Similarly, if the combined feature information includes 2... r If we have 3 * 4, we can get 2. r *3*4 pieces of second information.
[0073] S203. Based on the second information, determine the target identification information of the information to be identified.
[0074] The target identification information is the semantic recognition result of the information to be identified. In a specific embodiment, the target identification information includes first identification information and second identification information. The first identification information indicates that the information to be identified may involve harmful information such as pornography, violence, social prejudice, or violations of public order and good morals, while the second identification information indicates that the information to be identified is harmless. This embodiment determines the second information based on the information to be identified and the first information, and then determines the target identification information of the information to be identified based on the second information. Combining the first information of the information to be identified with the information to be identified improves the accuracy of information identification.
[0075] In a specific implementation, such as Figure 5 As shown, in step S203 above, determining the target identification information based on the second information may include steps S501 to S502, as follows:
[0076] S501. Perform feature recognition on the second information to obtain candidate recognition information.
[0077] The candidate identification information is the feature identification information obtained by performing feature recognition on the second information. For example, when the second information includes 2... r When there are 3*4, 2 r The three or four pieces of secondary information are input into a large language model for feature recognition, which yields 2. r *3*4 candidate recognition information, where feature recognition can be semantic recognition, and feature recognition information can be semantic recognition information.
[0078] S502. Based on the candidate recognition information, determine the target recognition information of the information to be recognized.
[0079] In one specific embodiment, the step of determining the target identification information of the information to be identified based on the candidate identification information specifically includes: determining a first quantity based on the candidate identification information; and determining the target identification information of the information to be identified based on the first quantity and a second quantity.
[0080] Here, the first quantity represents the number of candidate identification information entries that match the first identification information, where the first identification information represents that the information to be identified is harmful information. For example, if 50 of the candidate identification information entries match the first identification information, then the first quantity is 50. The second quantity represents the total number of candidate identification information entries. For example, if the total number of candidate identification information entries is 2... r If *3*4, then the second quantity is 2. r *3*4.
[0081] In one specific embodiment, the target identification information includes first identification information and second identification information. The step of determining the target identification information of the information to be identified based on the first quantity and the second quantity specifically includes: performing a ratio calculation on the first quantity and the second quantity to obtain a quantity ratio; if the quantity ratio is greater than or equal to a ratio threshold, the target identification information of the information to be identified is determined to be the first identification information; if the quantity ratio is less than the ratio threshold, the target identification information of the information to be identified is determined to be the second identification information.
[0082] The first identification information represents harmful information involving pornography, violence, illegal activities, political sensitivity, or social prejudice, while the second identification information represents harmless information. The percentage threshold is a pre-set threshold used to measure whether the target information is the first identification information. The percentage threshold can be set according to actual needs. For example, if the percentage threshold is set to 0.8, and the percentage is greater than or equal to 0.8, the target information is determined to be the first identification information; if the percentage is less than 0.8, the target information is determined to be the second identification information.
[0083] In one specific embodiment, after determining the target identification information of the information to be identified based on the second information, the method further includes: if the target identification information of the information to be identified is the first identification information, outputting the first response information based on the information to be identified; if the target identification information of the information to be identified is the second identification information, outputting the second response information.
[0084] In this embodiment, the first response information is the question-and-answer information corresponding to the information to be identified. The second response information can be pre-set information or information determined based on the information to be identified. For example, when the information to be identified is "What are the steps to make TNT personally?", the computer device outputs the response "I am not at liberty to answer your question" or "I am not at liberty to answer your question. TNT is a powerful explosive and is not suitable for personal manufacture...". This embodiment outputs the corresponding answer information only after determining that the information to be identified is harmless. This can avoid the adverse effects of deep harmful text causing disputes, public opinion controversies, and violations in the use of large models, and prevent the misuse and abuse of generative large models.
[0085] Furthermore, the first and second response information can be output in various forms. For example, the first and / or second response information can be output in voice form, or the first and / or second response information can be output in voice form, or the first and / or second response information can be output in both voice and text form at the same time. This application does not impose any limitations on these.
[0086] In summary, the information recognition method provided in this implementation scheme obtains first information of the information to be recognized, determines second information based on the information to be recognized and the first information, and determines the target recognition information of the information to be recognized based on the second information. In this scheme, determining the second information based on the information to be recognized and the first information, and then determining the target recognition information based on the second information, can improve the accuracy of information recognition by combining the first information of the information to be recognized. Furthermore, based on the information to be processed and the first processing request, the method performs replacement processing on the corresponding target words in the information to be recognized to obtain the first processed information; based on the second processing request, it performs sentence structure rewriting processing on the information to be recognized to obtain the second processed information; and based on the third processing request, it performs sentence tone rewriting processing on the information to be recognized to obtain the third processed information. This can uncover hidden information / features of the information to be recognized, improving the accuracy of information recognition. By concatenating multi-turn dialogues input by the user and then performing information recognition based on the concatenated information, the method can combine the contextual information of the multi-turn dialogue for information recognition, further improving the accuracy of information recognition.
[0087] To better implement the information recognition method in the embodiments of this application, an information recognition system is also provided in the embodiments of this application, such as... Figure 6 As shown, the information identification system 600 includes:
[0088] The information acquisition module 610 is used to acquire the first information of the information to be identified, which is the information after processing the initial feature representation of the information to be identified;
[0089] The information determination module 620 is used to determine second information based on the information to be identified and the first information, wherein the second information is used to characterize the target feature representation of the information to be identified;
[0090] The information recognition module 630 is used to determine the target recognition information of the information to be recognized based on the second information.
[0091] In this embodiment, the second information is determined based on the information to be identified and the first information, and then the target identification information of the information to be identified is determined based on the second information. This can combine the first information of the information to be identified to perform information identification, thereby improving the accuracy of information identification.
[0092] In some embodiments of this application, the information acquisition module 610 acquires first information of the information to be identified, including:
[0093] Based on the information to be identified, determine the corresponding information to be processed;
[0094] Based on the information to be processed and the information processing request, determine the first information of the information to be identified.
[0095] In some embodiments of this application, the first information includes at least one of first processing information, second processing information, and third processing information; the information processing request includes at least one of first processing request, second processing request, and third processing request; and the information acquisition module 610 determines the first information of the information to be identified based on the information to be processed and the information processing request, including:
[0096] Based on the information to be processed and the first processing request, the target words in the information to be identified are replaced to obtain the first processed information; and / or,
[0097] Based on the second processing request, the sentence structure in the information to be identified is rewritten to obtain the second processing information; and / or,
[0098] The sentence in the information to be identified is rewritten based on the third processing request to obtain the third processing information.
[0099] In some embodiments of this application, the information acquisition module 610 determines the corresponding information to be processed based on the information to be identified, including:
[0100] Each word in the information to be identified is masked to obtain the masked text information corresponding to each word.
[0101] Based on the masked text information corresponding to each word, the score information for each word is determined. The score information is used to characterize the importance of each word in the information to be identified.
[0102] The words in the information to be identified are filtered based on the scoring information to obtain the information to be processed.
[0103] In some embodiments of this application, the information acquisition module 610 determines the score information corresponding to each word based on the masked text information corresponding to each word, including:
[0104] The information to be identified is classified using a classification model to obtain the first category information.
[0105] The masked text information is classified using a classification processing model to obtain the second category information corresponding to each word;
[0106] The first and second category information are processed to obtain the score information for each word.
[0107] In some embodiments of this application, the information determination module 620 determines second information based on the information to be identified and the first information, including:
[0108] Feature extraction is performed on the information to be identified to obtain the first feature information;
[0109] The first information is used to extract features to obtain the second feature information;
[0110] The second information is determined based on the first feature information and the second feature information.
[0111] In some embodiments of this application, the information determination module 620 determines second information based on the first feature information and the second feature information, including:
[0112] Based on the first feature information and the second feature information, at least one combined feature information is determined;
[0113] Perform feature prediction on at least one combination of feature information to obtain the prediction information corresponding to each combination of feature information;
[0114] The second information is determined based on at least one combined feature information and the prediction information corresponding to each combined feature information.
[0115] In some embodiments of this application, the information determination module 620 determines at least one combined feature information based on the first feature information and the second feature information, including:
[0116] The second feature information and the first feature information are fused to obtain the first fused feature information;
[0117] The first fused feature information is subjected to feature combination processing to obtain at least one combined feature information.
[0118] In some embodiments of this application, each combined feature information includes at least one third feature information, the prediction information includes feature value information corresponding to each third feature information, and the information determination module 620 determines second information based on at least one combined feature information and the prediction information corresponding to each combined feature information, including:
[0119] The third feature information and the corresponding feature value information in each combined feature information are fused to obtain at least one second fused feature information; each second fused feature information includes at least one fourth feature information;
[0120] The fourth feature information in each second fusion feature information is fused to obtain the second information.
[0121] In some embodiments of this application, the information recognition module 630 determines the target recognition information of the information to be recognized based on the second information, including:
[0122] Semantic recognition is performed on the second information to obtain candidate recognition information;
[0123] Based on the candidate identification information, the target identification information of the information to be identified is determined.
[0124] In some embodiments of this application, the information recognition module 630 determines the target recognition information of the information to be recognized based on the candidate recognition information, including:
[0125] Based on the candidate identification information, a first quantity is determined; the first quantity represents the number of identification information in the candidate identification information that matches the first identification information.
[0126] Based on the first quantity and the second quantity, the target identification information of the information to be identified is determined; the second quantity represents the total number of candidate identification information.
[0127] In some embodiments of this application, the target identification information 630 includes first identification information and second identification information. The information identification module determines the target identification information of the information to be identified based on the first quantity and the second quantity, including:
[0128] The proportion of the first quantity to the second quantity is calculated.
[0129] If the proportion of the quantity is greater than or equal to the proportion threshold, the target identification information of the information to be identified is determined as the first identification information; or...
[0130] If the proportion of the quantity is less than the proportion threshold, the target identification information of the information to be identified is determined as the second identification information.
[0131] In some embodiments of this application, after the target identification information 630 determines the target identification information of the information to be identified based on the second information, the information identification module is further used for:
[0132] If the target identification information is the first identification information, output the first response information based on the information to be identified; or...
[0133] If the target identification information to be identified is the second identification information, output the second response information.
[0134] This application also provides a computer device that integrates any of the information identification systems provided in this application. The computer device includes:
[0135] One or more processors;
[0136] Memory; and
[0137] One or more applications, wherein the applications are stored in memory and configured to be executed by a processor from the steps of the information identification method in any of the embodiments described above.
[0138] This application also provides a computer device that integrates any of the information identification systems provided in this application. For example... Figure 7As shown, it illustrates a structural schematic diagram of the computer device involved in the embodiments of this application, specifically:
[0139] The computer device may include components such as a processor 801 with one or more processing cores, a memory 802 with one or more computer-readable storage media, a power supply 803, and an input unit 804. Those skilled in the art will understand that... Figure 7 The computer device structure shown does not constitute a limitation on the computer device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein:
[0140] The processor 801 is the control center of the computer device. It connects various parts of the computer device via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 802, and by calling data stored in the memory 802, it performs various functions of the computer device and processes data, thereby providing overall monitoring of the computer device. Optionally, the processor 801 may include one or more processing cores; preferably, the processor 801 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 801.
[0141] The memory 802 can be used to store software programs and modules. The processor 801 executes various functional applications and data processing by running the software programs and modules stored in the memory 802. The memory 802 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 802 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 802 may also include a memory controller to provide the processor 801 with access to the memory 802.
[0142] The computer device also includes a power supply 803 that supplies power to the various components. Preferably, the power supply 803 can be logically connected to the processor 801 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 803 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0143] The computer device may also include an input unit 804, which can be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
[0144] Although not shown, the computer device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 801 in the computer device loads the executable files corresponding to the processes of one or more application programs into the memory 802 according to the following instructions, and the processor 801 runs the application programs stored in the memory 802 to realize various functions, as follows:
[0145] Obtain the first information of the information to be identified, which is the information after processing the initial feature representation of the information to be identified;
[0146] Based on the information to be identified and the first information, the second information is determined, and the second information is used to characterize the target feature representation of the information to be identified.
[0147] Based on the second information, the target identification information of the information to be identified is determined.
[0148] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0149] Therefore, embodiments of this application provide a computer-readable storage medium, which may include: read-only memory (ROM), random access memory (RAM), a magnetic disk, or an optical disk, etc. A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in any of the information recognition methods provided in embodiments of this application. For example, the computer program loaded by the processor can execute the following steps:
[0150] Obtain the first information of the information to be identified, which is the information after processing the initial feature representation of the information to be identified;
[0151] Based on the information to be identified and the first information, the second information is determined, and the second information is used to characterize the target feature representation of the information to be identified.
[0152] Based on the second information, the target identification information of the information to be identified is determined.
[0153] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the detailed descriptions of other embodiments above, which will not be repeated here.
[0154] In practice, each of the above units or structures can be implemented as an independent entity or can be arbitrarily combined to be implemented as the same or several entities. For the specific implementation of each of the above units or structures, please refer to the previous method embodiments, which will not be repeated here.
[0155] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0156] The above provides a detailed description of an information identification method, system, computer device, and computer-readable storage medium provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method, characterized in that, include: Obtain first information of the information to be identified, wherein the first information is information after processing the initial feature representation of the information to be identified; Based on the information to be identified and the first information, second information is determined, and the second information is used to characterize the target feature representation of the information to be identified; Based on the second information, the target identification information of the information to be identified is determined.
2. The method according to claim 1, characterized in that, The first information for obtaining the information to be identified includes: Based on the information to be identified, the corresponding information to be processed is determined; Based on the information to be processed and the information processing request, the first information of the information to be identified is determined.
3. The method according to claim 2, characterized in that, The first information includes at least one of first processing information, second processing information, and third processing information, and the information processing request includes at least one of first processing request, second processing request, and third processing request; The step of determining the first information of the information to be identified based on the information to be processed and the information processing request includes: Based on the information to be processed and the first processing request, the target words corresponding to the information to be identified are replaced to obtain the first processed information; and / or, Based on the second processing request, the sentence structure in the information to be identified is rewritten to obtain the second processed information; and / or, Based on the third processing request, the sentence in the information to be identified is rewritten to obtain the third processing information.
4. The method according to claim 2, characterized in that, The step of determining the corresponding information to be processed based on the information to be identified includes: Each word in the information to be identified is masked to obtain the masked text information corresponding to each word. Based on the masked text information corresponding to each word, a score is determined for each word, and the score is used to characterize the importance of the corresponding word in the information to be identified. The words in the information to be identified are filtered based on the score information to obtain the information to be processed.
5. The method according to claim 4, characterized in that, The step of determining the score information for each word based on the masked text information corresponding to each word includes: The information to be identified is classified using a classification model to obtain the first category information; The masked text information is classified using the classification processing model to obtain the second category information corresponding to each word; The first category information and the second category information are processed to obtain the score information for each word.
6. The method according to claim 1, characterized in that, The step of determining the second information based on the information to be identified and the first information includes: Feature extraction is performed on the information to be identified to obtain first feature information; Feature extraction is performed on the first information to obtain the second feature information; Based on the first feature information and the second feature information, the second information is determined.
7. The method according to claim 6, characterized in that, The step of determining the second information based on the first feature information and the second feature information includes: Based on the first feature information and the second feature information, at least one combined feature information is determined; Perform feature prediction on at least one of the combined feature information to obtain prediction information corresponding to each of the combined feature information; The second information is determined based on at least one of the combined feature information and the prediction information corresponding to each of the combined feature information.
8. The method according to claim 7, characterized in that, The step of determining at least one combined feature information based on the first feature information and the second feature information includes: The second feature information and the first feature information are fused together to obtain the first fused feature information; The first fused feature information is subjected to feature combination processing to obtain at least one combined feature information.
9. The method according to claim 7, characterized in that, Each of the combined feature information includes at least one third feature information, and the prediction information includes feature value information corresponding to each of the third feature information; The step of determining the second information based on at least one of the combined feature information and the prediction information corresponding to each of the combined feature information includes: The third feature information and the feature value information corresponding to the third feature information in each of the combined feature information are fused to obtain at least one second fused feature information; each second fused feature information includes at least one fourth feature information. The fourth feature information in each of the second fused feature information is fused to obtain the second information.
10. The method according to claim 1, characterized in that, The step of determining the target identification information of the information to be identified based on the second information includes: The second information is used for feature recognition to obtain candidate recognition information; Based on the candidate identification information, the target identification information of the information to be identified is determined.
11. The method according to claim 10, characterized in that, The step of determining the target identification information of the information to be identified based on the candidate identification information includes: Based on the candidate identification information, a first quantity is determined; the first quantity represents the number of identification information in the candidate identification information that matches the first identification information. Based on the first quantity and the second quantity, the target identification information of the information to be identified is determined; the second quantity represents the total number of candidate identification information.
12. The method according to claim 11, characterized in that, The target identification information includes the first identification information and the second identification information. Determining the target identification information of the information to be identified based on the first quantity and the second quantity includes: The first quantity and the second quantity are proportionally calculated to obtain the quantity ratio; If the percentage of the quantity is greater than or equal to the percentage threshold, the target identification information of the information to be identified is determined to be the first identification information; and / or, If the proportion of the quantity is less than the proportion threshold, the target identification information of the information to be identified is determined to be the second identification information.
13. The method according to claim 12, characterized in that, After determining the target identification information of the information to be identified based on the second information, the method further includes: If the target identification information of the information to be identified is the first identification information, output the first response information based on the information to be identified; and / or, If the target identification information of the information to be identified is the second identification information, output the second response information.
14. A system, characterized in that, include: The information acquisition module is used to acquire first information of the information to be identified, wherein the first information is information after processing the initial feature representation of the information to be identified; An information determination module is used to determine second information based on the information to be identified and the first information, wherein the second information is used to characterize the target feature representation of the information to be identified; An information recognition module is used to determine the target recognition information of the information to be recognized based on the second information; Preferably, the information acquisition module acquires the first information of the information to be identified, including: Based on the information to be identified, the corresponding information to be processed is determined; Based on the information to be processed and the information processing request, the first information of the information to be identified is determined; Preferably, the first information includes at least one of first processing information, second processing information, and third processing information; the information processing request includes at least one of first processing request, second processing request, and third processing request; and the information acquisition module determines the first information of the information to be identified based on the information to be processed and the information processing request, including: Based on the information to be processed and the first processing request, the target words corresponding to the information to be identified are replaced to obtain the first processed information; and / or, Based on the second processing request, the sentence structure in the information to be identified is rewritten to obtain the second processed information; and / or, Based on the third processing request, the sentence in the information to be identified is rewritten to obtain the third processing information; Preferably, the information acquisition module determines the corresponding information to be processed based on the information to be identified, including: Each word in the information to be identified is masked to obtain the masked text information corresponding to each word. Based on the masked text information corresponding to each word, a score is determined for each word, and the score is used to characterize the importance of the corresponding word in the information to be identified. The words in the information to be identified are filtered based on the scoring information to obtain the information to be processed; Preferably, the information acquisition module determines the score information for each word based on the masked text information corresponding to each word, including: The information to be identified is classified using a classification model to obtain the first category information; The masked text information is classified using the classification processing model to obtain the second category information corresponding to each word; The first category information and the second category information are processed to obtain the score information for each word; Preferably, the information determining module determines the second information based on the information to be identified and the first information, including: Feature extraction is performed on the information to be identified to obtain first feature information; Feature extraction is performed on the first information to obtain the second feature information; Based on the first feature information and the second feature information, the second information is determined; Preferably, the information determining module determines the second information based on the first feature information and the second feature information, including: Based on the first feature information and the second feature information, at least one combined feature information is determined; Perform feature prediction on at least one of the combined feature information to obtain prediction information corresponding to each of the combined feature information; The second information is determined based on at least one of the combined feature information and the prediction information corresponding to each of the combined feature information; Preferably, the information determining module determines at least one combined feature information based on the first feature information and the second feature information, including: The second feature information and the first feature information are fused together to obtain the first fused feature information; The first fused feature information is subjected to feature combination processing to obtain at least one combined feature information; Preferably, each of the combined feature information includes at least one third feature information, the prediction information includes feature value information corresponding to each of the third feature information, and the information determination module determines second information based on at least one of the combined feature information and the prediction information corresponding to each of the combined feature information, including: The third feature information and the feature value information corresponding to the third feature information in each of the combined feature information are fused to obtain at least one second fused feature information; each second fused feature information includes at least one fourth feature information. The fourth feature information in each of the second fused feature information is fused to obtain the second information; Preferably, the information recognition module determines the target recognition information of the information to be recognized based on the second information, including: The second information is used for feature recognition to obtain candidate recognition information; Based on the candidate identification information, the target identification information of the information to be identified is determined; Preferably, the information recognition module determines the target recognition information of the information to be recognized based on the candidate recognition information, including: Based on the candidate identification information, a first quantity is determined; the first quantity represents the number of identification information in the candidate identification information that matches the first identification information. Based on the first quantity and the second quantity, the target identification information of the information to be identified is determined; the second quantity represents the total number of candidate identification information. Preferably, the target identification information includes the first identification information and the second identification information, and the information identification module determines the target identification information of the information to be identified based on the first quantity and the second quantity, including: The first quantity and the second quantity are proportionally calculated to obtain the quantity ratio; If the percentage of the quantity is greater than or equal to the percentage threshold, the target identification information of the information to be identified is determined to be the first identification information; and / or, If the proportion of the quantity is less than the proportion threshold, the target identification information of the information to be identified is determined to be the second identification information; Preferably, after the information recognition module determines the target recognition information of the information to be recognized based on the second information, the information recognition module is further configured to: If the target identification information of the information to be identified is the first identification information, output the first response information based on the information to be identified; and / or, If the target identification information of the information to be identified is the second identification information, output the second response information.
15. A device, characterized in that, The device includes: One or more processors; Memory; and One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the method of any one of claims 1 to 13.
16. A computer-readable storage medium, characterized in that, It contains a computer program that is loaded by a processor to perform the steps of the method according to any one of claims 1 to 13.