Data processing method and device, storage medium and electronic equipment

By risk detection and reply generation of problem information entered by users, the problem of inefficient reply caused by manual review is solved, and efficient and real-time automated reply is achieved.

CN119849474APending Publication Date: 2025-04-18INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411906617.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-23
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

The questions raised by users through manual review in the prior art lead to low response efficiency and cannot meet the real-time and automation requirements in large-scale and high-frequency interactive scenarios.

Method used

By obtaining the problem information entered by the user, risk detection is carried out. If there is a risk, it will be processed based on the preset reply information. If there is no risk, reply information will be generated through the knowledge base or generative model.

Benefits of technology

It improves the efficiency of question response, avoids the problem of low manual review efficiency, and realizes real-time and automated responses in large-scale, high-frequency interactive scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119849474A_ABST
    Figure CN119849474A_ABST
Patent Text Reader

Abstract

The invention discloses a data processing method and device, a storage medium and electronic equipment. The method comprises the steps that question information input by a target object is acquired; performing risk detection on the problem information to obtain a target detection result; if the target detection result represents that the question information has a risk, determining target reply information corresponding to the question information according to preset reply information; and if the target detection result represents that the question information has no risk, determining target reply information through a knowledge base or a generative model. Through the method and the device, the problem of relatively low question answering efficiency caused by checking the question proposed by the user in a manual mode in related technologies is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and more specifically, to a data processing method and device, a storage medium, and an electronic device. Background Art

[0002] With the rapid development of generative artificial intelligence technology, its application in text generation, image creation, audio synthesis and other fields has become increasingly widespread, bringing innovation and convenience to the creative industry, entertainment, design and scientific research. However, the widespread application of this technology has also raised concerns about the ethics and compliance of AI output content. The traditional audit method mainly relies on manual review, and specialized reviewers review the questions raised by users and the responses generated by AI one by one to ensure the appropriateness and accuracy of their content. Although the traditional manual review method can provide high audit accuracy and depth, it is inefficient and cannot adapt to the needs of artificial intelligence systems to handle a large number of user requests, especially in large-scale, high-frequency interaction scenarios. Manual review is difficult to meet real-time and automation requirements.

[0003] With respect to the problem that questions raised by users are manually reviewed in related technologies, resulting in low efficiency in answering questions, no effective solution has been proposed so far. Summary of the invention

[0004] The main purpose of the present application is to provide a data processing method and device, a storage medium and an electronic device to solve the problem in the related art that questions raised by users are manually reviewed, resulting in low efficiency in answering questions.

[0005] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a data processing method is provided. The method comprises: obtaining question information input by a target object; performing risk detection on the question information to obtain a target detection result; if the target detection result indicates that the question information has a risk, determining the target reply information corresponding to the question information according to preset reply information; if the target detection result indicates that the question information does not have a risk, determining the target reply information through a knowledge base or a generative model.

[0006] Furthermore, performing risk detection on the problem information to obtain a target detection result includes: performing risk detection on the problem information according to preset rules to obtain a first detection result; when the first detection result indicates that there is no risk in the problem information, performing risk detection on the intention of the problem information to obtain a second detection result; and obtaining the target detection result based on the second detection result.

[0007] Furthermore, according to preset rules, risk detection is performed on the problem information to obtain a first detection result, including: performing risk detection on the problem information based on preset keyword detection rules to obtain a first detection sub-result; performing risk detection on the problem information based on a preset regular expression to obtain a second detection sub-result; obtaining the first detection result based on the first detection sub-result and the second detection sub-result.

[0008] Furthermore, risk detection is performed on the intention of the question information to obtain a second detection result, including: extracting features of the question information through an intention recognition model to obtain a target feature vector; performing intent recognition based on the target feature vector through an intention recognition model to obtain a predicted intention category; and performing risk detection on the question information based on the predicted intention category to obtain the second detection result.

[0009] Furthermore, if the target detection result indicates that there is no risk in the question information, then determining the target reply information through a knowledge base or a generative model includes: calculating the similarity between the question information and the topic information in the knowledge base to obtain a target similarity value; if the target similarity value is greater than or equal to a preset threshold, determining the target reply information through the topic information in the knowledge base; if the target similarity value is less than the preset threshold, processing the question information through a generative model to obtain the target reply information.

