Large model dialogue management and control method, device and equipment and storage medium
By using preset response models and AC automatons in the AI chat system to filter sensitive information, the problem of artificial intelligence not being able to identify user emotions and mention sensitive information is solved, and the quality and compliance of response data are improved.
Patent Information
- Application Number
- CN202310987944.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-07
- Publication Date
- 2025-02-18
AI Technical Summary
When chatting with users, artificial intelligence cannot recognize users' emotions and sensitive information that cannot be mentioned, resulting in a decrease in the quality of the output response data.
By in response to the received problem data, the response data is generated based on the preset response model, and the response data is filtered through sensitive information, and the preset AC automaton is used to match the sensitive information in the sensitive information table to obtain compliant response data.
It effectively avoids the output of data with sensitive information by artificial intelligence, improves the quality of response data, and ensures that the output data is compliant.
Smart Images

Figure CN119474286A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of network security technology, and in particular to a method, device, equipment and storage medium for controlling large model dialogues. Background Art
[0002] With the rapid development of artificial intelligence, artificial intelligence has been widely used in life and has brought a lot of convenience to people's lives.
[0003] Artificial intelligence can use model algorithms to learn autonomously, generate autonomous creative thinking capabilities, and answer questions raised by users. However, when chatting with users, artificial intelligence cannot recognize users' emotions and sensitive information that cannot be mentioned. Therefore, when artificial intelligence answers questions raised by users, it may output data involving sensitive information, resulting in a decrease in the quality of the data output by artificial intelligence. Summary of the invention
[0004] The main purpose of this application is to provide a method, device, equipment and storage medium for managing and controlling large model dialogues, aiming to solve the technical problem in the prior art that when artificial intelligence answers questions raised by users, the artificial intelligence may output data involving sensitive information, resulting in a decrease in the quality of the artificial intelligence output response data.
[0005] To achieve the above objectives, the present application provides a method for controlling a large model dialogue, the method comprising:
[0006] In response to the received question data, generating answer data corresponding to the question data based on a preset answer model;
[0007] Filtering the response data for sensitive information to obtain compliant response data;
[0008] The compliance response data is displayed.
[0009] Optionally, the step of filtering the response data for sensitive information to obtain compliant response data includes:
[0010] Based on a preset AC automaton, matching sensitive information recorded in a preset sensitive information table from the response data;
[0011] The sensitive information is filtered from the response data to obtain compliant response data.
[0012] Optionally, before the step of matching the sensitive information recorded in the preset sensitive information table from the response data based on the preset AC automaton, the step further includes:
[0013] Get real-time data in real time;
[0014] Determining whether the real-time data is the sensitive information;
[0015] If the real-time data is the sensitive information, the preset sensitive information table is updated in real time based on the real-time data.
[0016] Optionally, the step of matching the sensitive information recorded in a preset sensitive information table from the response data based on a preset AC automaton includes:
[0017] Based on a preset AC automaton, matching sensitive characters recorded in a preset sensitive information table from the response data;
[0018] Determine the position and proportion of the sensitive characters in the response data;
[0019] Based on a preset matching rule, the position and the proportion, sensitive information is matched from the response data.
[0020] Optionally, the preset matching rule includes any one of a completely belonging rule and a partially belonging rule, and the step of matching sensitive information from the response data based on the preset matching rule, the position and the proportion includes:
[0021] If the preset matching rule is a partial belonging rule, then based on the position, determining the expression meaning of the sensitive character in the response data;
[0022] If the expression meaning is the expression meaning of the sensitive information, the sensitive information is matched from the response data based on the proportion.
[0023] Optionally, if the preset matching rule is a partial belonging rule, after the step of determining the expression meaning of the sensitive character in the response data based on the position, the method further includes:
[0024] If the expression meaning is different from the meaning expressed by the sensitive information, it is determined that the response data does not contain the sensitive information.
[0025] Optionally, if the expression meaning is the expression meaning of the sensitive information, the step of matching the sensitive information from the response data based on the proportion includes:
[0026] If the expression meaning is the expression meaning of the sensitive information, the proportion is compared with the preset sensitivity threshold, and the information to be determined is obtained from the response data;
[0027] If the proportion is greater than the preset sensitivity threshold, the information to be determined is determined to be sensitive information.
[0028] Optionally, if the preset matching rule is a completely belonging rule, the step of matching sensitive information from the response data based on the preset matching rule, the position and the proportion includes:
[0029] If the matching rule completely belongs to the rule, determining whether the response data contains all sensitive characters based on the proportion;
[0030] If the response data contains only sensitive characters, determining the meaning of each sensitive character in the response data based on the position;
[0031] If the expression meaning is the same as the expression meaning of the sensitive information, the response data is determined to be sensitive information.
[0032] Optionally, before the step of generating answer data corresponding to the question data based on a preset answer model, the step further includes:
[0033] Perform sensitive information analysis on the problematic data;
[0034] Filtering the sensitive information from the problem data;
[0035] The step of generating answer data corresponding to the question data based on a preset answer model comprises:
[0036] Generate response data corresponding to the question data for filtering the sensitive information based on a preset response model.
[0037] Optionally, the step of performing sensitive information analysis on the problematic data includes:
[0038] Classifying the problem data to determine the problem areas involved in the problem data;
[0039] Calling a whitelist of sensitive information corresponding to the problem domain;
[0040] Filtering the record information on the white list from the problem data;
[0041] It is determined that the recorded information is sensitive information.
[0042] Optionally, the step of generating answer data corresponding to the question data based on a preset answer model further includes:
[0043] Identify the fields involved in the problem data based on a preset answer model;
[0044] If the field belongs to a preset answer field set, answer data corresponding to the question data is generated.
[0045] Optionally, after the step of identifying the field involved in the question data based on a preset answer model, the following steps are included:
[0046] If the domain does not belong to the preset answer domain set, generating prompt data that is sensitive to the question data;
[0047] The prompt data is used as response data.
[0048] Optionally, the step of identifying the field involved in the question data based on a preset answer model includes:
[0049] Identify key word combinations in the question data based on a preset answer model;
[0050] The field involved in the problem data is determined based on the key combination words.
[0051] In addition, to achieve the above purpose, the present application also provides a control device for large model dialogue, and the control device for large model dialogue includes:
[0052] A response module, configured to generate response data corresponding to the question data based on a preset response model in response to the received question data;
[0053] An acquisition module, used to filter the response data for sensitive information and obtain compliant response data;
[0054] A display module is used to display the compliance response data.
[0055] Optionally, the obtaining module is further used to match the sensitive information recorded in a preset sensitive information table from the response data based on a preset AC automaton; and filter the sensitive information from the response data to obtain compliant response data.
[0056] Optionally, the acquisition module is also used to match sensitive characters recorded in a preset sensitive information table from the response data based on a preset AC automaton; determine the position and proportion of the sensitive characters in the response data; and match sensitive information from the response data based on preset matching rules, the position and the proportion.
[0057] Optionally, the response module is further used to perform sensitive information analysis on the problem data; filter the sensitive information from the problem data;
[0058] The response module is further used to generate response data corresponding to the question data for filtering the sensitive information based on a preset response model.
[0059] Optionally, the response module is further used to identify the field involved by the question data based on a preset response model; if the field belongs to a preset response field set, generate response data corresponding to the question data.
[0060] In addition, to achieve the above-mentioned purpose, the present application also proposes a large model dialogue control device, which includes: a memory, a processor, and a large model dialogue control program stored on the memory and executable on the processor, and the large model dialogue control program is configured to implement the steps of the large model dialogue control method as described above.
[0061] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, on which a control program for large model dialogue is stored. When the control program for large model dialogue is executed by a processor, the steps of the control method for large model dialogue described above are implemented.
[0062] The present application provides a method, device, equipment and storage medium for controlling a large model dialogue. Compared with the prior art in which artificial intelligence may output data involving sensitive information when answering questions raised by users, resulting in a decrease in the quality of the answer data output by artificial intelligence, in the present application, in response to the received question data, answer data corresponding to the question data is generated based on a preset answer model; the answer data is filtered for sensitive information to obtain compliant answer data; and the compliant answer data is displayed. In the present application, after receiving the question data and generating answer data corresponding to the question data based on a preset answer model, the sensitive information in the answer data is filtered to avoid the preset answer model from outputting data with sensitive information, and the filtered compliant answer data is displayed to the user, that is, in the present application, after the preset answer model generates answer data for the question data, sensitive information is filtered from the answer data to avoid outputting data involving sensitive information, thereby improving the quality of the answer data output by the artificial intelligence. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0064] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0065] Figure 1 Schematic diagram of the equipment structure of the hardware operating environment involved in the embodiment of the present application
[0066] Figure 2 This is a flow chart of the first embodiment of the method for controlling large model dialogues of this application;
[0067] Figure 3 This is a schematic diagram of the application process of the control method of the large model dialogue for this application;
[0068] Figure 4 This is a flow chart of the second embodiment of the method for controlling large model dialogue of this application;
[0069] Figure 5 A flowchart of a third embodiment of the method for controlling large model dialogues of this application;
[0070] Figure 6 Schematic diagram of the control device for the large-scale model dialogue in this application.
[0071] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0072] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0073] Reference Figure 1 , Figure 1 A schematic diagram of the structure of the control equipment for the large model dialogue of the hardware operating environment involved in the embodiment of the present application.
[0074] like Figure 1 As shown, the control device of the large model dialogue may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (WIreless-FIdelity, WI-FI) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM) memory, or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0075] Those skilled in the art will understand that Figure 1The structure shown in the figure does not constitute a limitation on the control device of the large model dialogue, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0076] like Figure 1 As shown, the memory 1005 as a storage medium may include an operating system, a data storage module, a network communication module, a user interface module, and a large model dialogue management and control program.
[0077] exist Figure 1 In the control device of the large model dialogue shown, the network interface 1004 is mainly used for data communication with other devices; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the control device of the large model dialogue of the present application can be set in the control device of the large model dialogue, and the control device of the large model dialogue calls the control program of the large model dialogue stored in the memory 1005 through the processor 1001, and executes the control method of the large model dialogue provided in the embodiment of the present application.
[0078] The present application embodiment provides a method for controlling a large model dialogue, referring to Figure 2 , Figure 2 This is a flow chart of the first embodiment of a large model dialogue control method of the present application.
[0079] The purpose of this embodiment is to: filter sensitive information in the response data of the waiting response model to avoid the presence of sensitive words in the response data, thereby improving the quality of the response data output by the artificial intelligence.
[0080] In this embodiment, it should be noted that the control method of large model dialogue can be applied to the control device of large model dialogue, the control device of large model dialogue is subordinate to the control equipment of large model dialogue, and the control equipment of large model dialogue belongs to the control system of large model dialogue.
[0081] In this embodiment, the control method of the large model dialogue includes:
[0082] Step S10, in response to the received question data, generating answer data corresponding to the question data based on a preset answer model;
[0083] The question data may be chat questions, knowledge questions or request questions sent by the user, without any specific limitation.
[0084] For example, chat questions can be daily conversations such as "Where should we go today when it rains?" or "My cat ignores me"; knowledge questions can be "What does trigonometric function mean?" or "Why should this poem be understood in this way", etc., without specific restrictions; request questions can be "Please write a poem about autumn" or "Please write a paper based on the current working people", etc., without specific restrictions.
[0085] The response data may be generated by a preset response model (big model) itself according to the question data, or may be compiled from a big database, etc., without specific limitation.
[0086] For example, if the question data is "What does trigonometric function mean", the answer data can be the standard definition of trigonometric function compiled from a large database, or it can be a preset answer model that reorganizes the language data according to the understood standard definition to obtain easy-to-understand answer data, or it can be both the standard definition and the understanding of the standard definition.
[0087] The received question data may be voice data or text data, etc., without any specific limitation.
[0088] Furthermore, the question and answer data can also be managed and controlled, that is, after receiving the question data, the question data can be first detected to determine whether there is sensitive information in the question data, and the sensitive information can be filtered out to prevent users from maliciously sending data that affects the normal user experience, such as advertising diversion and dirty words. At this time, before step S10 described in this embodiment, the following can also be included:
[0089] Step S08, performing sensitive information analysis on the problematic data;
[0090] It should be noted that when performing sensitive information analysis on problem data, a whitelist and a blacklist of sensitive information can be set in advance, and the whitelist and the blacklist can be used to perform sensitive information analysis on the problem data to increase the speed of finding sensitive information and improve the management efficiency of the problem data.
[0091] Furthermore, in order to improve the efficiency of sensitive analysis of problem data, the step of performing sensitive information analysis on the problem data includes:
[0092] Step S081, classifying the problem data to determine the problem field involved in the problem data;
[0093] Step S082, calling a whitelist of sensitive information corresponding to the problem domain;
[0094] Step S083, filtering the record information on the white list from the problem data;
[0095] Step S084: determine that the recorded information is sensitive information.
[0096] It should be noted that after receiving the problem data, you can also call a whitelist of sensitive information in the field based on the problem field involved in the problem data, that is, a blacklist of words that cannot appear in the field, search the problem data for record information that appears on the whitelist, and define the record information as sensitive information.
[0097] It should be noted that for the sensitivity analysis of the problem data, a white domain set of answerable questions and a black domain set of unanswerable questions can be pre-set; after determining the problem domain of the problem data, it is judged whether the problem domain belongs to the white domain set or the black domain set, thereby improving the efficiency of the sensitivity analysis of the problem data.
[0098] In addition, if the problem domain is neither in the black domain set nor in the white domain set, the white list of sensitive information corresponding to the problem domain is called to avoid missing or misdetecting problem data, thereby improving the accuracy of sensitive analysis of problem data.
[0099] Step S09, filtering the sensitive information from the problem data;
[0100] It should be noted that sensitive information analysis of problem data can analyze sensitive information such as violations of laws, violent tendencies, or advertising diversion from the problem data, and filter out the sensitive information.
[0101] In the specific implementation, sensitive information can be filtered out from the question data by using the model blacklist or model whitelist set in the pending response model, and by using the search blacklist for pornography, violence, etc. or the search whitelist for positive, sunny, and daily language set in the search engine, so as to comprehensively analyze the question data and avoid missed detections and false detections.
[0102] Furthermore, the step S10 may further include:
[0103] Step S11, generating response data corresponding to the question data for filtering the sensitive information based on a preset response model.
[0104] It should be noted that since the preset response model has learning capabilities, after filtering the sensitive information in the question data, the preset response module generates corresponding response data based on the filtered question data, which can reduce the impact of sensitive information on the learning of the preset response model.
[0105] Step S20, filtering the response data for sensitive information to obtain compliant response data;
[0106] It should be noted that filtering sensitive information in response data can be the same as filtering question data. The response data can be analyzed at the level of the model to be responded to itself, and the response data can be analyzed at the search engine level. The analyzed sensitive information can be filtered to provide double protection for the control of the response of the model to be responded to.
[0107] In a specific implementation, the analysis of the response data at the level of the model to be responded to itself can be to filter out data with negative emotional semantics from the data model to be responded to according to the model blacklist, and filter out the data; the analysis of the response data at the search engine level can be to filter out data with violent, pornographic, anti-life, disunity semantics, etc. according to the search blacklist, and filter out the data to obtain compliant response data, so as to avoid users converting their emotions into violent or anti-life harmful emotions after receiving the response data.
[0108] Step S30: displaying the compliance response data.
[0109] It should be noted that the display of compliance response data can be through a display or through voice display, etc., without any specific limitation.
[0110] It should be noted that before displaying the compliant response data, the compliant response data can also be modified according to the true meaning expressed by the filtered sensitive information, so that the compliant response data has the same or similar meaning as the response data, thereby avoiding the situation where the response data does not correspond to the problem data.
[0111] For ease of understanding, now combined Figure 3 This is for illustration only, but not for limitation. Figure 3 This is a schematic diagram of the application process of the control method for large model dialogue in this application.
[0112] refer to Figure 3 , input (input) the question data, filter (filter) the question data to filter out the sensitive data in the question data, and then use the model to be answered to infer the filtered question data to obtain the answer data of the question data, and output (output) the compliant answer data after filtering (filtering) the sensitive information in the answer data.
[0113] refer to Figure 3 , filtering will be done at the AI level and the SO level, that is, the question data and the answer data will be filtered at the level of the waiting-for-answer model and the search engine level, so that the information that is harmful to its own configuration and the information with negative emotional semantics can be filtered out through the waiting-for-answer model. Through the search engine, information related to pornography, violence, etc. can be continuously collected, and sensitive information such as pornography and violence can be filtered out at the search engine level.
[0114] refer to Figure 3 , AI-level filtering or SO-level filtering can first classify the fields involved in the answer data or question data, and then match them according to the blacklist (black words) and whitelist (white words) in each field to avoid the same word expressing different meanings in different fields and matching errors.
[0115] The present application provides a method, device, equipment and storage medium for controlling a large model dialogue. Compared with the prior art in which artificial intelligence may output data involving sensitive information when answering questions raised by users, resulting in a decrease in the quality of the answer data output by artificial intelligence, in the present application, in response to the received question data, answer data corresponding to the question data is generated based on a preset answer model; the answer data is filtered for sensitive information to obtain compliant answer data; and the compliant answer data is displayed. In the present application, after receiving the question data and generating answer data corresponding to the question data based on a preset answer model, the sensitive information in the answer data is filtered to avoid the preset answer model from outputting data with sensitive information, and the filtered compliant answer data is displayed to the user, that is, in the present application, after the preset answer model generates answer data for the question data, sensitive information is filtered from the answer data to avoid outputting data involving sensitive information, thereby improving the quality of the answer data output by the artificial intelligence.
[0116] refer to Figure 4 , Figure 4 This is a flow chart of the second embodiment of the large model dialogue control method of the present application.
[0117] Based on the above embodiment, in this embodiment, the steps of step S20 include:
[0118] Step S21, based on a preset AC automaton, matching sensitive information recorded in a preset sensitive information table from the response data;
[0119] It should be noted that preset AC automata are provided at both the level of the to-be-answered model and the level of the search engine, and sensitive information in the answer data or question-and-answer data is screened by the preset AC automata to improve the efficiency of screening sensitive information.
[0120] In specific real-time, when using the preset sensitive information table to match sensitive information in response data or sensitive information in question and answer data, the meaning of each character segment in the data can be first identified, and the meaning can be compared with the sensitive meaning recorded in the preset sensitive information table. If the meaning is sensitive, the corresponding character segment is determined to be sensitive information, thereby improving the accuracy of sensitive information detection and avoiding missed detection or false detection.
[0121] Step S22, filtering the sensitive information from the response data to obtain compliant response data.
[0122] It should be noted that since there are many specific sensitive words in the sensitive information, it is difficult to collect all of them and create a sensitive information database. Therefore, the sensitive information table may include not only specific sensitive words, but also the sensitive meanings expressed by the sensitive words, so as to avoid the inclusion of sensitive information in the response data or question data. However, if the sensitive information contained in the response data or question data cannot be found in the sensitive words recorded in the preset sensitive information table, the response data or question data shall be regarded as data without sensitive information.
[0123] Furthermore, the position and proportion of sensitive information in the response data are different, and the preset matching rules used are also different, and the sensitive information finally matched is also different. Therefore, the step S21 includes:
[0124] Step S211, based on a preset AC automaton, matching sensitive characters recorded in a preset sensitive information table from the response data;
[0125] Step S212, determining the position and proportion of the sensitive characters in the response data;
[0126] Step S213, matching sensitive information from the response data based on a preset matching rule, the position and the proportion.
[0127] It should be noted that the response data may include at least one data strip. When matching sensitive characters from the response data, the sensitive characters in each data strip are matched. If a data strip containing sensitive characters is matched, the data strip is discarded to avoid deleting the entire response data when a sensitive character is detected in the response data. A data strip can be regarded as a data packet of a sentence.
[0128] In a specific implementation, the preset matching rules include any one of the rules that fully belong to or partially belong to. According to the preset AC automaton, the sensitive characters of each sentence in the response data are detected, and the specific position and proportion of the sensitive characters in the sentence are determined. According to the selected preset matching rules, position and proportion, the data strip containing sensitive information is determined.
[0129] For example, if the response data is a paper, if a sentence in the paper contains sensitive information, the sentence can be deleted or the sensitive information in the sentence can be deleted according to the preset matching rules, so as to avoid affecting the response quality of the entire paper due to this sentence, and also avoid deleting and rewriting the entire paper due to one sentence, affecting the response efficiency of the model to be responded to.
[0130] Optionally, when the preset matching rule is a partial belonging rule, step S213 described in this embodiment includes:
[0131] Step S1A, if the preset matching rule is a partial belonging rule, then based on the position, determining the expression meaning of the sensitive character in the response data;
[0132] Step S2A: if the expression meaning is the expression meaning of the sensitive information, then matching the sensitive information from the response data based on the proportion.
[0133] It should be noted that the preset matching rules may include full matching rules and partial matching rules, that is, the full matching rule may be that when all fields in the data strip are sensitive characters, the data strip is regarded as sensitive information; the partial matching rule may be that when some fields in the data strip are sensitive characters, the data strip is regarded as sensitive information.
[0134] It should be noted that if the preset matching rule is a partial belonging rule, the meaning expressed by the sensitive character at the position is determined according to the position of the sensitive character, so as to avoid mistaking a data segment without sensitive meaning and recorded as a sensitive character as a sensitive character, resulting in misjudgment. For example, in a data item of the response data, "The next class is a political morality class", where "politics" is a sensitive character, if the meaning of politics expressed in the data item is not determined, the data item will be defined as sensitive information discussing political issues, and the data item will be misjudged as sensitive information.
[0135] In a specific implementation, if the expression of the sensitive character means the expression of sensitive information, the proportion of the sensitive character in the data strip can be determined, and it can be determined based on the vibration arm whether deleting only the sensitive character will change the meaning expressed by the data strip. If it will change the meaning of the data strip, the entire data strip will be treated as sensitive information; if it will not change the meaning of the data strip, the sensitive character will be treated as sensitive information, so as to ensure that a large amount of useful data can be retained after the response data filters the sensitive information.
[0136] Furthermore, if the expression meaning is the expression meaning of the sensitive information, the step of matching the sensitive information from the response data based on the proportion includes:
[0137] Step S2A1, if the expression meaning is the expression meaning of the sensitive information, then compare the proportion with the preset sensitivity threshold, and obtain the information to be determined from the response data;
[0138] Step S2A2: if the proportion is greater than the preset sensitivity threshold, the information to be determined is determined to be sensitive information.
[0139] In this embodiment, the preset sensitivity threshold can be determined based on the meaning expressed by each data strip, that is, the preset sensitivity threshold may not be fixed. After obtaining the response data or question data, the overall meaning expressed by each data strip in the response data or question data can be identified, and keywords can be determined therefrom. The preset sensitivity threshold is temporarily determined based on the overall meaning, and the data strips are divided into different positions according to the keywords, and the preset sensitivity threshold for each position is determined.
[0140] Optionally, when the preset matching rule is a partial belonging rule, after step S1A of determining the expression meaning of the sensitive character in the response data based on the position, the method may further include:
[0141] Step S1a: if the expression meaning is different from the meaning expressed by the sensitive information, it is determined that the response data does not contain the sensitive information.
[0142] It should be noted that since the same word may express different meanings when combined with different words, in order to determine whether sensitive characters are likely to cause users to misunderstand sensitive information, the sensitive characters are tested for their meanings. When the meaning is different from that of the sensitive information, it can be said that the response data does not contain sensitive information.
[0143] In the specific implementation, since some nouns can be composed of two or more nouns, for example, massage, etc., when judging the meaning of "massage", the true meaning of "massage" will also be judged according to the context, rather than just judging based on the literal meaning, thereby improving the accuracy of sensitive information detection.
[0144] Optionally, if the preset matching rule is a completely matching rule, step S213 in this embodiment includes:
[0145] Step S1B, if the matching rule completely belongs to the rule, determine whether the response data contains all sensitive characters based on the proportion;
[0146] Step S2B, if the response data contains only sensitive characters, then based on the position, determine the meaning of each sensitive character in the response data;
[0147] Step S3B: if the expression meaning is the same as the expression meaning of the sensitive information, then the response data is determined to be sensitive information.
[0148] It should be noted that, since different sensitive characters have different impacts on users, sensitive characters with low impact on users can use the complete matching rule to detect sensitive information in the response data. That is, when all data items are sensitive characters, the data item is judged as sensitive information, or when all data items in the entire response data are sensitive information, the response data is judged as sensitive information.
[0149] Furthermore, in order to improve the versatility and responsiveness of the service, before step S21 in this embodiment, the following steps are further included:
[0150] Step S01, acquiring real-time data in real time;
[0151] Step S02, determining whether the real-time data is the sensitive information;
[0152] Step S03: If the real-time data is the sensitive information, updating the preset sensitive information table in real time based on the real-time data.
[0153] It should be noted that since real-time data can represent the popularity of some words in a certain period of time in the future, the occurrence pattern of sensitive information can be determined based on real-time data, and the occurrence pattern can be updated to the preset sensitive information table to improve the versatility and responsiveness of the service.
[0154] In the specific implementation, in order to ensure the timeliness of each blacklist and whitelist, real-time data can be obtained in real time to determine whether the real-time data contains sensitive information. If sensitive information exists in the real-time data, the real-time data can be used to update the preset sensitive information table.
[0155] refer to Figure 5 , Figure 5 This is a flow chart of the third embodiment of the large model dialogue control method of the present application.
[0156] Based on the above embodiment, in this embodiment, the step S10 includes:
[0157] Step S101, identifying the field involved in the question data based on a preset answer model;
[0158] Step S102: if the field belongs to a preset answer field set, then generate answer data corresponding to the question data.
[0159] It should be noted that the preset answer model can also be a model of a certain field or several fields. After the preset answer model obtains the question data, it can first determine whether the field involved in the question data belongs to the preset answer field set. If the field involved in the question data belongs to the preset answer field set, then the answer question for the question data is generated.
[0160] Optionally, the relationship between the domain and the preset answer domain set also includes that the domain does not belong to the preset answer domain set. In this case, after step S101 in this embodiment, the following further includes:
[0161] Step S103, if the domain does not belong to the preset answer domain set, generating prompt data that is sensitive to the question data;
[0162] Step S104: using the prompt data as response data.
[0163] It should be noted that if the field involved in the question data does not belong to the preset response field set, it means that the model to be answered cannot answer the question data, so there is no need for subsequent detection or control. It directly generates prompt data sensitive to the question data and displays the prompt data to the user to warn the user that due to domain reasons, the preset response model cannot answer the question data, which improves the efficiency of large model dialogue control and avoids the production of erroneous response data when the data to be answered answers question data in unfamiliar fields, thereby improving the quality of the response data output by artificial intelligence.
[0164] In the specific implementation, the field involved in the question data is first identified. If the field involved in the question data belongs to the service field set of the model to be answered (the preset answer field set), answer data is generated based on the question data to answer the question data. If the field involved in the question data does not belong to the preset answer field set, it means that the question data is sensitive information relative to the model to be answered, that is, the model to be answered cannot correctly understand the meaning of the question data, so the model to be answered generates prompt data that is sensitive to the question data and uses the prompt data as answer data.
[0165] Furthermore, in order to improve the accuracy of recognizing keywords, step S101 in this embodiment further includes:
[0166] Step A10, identifying key combination words in the question data based on a preset answer model;
[0167] Step A20: determining the field involved in the problem data based on the key combination words.
[0168] It should be noted that in order to avoid compound nouns in the question data, when identifying keywords in the question data, it is necessary to identify key compound words composed of multiple nouns to avoid splitting the key compound words and causing recognition errors.
[0169] For example, "Ximen buns" is a keyword in the problem data. In order to avoid mistaking Ximen buns for Ximen and buns, which would result in a keyword error, we can determine whether "Ximen buns" refers to "Ximen" and "bun" or "Ximen buns" based on the meaning of the context.
[0170] It should be noted that the meaning of the compound noun is judged according to the context of the question data to avoid incorrect recognition of key compound words, and then the field involved in the wrong question data is determined, resulting in the waiting model that can answer the question data displaying prompt data sensitive to the question data to avoid increasing the recognition error.
[0171] This application also provides a control device for large model dialogue, refer to Figure 6 , the control devices of large model dialogue include:
[0172] A response module 601 is used to generate response data corresponding to the question data based on a preset response model in response to the received question data;
[0173] An acquisition module 602 is used to filter the response data for sensitive information to obtain compliant response data;
[0174] The display module 603 is used to display the compliance response data.
[0175] Optionally, the obtaining module 602 is further used to match the sensitive information recorded in a preset sensitive information table from the response data based on a preset AC automaton; the obtaining submodule is used to filter the sensitive information from the response data to obtain compliant response data.
[0176] Optionally, the acquisition module 602 is further used to acquire real-time data in real time; determine whether the real-time data is the sensitive information; if the real-time data is the sensitive information, update the preset sensitive information table in real time based on the real-time data.
[0177] Optionally, the acquisition module 602 is also used to match sensitive characters recorded in a preset sensitive information table from the response data based on a preset AC automaton; determine the position and proportion of the sensitive characters in the response data; and match sensitive information from the response data based on preset matching rules, the position and the proportion.
[0178] Optionally, the preset matching rule includes any one of completely belonging to the rule and partially belonging to the rule;
[0179] The acquisition module 602 is also used to determine the expression meaning of the sensitive character in the response data based on the position if the preset matching rule is a partial belonging rule; if the expression meaning is the expression meaning of the sensitive information, match the sensitive information from the response data based on the proportion.
[0180] Optionally, the obtaining module 602 is further configured to determine that the response data does not contain the sensitive information if the expression meaning is different from the meaning expressed by the sensitive information.
[0181] Optionally, the acquisition module 602 is also used to compare the proportion with a preset sensitivity threshold and obtain the information to be determined from the response data if the expression meaning is the expression meaning of sensitive information; and to determine that the information to be determined is sensitive information if the proportion is greater than the preset sensitivity threshold.
[0182] Optionally, the acquisition module 602 is also used to determine whether the response data is completely sensitive characters based on the proportion if the matching rule completely belongs to the rule; if the response data is all sensitive characters, then based on the position, determine the expression meaning of each sensitive character in the response data.
[0183] Optionally, the response module 601 is further used to perform sensitive information analysis on the problem data; filter the sensitive information from the problem data;
[0184] The response module 601 is further used to generate response data corresponding to the question data for filtering the sensitive information based on a preset response model.
[0185] Optionally, the response module 601 is also used to classify the problem data, determine the problem field involved in the problem data; call a whitelist of sensitive information corresponding to the problem field; filter the record information on the whitelist from the problem data; and determine that the record information is sensitive information.
[0186] Optionally, the response module 601 is further configured to identify a field to which the question data relates based on a preset response model; if the field belongs to a preset response field set, generate response data corresponding to the question data.
[0187] Optionally, the response module 601 is further configured to generate prompt data sensitive to the question data if the field does not belong to the preset response field set; and use the prompt data as response data.
[0188] Optionally, the response module 601 is further configured to identify key word combinations in the question data based on a preset response model; and determine the field involved in the question data based on the key word combinations.
[0189] The specific implementation method of the control device for large model dialogue in the present application is basically the same as the various embodiments of the control method for large model dialogue mentioned above, and will not be repeated here.
[0190] An embodiment of the present application provides a storage medium, and the storage medium stores one or more programs, and the one or more programs can also be executed by one or more processors to implement the steps of any of the above-mentioned large model dialogue control methods.
[0191] The specific implementation method of the storage medium of the present application is basically the same as the various embodiments of the control method of the above-mentioned large model dialogue, and will not be repeated here.
[0192] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "includes an etc." does not exclude the presence of other identical elements in the process, method, article or device including the element.
[0193] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0194] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), including a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods of various embodiments of the present invention.
[0195] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent mechanism or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
[0196] The present application discloses A1, a method for controlling a large model dialogue, the method for controlling a large model dialogue comprising the following steps:
[0197] In response to the received question data, generating answer data corresponding to the question data based on a preset answer model;
[0198] Filtering the response data for sensitive information to obtain compliant response data;
[0199] The compliance response data is displayed.
[0200] A2. The method for controlling the large model dialogue as described in A1, wherein the step of filtering the response data for sensitive information to obtain compliant response data comprises:
[0201] Based on a preset AC automaton, matching sensitive information recorded in a preset sensitive information table from the response data;
[0202] The sensitive information is filtered from the response data to obtain compliant response data.
[0203] A3. The method for controlling a large model dialogue as described in A2, before the step of matching the sensitive information recorded in the preset sensitive information table from the response data based on the preset AC automaton, further comprises:
[0204] Get real-time data in real time;
[0205] Determining whether the real-time data is the sensitive information;
[0206] If the real-time data is the sensitive information, the preset sensitive information table is updated in real time based on the real-time data.
[0207] A4. The method for controlling a large model dialogue as described in A2, wherein the step of matching the sensitive information recorded in a preset sensitive information table from the response data based on a preset AC automaton comprises:
[0208] Based on a preset AC automaton, matching sensitive characters recorded in a preset sensitive information table from the response data;
[0209] Determine the position and proportion of the sensitive characters in the response data;
[0210] Based on a preset matching rule, the position and the proportion, sensitive information is matched from the response data.
[0211] A5. The method for controlling a large model dialogue as described in A4, wherein the preset matching rule includes any one of a completely belonging rule and a partially belonging rule, and the step of matching sensitive information from the response data based on the preset matching rule, the position and the proportion includes:
[0212] If the preset matching rule is a partial belonging rule, then based on the position, determining the expression meaning of the sensitive character in the response data;
[0213] If the expression meaning is the expression meaning of the sensitive information, the sensitive information is matched from the response data based on the proportion.
[0214] A6. The method for controlling a large model dialogue as described in A5, wherein if the preset matching rule is a partial rule, after the step of determining the expression meaning of the sensitive character in the response data based on the position, the method further comprises:
[0215] If the expression meaning is different from the meaning expressed by the sensitive information, it is determined that the response data does not contain the sensitive information.
[0216] A7. The method for controlling a large model dialogue as described in A5, wherein if the expression meaning is the expression meaning of the sensitive information, the step of matching the sensitive information from the response data based on the proportion comprises:
[0217] If the expression meaning is the expression meaning of the sensitive information, the proportion is compared with the preset sensitivity threshold, and the information to be determined is obtained from the response data;
[0218] If the proportion is greater than the preset sensitivity threshold, the information to be determined is determined to be sensitive information.
[0219] A8. In the method for controlling a large model dialogue as described in A5, if the preset matching rule is a complete rule, the step of matching sensitive information from the response data based on the preset matching rule, the position and the proportion includes:
[0220] If the matching rule completely belongs to the rule, determining whether the response data contains all sensitive characters based on the proportion;
[0221] If the response data contains only sensitive characters, determining the meaning of each sensitive character in the response data based on the position;
[0222] If the expression meaning is the same as the expression meaning of the sensitive information, the response data is determined to be sensitive information.
[0223] A9. The method for controlling a large model dialogue as described in any one of A1 to A8, before the step of generating answer data corresponding to the question data based on a preset answer model, further comprising:
[0224] Perform sensitive information analysis on the problematic data;
[0225] Filtering the sensitive information from the problem data;
[0226] The step of generating answer data corresponding to the question data based on a preset answer model comprises:
[0227] Generate response data corresponding to the question data for filtering the sensitive information based on a preset response model.
[0228] A10. In the method for controlling large model dialogue as described in A9, the step of performing sensitive information analysis on the problem data comprises:
[0229] Classifying the problem data to determine the problem areas involved in the problem data;
[0230] Calling a whitelist of sensitive information corresponding to the problem domain;
[0231] Filtering the record information on the white list from the problem data;
[0232] It is determined that the recorded information is sensitive information.
[0233] A11. The method for controlling a large model dialogue as described in any one of A1 to A8, wherein the step of generating response data corresponding to the question data based on a preset response model further includes:
[0234] Identify the fields involved in the problem data based on a preset answer model;
[0235] If the field belongs to a preset answer field set, answer data corresponding to the question data is generated.
[0236] A12. The method for controlling a large model dialogue as described in A11, after the step of identifying the field involved in the question data based on a preset answer model, comprises:
[0237] If the domain does not belong to the preset answer domain set, generating prompt data that is sensitive to the question data;
[0238] The prompt data is used as response data.
[0239] A13. In the method for controlling a large model dialogue as described in A11, the step of identifying the fields involved in the question data based on a preset answer model comprises:
[0240] Identify key word combinations in the question data based on a preset answer model;
[0241] The field involved in the problem data is determined based on the key combination words.
[0242] The present application also discloses B14, a control device for large model dialogue, the control device for large model dialogue comprising:
[0243] A response module, configured to generate response data corresponding to the question data based on a preset response model in response to the received question data;
[0244] An acquisition module, used to filter the response data for sensitive information and obtain compliant response data;
[0245] A display module is used to display the compliance response data.
[0246] B15. In the control device for large model dialogue as described in B14, the acquisition module is also used to match the sensitive information recorded in the preset sensitive information table from the response data based on a preset AC automaton; filter the sensitive information from the response data to obtain compliant response data.
[0247] B16. In the control device for the large model dialogue as described in B15, the acquisition module is also used to match the sensitive characters recorded in the preset sensitive information table from the response data based on a preset AC automaton; determine the position and proportion of the sensitive characters in the response data; and match sensitive information from the response data based on preset matching rules, the position and the proportion.
[0248] B17. In the control device for large model dialogue as described in B15, the response module is further used to perform sensitive information analysis on the problem data; and filter the sensitive information from the problem data;
[0249] The response module is further used to generate response data corresponding to the question data for filtering the sensitive information based on a preset response model.
[0250] B18. In the control device for the large model dialogue as described in B14, the response module is also used to identify the field involved in the question data based on a preset response model; if the field belongs to a preset response field set, response data corresponding to the question data is generated.
[0251] The present application also discloses C19, a large model dialogue control device, the large model dialogue control device comprising: a memory, a processor, and a large model dialogue control program stored in the memory and executable on the processor, the large model dialogue control program being configured to implement the steps of the large model dialogue control method as described above.
[0252] The present application also discloses D20, a storage medium, on which is stored a program for implementing a method for controlling large model dialogues. The program for implementing a method for controlling large model dialogues is executed by a processor to implement the steps of the method for controlling large model dialogues as described above.
Claims
1. A method for controlling large model dialogues, characterized in that: The control method of the large model dialogue includes: In response to the received question data, generating answer data corresponding to the question data based on a preset answer model; Filtering the response data for sensitive information to obtain compliant response data; The compliance response data is displayed.
2. The method for controlling large model dialogues according to claim 1, characterized in that: The step of filtering the response data for sensitive information to obtain compliant response data includes: Based on a preset AC automaton, matching sensitive information recorded in a preset sensitive information table from the response data; The sensitive information is filtered from the response data to obtain compliant response data.
3. The method for controlling large model dialogues according to claim 2, characterized in that: Before the step of matching the sensitive information recorded in the preset sensitive information table from the response data based on the preset AC automaton, the method further includes: Get real-time data in real time; Determining whether the real-time data is the sensitive information; If the real-time data is the sensitive information, the preset sensitive information table is updated in real time based on the real-time data.
4. The method for controlling large model dialogues according to claim 2, characterized in that: The step of matching the sensitive information recorded in the preset sensitive information table from the response data based on the preset AC automaton includes: Based on a preset AC automaton, matching sensitive characters recorded in a preset sensitive information table from the response data; Determine the position and proportion of the sensitive characters in the response data; Based on a preset matching rule, the position and the proportion, sensitive information is matched from the response data.
5. The method for controlling a large model dialogue according to any one of claims 1 to 4, characterized in that: Before the step of generating answer data corresponding to the question data based on the preset answer model, the method further includes: Perform sensitive information analysis on the problematic data; Filtering the sensitive information from the problem data; The step of generating answer data corresponding to the question data based on a preset answer model comprises: Generate response data corresponding to the question data for filtering the sensitive information based on a preset response model.
6. The method for controlling large model dialogues according to claim 1, characterized in that: The step of generating answer data corresponding to the question data based on the preset answer model also includes: Identify the fields involved in the problem data based on a preset answer model; If the field belongs to a preset answer field set, answer data corresponding to the question data is generated.
7. The method for controlling large model dialogues according to claim 6, characterized in that: After the step of identifying the fields involved in the question data based on the preset answer model, the method further includes: If the domain does not belong to the preset answer domain set, generating prompt data that is sensitive to the question data; The prompt data is used as response data.
8. A control device for large model dialogue, characterized in that: The control device of the large model dialogue includes: A response module, configured to generate response data corresponding to the question data based on a preset response model in response to the received question data; An acquisition module, used to filter the response data for sensitive information and obtain compliant response data; A display module is used to display the compliance response data.
9. A control device for large model dialogue, characterized in that: The control device for the large model dialogue includes: a memory, a processor, and a large model dialogue control program stored in the memory and executable on the processor, wherein the large model dialogue control program is configured to implement the steps of the large model dialogue control method as described in any one of claims 1 to 7.
10. A storage medium, characterized in that: A program for implementing a method for controlling large model dialogues is stored on the storage medium, and the program for implementing a method for controlling large model dialogues is executed by a processor to implement the steps of the method for controlling large model dialogues as described in any one of claims 1 to 7.