Data processing method and device, electronic equipment and storage medium
By inputting natural language descriptions into pre-trained language transformation model, generating target language description information and generating business operation code, the problems of low efficiency and error-prone business exception detection in the prior art are solved, and more efficient and accurate abnormal detection is achieved.
Patent Information
- Application Number
- CN202310733287.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-20
- Publication Date
- 2024-12-20
AI Technical Summary
The existing business abnormality detection methods are inefficient and prone to errors, making it difficult to effectively identify and handle abnormal situations in the business.
By obtaining the preset text information of natural language description, input it to the pre-trained language conversion model for language conversion processing, generating the target language description information corresponding to the target service, and generating the service operation code information based on this to avoid direct conversion from natural language to Code instability.
It improves the efficiency and stability of business operation code generation, improves the overall efficiency of business abnormal detection, and reduces errors during the detection process.
Smart Images

Figure CN119167888A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence technology, and in particular to a data processing method, device, electronic device and storage medium. Background Art
[0002] Business anomaly detection can refer to the detection and identification of abnormal situations in the business. Specifically, it can be the identification of data to be detected that does not match the expected data. For example, in a business audit scenario, a large amount of data needs to be queried and analyzed to verify whether the business logic is correct and compliant; among them, business audit can refer to the inspection of the rules, processes, standards, etc. followed by enterprises or organizations in the process of carrying out business activities, aiming to ensure that enterprises or organizations comply with laws and regulations, internal systems, industry norms and other relevant requirements, prevent anomalies, and improve management levels and operating efficiency. At present, business anomaly detection can be performed through traditional data analysis tools. However, the above-mentioned business anomaly detection methods are inefficient and prone to errors. Summary of the invention
[0003] In view of the above-mentioned technical problems, the present disclosure proposes a data processing method, device, electronic device and storage medium.
[0004] According to one aspect of an embodiment of the present disclosure, there is provided a data processing method, including:
[0005] Acquire preset text information corresponding to the target service, wherein the preset text information is text information described based on natural language;
[0006] Input the preset text information into a pre-trained language conversion model for language conversion processing to obtain target language description information corresponding to the target business; the target language description information is information of the target business language description matched based on the business field to which the target business belongs;
[0007] Based on the target language description information, business operation code information corresponding to the target business is generated.
[0008] According to another aspect of an embodiment of the present disclosure, there is provided a data processing device, including:
[0009] An information acquisition module, used to acquire preset text information corresponding to a target service, wherein the preset text information is text information based on a natural language description;
[0010] A language conversion processing module is used to input the preset text information into a pre-trained language conversion model for language conversion processing to obtain target language description information corresponding to the target business; the target language description information is information of the target business language description matched based on the business field to which the target business belongs;
[0011] The code generation module is used to generate business operation code information corresponding to the target business based on the target language description information.
[0012] Optionally, the device further comprises:
[0013] A checking and processing module, used for checking and processing the target language description information to obtain a target checking result;
[0014] An updating module, used for updating the target language description information based on the target inspection result to obtain updated description information;
[0015] Correspondingly, the code generation module includes:
[0016] An error correction module is used to generate the business operation code information based on the update description information.
[0017] Optionally, the inspection processing module includes:
[0018] A logic tree generation module, used to generate an anomaly detection logic tree based on the target language description information;
[0019] A verification data generation module, used to generate logic verification data based on the anomaly detection logic tree;
[0020] A verification processing module, used to perform verification processing on the abnormality detection logic tree based on the logic verification data to obtain the first inspection result;
[0021] A tree structure checking module is used to perform a tree structure check on the abnormality detection logic tree to obtain the second check result.
[0022] Optionally, the verification data generation module includes:
[0023] A data extraction module, used to extract data from each logical node in the abnormality detection logic tree to obtain at least one logical node data corresponding to each logical node;
[0024] A syntax tree conversion module, used to convert each logic node in the anomaly detection logic tree into a syntax tree, and obtain syntax tree information corresponding to each logic node;
[0025] The logic verification data generating module is used to generate the logic verification data based on at least one logic node data corresponding to each logic node and the syntax tree information corresponding to each logic node.
[0026] Optionally, the logic tree verification module includes:
[0027] A first input module, used to input each node verification data of the multiple node verification data corresponding to each logical node into the abnormality detection logic tree to obtain a node output result corresponding to each node verification data;
[0028] The third inspection result determination module is used to determine the third inspection result based on the node output result corresponding to each node verification data, and the third inspection result is used to indicate whether the number of node output results that are failed results among the multiple node output results corresponding to each logical node is a preset number of results.
[0029] Optionally, the logic tree verification module includes:
[0030] A second input module, used to input each node verification data of the multiple node verification data corresponding to each logical node into the abnormality detection logic tree to obtain a node output result corresponding to each node verification data;
[0031] A first comparison module, used for comparing the node output result corresponding to each node verification data with the node reference result corresponding to each node verification data, to obtain a first comparison result corresponding to each node verification data;
[0032] The fourth inspection result determination module is used to determine the fourth inspection result based on the first comparison result corresponding to each node verification data, and the fourth inspection result is used to indicate whether the node output result corresponding to each node verification data matches the corresponding node reference result.
[0033] Optionally, the tree structure checking module includes:
[0034] A logic expression recognition module is used to perform logic expression recognition on each logic node in the anomaly detection logic tree to obtain a target recognition result corresponding to each logic node;
[0035] The fifth check result determination module is used to determine the fifth check result based on the target recognition result corresponding to each logical node, and the fifth check result is used to indicate whether each logical node is a logical expression.
[0036] Optionally, the tree structure checking module includes:
[0037] an associated edge data determination module, configured to determine associated edge data of a plurality of associated edges corresponding to each logical node in the anomaly detection logic tree, wherein the plurality of associated edges corresponding to any logical node are edges pointing from the any logical node to a corresponding associated node or to a corresponding associated result in the anomaly detection logic tree, the associated node corresponding to any logical node is a node adjacent to the any logical node in the anomaly detection logic tree, and the associated result corresponding to any logical node is a node logic result adjacent to the any logical node in the anomaly detection logic tree;
[0038] A matching processing module, used for matching the associated edge data corresponding to each logical node with preset associated edge data to obtain a target matching result;
[0039] The sixth check result determination module is used to determine the sixth check result based on the target matching result, and the sixth check result is used to indicate whether the associated edge data corresponding to each logical node belongs to the preset associated edge data.
[0040] Optionally, the tree structure checking module includes:
[0041] A starting and ending node determination module, used to determine a starting logical node and an ending logical node among a plurality of logical nodes corresponding to the abnormality detection logical tree;
[0042] A node type identification module, configured to perform node type identification on the start logic node and the end logic node based on the abnormality detection logic tree, and obtain a start node type corresponding to the start logic node and an end node type corresponding to the end logic node;
[0043] The seventh inspection result determination module is used to determine the seventh inspection result based on the starting node type and the ending node type, and the seventh inspection result is used to characterize whether the starting node type and the ending node type meet the preset node type conditions, and the preset node type conditions are that the starting node type belongs to the root node type and the ending node type belongs to the leaf node type.
[0044] Optionally, the tree structure checking module includes:
[0045] A leaf node determination module, used to determine a target logical node corresponding to a leaf node from a plurality of logical nodes in the anomaly detection logical tree;
[0046] A result type identification module, used to identify the result types of the multiple target association results corresponding to the target logical node, and obtain the target result types corresponding to the multiple target association results;
[0047] The eighth inspection result determination module is used to determine the eighth inspection result based on the target result types corresponding to each of the multiple target association results, and the eighth inspection result is used to characterize whether there are two different result types in the target result types corresponding to each of the multiple target association results.
[0048] Optionally, the device further comprises:
[0049] a training information acquisition module, used to acquire first preset dialogue information, second preset dialogue information, third preset dialogue information, fourth preset dialogue information, preset sample text information, and sample language description information corresponding to the preset sample text information; the first preset dialogue information is used to represent the model role configuration information of the preset language conversion model, the second preset dialogue information is used to represent the structural configuration information of the language description information to be output, and the third preset dialogue information is used to represent the structural logic information of the language description information to be output; the fourth preset dialogue information is used as an example of text information and corresponding language description information;
[0050] a third input module, configured to input the first preset dialogue information, the second preset dialogue information, the third preset dialogue information, and the fourth preset dialogue information into a preset language conversion model in sequence, so that the preset language conversion model learns the conversion logic from text information to language description information, and obtains an initial language conversion model;
[0051] A predicted language description determination module is used to input preset sample text information into the initial language conversion model for language conversion processing to obtain predicted language description information;
[0052] A second comparison module, used for comparing the predicted language description information with the sample language description information to obtain a second comparison result;
[0053] A model training module is used to train the initial language conversion model based on the second comparison result to obtain the pre-trained language conversion model.
[0054] According to another aspect of an embodiment of the present disclosure, there is provided an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the above-mentioned data processing method.
[0055] According to another aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the above-mentioned data processing method.
[0056] According to another aspect of an embodiment of the present disclosure, a computer program product including instructions is provided, and when the computer program product is run on a computer, the computer is enabled to execute the above data processing method.
[0057] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects:
[0058] Obtain preset text information based on natural language description corresponding to the target business, input the preset text information into a pre-trained language conversion model for language conversion processing, and obtain target language description information corresponding to the target business, wherein the target language description information is information of the target business language description based on the business field to which the target business belongs. By utilizing the language processing capability of the pre-trained language conversion model, the preset text information is converted into a stable language space, and stable conversion of natural language can be achieved. Combined with the target language description information, the business operation code information corresponding to the target business is generated, which can avoid the instability of direct conversion from natural language to code, improve the generation efficiency of the business operation code, and improve the stability and accuracy of the generated business operation code, thereby improving the overall efficiency of business anomaly detection and reducing errors in the business anomaly detection process.
[0059] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.
[0061] Figure 1 is a schematic diagram of an application system according to an exemplary embodiment;
[0062] Figure 2 is a flow chart of a data processing method according to an exemplary embodiment;
[0063] Figure 3 is a schematic diagram of an anomaly detection logic tree according to an exemplary embodiment;
[0064] Figure 4 is a schematic diagram of a syntax tree structure according to an exemplary embodiment;
[0065] Figure 5 is a schematic diagram of a process for generating business operation code information according to an exemplary embodiment;
[0066] Figure 6 is a block diagram of a data processing device according to an exemplary embodiment;
[0067] Figure 7 is a block diagram of an electronic device for generating service operation code information based on preset text information according to an exemplary embodiment;
[0068] Figure 8 The invention is a block diagram showing another electronic device for generating service operation code information based on preset text information according to an exemplary embodiment. DETAILED DESCRIPTION
[0069] Various exemplary embodiments, features and aspects of the present application will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.
[0070] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.
[0071] In addition, in order to better illustrate the present application, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present application can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present application.
[0072] Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology and machine learning / deep learning.
[0073] In recent years, with the research and progress of artificial intelligence technology, artificial intelligence technology has been widely used in many fields. The solution provided in the embodiment of the present application involves technologies such as natural language processing, which is specifically described by the following embodiments:
[0074] See also Figure 1 , Figure 1 FIG. 1 is a schematic diagram of an application system according to an exemplary embodiment. The application system can be used in the data processing method of the present application. Figure 1 As shown, the application system may at least include a server 01 and a terminal 02 .
[0075] In the embodiment of the present application, the server 01 can be used to generate the business operation code information corresponding to the target business. Specifically, the server 01 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.
[0076] In the embodiment of the present application, the terminal 02 can be used to generate preset text information corresponding to the target service. The terminal 02 may include physical devices such as smart phones, desktop computers, tablet computers, laptops, smart speakers, vehicle terminals, digital assistants, augmented reality (AR) / virtual reality (VR) devices, smart wearable devices, etc., and may also include software running in physical devices, such as applications. The operating system running on the terminal 02 in the embodiment of the present application may include but is not limited to Android system, IOS system, Linux, Windows, etc.
[0077] In addition, it should be noted that Figure 1 What is shown is only one application environment provided by the present disclosure. In actual application, other application environments may also be included. For example, the process of generating the business operation code information corresponding to the target business may also be implemented on the terminal 02.
[0078] In the embodiments of this specification, the terminal 02 and the server 01 may be directly or indirectly connected via wired or wireless communication, which is not limited in this application.
[0079] It should be noted that the following figure shows a possible sequence of steps, which is not actually limited to strictly following this sequence. Some steps can be executed in parallel without relying on each other.
[0080] Specifically, Figure 2 FIG. 1 is a flow chart of a data processing method according to an exemplary embodiment. Figure 2 As shown, the data processing method can be used in electronic devices such as terminals or servers, and can specifically include the following steps:
[0081] S201: Obtain preset text information corresponding to the target service.
[0082] In a specific embodiment, the target service may refer to a service that needs to be detected for abnormality. It is understandable that different services have different corresponding service logics.
[0083] In a specific embodiment, the preset text information may refer to text information based on natural language description. Specifically, the preset text information may be text information based on natural language description of the anomaly detection logic for the target business. Exemplarily, taking the audit scenario as an example, the preset text information may be "order number (field_2), serial number (field_3), merchant number (field_4), date (field_5); if the order number is empty, it will not pass, and the reason for failure is 'verification failed, order number is empty'"; taking the industrial production detection scenario as an example, the preset text information may be "length information of the object to be detected (size_1), width information of the object to be detected (size_2); if the length information of the object to be detected and the width information of the object to be detected are both less than the preset threshold, it will not pass, and the reason for failure is 'verification failed, size does not meet'".
[0084] In a specific embodiment, the code developer can determine the target business's data to be detected and the target business's detection logic through the business logic of the target business; based on the above target business's data to be detected and the target business's detection logic, preset text information corresponding to the target business can be generated.
[0085] S203: Input the preset text information into the pre-trained language conversion model for language conversion processing to obtain target language description information corresponding to the target business.
[0086] In a specific embodiment, the language conversion model can be used to convert text information in a natural language into description information in a target business language corresponding to the target business. Specifically, the pre-trained language conversion model can be trained based on the first preset dialogue information, the second preset dialogue information, the third preset dialogue information, and the fourth preset dialogue information. The pre-trained language conversion model may include a pre-trained natural language processing model. Optionally, the pre-trained language conversion model may be ChatGPT (Chat Generative Pre-trained Transformer). Among them, the first preset dialogue information can be used to characterize the model role configuration information of the preset language conversion model; the second preset dialogue information can be used to characterize the structural configuration information of the language description information to be output; the third preset dialogue information can be used to characterize the structural logic information of the language description information to be output; and the fourth preset dialogue information can be used as an example of text information and corresponding language description information.
[0087] In a specific embodiment, the pre-trained language conversion model may be obtained in the following manner:
[0088] Obtaining first preset dialogue information, second preset dialogue information, third preset dialogue information, fourth preset dialogue information, preset sample text information, and sample language description information corresponding to the preset sample text information;
[0089] inputting the first preset dialogue information, the second preset dialogue information, the third preset dialogue information and the fourth preset dialogue information into the preset language conversion model in sequence, so that the preset language conversion model learns the conversion logic from text information to language description information, and obtains an initial language conversion model;
[0090] Inputting the preset sample text information into the initial language conversion model for language conversion processing to obtain predicted language description information;
[0091] Comparing the predicted language description information with the sample language description information to obtain a second comparison result;
[0092] Based on the second comparison result, the initial language conversion model is trained to obtain a pre-trained language conversion model.
[0093] In a specific embodiment, the first preset dialogue information can be used to characterize the model role configuration information of the preset language conversion model. The first preset dialogue information can be text information describing the model role configuration based on natural language. Exemplarily, the first preset dialogue information can be "You are a business anomaly detection assistant, you are responsible for converting my requirements into JSON."
[0094] In a specific embodiment, the second preset dialogue information may be used to represent the structural configuration information of the language description information to be output. The second preset dialogue information may be text information based on the natural language description structural configuration. Exemplarily, the second preset dialogue information may include “This is the target structure you want to output, which is data in JSON format;
[0095] JSON
[0096] {“logic_nodes”:{ / / Logical nodes, there can be multiple
[0097] "node_id": "node_express" / / node_id is the node id, node_express is the logical expression
[0098] },
[0099] "decisions": { / / The above logical nodes specifically contain at least one logical path
[0100] "decision_path":{ / / Logical path, including logical nodes and logical results. For example, if node_id=A, then the logical path A1 indicates that the logical expression of logical node A is true, A0 indicates that the logical expression of logical node A is false; A1B0 indicates that the logical expression of logical node A is true and the logical expression of logical node B is false
[0101] "reason": "decision_reason", / / The reason for output when hitting this logic path
[0102] "detail": "{decision_detail}" / / Detailed description of the above "decision_reason" output when hitting this logic path
[0103] }
[0104] }
[0105] }" and "I will explain the logic of this JSON next, you need to remember it."
[0106] In a specific embodiment, the third preset dialogue information can be used to characterize the structural logic information of the language description information to be output. The third preset dialogue information can be text information of the structural logic to be output based on the model described in natural language. Exemplarily, the third preset dialogue information can be "This JSON represents a tree, where node_id is the node of the tree, there can be multiple nodes, and it is composed of letters az; node_express represents the logical expression of the node, and the variables prefixed with field_ in the expression must be wrapped with {}. Please note that we need to run it under Python; decision_path is a logical path on the tree composed of node_id. Node_id has two values of 1 and 0. 1 means true and 0 means false. For example, A1B0 means that the logic of node_id=A is true and the logic of node_id=B is false; decision_reason is the reason for decision_path".
[0107] In a specific embodiment, the fourth preset dialogue information can be used as an example of text information and corresponding language description information. The fourth preset dialogue information can be text information of examples of model input and corresponding output. Exemplarily, taking the audit scenario as an example, the fourth preset dialogue information can include "Next, let's do some exercises to strengthen your understanding", "Subject ID (field_2), object P1 certificate number (field_3), authorization letter (field_4), object P2 certificate number (field_5), if the object P1 certificate number is empty, it will not pass, and the reason for failure is 'Verification failed, no subject ID'", and "Because to determine whether 'object P1 certificate number' is empty, we need a node_id, assumed to be A, A's logical expression is '{field_3}is None and len({field_3})>0'".
[0108] In a specific embodiment, the preset sample text information can be used to train the language conversion model. For example, taking the audit scenario as an example, the preset sample text information can be "order number (field_2), serial number (field_3), merchant number (field_4), date (field_5); if the order number is empty, it will fail, and the reason for failure is 'verification failed, order number is empty'".
[0109] In a specific embodiment, the sample language description information corresponding to the preset sample text information can be used as a reference in the training process of the language conversion model. It can be understood that the sample language description information corresponding to the preset sample text information can refer to the description information obtained by the expected language conversion model through language conversion processing of the preset sample text information.
[0110] In a specific embodiment, the initial language conversion model may refer to a preset language conversion model that has been learned but still needs to be trained.
[0111] In a specific embodiment, the first preset dialogue information can be input into the preset language conversion model so that the preset language conversion model learns the model role configuration to obtain the first conversion model; the second preset dialogue information can be input into the above-mentioned first conversion model so that the above-mentioned first conversion model learns the structural configuration of the language description information to be output, and the second conversion model can be obtained; then, the third preset dialogue information can be input into the above-mentioned second conversion model so that the above-mentioned second conversion model learns the structural logic of the language description information to be output, and the third conversion model can be obtained; then, the fourth preset dialogue information can be input into the above-mentioned third conversion model so that the above-mentioned third conversion model can enhance the understanding and obtain the initial language conversion model.
[0112] In a specific embodiment, the predicted language description information may refer to the language description information obtained by the initial language conversion model performing language conversion processing on the preset sample text information. Specifically, the format of the predicted language description information may include JSON format.
[0113] In a specific embodiment, by inputting preset sample text information into an initial language conversion model for language conversion processing, the initial language conversion model can convert the preset sample text information from natural language into a target business language corresponding to the target business to obtain predicted language description information.
[0114] In a specific embodiment, the second comparison result may represent the degree of difference between the predicted language description information and the sample language description information.
[0115] In a specific embodiment, the initial language conversion model can be relearned based on the second comparison result to obtain the learned initial language conversion model. Specifically, when the second comparison result indicates that the difference between the predicted language description information and the sample language description information is greater than the preset difference, the third preset dialogue information and the fourth preset dialogue information can be adjusted to obtain the adjusted third preset dialogue information and the adjusted fourth preset dialogue information; and then the adjusted third preset dialogue information and the adjusted fourth preset dialogue information are input into the initial language conversion model, so that the initial language conversion model can further accurately learn the conversion logic from the natural language to the target business language, and obtain the learned initial language conversion model. Furthermore, the logic description in the third preset dialogue information can be modified or supplemented, and the logic description of the natural language text example in the fourth preset dialogue information and the natural language text example can be modified or supplemented, so that the initial language conversion model can more clearly understand the conversion logic. Accordingly, based on the learned initial language conversion model, the above steps of obtaining the preset sample text information and the sample language description information corresponding to the preset sample text information can be repeated until the initial language conversion model is relearned based on the second comparison result to obtain the learned initial language conversion model until the preset convergence condition is met; then, the initial language conversion model that meets the preset convergence condition can be used as the pre-trained language conversion model. Wherein, when the second comparison result indicates that the difference between the predicted language description information and the sample language description information is less than or equal to the preset difference, it can be determined that the preset convergence condition is met.
[0116] In the above embodiment, by obtaining the first preset dialogue information, the second preset dialogue information, the third preset dialogue information, the fourth preset dialogue information, the preset sample text information and the sample language description information corresponding to the preset sample text information; the first preset dialogue information, the second preset dialogue information, the third preset dialogue information and the fourth preset dialogue information are sequentially input into the preset language conversion model so that the preset language conversion model learns the conversion logic from text information to language description information, and obtains the initial language conversion model; the preset sample text information is input into the initial language conversion model for language conversion processing to obtain the predicted language description information; the predicted language description information and the sample language description information are compared to obtain the second comparison result; based on the second comparison result, the initial language conversion model is trained to obtain the pre-trained language conversion model, and the convenience and efficiency of the pre-training process of the language conversion model can be achieved by utilizing the logical understanding ability of the language conversion model, thereby enabling the language conversion model to more accurately learn the conversion logic from natural language to target business language.
[0117] In a specific embodiment, the target language description information may refer to information of the target business language description that matches the business field to which the target business belongs. Optionally, the target language description information may be in JSON (JavaScript Object Notation) format. For example, the target language description information may be “{“logic_nodes”:{ / / Logical nodes
[0118] "A": "{field_3}is None and len({field_3})>0" / / Logical expression of logic node A
[0119] },
[0120] "decisions":{ / / Logical node A specifically contains at least one logical path
[0121] "A1":{ / / Logical path of logical node A, A1 can refer to the logic of corresponding logical node A is true
[0122] "reason": "Verification failed, no object subject ID", / / The reason output when hitting this logical path
[0123] "detail": "" / / Detailed description of the above "decision_reason" output when hitting this logic path
[0124] }
[0125] }
[0126] }". For example, taking the audit scenario as an example, the target language description information can be text information based on the business audit language description. It can be understood that by matching the target business language based on the business field to which the target business belongs, a more convenient, efficient and readable description method can be provided.
[0127] In a specific embodiment, by inputting preset text information into a pre-trained language conversion model, the pre-trained language conversion model can convert the preset text information from natural language to a target business language corresponding to the target business, and obtain target language description information corresponding to the target business.
[0128] In the above embodiment, the preset text information is input into the pre-trained language conversion model for language conversion processing to obtain the target language description information corresponding to the target business. By utilizing the language processing capability of the pre-trained language conversion model, the preset text information is converted into a stable language space, thereby achieving stable conversion of natural language.
[0129] S205: Generate business operation code information corresponding to the target business based on the target language description information.
[0130] In a specific embodiment, the business operation code information corresponding to the target business may refer to code information that can be directly executed. The business operation code information corresponding to the target business may include an anomaly detection code. It is understandable that by executing the business operation code information corresponding to the target business, anomaly detection for the target business can be achieved.
[0131] In a specific embodiment, the target language description information can be input into the code conversion model for code conversion processing to obtain the business operation code information corresponding to the target business. Specifically, the code conversion model can convert the target language description information into the above-mentioned business operation code information based on a preset mapping relationship. Optionally, the code conversion model can include a pre-trained natural language processing model.
[0132] In the above embodiment, preset text information based on natural language description corresponding to the target business is obtained, and the preset text information is input into a pre-trained language conversion model for language conversion processing to obtain target language description information corresponding to the target business, wherein the target language description information is information of the target business language description based on the business field to which the target business belongs. By utilizing the language processing capability of the pre-trained language conversion model, the preset text information is converted into a stable language space, and stable conversion of natural language can be achieved. Combined with the target language description information, business operation code information corresponding to the target business is generated, which can avoid the instability of direct conversion from natural language to code, improve the generation efficiency of business operation code, and improve the stability and accuracy of the generated business operation code, thereby improving the overall efficiency of business anomaly detection and reducing errors in the business anomaly detection process. For example, for business audit scenarios, the preset text information is input into the pre-trained language conversion model for language conversion processing to obtain the target language description information corresponding to the business audit language. The target language description information is then combined to generate the business operation code information corresponding to the target business. This can avoid the instability of direct conversion from natural language to code, improve the efficiency of business operation code generation, and improve the stability and accuracy of the generated business operation code, thereby improving the overall efficiency of business audits and reducing errors in the business audit process.
[0133] In a specific embodiment, the above method may further include:
[0134] Check and process the target language description information to obtain a target check result;
[0135] Based on the target inspection result, the target language description information is updated to obtain updated description information;
[0136] Accordingly, the above step S205 may include:
[0137] Generate business operation code information based on the update description information.
[0138] In a specific embodiment, the target check result can be used to indicate whether there is an error in the target language description information. The target check result can include a first check result and a second check result.
[0139] In a specific embodiment, the above-mentioned checking and processing of the target language description information to obtain the target checking result may include:
[0140] Generate anomaly detection logic tree based on target language description information;
[0141] Generate logic verification data based on the anomaly detection logic tree;
[0142] Based on the logic verification data, verify the abnormality detection logic tree to obtain a first inspection result;
[0143] A tree structure check is performed on the anomaly detection logic tree to obtain a second check result.
[0144] In a specific embodiment, the anomaly detection logic tree may refer to a tree structure with multiple logic nodes as tree nodes, and the association relationship between logic nodes or the association relationship between logic nodes and logic results as the node hierarchy relationship. Figure 3 FIG. 1 is a schematic diagram of an anomaly detection logic tree according to an exemplary embodiment. Specifically, Figure 3 As shown, the logic of the anomaly detection logic tree is: if the condition "certificate type = 1" is not met, that is, it is false, then the verification passes and the anomaly detection ends, and the above logic path is A0; if the condition "certificate type = 1" is met, that is, it is true, then determine whether the condition "entity is empty" is met, if it is true, then the verification fails, and the logic path is A1B1... and so on, which will not be repeated in this disclosure.
[0145] In a specific embodiment, an anomaly detection logic tree may be generated based on target language description information, with multiple logic nodes as tree nodes, and with associations between logic nodes or between logic nodes and logic results as node hierarchical relationships.
[0146] In a specific embodiment, the logic verification data can be used to verify whether there is an error in the anomaly detection logic tree that needs to be modified. The logic verification data may include node verification data corresponding to each logic node; the node verification data corresponding to each logic node may include at least one data variable corresponding to each logic node and verification data corresponding to each data variable. Exemplarily, the data variable may be "certificate type"; accordingly, the verification data corresponding to the above data variable "certificate type" may be 0 or 1.
[0147] In a specific embodiment, the generation of logic verification data based on the anomaly detection logic tree may include:
[0148] Extract data from each logical node in the anomaly detection logic tree to obtain at least one logical node data corresponding to each logical node;
[0149] Convert each logic node in the anomaly detection logic tree into a syntax tree to obtain syntax tree information corresponding to each logic node;
[0150] Based on at least one logical node data corresponding to each logical node and syntax tree information corresponding to each logical node, logic verification data is generated.
[0151] In a specific embodiment, at least one logical node data corresponding to any logical node may refer to data used in any of the above logical nodes. Any logical node data corresponding to any logical node may include a data variable and data corresponding to the data variable. Exemplarily, assuming that the logical expression of logical node A is "certificate type = 1", the logical node data corresponding to the logical node may include a data variable "certificate type" and data "1" corresponding to the data variable "certificate type".
[0152] In a specific embodiment, the data variables and corresponding data in any of the above-mentioned logical nodes can be extracted and processed to obtain at least one logical node data corresponding to any of the logical nodes. It should be noted that for a logical node that has a data variable but no value, the extracted data can be empty. Exemplarily, assuming that the logical expression of the logical node is "attribute A = attribute B", the extracted data variables include "attribute A" and "attribute B", the data corresponding to the above-mentioned data variable "attribute A" can be empty, and the data corresponding to the above-mentioned data variable "attribute B" can be empty.
[0153] In a specific embodiment, the syntax tree information corresponding to any logic node can be used to characterize the logical relationship of the logic expression corresponding to any logic node. The syntax tree information corresponding to any logic node can be tree structure information constructed with elements in the logic expression as nodes and hierarchical relationships between elements as hierarchical relationships between nodes; wherein the elements of the logic expression can include data variables, logical relationships, etc. Logical relationships can include "equal", "or" or "and", etc. Figure 4 FIG. 1 is a schematic diagram showing a structure of a syntax tree according to an exemplary embodiment. Figure 4 As shown, the logical expression corresponding to the syntax tree may be "attribute A = attribute B or attribute A = attribute C".
[0154] In a specific embodiment, the syntax tree information corresponding to each logic node can be obtained by performing syntax tree conversion processing on the logic expression corresponding to each logic node in the abnormal detection logic tree. Specifically, the syntax tree can be constructed with the elements in the logic expression of any logic node as nodes and the hierarchical relationship between the elements as the hierarchical relationship between the nodes to obtain the syntax tree information corresponding to any of the above logic nodes.
[0155] In a specific embodiment, based on the syntax tree information corresponding to any of the above-mentioned logical nodes, at least one first condition corresponding to any of the above-mentioned logical nodes and at least one second condition corresponding to any of the above-mentioned logical nodes are determined; and then, in combination with at least one first condition corresponding to any of the above-mentioned logical nodes, at least one second condition corresponding to any of the above-mentioned logical nodes and at least one logical node data corresponding to any of the above-mentioned logical nodes, multiple node verification data corresponding to any of the above-mentioned logical nodes can be generated. Among them, the first condition corresponding to any of the above-mentioned logical nodes can satisfy the logical expression of any of the above-mentioned logical nodes; the second condition corresponding to any of the above-mentioned logical nodes may not satisfy the logical expression of any of the above-mentioned logical nodes. Exemplarily, assuming that the logical expression of the logical node is "attribute A = attribute B or attribute A = attribute C", the multiple first conditions corresponding to the above-mentioned logical nodes include "attribute A is equal to attribute B and attribute A is equal to attribute C", "attribute A is not equal to attribute B and attribute A is equal to attribute C" and "attribute A is equal to attribute B and attribute A is not equal to attribute C", and the second condition corresponding to the above-mentioned logical node includes "attribute A is not equal to attribute B and attribute A is not equal to attribute C". Specifically, the data of the data variable that satisfies any first condition or any second condition corresponding to any of the above-mentioned logical nodes can be used as the verification data of the data variable corresponding to any of the above-mentioned logical nodes. Exemplarily, assuming that the first condition is "attribute A is equal to attribute B and attribute A is equal to attribute C", the data variables corresponding to the above-mentioned first condition include "attribute A", "attribute B" and "attribute C", the verification data corresponding to the above-mentioned data variable "attribute A" can be "1", the verification data corresponding to the above-mentioned data variable "attribute B" can be "1", and the verification data corresponding to the above-mentioned data variable "attribute C" can be "1".
[0156] In a specific embodiment, the first check result may include at least one of a third check result and a fourth check result. The third check result may be used to indicate whether the number of node output results that are failed results among the multiple node output results corresponding to each logical node is a preset number of results; and the fourth check result may be used to indicate whether the node output result corresponding to each node verification data matches the corresponding node reference result.
[0157] In a specific embodiment, when the first inspection result includes the third inspection result, the verification process of the abnormality detection logic tree based on the logic verification data to obtain the first inspection result may include:
[0158] Input each node verification data of the multiple node verification data corresponding to each logical node into the anomaly detection logic tree to obtain the node output result corresponding to each node verification data;
[0159] A third inspection result is determined based on the node output result corresponding to each node verification data.
[0160] In a specific embodiment, the node output result corresponding to any logical node may refer to the output result obtained by the judgment of the logical node. The node output result corresponding to any logical node may include a pass result or a fail result. Among them, the pass result corresponding to any logical node may be used to indicate that the data input to the logical node meets its logical expression; the fail result corresponding to any logical node may be used to indicate that the data input to the logical node does not meet its logical expression.
[0161] In a specific embodiment, when any node verification data corresponding to any logical node satisfies the logical expression corresponding to any of the above logical nodes, it can be determined that the node output result corresponding to any of the above node verification data is a passed result; when any node verification data corresponding to any of the above logical nodes does not satisfy the logical expression corresponding to any of the above logical nodes, it can be determined that the node output result corresponding to any of the above node verification data is a failed result.
[0162] In a specific embodiment, the number of target output results corresponding to each logical node can be determined based on the node output results of each of the multiple node verification data corresponding to each logical node, and the third inspection result can be determined in combination with the number of target output results corresponding to each of the above-mentioned logical nodes. Among them, the number of target output results corresponding to any logical node can refer to the number of node output results that are not passed in the node output results of each of the multiple node verification data corresponding to any of the above-mentioned logical nodes. Specifically, when the number of target output results corresponding to each logical node is the preset number of results, the third inspection result can be determined to be a passed inspection result; when the number of target output results corresponding to any logical node is not the preset number of results, the third inspection result can be determined to be a failed inspection result. Further, the preset number of results can be 1. It can be understood that when the preset number of results is 1, through the third inspection result, it can be verified that for any data, the hit logical path has and only has one failed logical path.
[0163] In a specific embodiment, the logic verification data may include a plurality of node verification data corresponding to each logic node and a node reference result corresponding to any node verification data.
[0164] In a specific embodiment, when the first inspection result includes the fourth inspection result, the verification process of the abnormality detection logic tree based on the logic verification data to obtain the first inspection result may include:
[0165] Input each node verification data of the multiple node verification data corresponding to each logical node into the anomaly detection logic tree to obtain the node output result corresponding to each node verification data;
[0166] Compare the node output result corresponding to each node verification data with the node reference result corresponding to each node verification data to obtain a first comparison result corresponding to each node verification data;
[0167] Based on the first comparison result corresponding to each node verification data, a fourth check result is determined.
[0168] In a specific embodiment, the first comparison result corresponding to any node verification data can be used to characterize whether there is a difference between the node output result corresponding to any of the node verification data and the node reference result corresponding to any of the node verification data. The first comparison result may include a third comparison result and a fourth comparison result. The third comparison result can be used to indicate that there is a difference between the corresponding node output result and the corresponding node reference result; the fourth comparison result can be used to indicate that there is no difference between the corresponding node output result and the corresponding node reference result.
[0169] In a specific embodiment, when the node output result corresponding to any node verification data is different from the node reference result corresponding to any of the above node verification data, the first comparison result corresponding to any of the above node verification data can be determined as the third comparison result; when the node output result corresponding to any of the node verification data is the same as the node reference result corresponding to any of the above node verification data, the first comparison result corresponding to any of the above node verification data can be determined as the fourth comparison result.
[0170] In a specific embodiment, when the first comparison result corresponding to each node verification data is the fourth comparison result, the fourth inspection result can be determined as a passed inspection result; when the first comparison result corresponding to any node verification data is the third comparison result, the fourth inspection result can be determined as a failed inspection result.
[0171] In a specific embodiment, the second check result may include at least one of the fifth check result, the sixth check result, the seventh check result, and the eighth check result. The fifth check result may be used to indicate whether each logical node is a logical expression; the sixth check result may be used to indicate whether the associated edge data corresponding to each logical node belongs to the preset associated edge data; the seventh check result may be used to characterize whether the starting node type and the ending node type meet the preset node type condition, and the preset node type condition may be that the starting node type belongs to the root node type, and the ending node type belongs to the leaf node type; the eighth check result may be used to characterize whether there are two different result types in the target result types corresponding to each of the multiple target associated results.
[0172] In a specific embodiment, when the second inspection result includes the fifth inspection result, the tree structure inspection of the anomaly detection logic tree to obtain the second inspection result may include:
[0173] Perform logical expression recognition on each logic node in the anomaly detection logic tree to obtain the target recognition result corresponding to each logic node;
[0174] A fifth inspection result is determined based on the target recognition result corresponding to each logical node.
[0175] In a specific embodiment, the target recognition result corresponding to any logic node can be used to indicate whether any of the above logic nodes is a logic expression.
[0176] In a specific embodiment, when the target identification result corresponding to each logical node indicates that each of the above logical nodes is a logical expression, the fifth inspection result can be determined as a passed inspection result; when there is a target identification result corresponding to any logical node indicating that any of the above logical nodes is not a logical expression, the fifth inspection result can be determined as a failed inspection result.
[0177] In a specific embodiment, when the second inspection result includes the sixth inspection result, the tree structure inspection of the anomaly detection logic tree to obtain the second inspection result may include:
[0178] Determine associated edge data of a plurality of associated edges corresponding to each logic node in the anomaly detection logic tree;
[0179] Matching the associated edge data corresponding to each logical node with the preset associated edge data to obtain a target matching result;
[0180] Based on the target matching result, a sixth inspection result is determined.
[0181] In a specific embodiment, any associated edge data may include "yes" or "no", etc. The multiple associated edges corresponding to any logical node may refer to the edges pointing from any logical node to the corresponding associated node or to the corresponding associated result in the anomaly detection logic tree. The associated node corresponding to any logical node may refer to the node adjacent to any logical node in the anomaly detection logic tree. The associated result corresponding to any logical node may refer to the node logic result adjacent to any logical node in the anomaly detection logic tree. Among them, the node logic result of any logical node may refer to the logic result that may be obtained from any of the above-mentioned logical nodes; specifically, the node logic result may include a pass result or a fail result.
[0182] In a specific embodiment, multiple associated edges corresponding to each logic node may be determined from the anomaly detection logic tree first; and then associated edge data of the multiple associated edges corresponding to each logic node may be obtained from the anomaly detection logic tree.
[0183] In a specific embodiment, the preset associated edge data may be set according to actual needs. Optionally, the preset associated edge data may include "yes" and "no".
[0184] In a specific embodiment, the target matching result may be used to indicate whether the associated edge data corresponding to each logical node belongs to the preset associated edge data.
[0185] In a specific embodiment, when the target matching result indicates that the associated edge data corresponding to each logical node belongs to the preset associated edge data, the sixth inspection result can be determined as a passed inspection result; when the target matching result indicates that there is any logical node corresponding to the associated edge data that does not belong to the preset associated edge data, the sixth inspection result can be determined as a failed inspection result.
[0186] In a specific embodiment, when the second inspection result includes the seventh inspection result, the tree structure inspection of the anomaly detection logic tree to obtain the second inspection result may include:
[0187] Determine a start logic node and an end logic node among a plurality of logic nodes corresponding to the anomaly detection logic tree;
[0188] Based on the anomaly detection logic tree, node type identification is performed on the starting logic node and the ending logic node to obtain the starting node type corresponding to the starting logic node and the ending node type corresponding to the ending logic node;
[0189] Based on the start node type and the end node type, a seventh check result is determined.
[0190] In a specific embodiment, the start logic node may refer to the first node in the anomaly detection logic tree that points to other logic nodes. The end logic node may refer to the last logic node pointed to by other logic nodes in the anomaly detection logic tree.
[0191] In a specific embodiment, by traversing the above-mentioned abnormality detection logic tree, the first traversed logic node and the last traversed logic node are determined; accordingly, the above-mentioned first traversed logic node can be used as the starting logic node, and the above-mentioned last traversed logic node can be used as the ending logic node.
[0192] In a specific embodiment, the starting node type may refer to the node type corresponding to the starting logical node. The ending node type may refer to the node type corresponding to the ending logical node. The node type may include a root node type, a leaf node type, or a child node type.
[0193] In a specific embodiment, when the starting node type and the ending node type meet the preset node type condition, the seventh inspection result can be determined as a passing inspection result; when the starting node type and the ending node type do not meet the preset node type condition, the seventh inspection result can be determined as a failing inspection result. Among them, the preset node type condition can be that the starting node type belongs to the root node type, and the ending node type belongs to the leaf node type. It can be understood that by determining the starting logical node and the ending logical node among the multiple logical nodes corresponding to the abnormal detection logic tree, based on the abnormal detection logic tree, the node type of the starting logical node and the ending logical node are identified, and the starting node type corresponding to the starting logical node and the ending node type corresponding to the ending logical node are obtained. Based on the starting node type and the ending node type, the seventh inspection result is determined, and the inspection of the path starting point and the path end point can be realized, that is, the abnormal detection logic tree needs to meet the condition that "the path starting point is the root node, and the path end point is the leaf node".
[0194] In a specific embodiment, when the second inspection result includes the eighth inspection result, the tree structure inspection of the anomaly detection logic tree to obtain the second inspection result may include:
[0195] Determine a target logical node corresponding to a leaf node from multiple logical nodes in the anomaly detection logical tree;
[0196] Perform result type identification on multiple target association results corresponding to the target logical node to obtain target result types corresponding to each of the multiple target association results;
[0197] An eighth inspection result is determined based on the target result types corresponding to each of the plurality of target association results.
[0198] In a specific embodiment, the target logical node may refer to a logical node that is a leaf node in the anomaly detection logic tree.
[0199] In a specific embodiment, node types of the multiple logical nodes in the anomaly detection logic tree can be identified to obtain the node types of the multiple logical nodes. Accordingly, the logical node whose node type is a leaf node type can be used as the target logical node.
[0200] In a specific embodiment, the target association result may refer to an association result corresponding to a target logical node, wherein the association result corresponding to the target logical node may refer to a node logic result adjacent to the target logical node.
[0201] In a specific embodiment, the target result type corresponding to any target association result may refer to the result type of any of the above target association results, wherein the result type may include a pass result type and a fail result type.
[0202] In a specific embodiment, when there are two different result types in the target result types corresponding to each of the multiple target association results, the eighth inspection result can be determined as a passed inspection result; when there are no two different result types in the target result types corresponding to each of the multiple target association results, the eighth inspection result can be determined as a failed inspection result. It can be understood that by determining the target logic node corresponding to the leaf node from the multiple logic nodes in the anomaly detection logic tree, identifying the result type of the multiple target association results corresponding to the target logic node, obtaining the target result type corresponding to each of the multiple target association results, and determining the eighth inspection result based on the target result type corresponding to each of the multiple target association results, it is possible to implement a check on whether there are two different results for the leaf node in the anomaly detection logic tree, that is, the anomaly detection logic tree needs to meet the condition that "the leaf node has two different logic results".
[0203] In a specific embodiment, the updated description information may refer to updated target language description information.
[0204] In a specific embodiment, when there are failed inspection results in the target inspection results, the target language description information may be updated based on the inspection conditions corresponding to the failed inspection results in the target inspection results to obtain updated description information.
[0205] In a specific embodiment, after obtaining the update description information, the update description information may be checked to obtain an update check result corresponding to the update description information, and if there is no failed check result in the update check result, the business operation code information may be generated based on the update description information. The update check result may refer to the check result of the update description information.
[0206] In the above embodiment, the target language description information is checked and processed to obtain the target inspection result, and the target language description information is updated in combination with the target inspection result to obtain the updated description information, and then the business operation code information is generated in combination with the updated description information. On the basis of stable and efficient generation of the business operation code information, the accuracy of the business operation code information can be further improved and the error situation of the business operation code information can be reduced.
[0207] Figure 5 FIG. 1 is a schematic diagram showing a process of generating a service operation code information according to an exemplary embodiment. Figure 5 As shown, the preset language conversion model can be trained based on the first preset dialogue information, the second preset dialogue information, the third preset dialogue information and the fourth preset dialogue information, and a pre-trained language conversion model can be obtained; wherein the first preset dialogue information can be used to characterize the model role configuration information of the preset language conversion model; the second preset dialogue information can be used to characterize the structural configuration information of the language description information to be output; the third preset dialogue information can be used to characterize the structural logic information of the language description information to be output; and the fourth preset dialogue information can be used as an example of text information and corresponding language description information. When the preset text information corresponding to the target business sent by the code developer is received, the preset text information is input into the pre-trained language conversion model for language conversion processing, and the target language description information corresponding to the target business can be obtained; then, based on the target language description information, the business operation code information corresponding to the target business can be generated.
[0208] Figure 6 FIG. 1 is a block diagram of a data processing device according to an exemplary embodiment. Figure 6 As shown, the device may include:
[0209] The information acquisition module 610 may be used to acquire preset text information corresponding to the target service, where the preset text information is text information based on natural language description;
[0210] The language conversion processing module 620 may be used to input preset text information into a pre-trained language conversion model for language conversion processing to obtain target language description information corresponding to the target business; the target language description information is information on the target business language description that matches the business field to which the target business belongs;
[0211] The code generation module 630 may be used to generate business operation code information corresponding to the target business based on the target language description information.
[0212] In a specific embodiment, the above device may further include:
[0213] The inspection and processing module can be used to inspect and process the target language description information to obtain the target inspection result;
[0214] An update module can be used to update the target language description information based on the target inspection result to obtain updated description information;
[0215] Accordingly, the above code generation module 630 may include:
[0216] The error correction module can be used to generate business operation code information based on the update description information.
[0217] In a specific embodiment, the inspection processing module may include:
[0218] The logic tree generation module can be used to generate anomaly detection logic trees based on target language description information;
[0219] The verification data generation module can be used to generate logic verification data based on the anomaly detection logic tree;
[0220] The verification processing module can be used to verify the abnormality detection logic tree based on the logic verification data to obtain a first inspection result;
[0221] The tree structure checking module can be used to perform a tree structure check on the anomaly detection logic tree to obtain a second check result.
[0222] In a specific embodiment, the verification data generation module may include:
[0223] The data extraction module can be used to extract data from each logical node in the anomaly detection logic tree to obtain at least one logical node data corresponding to each logical node;
[0224] The syntax tree conversion module can be used to convert each logic node in the anomaly detection logic tree into a syntax tree to obtain the syntax tree information corresponding to each logic node;
[0225] The logic verification data generation module may be used to generate logic verification data based on at least one logic node data corresponding to each logic node and syntax tree information corresponding to each logic node.
[0226] In a specific embodiment, the above logic tree verification module may include:
[0227] The first input module may be used to input each node verification data of the plurality of node verification data corresponding to each logical node into the anomaly detection logic tree to obtain a node output result corresponding to each node verification data;
[0228] The third inspection result determination module can be used to determine the third inspection result based on the node output result corresponding to each node verification data, and the third inspection result is used to indicate whether the number of node output results that are failed results among the multiple node output results corresponding to each logical node is a preset number of results.
[0229] In a specific embodiment, the above logic tree verification module may include:
[0230] The second input module may be used to input each node verification data of the multiple node verification data corresponding to each logical node into the anomaly detection logic tree to obtain a node output result corresponding to each node verification data;
[0231] A first comparison module may be used to compare the node output result corresponding to each node verification data with the node reference result corresponding to each node verification data to obtain a first comparison result corresponding to each node verification data;
[0232] The fourth inspection result determination module can be used to determine the fourth inspection result based on the first comparison result corresponding to each node verification data, and the fourth inspection result is used to indicate whether the node output result corresponding to each node verification data matches the corresponding node reference result.
[0233] In a specific embodiment, the tree structure checking module may include:
[0234] The logic expression recognition module can be used to perform logic expression recognition on each logic node in the anomaly detection logic tree to obtain the target recognition result corresponding to each logic node;
[0235] The fifth check result determination module may be used to determine a fifth check result based on the target recognition result corresponding to each logical node, where the fifth check result is used to indicate whether each logical node is a logical expression.
[0236] In a specific embodiment, the tree structure checking module may include:
[0237] The associated edge data determination module can be used to determine the associated edge data of multiple associated edges corresponding to each logical node in the anomaly detection logic tree, the multiple associated edges corresponding to any logical node are edges pointing from any logical node to the corresponding associated node or to the corresponding associated result in the anomaly detection logic tree, the associated node corresponding to any logical node is a node adjacent to any logical node in the anomaly detection logic tree, and the associated result corresponding to any logical node is a node logic result adjacent to any logical node in the anomaly detection logic tree;
[0238] The matching processing module can be used to match the associated edge data corresponding to each logical node with the preset associated edge data to obtain the target matching result;
[0239] The sixth inspection result determination module may be used to determine a sixth inspection result based on the target matching result, where the sixth inspection result is used to indicate whether the associated edge data corresponding to each logical node belongs to preset associated edge data.
[0240] In a specific embodiment, the tree structure checking module may include:
[0241] The start and end node determination module can be used to determine the start logical node and the end logical node among the multiple logical nodes corresponding to the abnormality detection logic tree;
[0242] The node type identification module can be used to identify the node types of the starting logic node and the ending logic node based on the abnormal detection logic tree, and obtain the starting node type corresponding to the starting logic node and the ending node type corresponding to the ending logic node;
[0243] The seventh inspection result determination module can be used to determine the seventh inspection result based on the starting node type and the ending node type. The seventh inspection result is used to characterize whether the starting node type and the ending node type meet the preset node type conditions. The preset node type conditions are that the starting node type belongs to the root node type and the ending node type belongs to the leaf node type.
[0244] In a specific embodiment, the tree structure checking module may include:
[0245] The leaf node determination module can be used to determine the target logical node corresponding to the leaf node from multiple logical nodes in the anomaly detection logic tree;
[0246] The result type identification module can be used to identify the result types of multiple target association results corresponding to the target logical node, and obtain the target result types corresponding to each of the multiple target association results;
[0247] The eighth inspection result determination module can be used to determine the eighth inspection result based on the target result types corresponding to each of the multiple target association results, and the eighth inspection result is used to characterize whether there are two different result types in the target result types corresponding to each of the multiple target association results.
[0248] In a specific embodiment, the above device may further include:
[0249] The training information acquisition module can be used to acquire first preset dialogue information, second preset dialogue information, third preset dialogue information, fourth preset dialogue information, preset sample text information, and sample language description information corresponding to the preset sample text information; the first preset dialogue information is used to represent the model role configuration information of the preset language conversion model, the second preset dialogue information is used to represent the structural configuration information of the language description information to be output, and the third preset dialogue information is used to represent the structural logic information of the language description information to be output; the fourth preset dialogue information is used as an example of text information and corresponding language description information;
[0250] The third input module may be used to input the first preset dialogue information, the second preset dialogue information, the third preset dialogue information and the fourth preset dialogue information into the preset language conversion model in sequence, so that the preset language conversion model learns the conversion logic from text information to language description information, and obtains an initial language conversion model;
[0251] The predicted language description determination module can be used to input the preset sample text information into the initial language conversion model for language conversion processing to obtain the predicted language description information;
[0252] The second comparison module can be used to compare the predicted language description information with the sample language description information to obtain a second comparison result;
[0253] The model training module can be used to train the initial language conversion model based on the second comparison result to obtain a pre-trained language conversion model.
[0254] Regarding the device in the above embodiment, the specific manner in which each module and unit performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0255] Figure 7 is a block diagram of an electronic device for generating service operation code information based on preset text information according to an exemplary embodiment. The electronic device may be a server, and its internal structure diagram may be as shown in FIG. Figure 7As shown. The electronic device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the electronic device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a data processing method is implemented.
[0256] Figure 8 is a block diagram of another electronic device for generating service operation code information based on preset text information according to an exemplary embodiment. The electronic device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 8 As shown. The electronic device includes a processor, a memory, a network interface, a display screen and an input device connected via a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the electronic device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a data processing method is implemented. The display screen of the electronic device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic device can be a touch layer covering the display screen, or a key, trackball or touchpad provided on the housing of the electronic device, or an external keyboard, touchpad or mouse, etc.
[0257] Those skilled in the art will understand that Figure 7 or Figure 8 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present disclosure, and does not constitute a limitation on the electronic device to which the scheme of the present disclosure is applied. The specific electronic device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0258] In an exemplary embodiment, an electronic device is also provided, including: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the data processing method in the embodiment of the present disclosure.
[0259] In an exemplary embodiment, a computer-readable storage medium is also provided. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the data processing method in the embodiment of the present disclosure.
[0260] In an exemplary embodiment, a computer program product containing instructions is also provided. When the computer program product is run on a computer, the computer is caused to execute the data processing method in the embodiment of the present disclosure.
[0261] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0262] It is understandable that in the specific implementation of this application, related data such as user information is involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0263] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0264] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A data processing method, characterized in that: The method comprises: Acquire preset text information corresponding to the target service, wherein the preset text information is text information described based on natural language; Input the preset text information into a pre-trained language conversion model for language conversion processing to obtain target language description information corresponding to the target business; the target language description information is information of the target business language description matched based on the business field to which the target business belongs; Based on the target language description information, business operation code information corresponding to the target business is generated.
2. The method according to claim 1, characterized in that The method further comprises: Checking and processing the target language description information to obtain a target checking result; Based on the target inspection result, the target language description information is updated to obtain updated description information; The generating, based on the target language description information, the business operation code information corresponding to the target business includes: Based on the update description information, the service operation code information is generated.
3. The method according to claim 2, characterized in that The target inspection result includes a first inspection result and a second inspection result; the inspection and processing of the target language description information to obtain the target inspection result includes: Based on the target language description information, generate an anomaly detection logic tree; Based on the anomaly detection logic tree, generate logic verification data; Based on the logic verification data, verify the abnormality detection logic tree to obtain the first inspection result; Perform a tree structure check on the anomaly detection logic tree to obtain the second check result.
4. The method according to claim 3, characterized in that The generating logic verification data based on the abnormality detection logic tree includes: Extracting data from each logical node in the abnormality detection logic tree to obtain at least one logical node data corresponding to each logical node; Convert each logic node in the anomaly detection logic tree into a syntax tree to obtain syntax tree information corresponding to each logic node; The logic verification data is generated based on at least one logic node data corresponding to each logic node and syntax tree information corresponding to each logic node.
5. The method according to claim 3, characterized in that: The logic verification data includes a plurality of node verification data corresponding to each logic node, and the first inspection result includes a third inspection result; the verification processing is performed on the abnormality detection logic tree based on the logic verification data to obtain the first inspection result, including: Input each node verification data of the plurality of node verification data corresponding to each logical node into the anomaly detection logic tree to obtain a node output result corresponding to each node verification data; The third check result is determined based on the node output result corresponding to each node verification data, and the third check result is used to indicate whether the number of node output results that are failed results among the multiple node output results corresponding to each logical node is a preset number of results.
6. The method according to claim 3, characterized in that The logic verification data includes a plurality of node verification data corresponding to each logic node and a node reference result corresponding to any node verification data, and the first inspection result includes a fourth inspection result; and the first inspection result is obtained by performing verification processing on the anomaly detection logic tree based on the logic verification data, including: Input each node verification data of the plurality of node verification data corresponding to each logical node into the anomaly detection logic tree to obtain a node output result corresponding to each node verification data; Compare the node output result corresponding to each node verification data with the node reference result corresponding to each node verification data to obtain a first comparison result corresponding to each node verification data; Based on the first comparison result corresponding to each node verification data, the fourth check result is determined, and the fourth check result is used to indicate whether the node output result corresponding to each node verification data matches the corresponding node reference result.
7. The method according to claim 3, characterized in that The second inspection result includes the fifth inspection result; the tree structure inspection of the abnormality detection logic tree is performed to obtain the second inspection result, including: Performing logical expression recognition on each logic node in the anomaly detection logic tree to obtain a target recognition result corresponding to each logic node; Based on the target recognition result corresponding to each logical node, the fifth check result is determined, and the fifth check result is used to indicate whether each logical node is a logical expression.
8. The method according to claim 3, characterized in that The second inspection result includes the sixth inspection result; the tree structure inspection of the abnormality detection logic tree is performed to obtain the second inspection result, including: Determine the associated edge data of multiple associated edges corresponding to each logical node in the anomaly detection logic tree, wherein the multiple associated edges corresponding to any logical node are edges pointing from the any logical node to the corresponding associated node or to the corresponding associated result in the anomaly detection logic tree, the associated node corresponding to any logical node is a node adjacent to the any logical node in the anomaly detection logic tree, and the associated result corresponding to any logical node is a node logic result adjacent to the any logical node in the anomaly detection logic tree; Matching the associated edge data corresponding to each logical node with the preset associated edge data to obtain a target matching result; Based on the target matching result, the sixth check result is determined, where the sixth check result is used to indicate whether the associated edge data corresponding to each logical node belongs to the preset associated edge data.
9. The method according to claim 3, characterized in that: The second inspection result includes the seventh inspection result; the tree structure inspection of the abnormality detection logic tree is performed to obtain the second inspection result, including: Determine a start logical node and an end logical node among a plurality of logical nodes corresponding to the anomaly detection logical tree; Based on the anomaly detection logic tree, performing node type identification on the starting logic node and the ending logic node to obtain a starting node type corresponding to the starting logic node and an ending node type corresponding to the ending logic node; Based on the starting node type and the ending node type, the seventh check result is determined, and the seventh check result is used to characterize whether the starting node type and the ending node type meet a preset node type condition, and the preset node type condition is that the starting node type belongs to a root node type, and the ending node type belongs to a leaf node type.
10. The method according to claim 3, characterized in that The second inspection result includes the eighth inspection result; the tree structure inspection of the abnormality detection logic tree is performed to obtain the second inspection result, including: Determine a target logical node corresponding to a leaf node from a plurality of logical nodes in the anomaly detection logical tree; Performing result type identification on a plurality of target association results corresponding to the target logical node to obtain target result types corresponding to each of the plurality of target association results; The eighth inspection result is determined based on the target result types corresponding to each of the multiple target association results, and the eighth inspection result is used to characterize whether there are two different result types in the target result types corresponding to each of the multiple target association results.
11. The method according to any one of claims 1 to 10, characterized in that: The pre-trained language conversion model is obtained by: Obtaining first preset dialogue information, second preset dialogue information, third preset dialogue information, fourth preset dialogue information, preset sample text information, and sample language description information corresponding to the preset sample text information; The first preset dialogue information is used to represent the model role configuration information of the preset language conversion model, the second preset dialogue information is used to represent the structure configuration information of the language description information to be output, and the third preset dialogue information is used to represent the structure logic information of the language description information to be output; The fourth preset dialogue information is used as an example of text information and corresponding language description information; inputting the first preset dialogue information, the second preset dialogue information, the third preset dialogue information, and the fourth preset dialogue information into a preset language conversion model in sequence, so that the preset language conversion model learns the conversion logic from text information to language description information, and obtains an initial language conversion model; Inputting the preset sample text information into the initial language conversion model for language conversion processing to obtain predicted language description information; Comparing the predicted language description information with the sample language description information to obtain a second comparison result; Based on the second comparison result, the initial language conversion model is trained to obtain the pre-trained language conversion model.
12. A data processing device, characterized in that: The device comprises: An information acquisition module, used to acquire preset text information corresponding to a target service, wherein the preset text information is text information based on a natural language description; A language conversion processing module is used to input the preset text information into a pre-trained language conversion model for language conversion processing to obtain target language description information corresponding to the target business; the target language description information is information of the target business language description matched based on the business field to which the target business belongs; The code generation module is used to generate business operation code information corresponding to the target business based on the target language description information.
13. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to execute the executable instructions to implement the data processing method described in any one of claims 1 to 11.
14. A non-volatile computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the data processing method according to any one of claims 1 to 11 is implemented.