[0010] Furthermore, the question information is processed through a generative model to obtain the target answer information, including: encoding the question information through the generative model to obtain key-value information corresponding to the question information; inferring the key-value information through the generative model to obtain initial answer information; and in case the risk detection of the initial answer information passes, determining the target answer information based on the initial answer information.

[0011] Furthermore, risk detection is performed on the problem information based on preset keyword detection rules to obtain a first detection sub-result, including: extracting keywords from the problem information to obtain target keywords; matching the target keywords with sensitive words in a sensitive word library to obtain a matching number; and performing risk detection on the problem information based on the matching number to obtain the first detection sub-result.

[0012] In order to achieve the above-mentioned purpose, according to another aspect of the present application, a data processing device is provided. The device includes: an acquisition unit, which is used to acquire question information input by a target object; a detection unit, which is used to perform risk detection on the question information to obtain a target detection result; a first reply unit, which is used to determine the target reply information corresponding to the question information according to preset reply information if the target detection result indicates that the question information has a risk; and a second reply unit, which is used to determine the target reply information through a knowledge base or a generative model if the target detection result indicates that the question information does not have a risk.

[0013] Furthermore, the detection unit includes: a first detection subunit, used to perform risk detection on the problem information according to preset rules to obtain a first detection result; a second detection subunit, used to perform risk detection on the intention of the problem information when the first detection result indicates that there is no risk in the problem information to obtain a second detection result; and a generation subunit, used to obtain the target detection result based on the second detection result.

[0014] Furthermore, the first detection sub-unit includes: a first detection module, used to perform risk detection on the problem information based on a preset keyword detection rule to obtain a first detection sub-result; a second detection module, used to perform risk detection on the problem information based on a preset regular expression to obtain a second detection sub-result; and a generation module, used to obtain the first detection result based on the first detection sub-result and the second detection sub-result.

[0015] Furthermore, the second detection subunit includes: an extraction module, used to perform feature extraction on the problem information through an intention recognition model to obtain a target feature vector; an identification module, used to perform intent recognition based on the target feature vector through an intention recognition model to obtain a predicted intent category; and a third detection module, used to perform risk detection on the problem information based on the predicted intent category to obtain the second detection result.

[0016] Furthermore, the second reply unit includes: a calculation subunit, used to calculate the similarity between the question information and the topic information in the knowledge base to obtain a target similarity value; a first reply subunit, used to determine the target reply information through the topic information in the knowledge base if the target similarity value is greater than or equal to a preset threshold; and a second reply subunit, used to process the question information through a generative model to obtain the target reply information if the target similarity value is less than a preset threshold.

[0017] Furthermore, the second reply sub-unit includes: an encoding module, used to encode the question information through the generative model to obtain key-value information corresponding to the question information; an inference module, used to infer the key-value information through the generative model to obtain initial reply information; and a reply module, used to determine the target reply information based on the initial reply information when the risk detection of the initial reply information passes.

[0018] Furthermore, the first detection module includes: an extraction submodule, used to extract keywords from the problem information to obtain target keywords; a matching submodule, used to match the target keywords with sensitive words in the sensitive word library to obtain the number of matches; and a detection submodule, used to perform risk detection on the problem information based on the number of matches to obtain the first detection sub-result.

[0019] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the storage medium is located is controlled to execute any one of the above-mentioned data processing methods.

[0020] According to another aspect of an embodiment of the present invention, there is further provided an electronic device, comprising a memory storing an executable program; and a processor for running the program, wherein the program executes any one of the above-mentioned data processing methods when running.

[0021] According to another aspect of an embodiment of the present invention, a computer program product is further provided. The computer program product includes a stored computer program. When the computer program is executed by a processor, any one of the above-mentioned data processing methods is implemented.

