Network Model-Based Prediction Method, Device, Electronic Device, and Readable Medium
By splitting the machine learning model into multiple subnet models in parallel computing, the existing model has been solved, and more efficient real-time computing capabilities are achieved.
Patent Information
- Application Number
- CN202210664356.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-13
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2042-06-13
AI Technical Summary
Existing machine learning models are highly complex in the computing process, resulting in long calculation time and poor real-time performance, making it difficult to apply to real-time computing scenarios.
By splitting the target network model into multiple subnet models, parallel computing is used to improve model running speed and real-time performance.
It improves the parallel computing power of the model, shortens the computing time, and improves the real-timeness of the computing, making it suitable for real-time computing applications.
Smart Images

Figure CN115099415B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular, to a prediction method, apparatus, electronic device, and readable medium based on a network model. Background Art
[0002] With the rapid development of the field of artificial intelligence, the application of machine learning models has become increasingly widespread. The accuracy of policy conclusions and label information obtained through model training for various services is also getting higher and higher. A good model can bring great improvements to various fields of risk.
[0003] In related technologies, the application of machine learning models usually involves offline training and calculation using a large amount of data.
[0004] However, such models usually have a relatively complex calculation process. Therefore, each calculation requires a long time to output the result, and the real-time performance of the calculation is poor, making it difficult to perform real-time calculation and application. Summary of the Invention
[0005] Based on the above technical problems, this application provides a prediction method, apparatus, electronic device, and readable medium based on a network model, so as to increase the parallelism of calculations in the model, improve the running speed of the model, thereby improving the real-time performance of calculations, and facilitating application in the field of real-time calculation applications.
[0006] Other features and advantages of this application will become apparent through the following detailed description, or be learned in part through the practice of this application.
[0007] According to one aspect of the embodiments of this application, a prediction method based on a network model is provided, including:
[0008] Obtain the original model parameters of the target network model, where the input of the target network model is K variables, and K is an integer greater than 1;
[0009] Generate T sub-network models according to the original model parameters, where each sub-network model in the T sub-network models is used to input a variable group, the variable groups input by different sub-network models are different from each other, the T variable groups include the K variables, and each variable group includes at least one variable;
[0010] Obtain the data to be predicted, where the data to be predicted includes the data features corresponding to each of the K variables;
[0011] According to the variable group corresponding to each sub-network model, divide the data to be predicted into data feature groups corresponding to the T variable groups;
[0012] Input corresponding data feature groups into each of the sub-network models respectively to generate the model prediction result of the target network model.
[0013] In some embodiments of the present application, based on the above technical solutions, the generating T sub-network models according to the original model parameters includes:
[0014] Parse the original model parameters according to the implementation language of the original model parameters to obtain a plurality of computing units, where the computing units are used to calculate output results based on corresponding variable groups;
[0015] According to the dependency relationship between the input parameters and output results of the plurality of computing units, combine the computing units that have dependencies on each other into sub-network models to obtain T sub-network models.
[0016] In some embodiments of the present application, based on the above technical solutions, the generating T sub-network models according to the original model parameters includes:
[0017] Parse the original model parameters according to the implementation language of the original model parameters to obtain a first computing unit, a second computing unit, and a third computing unit, where the input parameter of the third computing unit is the output results of the first computing unit and the second computing unit;
[0018] Generate sub-network models based on the first computing unit, the second computing unit, and the third computing unit to obtain the T sub-network models.
[0019] In some embodiments of the present application, based on the above technical solutions, the obtaining the data to be predicted includes:
[0020] Determine the data query statements and corresponding data sources corresponding to each variable according to the K variables;
[0021] Obtain the business data features corresponding to the K variable pairs from the data source according to the data query statements to obtain the data to be predicted.
[0022] In some embodiments of the present application, based on the above technical solutions, the inputting corresponding data feature groups into each of the sub-network models respectively to generate the model prediction result of the target network model includes:
[0023] Input corresponding data feature groups into each of the sub-network models respectively to obtain T output results;
[0024] According to the T output results, perform model fitting through the loss function of the target network model to obtain the model prediction result of the target network model.
[0025] In some embodiments of the present application, based on the above technical solutions, after respectively inputting corresponding data feature groups into each of the sub-network models to generate a model prediction result of the target network model, the method further includes:
[0026] Obtain independent data features from the data to be predicted, where the independent data features do not correspond to the variables among the K variables;
[0027] Determine a decision rule corresponding to the data to be predicted according to the independent data features and the model prediction result, where the decision rule is used to determine the risk level of the business transaction corresponding to the data to be predicted.
[0028] According to one aspect of the embodiments of the present application, there is provided a prediction device based on a network model, including:
[0029] A parameter acquisition module, configured to acquire original model parameters of a target network model, where the input of the target network model is K variables, and K is an integer greater than 1;
[0030] A sub-network model generation module, configured to generate T sub-network models according to the original model parameters, where each of the T sub-network models is used to input a variable group, the variable groups input by different sub-network models are different from each other, the T variable groups include the K variables, and each variable group includes at least one variable;
[0031] A data acquisition module, configured to acquire data to be predicted, where the data to be predicted includes data features corresponding to each of the K variables;
[0032] A data division module, configured to divide the data to be predicted into data feature groups corresponding to the T variable groups according to the variable group corresponding to each sub-network model;
[0033] A result generation module, configured to respectively input corresponding data feature groups into each of the sub-network models to generate a model prediction result of the target network model.
[0034] In some embodiments of the present application, based on the above technical solutions, the sub-network model generation module includes:
[0035] A parameter parsing unit, configured to parse the original model parameters according to the implementation language of the original model parameters to obtain a plurality of computing units, where the computing units are used to calculate output results based on corresponding variable groups;
[0036] A combination unit, configured to combine the computing units that have dependencies on each other into sub-network models according to the dependency relationships between the input parameters and output results of the plurality of computing units, to obtain T sub-network models.
[0037] According to one aspect of the embodiments of the present application, there is provided an electronic device, which includes: a processor; and a memory for storing executable instructions of the processor; wherein, the processor is configured to execute the prediction method based on the network model in the above technical solution by executing the executable instructions.
[0038] According to one aspect of the embodiments of the present application, there is provided a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the prediction method based on the network model in the above technical solution is implemented.
[0039] In the embodiments of the present application, by changing the execution order of the model itself, the original execution logic of the model is split and reorganized during the compilation process, so that the parallelism of the calculations in the model is increased, the running speed of the model is improved, and thus the real-time performance of the calculations is improved, so as to be applied in the application fields of real-time calculations.
[0040] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application. Obviously, the drawings in the following description are only some embodiments of the present application, and those of ordinary skill in the art can obtain other drawings based on these drawings without creative efforts. In the drawings:
[0042] Figure 1 Schematically shows an exemplary system architecture diagram of the technical solution of the present application in an application scenario;
[0043] Figure 2 Is a schematic flowchart of the prediction process in the embodiments of the present application;
[0044] Figure 3 Is a flowchart of a prediction method based on a network model provided by the embodiments of the present application;
[0045] Figure 4 Schematically shows a block diagram of the composition of the prediction device based on the network model in the embodiments of the present application;
[0046] Figure 5 Shows a schematic structural diagram of a computer system of an electronic device suitable for implementing the embodiments of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0047] Example embodiments will now be described more fully with reference to the accompanying drawings. However, the example embodiments can be implemented in various forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this application will be more complete and comprehensive, and will fully convey the concept of the example embodiments to those skilled in the art.
[0048] In addition, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of the embodiments of this application. However, those skilled in the art will recognize that the technical solutions of this application may be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. may be employed. In other instances, well-known methods, devices, implementations, or operations are not shown or described in detail to avoid obscuring aspects of this application.
[0049] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0050] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all the content and operations / steps, nor do they have to be executed in the order described. For example, some operations / steps can be decomposed, while some operations / steps can be combined or partially combined, so the actual execution order may change according to the actual situation.
[0051] It should be understood that the solution of this application can be applied to the field of machine learning and is specifically used in scenarios of real-time computing using machine models. The solution of this application can dynamically parse the outputs of various model packages, normalize them into a unified model execution object, then dynamically generate a DAG execution graph according to the input parameters on which each subtree depends, and then incorporate the DAG execution graph into the overall DAG flowchart of the application according to the dependencies. In practical applications, relying on the topological sorting algorithm, the calculations of the model are integrated into the application execution process while performing distributed computing, thereby reducing the time consumption brought by the introduction of the model to the system.
[0052] Figure 1 Schematically shown is an exemplary system architecture diagram of the technical solution of this application in an application scenario. As Figure 1As shown, the application scenario includes a server and multiple terminal devices. A real-time service is deployed in the server, and the real-time service performs relevant operations through a machine model configured according to the solution of this application. The terminal can access the real-time service on the server through the network to request operations. The service then calls the machine model to perform real-time operations on the data sent by the terminal and returns the operation results.
[0053] Figure 1 The server shown in the figure can specifically be a single server, a server cluster including multiple servers, or a cloud server. In one embodiment, no terminal device may be adopted in this system architecture, and the operations performed by the above terminal devices are run by a background service on the server or by a dedicated server.
[0054] It can be understood that Figure 1 the scenario shown in the figure is only an example of the application scenario of the solution of this application. The actual application scenario can adopt other suitable network structures, such as adding a proxy server and a multi-level network, etc. This application does not limit this.
[0055] Figure 2 is a schematic flowchart of the prediction process in the embodiment of this application. As Figure 2 described, a model written in PMML or SPARK, etc. will be dynamically compiled into a model object and normalized into a unified model execution object, that is, a subtree. Subsequently, a DAG execution graph is constructed according to the variable dependency relationships of each subtree to determine the execution process of the subtree, and then the model is fitted to obtain the model result. In actual applications, the variables required by the model will be extracted from external information according to the input data of the model and calculated, so as to obtain the result of the model and make a decision based on the result.
[0056] The technical solution provided by this application will be described in detail below in combination with specific embodiments. For the convenience of introduction, please refer to Figure 3 , Figure 3 is a flowchart of a prediction method based on a network model provided by an embodiment of this application. This method can be applied to the above server for execution. The server can be regarded as a computer device. In the embodiment of this application, taking the computer device as the execution subject, the prediction based on the network model is introduced. The prediction method based on the network model may include the following steps S310 to S350:
[0057] Step S310, obtain the original model parameters of the target network model, where the input of the target network model is K variables, and K is an integer greater than 1;
[0058] The original model parameters include the structure of the target network model itself, the calculation process, model variables, etc. The original model parameters are usually in the form of files or file packages. Among them, the original model parameters are written in various programming languages and exported into corresponding files, such as languages like PMML, PYTHON, etc. The target network model itself is a trained machine learning model. The target network model can be a network model for achieving any goal, and the structure adopted by the model can also use various common network models. For example, the target network model can be a model for risk assessment of bank transactions. The input data is various data of each credit card transaction, such as the accounts of both parties for the down payment, amount, remarks, transaction history of both parties, etc., and the output result is a prediction result such as whether this transaction is an illegal act, etc.
[0059] Step S320, generate T sub-network models according to the original model parameters, where each sub-network model in the T sub-network models is used to input a variable group, and the variable groups input by different sub-network models are different from each other. The T variable groups include the K variables, and each variable group includes at least one variable;
[0060] Specifically, the sub-network model usually adopts a tree structure, and the T sub-network models can form a directed acyclic graph. The overall effect achieved by the T sub-network models is the same as that of the target network model. The original model parameters are converted into one or more tree-structured networks, and each network corresponds to one or more calculation processes in the original model parameters. Each sub-network model in the T sub-network models is used to input a variable group, and the variable groups input by different sub-network models are different from each other. The T variable groups include the K variables. The intersection of the variable groups of all sub-network models is the original input variables of the target network model. The variable groups of each sub-network model are different, but there are partial variable conflicts between the variable components of different sub-network models. The T sub-network models can be executed in parallel.
[0061] In an embodiment of the present application, the process of generating T sub-network models according to the original model parameters includes the following steps: Parse the original model parameters according to the implementation language of the original model parameters to obtain multiple calculation units, and the calculation units are used to calculate the output result based on the corresponding variable group; According to the dependency relationship between the input parameters and output results of the multiple calculation units, combine the calculation units with dependency relationships between each other into sub-network models to obtain T sub-network models.
[0062] In an embodiment of the present application, the process of generating T sub-network models according to the original model parameters includes the following steps: parsing the original model parameters according to the implementation language of the original model parameters to obtain a first calculation unit, a second calculation unit, and a third calculation unit, wherein the input parameter of the third calculation unit is the output results of the first calculation unit and the second calculation unit; generating sub-network models based on the first calculation unit, the second calculation unit, and the third calculation unit to obtain the T sub-network models.
[0063] Step S330: Obtain the data to be predicted, where the data to be predicted includes the data features corresponding to each of the K variables.
[0064] The data to be predicted is actual data generated in an actual system. During the obtaining process, relevant data can be collected from the actual system according to the attributes and classification of the K variables. According to the collected actual data, feature extraction can be performed on the data to obtain the data features corresponding to each variable. It can be understood that the data to be predicted is usually data within a predetermined time period, for example, business data within three months or business data within a certain period.
[0065] In an embodiment of the present application, the process of obtaining the data to be predicted includes the following steps: determining the data query statements and corresponding data sources corresponding to each of the K variables according to the K variables; obtaining the business data features corresponding to the K variables from the data sources according to the data query statements to obtain the data to be predicted.
[0066] Step S340: Divide the data to be predicted into data feature groups corresponding to the T variable groups according to the variable group corresponding to each sub-network model.
[0067] The variable group input to each sub-network model includes a part of the K variables. Therefore, according to this corresponding relationship, data feature groups corresponding to the variable groups can be generated according to the data to be predicted based on the variables included in the variable groups.
[0068] Step S350: Input the corresponding data feature groups into each sub-network model respectively to generate the model prediction results of the target network model.
[0069] The sub-network models respectively perform operations on the input data feature groups. Since the input parameters between the sub-network models all come from K variables, there is no interdependent relationship between the operation processes of the sub-network models, so they can be executed in parallel. After all the sub-network models have been calculated, the output results of each sub-network model can be aggregated, and further regression operations of the loss function can be performed to obtain the model prediction result of the target network model. In actual applications, based on the model prediction result, the business operations corresponding to the data to be predicted can be further processed. For example, if it is determined that the transaction is suspected of illegal behavior, the transaction can be frozen for further confirmation.
[0070] In an embodiment of the present application, the process of respectively inputting corresponding data feature groups to each sub-network model to generate the model prediction result of the target network model includes the following steps: respectively inputting corresponding data feature groups to each sub-network model to obtain T output results; according to the T output results, performing model fitting through the loss function of the target network model to obtain the model prediction result of the target network model.
[0071] In an embodiment of the present application, after respectively inputting corresponding data feature groups to each sub-network model to generate the model prediction result of the target network model, the method further includes the following steps: obtaining independent data features from the data to be predicted, where the independent data features do not correspond to the variables in the K variables; according to the independent data features and the model prediction result, determining the decision rule corresponding to the data to be predicted, where the decision rule is used to determine the risk level of the business transaction corresponding to the data to be predicted.
[0072] In an embodiment of the present application, by changing the execution order of the model itself, the original execution logic of the model is split and reorganized during the compilation process, so that the parallelism of the calculations in the model is increased, the running speed of the model is improved, and thus the real-time performance of the calculations is improved, so as to be applied in the application field of real-time calculations.
[0073] It should be noted that although the steps of the method in the present application are described in a specific order in the drawings, this does not require or imply that these steps must be executed in this specific order, or that all the steps shown must be executed to achieve the desired result. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step for execution, and / or one step may be decomposed into multiple steps for execution, etc.
[0074] The following introduces the device embodiment of the present application, which can be used to execute the prediction method based on the network model in the above embodiments of the present application. Figure 4The block diagram of the prediction device based on the network model in the embodiment of the present application is schematically shown. As Figure 4 shown, the prediction device 400 based on the network model mainly may include:
[0075] A parameter acquisition module 410, configured to acquire the original model parameters of the target network model, where the input of the target network model is K variables, and K is an integer greater than 1;
[0076] A sub-network model generation module 420, configured to generate T sub-network models according to the original model parameters, where each sub-network model in the T sub-network models is used to input a variable group, the variable groups input by different sub-network models are different from each other, the T variable groups include the K variables, and each variable group includes at least one variable;
[0077] A data acquisition module 430, configured to acquire the data to be predicted, where the data to be predicted includes the data features corresponding to each of the K variables;
[0078] A data division module 440, configured to divide the data to be predicted into data feature groups corresponding to the T variable groups according to the variable groups corresponding to each sub-network model;
[0079] A result generation module 450, configured to input the corresponding data feature groups into each sub-network model respectively to generate the model prediction result of the target network model.
[0080] In some embodiments of the present application, based on the above technical solution, the sub-network model generation module includes:
[0081] A parameter analysis unit, configured to analyze the original model parameters according to the implementation language of the original model parameters to obtain a plurality of calculation units, and the calculation units are used to calculate and output results based on the corresponding variable groups;
[0082] A combination unit, configured to combine the calculation units that have dependencies on each other into sub-network models according to the dependency relationships between the input parameters and output results of the plurality of calculation units to obtain T sub-network models.
[0083] In some embodiments of the present application, based on the above technical solution, the sub-network model generation module includes:
[0084] Analyze the original model parameters according to the implementation language of the original model parameters to obtain a first calculation unit, a second calculation unit, and a third calculation unit, where the input parameter of the third calculation unit is the output results of the first calculation unit and the second calculation unit;
[0085] Based on the first computing unit, the second computing unit, and the third computing unit, generate sub-network models to obtain the T sub-network models.
[0086] In some embodiments of the present application, based on the above technical solutions, the data acquisition module includes:
[0087] A data source determination unit, configured to determine, according to the K variables, data query statements corresponding to each variable and corresponding data sources;
[0088] A feature acquisition unit, configured to obtain business data features corresponding to the K variables from the data source according to the data query statements to obtain data to be predicted.
[0089] In some embodiments of the present application, based on the above technical solutions, the result generation module includes:
[0090] A feature value input unit, configured to input corresponding data feature groups into each of the sub-network models respectively to obtain T output results;
[0091] A model fitting unit, configured to perform model fitting through the loss function of the target network model according to the T output results to obtain the model prediction result of the target network model.
[0092] In some embodiments of the present application, based on the above technical solutions, the prediction device based on the network model further includes:
[0093] An independent feature acquisition module, configured to acquire independent data features from the data to be predicted, where the independent data features do not correspond to the variables in the K variables;
[0094] A decision rule determination module, configured to determine a decision rule corresponding to the data to be predicted according to the independent data features and the model prediction result, where the decision rule is used to determine the risk level of the business transaction corresponding to the data to be predicted.
[0095] It should be noted that the device provided in the above embodiments and the method provided in the above embodiments belong to the same concept. The specific manners in which each module performs operations have been described in detail in the method embodiments and will not be elaborated herein.
[0096] Figure 5 The structural schematic diagram of a computer system of an electronic device suitable for implementing the embodiments of the present application is shown.
[0097] It should be noted that Figure 5 The computer system 500 of the electronic device shown is only an example and should not impose any limitation on the functions and usage scope of the embodiments of the present application.
[0098] As Figure 5 shown, the computer system 500 includes a Central Processing Unit (CPU) 501, which can perform various appropriate actions and processes according to the program stored in the Read-Only Memory (ROM) 502 or the program loaded from the storage section 508 into the Random Access Memory (RAM) 503. In the RAM 503, various programs and data required for system operation are also stored. The CPU 501, ROM 502, and RAM 503 are connected to each other via a bus 504. An Input / Output (I / O) interface 505 is also connected to the bus 504.
[0099] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, etc.; an output section 507 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), etc. and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed so that the computer program read from it can be installed into the storage section 508 as needed.
[0100] Specifically, according to the embodiments of the present application, the processes described in each method flowchart can be implemented as computer software programs. For example, the embodiments of the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program codes for executing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from the network via the communication section 509, and / or installed from the removable medium 511. When the computer program is executed by the Central Processing Unit (CPU) 501, various functions defined in the system of the present application are executed.
[0101] It should be noted that the computer-readable medium shown in the embodiments of the present application can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, the computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or in combination with an instruction execution system, apparatus, or device. In the present application, the computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, in which computer-readable program code is carried. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium can also be any computer-readable medium other than the computer-readable storage medium, and this computer-readable medium can send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0102] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagram can represent a module, a program segment, or a part of code, and the above module, program segment, or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, and the combination of blocks in the block diagram or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0103] It should be noted that although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of the two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0104] Through the description of the above embodiments, those skilled in the art can easily understand that the example embodiments described herein can be implemented by software or by a combination of software and necessary hardware. Therefore, the technical solutions according to the embodiments of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (such as a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiments of the present application.
[0105] After considering the specification and practicing the invention disclosed herein, those skilled in the art will readily conceive of other embodiments of the present application. The present application is intended to cover any variations, uses, or adaptations of the present application, which follow the general principles of the present application and include known common general knowledge or conventional technical means in the technical field not disclosed in the present application.
[0106] It should be understood that the present application is not limited to the exact structures already described and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present application is only limited by the appended claims.
Claims
1. A prediction method based on a network model, characterized in that, it includes: Obtain the original model parameters of the target network model, where the input of the target network model is K variables, K is an integer greater than 1, the target network model is a risk assessment model, the input data of the target network model is credit card transaction data, and the credit card transaction data includes accounts, amounts, remarks, and the transaction history of both parties; Generate T sub-network models according to the original model parameters, where each sub-network model in the T sub-network models is used to input a variable group, and the variable groups input by different sub-network models are different from each other. The T variable groups include the K variables, and each variable group includes at least one variable; Obtain the data to be predicted, where the data to be predicted is the business operation data of bank transactions, and the data to be predicted includes the data characteristics corresponding to each of the K variables; According to the variable group corresponding to each sub-network model, divide the data to be predicted into data characteristic groups corresponding to the T variable groups; Input the corresponding data characteristic groups into each sub-network model respectively to generate the model prediction result of the target network model, and the model prediction result is the prediction result of whether the transaction is legal; Obtain independent data characteristics from the data to be predicted, where the independent data characteristics do not correspond to the variables in the K variables, and the independent data characteristics are the business data characteristics of bank business transactions; According to the independent data characteristics and the model prediction result, determine the decision rule corresponding to the data to be predicted, and the decision rule is used to determine the risk level of the business transaction corresponding to the data to be predicted.
2. The method according to claim 1, characterized in that, the generating T sub-network models according to the original model parameters includes: Parse the original model parameters according to the implementation language of the original model parameters to obtain a plurality of calculation units, and the calculation units are used to calculate the output result based on the corresponding variable group; According to the dependency relationship between the input parameters and the output results of the plurality of calculation units, combine the calculation units that have a dependency relationship with each other into sub-network models to obtain T sub-network models.
3. The method according to claim 1, characterized in that, the generating T sub-network models according to the original model parameters includes: Parse the original model parameters according to the implementation language of the original model parameters to obtain a first calculation unit, a second calculation unit, and a third calculation unit, where the input parameter of the third calculation unit is the output results of the first calculation unit and the second calculation unit; Generate sub-network models based on the first calculation unit, the second calculation unit, and the third calculation unit to obtain the T sub-network models.
4. The method according to claim 1, characterized in that, the obtaining the data to be predicted includes: According to the K variables, determine the data query statements and the corresponding data sources for each variable; Obtain the business data features corresponding to the K variable pairs from the data source according to the data query statement to obtain the data to be predicted.
5. The method according to claim 1, wherein, the step of respectively inputting corresponding data feature groups into each sub-network model to generate the model prediction result of the target network model includes: respectively inputting corresponding data feature groups into each sub-network model to obtain T output results; According to the T output results, perform model fitting through the loss function of the target network model to obtain the model prediction result of the target network model.
6. A prediction device based on a network model, wherein, it includes: A parameter acquisition module, configured to acquire the original model parameters of the target network model, wherein the input of the target network model is K variables, K is an integer greater than 1, the target network model is a risk assessment model, the input data of the target network model is credit card transaction data, and the credit card transaction data includes accounts, amounts, remarks, and the transaction history of both parties; A sub-network model generation module, configured to generate T sub-network models according to the original model parameters, wherein each sub-network model in the T sub-network models is used to input a variable group, the variable groups input by different sub-network models are different from each other, the T variable groups include the K variables, and each variable group includes at least one variable; A data acquisition module, configured to acquire the data to be predicted, wherein the data to be predicted is the business operation data of bank transactions, and the data to be predicted includes the data features corresponding to each of the K variables; A data division module, configured to divide the data to be predicted into data feature groups corresponding to the T variable groups according to the variable groups corresponding to each sub-network model; A result generation module, configured to respectively input corresponding data feature groups into each sub-network model to generate the model prediction result of the target network model, and the model prediction result is the prediction result of whether the transaction is legal; An independent feature acquisition module, configured to acquire independent data features from the data to be predicted, and the independent data features do not correspond to the variables in the K variables; A decision rule determination module, configured to determine the decision rule corresponding to the data to be predicted according to the independent data features and the model prediction result, and the decision rule is used to determine the risk level of the business transaction corresponding to the data to be predicted.
7. The prediction device according to claim 6, wherein, the sub-network model generation module includes: A parameter parsing unit, configured to parse the original model parameters according to the implementation language of the original model parameters to obtain a plurality of computing units, and the computing units are used to calculate output results based on the corresponding variable groups; A combination unit, configured to combine the computing units that have dependencies on each other into sub-network models according to the dependency relationships between the input parameters and output results of the plurality of computing units to obtain T sub-network models.
8. An electronic device, wherein, it includes: A processor; A memory, configured to store the executable instructions of the processor; Wherein, the processor is configured to execute the network model-based prediction method according to any one of claims 1 to 5 by executing the executable instructions.
9. A computer-readable medium having a computer program stored thereon, wherein, when the computer program is executed by a processor, it implements the network model-based prediction method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Photovoltaic power ultra-short-term prediction method based on parallel dendritic neural network
CN113205214A
KR20210042992A