[0022] In an embodiment of the present application, the question information input by the target object is obtained; the risk detection is performed on the question information to obtain the target detection result; if the target detection result indicates that the question information has a risk, the target response information corresponding to the question information is determined based on the preset response information; if the target detection result indicates that the question information does not have a risk, the target response information is determined through a knowledge base or a generative model, thereby solving the problem of low efficiency in answering questions manually performed on questions raised by users in the related art. In this solution, after receiving the question information input by the target object, it will automatically detect whether the question information has a risk. If there is a risk, the target response information corresponding to the question information is determined based on the preset response information. If there is no risk, the target response information is determined through a knowledge base or a generative model, thereby avoiding the problem of low efficiency in reviewing questions raised by users manually performed on questions raised by users, thereby achieving the effect of improving the efficiency of answering questions. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0024] Figure 1 It is a hardware structure block diagram of a computer terminal for implementing a data processing method provided in an embodiment of the present application;

[0025] Figure 2 The data processing method according to the embodiment of the present application is as follows: Figure 1 ;

[0026] Figure 3 The data processing method according to the embodiment of the present application is as follows: Figure 2 ;

[0027] Figure 4 The data processing method according to the embodiment of the present application is as follows: Figure 3 ;

[0028] Figure 5 is a schematic diagram of a data processing device provided according to an embodiment of the present application;

[0029] Figure 6 It is a structural block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0030] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0031] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0032] It should be noted that the collected information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for display, data for analysis, etc.) involved in this application are information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of relevant data are in compliance with relevant laws, regulations and standards, necessary confidentiality measures are taken, and public order and good customs are not violated, and corresponding operation entrances are provided for users to choose to authorize or refuse. For example, an interface is set up between this system and relevant users or institutions to provide users with corresponding operation entrances for users to choose to agree or refuse the results of automated decision-making; if the user chooses to refuse, the expert decision-making process will be entered.

[0033] Example 1

[0034] According to an embodiment of the present application, a method embodiment of data processing is also provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0035] The method embodiment provided in the first embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 FIG. 1 shows a hardware structure block diagram of a computer terminal (or mobile device) for implementing a data processing method. Figure 1As shown, the computer terminal 10 (or mobile device) may include one or more (102a, 102b, ..., 102n are used to illustrate) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

[0036] It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10 (or mobile device). As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).

[0037] The memory 104 can be used to store software programs and modules of application software, such as program instructions / data storage devices corresponding to the data processing method in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, realizing the above-mentioned data processing method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0038] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0039] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 (or mobile device).

[0040] Under the above operating environment, this application provides Figure 2 The data processing method shown. Figure 2 The data processing method according to the first embodiment of the present invention is as follows: Figure 1 , the method comprising:

[0041] Step S201, obtaining question information input by the target object.

[0042] Optionally, question information input by the user (ie, the target object mentioned above) may be received through the front-end interface. For example, the question information may be “What is the execution process of xx financial business?”.

[0043] Step S202: perform risk detection on the problem information to obtain a target detection result.

[0044] Optionally, risk detection can be performed on question information by keyword matching to obtain target detection results. It should be noted that the risk detection here can be to detect whether the questions raised by users are sensitive topics, whether the questions raised by users exceed the user's access rights, or whether the questions raised by users violate relevant laws and regulations.

[0045] Step S203: If the target detection result indicates that the question information has a risk, target response information corresponding to the question information is determined based on preset response information.

[0046] Optionally, when the target detection result indicates that the question information has a risk, the target reply information corresponding to the question information is selected from the preset reply information. The preset reply information is a flexible rejection information, for example, the preset reply information may be "the question you asked is not within the scope of the service". By maintaining the corresponding words, use reasonable statements to reject users' illegal input content.

[0047] Step S204: If the target detection result indicates that the question information does not have any risk, the target response information is determined through a knowledge base or a generative model.

[0048] Optionally, if the target detection result indicates that the question information does not pose a risk, the target reply information can be determined through a knowledge base or a generative model. For example, the corresponding reply information can be obtained by matching the question information in the knowledge base. It should be noted that data security personnel can maintain the knowledge items in the knowledge base to achieve a correct answer to the question information, and the reply information will not involve sensitive topics. For example, the question information can also be input into a generative model to generate the corresponding target reply information through the generative model.

[0049] In summary, after receiving the question information input by the target object, it will automatically detect whether the question information is risky. If there is a risk, the target reply information corresponding to the question information will be determined based on the preset reply information. If there is no risk, the target reply information will be determined through the knowledge base or generative model, thereby avoiding the problem of low review efficiency caused by manual review of questions raised by users, thereby achieving the effect of improving the efficiency of answering questions.

[0050] Optionally, performing risk detection on the problem information to obtain a target detection result includes: performing risk detection on the problem information according to preset rules to obtain a first detection result; when the first detection result indicates that the problem information does not have a risk, performing risk detection on the intention of the problem information to obtain a second detection result; and obtaining a target detection result based on the second detection result.

[0051] In an optional embodiment, risk detection of problem information includes the following steps: determining preset rules, such as keyword matching rules, and performing risk detection on the problem information according to the preset rules to obtain a first detection result, such as maintaining a keyword library, and then matching the problem information with the keyword library; if there are keywords matching the problem information in the keyword library, the problem information is determined to be risky.

[0052] When the first detection result indicates that the problem information does not have risks, the intention of the problem information is detected through the intention recognition model to obtain a second detection result, and finally the target detection result is obtained based on the second detection result. For example, the intention category of the problem information is determined through the intention recognition model. If the corresponding intention category is a security risk category, the second detection result is determined to be that the problem information has risks.

[0053] It should be noted that a large amount of labeled text data can be collected, each of which belongs to a specific intent category, and then cleaned and preprocessed, and feature information can be extracted from the preprocessed text to train the classification model. Common features include word embedding, etc. Model classification algorithms can use support vector machines, logistic regression, random forests, gradient boosting decision trees, or deep learning models such as convolutional neural networks, recurrent neural networks, long short-term memory networks, etc.

[0054] Risk detection of problem information is achieved through both preset rule detection and intention detection, which improves the accuracy of risk detection of problem information.

[0055] Optionally, performing risk detection on the problem information according to preset rules to obtain a first detection result includes: performing risk detection on the problem information based on preset keyword detection rules to obtain a first detection sub-result; performing risk detection on the problem information based on a preset regular expression to obtain a second detection sub-result; obtaining the first detection result based on the first detection sub-result and the second detection sub-result.

[0056] In an optional embodiment, the following steps are used to obtain the first detection result: First, the preset rules may include preset keyword detection rules and preset regular expression detection rules, and the problem information is subjected to risk detection through the preset keyword detection rules to obtain the first detection sub-result, and the problem information is subjected to risk detection through the preset regular expression to obtain the second detection sub-result. For example, data security personnel implement the control of user input content by maintaining a keyword library and a regular expression rule library, that is, when a matching rule is detected, the problem information is determined to be risky. Finally, the first detection result is obtained based on the first detection sub-result and the second detection sub-result.

[0057] The accuracy of risk detection of problem information can be effectively improved by pre-setting keyword detection rules and pre-setting regular expressions.

[0058] Optionally, performing risk detection on the intention of the question information to obtain a second detection result includes: performing feature extraction on the question information through an intention recognition model to obtain a target feature vector; performing intent recognition based on the target feature vector through the intention recognition model to obtain a predicted intent category; performing risk detection on the question information based on the predicted intent category to obtain a second detection result.

[0059] In an optional embodiment, the following steps are used to obtain the second detection result: input the question information into the intent recognition model, extract the features of the question information through the intent recognition model to obtain the target feature vector, then perform intent recognition based on the target feature vector to obtain the predicted intent category, and determine whether the user input content involves a security risk category based on the predicted intent category, thereby achieving risk identification of the question information to obtain the second detection result. For example, a large amount of labeled text data can be collected, each of which belongs to a specific intent category, and then cleaned and preprocessed, and feature information is extracted from the preprocessed text for training the classification model. Common features include word embedding, etc. Model classification algorithms can use support vector machines, logistic regression, random forests, gradient boosting decision trees, or deep learning models can be selected, such as convolutional neural networks, recurrent neural networks, long short-term memory networks, etc.

[0060] The intent recognition model can be used to further determine whether the problem information poses risks.

[0061] Optionally, if the target detection result indicates that there is no risk in the question information, then the target reply information is determined through a knowledge base or a generative model, including: calculating the similarity between the question information and the topic information in the knowledge base to obtain a target similarity value; if the target similarity value is greater than or equal to a preset threshold, then determining the target reply information through the topic information in the knowledge base; if the target similarity value is less than the preset threshold, then processing the question information through a generative model to obtain the target reply information.

[0062] In an optional embodiment, when the target detection result indicates that there is no risk in the question information, determining the target reply information through a knowledge base or a generative model includes the following steps: calculating the similarity between the question information and the topic information in the knowledge base, and then judging whether there is reply information matching the question information in the knowledge base based on the target similarity value; if the target similarity value is greater than or equal to a preset threshold, determining the target reply information based on the data in the knowledge base corresponding to the target similarity value; if the target similarity value is less than the preset threshold, processing the question information through a generative model to obtain the target reply information.

[0063] It should be noted that the knowledge base is a knowledge base implemented based on a vector database. For example, when the system detects that there is an entry in the knowledge base that is highly similar to the user's input data, it uses the entry as output to feedback to the user. Usually, this module is used to answer specific topics. Data security personnel maintain knowledge entries through the knowledge entry management module to achieve correct answers to questions.

[0064] The data information in the knowledge base can provide more appropriate answer information for users' question information.

[0065] Optionally, processing the question information through a generative model to obtain target reply information includes: encoding the question information through a generative model to obtain key-value information corresponding to the question information; inferring the key-value information through a generative model to obtain initial reply information; and determining the target reply information based on the initial reply information when risk detection of the initial reply information passes.

[0066] In an optional embodiment, processing the question information through a generative model includes the following steps: inputting the question information into the generative model, pre-filling the question information through the generative model to obtain the key value information corresponding to the question information, and then decoding and inferring the key value information through the generative model to obtain the initial reply information. After obtaining the initial reply information, it is necessary to perform risk detection on the initial reply information, that is, it is necessary to perform content review on the initial reply information to determine whether the initial reply information involves a security risk type. If there is no security risk involved, that is, if the risk detection of the initial reply information passes, the initial reply information is determined as the target reply information. If a security risk is involved, the preset reply information is determined as the target reply information. It should be noted that the content review of the initial reply information can be performed through models such as convolutional neural networks, recurrent neural networks, and long short-term memory networks.

[0067] By detecting the generated content, non-compliant data is prevented from being fed back to users, thus improving the security of information.

[0068] Optionally, risk detection is performed on the problem information based on preset keyword detection rules to obtain a first detection sub-result, including: extracting keywords from the problem information to obtain target keywords; matching the target keywords with sensitive words in a sensitive word library to obtain the number of matches; performing risk detection on the problem information based on the number of matches to obtain the first detection sub-result.

[0069] In an optional embodiment, risk detection of problem information based on preset keyword detection rules can be implemented through the following steps: keyword extraction of the problem information obtains the corresponding target keyword, and then the target keyword is matched with the sensitive words in the sensitive word library to obtain the number of matches; if the number of matches exceeds a threshold (for example, 2), the first detection sub-result of the problem information is determined to be a risk; if the number of matches does not exceed the threshold, the first detection sub-result of the problem information is determined to be a risk-free.

[0070] The first detection sub-result of the question information can be determined more accurately by the matching number of the keywords.

[0071] In an optional embodiment, the Figure 3The schematic diagram shown implements data processing, specifically including: first, matching the user input with rules. If the rules are matched, indicating that the user input involves illegal content, a flexible rejection is returned. If the rules are not matched, the user intent is identified to determine whether the semantics of the user input content contains illegal content. If it is malicious content, a flexible rejection is returned. If it is normal content, a redline knowledge base match is performed. If there is a corresponding knowledge base entry for the user input, the entry is returned directly. If there is no matching content, it is sent to the generative artificial intelligence service. The service-generated content needs to pass the content review module. If it is judged to be unsuccessful, a flexible rejection is performed. If it is judged to be normal, it is output to the user.

[0072] In an optional embodiment, the schematic diagram of rule matching is as follows: Figure 4 As shown, rule matching supports the detection of user input content by means of keywords and regular expressions. Data security personnel manage user input content that poses security risks by maintaining keyword libraries and rule libraries. That is, when the rule engine detects a matching rule, it directly outputs the preset flexible answer.

[0073] In an embodiment of the present application, the question information input by the target object is obtained; the risk detection is performed on the question information to obtain the target detection result; if the target detection result indicates that the question information has a risk, the target response information corresponding to the question information is determined based on the preset response information; if the target detection result indicates that the question information does not have a risk, the target response information is determined through a knowledge base or a generative model, thereby solving the problem of low efficiency in answering questions caused by manually reviewing questions raised by users. In this solution, after receiving the question information input by the target object, it will automatically detect whether the question information has a risk. If there is a risk, the target response information corresponding to the question information is determined based on the preset response information. If there is no risk, the target response information is determined through a knowledge base or a generative model, thereby avoiding the problem of low efficiency in reviewing questions raised by users caused by manually reviewing questions, thereby achieving the effect of improving the efficiency of answering questions.

[0074] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0075] Example 2

[0076] The embodiment of the present application also provides a data processing device. It should be noted that the data processing device of the embodiment of the present application can be used to execute the data processing method provided by the embodiment of the present application. The data processing device provided by the embodiment of the present application is introduced below.

[0077] According to an embodiment of the present application, a data processing device for implementing the above data processing method is also provided. Figure 5 As shown, the device includes: an acquisition unit 501, a detection unit 502, a first reply unit 503 and a second reply unit 504.

[0078] An acquisition unit 501 is used to acquire question information input by a target object;

[0079] The detection unit 502 is used to perform risk detection on the problem information and obtain a target detection result;

[0080] The first reply unit 503 is used to determine the target reply information corresponding to the question information according to the preset reply information if the target detection result indicates that the question information has a risk;

[0081] The second reply unit 504 is used to determine the target reply information through a knowledge base or a generative model if the target detection result indicates that the problem information does not have any risk.

[0082] The data processing device provided by the embodiment of the present application obtains the question information input by the target object through the acquisition unit 501; the detection unit 502 performs risk detection on the question information to obtain the target detection result; the first reply unit 503 determines the target reply information corresponding to the question information according to the preset reply information if the target detection result indicates that the question information has a risk; the second reply unit 504 determines the target reply information through the knowledge base or the generative model if the target detection result indicates that the question information does not have a risk, thereby solving the problem of low efficiency in answering questions by manually reviewing questions raised by users. In this solution, after receiving the question information input by the target object, it will automatically detect whether the question information has a risk. If there is a risk, the target reply information corresponding to the question information is determined according to the preset reply information. In the absence of a risk, the target reply information is determined through the knowledge base or the generative model, thereby avoiding the problem of low efficiency in reviewing questions raised by users by manually reviewing questions, thereby achieving the effect of improving the efficiency of answering questions.

[0083] Optionally, in the data processing device provided in the embodiment of the present application, the detection unit includes: a first detection subunit, used to perform risk detection on the problem information according to preset rules to obtain a first detection result; a second detection subunit, used to perform risk detection on the intention of the problem information when the first detection result indicates that the problem information does not have a risk, to obtain a second detection result; and a generation subunit, used to obtain a target detection result based on the second detection result.

[0084] Optionally, in the data processing device provided in the embodiment of the present application, the first detection sub-unit includes: a first detection module, used to perform risk detection on the problem information based on a preset keyword detection rule to obtain a first detection sub-result; a second detection module, used to perform risk detection on the problem information based on a preset regular expression to obtain a second detection sub-result; and a generation module, used to obtain the first detection result based on the first detection sub-result and the second detection sub-result.

[0085] Optionally, in the data processing device provided in the embodiment of the present application, the second detection subunit includes: an extraction module, which is used to extract features of problem information through an intention recognition model to obtain a target feature vector; an identification module, which is used to perform intent recognition based on the target feature vector through the intention recognition model to obtain a predicted intent category; and a third detection module, which is used to perform risk detection on the problem information based on the predicted intent category to obtain a second detection result.

[0086] Optionally, in the data processing device provided in the embodiment of the present application, the second reply unit includes: a calculation subunit, used to calculate the similarity between the question information and the topic information in the knowledge base to obtain a target similarity value; a first reply subunit, used to determine the target reply information through the topic information in the knowledge base if the target similarity value is greater than or equal to a preset threshold; and a second reply subunit, used to process the question information through a generative model to obtain the target reply information if the target similarity value is less than the preset threshold.

[0087] Optionally, in the data processing device provided in the embodiment of the present application, the second reply sub-unit includes: an encoding module, which is used to encode the question information through a generative model to obtain key value information corresponding to the question information; an inference module, which is used to infer the key value information through a generative model to obtain initial reply information; and a reply module, which is used to determine the target reply information based on the initial reply information when the risk detection of the initial reply information passes.

[0088] Optionally, in the data processing device provided in the embodiment of the present application, the first detection module includes: an extraction submodule, used to extract keywords from the problem information to obtain target keywords; a matching submodule, used to match the target keywords with sensitive words in the sensitive word library to obtain the number of matches; a detection submodule, used to perform risk detection on the problem information based on the number of matches to obtain a first detection sub-result.

[0089] It should be noted that the acquisition unit 501, the detection unit 502, the first reply unit 503 and the second reply unit 504 correspond to steps S201 to S204 in the first embodiment, and the four units and the corresponding steps implement the same examples and application scenarios, but are not limited to the contents disclosed in the first embodiment. It should be noted that the modules or units may be hardware components or software components stored in a memory (e.g., the memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n), and the modules may also be part of the device and run in the computer terminal 10 provided in the first embodiment.

[0090] Example 3

[0091] An embodiment of the present application may provide an electronic device, Figure 6 is a structural block diagram of an electronic device according to an embodiment of the present application. Figure 6 As shown, the electronic device may include: one or more ( Figure 6 (only one is shown) processor 602, memory 604, storage controller, and peripheral interface, wherein the peripheral interface is connected to the radio frequency module, audio module and display.

[0092] Among them, the memory can be used to store software programs and modules, such as program instructions / modules corresponding to the methods and devices in the embodiments of the present application, and the processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the above-mentioned method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0093] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: obtain the question information input by the target object; perform risk detection on the question information to obtain the target detection result; if the target detection result indicates that the question information has a risk, determine the target reply information corresponding to the question information based on the preset reply information; if the target detection result indicates that the question information does not have a risk, determine the target reply information through a knowledge base or a generative model.

[0094] The processor can also call the information and application programs stored in the memory through the transmission device to perform the following steps: perform risk detection on the problem information according to preset rules to obtain a first detection result; when the first detection result indicates that the problem information does not have a risk, perform risk detection on the intention of the problem information to obtain a second detection result; and obtain a target detection result based on the second detection result.

[0095] The processor can also call the information and application stored in the memory through the transmission device to perform the following steps: perform risk detection on the problem information based on the preset keyword detection rules to obtain a first detection sub-result; perform risk detection on the problem information based on the preset regular expression to obtain a second detection sub-result; obtain the first detection result based on the first detection sub-result and the second detection sub-result.

[0096] The processor can also call the information and applications stored in the memory through the transmission device to perform the following steps: extract features of the problem information through the intention recognition model to obtain a target feature vector; perform intent recognition based on the target feature vector through the intention recognition model to obtain a predicted intent category; perform risk detection on the problem information based on the predicted intent category to obtain a second detection result.

[0097] The processor can also call the information and application programs stored in the memory through the transmission device to perform the following steps: calculate the similarity between the question information and the topic information in the knowledge base to obtain a target similarity value; if the target similarity value is greater than or equal to a preset threshold, determine the target reply information through the topic information in the knowledge base; if the target similarity value is less than the preset threshold, process the question information through the generative model to obtain the target reply information.

[0098] The processor can also call the information and application programs stored in the memory through the transmission device to perform the following steps: encode the question information through the generative model to obtain the key value information corresponding to the question information; infer the key value information through the generative model to obtain the initial reply information; when the risk detection of the initial reply information passes, determine the target reply information based on the initial reply information.

[0099] The processor can also call the information and application programs stored in the memory through the transmission device to perform the following steps: extract keywords from the problem information to obtain target keywords; match the target keywords with sensitive words in the sensitive word library to obtain the number of matches; perform risk detection on the problem information based on the number of matches to obtain the first detection sub-result.

[0100] By adopting the embodiment of the present application, a data processing method is provided. By performing risk detection on the question information input by the target object, obtaining the target detection result, judging the target detection result, when the target detection result indicates that there is a risk, selecting a suitable response from the preset response information as the target response information, and when the target detection result indicates that there is no risk, matching the target response information through the knowledge base or generating the target response information through the generative model, the problem of low efficiency in answering questions caused by manually reviewing the questions raised by users is solved.

[0101] It can be understood by those skilled in the art that Figure 6 The structure shown is for illustration only, and the electronic device may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, MID), a PAD, and other terminal devices. Figure 6 The structure of the electronic device is not limited. Figure 6 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Figure 6 Different configurations are shown.

[0102] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0103] Example 4

[0104] The embodiment of the present application further provides a storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the data processing method provided in the first embodiment.

[0105] Optionally, in this embodiment, the above storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.

[0106] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing the program of the data processing method steps.

[0107] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0108] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0109] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0110] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0111] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0112] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.

[0113] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A data processing method, characterized in that: include: Get the question information input by the target object; Perform risk detection on the problem information to obtain a target detection result; If the target detection result indicates that the question information has a risk, then determining the target answer information corresponding to the question information according to the preset answer information; If the target detection result indicates that there is no risk in the question information, the target response information is determined through a knowledge base or a generative model.

2. The method according to claim 1, characterized in that Perform risk detection on the problem information to obtain target detection results including: According to preset rules, risk detection is performed on the problem information to obtain a first detection result; When the first detection result indicates that the problem information does not have any risk, a risk detection is performed on the intention of the problem information to obtain a second detection result; The target detection result is obtained according to the second detection result.

3. The method according to claim 2, characterized in that According to the preset rules, the problem information is subjected to risk detection, and the first detection result obtained includes: Perform risk detection on the problem information based on preset keyword detection rules to obtain a first detection sub-result; Perform risk detection on the problem information based on a preset regular expression to obtain a second detection sub-result; The first detection result is obtained according to the first detection sub-result and the second detection sub-result.

4. The method according to claim 2, characterized in that: Performing risk detection on the intention of the question information, obtaining a second detection result includes: Extract features of the question information through an intention recognition model to obtain a target feature vector; Performing intent recognition based on the target feature vector through an intent recognition model to obtain a predicted intent category; Perform risk detection on the problem information according to the predicted intention category to obtain the second detection result.

5. The method according to claim 1, characterized in that If the target detection result indicates that the question information does not have a risk, then determining the target answer information through a knowledge base or a generative model includes: Calculating similarity between the question information and the topic information in the knowledge base to obtain a target similarity value; If the target similarity value is greater than or equal to a preset threshold, the target reply information is determined through the topic information in the knowledge base; If the target similarity value is less than a preset threshold, the question information is processed through a generative model to obtain the target answer information.

6. The method according to claim 5, characterized in that The question information is processed by a generative model to obtain the target answer information, including: The question information is encoded by the generative model to obtain key value information corresponding to the question information; Reasoning the key-value information through the generative model to obtain initial response information; In the case that the risk detection of the initial response information passes, the target response information is determined based on the initial response information.

7. The method according to claim 3, characterized in that The problem information is subjected to risk detection based on preset keyword detection rules, and the first detection sub-result obtained includes: Extracting keywords from the question information to obtain target keywords; Matching the target keyword with sensitive words in the sensitive word library to obtain the number of matches; Perform risk detection on the problem information according to the matching number to obtain the first detection sub-result.

8. A data processing device, characterized in that: include: An acquisition unit, used for acquiring question information input by a target object; A detection unit, used to perform risk detection on the problem information to obtain a target detection result; A first reply unit, configured to determine target reply information corresponding to the question information according to preset reply information if the target detection result indicates that the question information has a risk; The second reply unit is used to determine target reply information through a knowledge base or a generative model if the target detection result indicates that the question information does not have any risk.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored executable program, wherein when the executable program is executed, the device where the computer-readable storage medium is located is controlled to execute the data processing method according to any one of claims 1 to 7.

10. An electronic device, characterized in that: include: A memory storing an executable program; A processor, used to run the program, wherein the program executes the data processing method according to any one of claims 1 to 7 when running.

11. A computer program product comprising computer instructions, characterized in that: When the computer instructions are executed by a processor, the steps of the data processing method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Physical examination information intelligent recommendation method and system, storage medium and computing device

    CN114372201A

  • Government affair intelligent question and answer method, system and device and medium

    CN117633167A

  • Message processing method and device, storage medium and electronic equipment

    CN118101613A

  • Question and answer method and device, electronic equipment and storage medium

    CN118227760A

  • Sensitive word recognition method and apparatus based on artificial intelligence, and computer device

    WO2021151333A1