[go: up one dir, main page]

CN115099415A - Prediction method, apparatus, electronic device and readable medium based on network model - Google Patents

Prediction method, apparatus, electronic device and readable medium based on network model Download PDF

Info

Publication number
CN115099415A
CN115099415A CN202210664356.XA CN202210664356A CN115099415A CN 115099415 A CN115099415 A CN 115099415A CN 202210664356 A CN202210664356 A CN 202210664356A CN 115099415 A CN115099415 A CN 115099415A
Authority
CN
China
Prior art keywords
sub
data
model
network model
variable
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210664356.XA
Other languages
Chinese (zh)
Other versions
CN115099415B (en
Inventor
吴朦
姜立娣
姚孝辉
王昱晟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Bank Co Ltd
Original Assignee
Ping An Bank Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Bank Co Ltd filed Critical Ping An Bank Co Ltd
Priority to CN202210664356.XA priority Critical patent/CN115099415B/en
Publication of CN115099415A publication Critical patent/CN115099415A/en
Application granted granted Critical
Publication of CN115099415B publication Critical patent/CN115099415B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • G06F8/443Optimisation
    • G06F8/4441Reducing the execution time required by the program code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/401Transaction verification
    • G06Q20/4016Transaction verification involving fraud or risk level assessment in transaction processing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Artificial Intelligence (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application provides a prediction method, a prediction device, electronic equipment and a readable medium based on a network model. The method comprises the following steps: acquiring original model parameters of a target network model, wherein the input of the target network model is K variables; generating T sub-network models according to the original model parameters, wherein each sub-network model in the T sub-network models is used for inputting a variable group, the variable groups input by different sub-network models are different from each other, the T variable groups comprise K variables, and each variable group comprises at least one variable; acquiring data to be predicted, wherein the data to be predicted comprises data characteristics corresponding to each variable in K variables; dividing the data to be predicted into data feature groups corresponding to T variable groups according to the variable groups corresponding to each sub-network model; and inputting a corresponding data characteristic group into each sub-network model respectively to generate a model prediction result of the target network model. The method increases the parallelism of calculation in the model and improves the running speed of the model.

Description

基于网络模型的预测方法、装置、电子设备和可读介质Prediction method, apparatus, electronic device and readable medium based on network model

技术领域technical field

本申请涉及计算机技术领域,尤其涉及一种基于网络模型的预测方法、装置、电子设备和可读介质。The present 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 technique

随着人工智能领域的快速发展,机器学习模型的应用已经越来越广,各类业务通过模型训练得出的策略结论、标签信息精准度也越来越高,一个良好的模型能够带给风险各个领域带来极大的提升。With the rapid development of the field of artificial intelligence, the application of machine learning models has become more and more extensive, and the strategic conclusions and label information obtained by various businesses through model training have become more and more accurate. A good model can bring risks. Great improvement in all fields.

在相关技术中,机器学习模型的应用通常是采用大量数据进行离线训练和计算。In related technologies, the application of machine learning models is usually to use a large amount of data for offline training and calculation.

然而,此类模型通常是计算过程相对复杂计算过程,因此每次进行计算需要较长时间输出结果,计算的实时性差,难以进行实时的计算和应用。However, such a model is usually a relatively complex calculation process, so it takes a long time to output the results each time the calculation is performed, and the real-time performance of the calculation is poor, making it difficult to perform real-time calculation and application.

发明内容SUMMARY OF THE INVENTION

基于上述技术问题,本申请提供一种基于网络模型的预测方法、装置、电子设备和可读介质,以使得模型中计算的并行性增加,提升模型的运行速度,从而提升计算的实时性,以便于应用在实时计算的应用领域中。Based on the above technical problems, the present application provides a prediction method, device, electronic device and readable medium based on a network model, so as to increase the parallelism of calculation in the model, improve the running speed of the model, and thereby improve the real-time performance of calculation, so as to for applications in real-time computing applications.

本申请的其他特性和优点将通过下面的详细描述变得显然,或部分地通过本申请的实践而习得。Other features and advantages of the present application will become apparent from the following detailed description, or be learned in part by practice of the present application.

根据本申请实施例的一个方面,提供一种基于网络模型的预测方方法,包括:According to an aspect of the embodiments of the present application, a method for predicting a method based on a network model is provided, including:

获取目标网络模型的原始模型参数,其中,所述目标网络模型的输入为K个变量,所述K为大于1的整数;Obtain the original model parameters of the target network model, wherein the input of the target network model is K variables, and the K is an integer greater than 1;

根据所述原始模型参数生成T个子网络模型,其中,所述T个子网络模型中的每个子网络模型用于输入一个变量组,不同子网络模型所输入的变量组互不相同,T个变量组包括所述K个变量,每个变量组包括至少一个变量;T sub-network models are generated according to the original model parameters, wherein 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, and the T variable groups Including the K variables, each variable group includes at least one variable;

获取待预测数据,其中,所述待预测数据包括所述K个变量中每个变量对应的数据特征;Obtaining data to be predicted, wherein the data to be predicted includes data features corresponding to each of the K variables;

根据所述每个子网络模型对应的变量组,将所述待预测数据划分为所述T个变量组对应的数据特征组;According to the variable group corresponding to each sub-network model, the to-be-predicted data is divided into data feature groups corresponding to the T variable groups;

分别向所述每个子网络模型输入相应的数据特征组,以生成所述目标网络模型的模型预测结果。Corresponding data feature groups are respectively input to each of the sub-network models to generate a model prediction result of the target network model.

在本申请的一些实施例中,基于以上技术方案,所述根据所述原始模型参数生成T个子网络模型,包括: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:

根据所述原始模型参数的实现语言,对所述原始模型参数进行解析,得到多个计算单元,所述计算单元用于基于对应的变量组计算输出结果;According to the implementation language of the original model parameters, the original model parameters are analyzed to obtain a plurality of calculation units, and the calculation units are used to calculate the output result based on the corresponding variable group;

根据所述多个计算单元输入参数和输出结果之间的依赖关系,将相互之间存在依赖关系的计算单元组合为子网络模型,得到T个子网络模型。According to the dependencies between the input parameters and the output results of the plurality of computing units, the computing units with mutual dependencies are combined into a sub-network model to obtain T sub-network models.

在本申请的一些实施例中,基于以上技术方案,所述根据所述原始模型参数生成T个子网络模型,包括: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:

根据所述原始模型参数的实现语言,对所述原始模型参数进行解析,得到第一计算单元、第二计算单元以及第三计算单元,其中,所述第三计算单元的输入参数为所述第一计算单元和所述第二计算单元的输出结果;According to the implementation language of the original model parameters, the original model parameters are parsed 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 first calculation unit. an output result of a computing unit and the second computing unit;

基于所述第一计算单元、所述第二计算单元和所述第三计算单元,生成子网络模型,得到所述T个子网络模型。Based on the first computing unit, the second computing unit, and the third computing unit, a sub-network model is generated, and the T sub-network models are obtained.

在本申请的一些实施例中,基于以上技术方案,所述获取待预测数据,包括:In some embodiments of the present application, based on the above technical solutions, the obtaining data to be predicted includes:

根据所述K个变量,确定各个变量所对应的数据查询语句以及相应的数据源;According to the K variables, determine the data query statement corresponding to each variable and the corresponding data source;

根据所述数据查询语句从所述数据源获取所述K个变量对对应的业务数据特征,得到待预测数据。The business data characteristics corresponding to the K variable pairs are obtained from the data source according to the data query statement, and the data to be predicted is obtained.

在本申请的一些实施例中,基于以上技术方案,所述分别向所述每个子网络模型输入相应的数据特征组,以生成所述目标网络模型的模型预测结果,包括:In some embodiments of the present application, based on the above technical solutions, inputting a corresponding data feature group to each sub-network model to generate a model prediction result of the target network model includes:

分别向所述每个子网络模型输入相应的数据特征组,以得到T个输出结果;Input corresponding data feature groups to each of the sub-network models to obtain T output results;

根据所述T个输出结果,通过所述目标网络模型的损失函数进行模型拟合,得到所述目标网络模型的模型预测结果。According to the T output results, model fitting is performed through the loss function of the target network model to obtain a model prediction result of the target network model.

在本申请的一些实施例中,基于以上技术方案,所述分别向所述每个子网络模型输入相应的数据特征组,以生成所述目标网络模型的模型预测结果之后,所述方法还包括:In some embodiments of the present application, based on the above technical solutions, after the corresponding data feature groups are respectively input to the each sub-network model to generate the model prediction result of the target network model, the method further includes:

从所述待预测数据中获取独立数据特征,所述独立数据特征不对应于所述K个变量中的变量;Obtain independent data features from the data to be predicted, and the independent data features do not correspond to variables in the K variables;

根据所述独立数据特征与所述模型预测结果,确定所述待预测数据对应的决策规则,所述决策规则用于确定所述待预测数据对应的业务交易的风险等级。According to the independent data feature and the model prediction result, a decision rule corresponding to the to-be-predicted data is determined, and the decision-making rule is used to determine the risk level of the business transaction corresponding to the to-be-predicted data.

根据本申请实施例的一个方面,提供一种基于网络模型的预测装置,包括:According to an aspect of the embodiments of the present application, a prediction apparatus based on a network model is provided, including:

参数获取模块,用于获取目标网络模型的原始模型参数,其中,所述目标网络模型的输入为K个变量,所述K为大于1的整数;A parameter obtaining module, used for obtaining the original model parameters of the target network model, wherein the input of the target network model is K variables, and the K is an integer greater than 1;

子网络模型生成模块,用于根据所述原始模型参数生成T个子网络模型,其中,所述T个子网络模型中的每个子网络模型用于输入一个变量组,不同子网络模型所输入的变量组互不相同,T个变量组包括所述K个变量,每个变量组包括至少一个变量;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, and the variable groups input by different sub-network models Different from each other, T variable groups include the K variables, and each variable group includes at least one variable;

数据获取模块,用于获取待预测数据,其中,所述待预测数据包括所述K个变量中每个变量对应的数据特征;A data acquisition module, configured to acquire data to be predicted, wherein the data to be predicted includes data features corresponding to each of the K variables;

数据划分模块,用于根据所述每个子网络模型对应的变量组,将所述待预测数据划分为所述T个变量组对应的数据特征组;a data division module, configured to divide the to-be-predicted data into data feature groups corresponding to the T variable groups according to the variable group corresponding to each sub-network model;

结果生成模块,用于分别向所述每个子网络模型输入相应的数据特征组,以生成所述目标网络模型的模型预测结果。The result generating module is used for inputting corresponding data feature groups to each sub-network model respectively, so as to generate a model prediction result of the target network model.

在本申请的一些实施例中,基于以上技术方案,所述子网络模型生成模块,包括:In some embodiments of the present application, based on the above technical solutions, 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 calculation units, the calculation units are used to calculate the output result based on the corresponding variable group;

组合单元,用于根据所述多个计算单元输入参数和输出结果之间的依赖关系,将相互之间存在依赖关系的计算单元组合为子网络模型,得到T个子网络模型。The combining unit is configured to combine the computing units with mutual dependencies into a sub-network model according to the dependencies between the input parameters and output results of the plurality of computing units to obtain T sub-network models.

根据本申请实施例的一个方面,提供一种电子设备,该电子设备包括:处理器;以及存储器,用于存储处理器的可执行指令;其中,该处理器配置为经由执行可执行指令来执行如以上技术方案中的基于网络模型的预测方法。According to an aspect of the embodiments of the present application, there is provided an electronic device, the electronic device includes: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute by executing the executable instructions Such as the prediction method based on the network model in the above technical solutions.

根据本申请实施例的一个方面,提供一种计算机可读存储介质,其上存储有计算机程序,当该计算机程序被处理器执行时实现如以上技术方案中的基于网络模型的预测方法。According to an 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, implements the network model-based prediction method in the above technical solution.

在本申请的实施例中,通过改变模型本身的执行顺序,在编译的过程中对于模型的原始执行逻辑进行拆分和重组,从而使得模型中计算的并行性增加,提升模型的运行速度,从而提升计算的实时性,以便于应用在实时计算的应用领域中。In the 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 calculation in the model is increased, and the running speed of the model is improved, thereby Improve the real-time performance of computing, so that it can be applied in the application field of real-time computing.

应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本申请。It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not limiting of the present application.

附图说明Description of drawings

此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本申请的实施例,并与说明书一起用于解释本申请的原理。显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。在附图中:The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description serve to explain the principles of the application. Obviously, the drawings in the following description are only some embodiments of the present application, and for those of ordinary skill in the art, other drawings can also be obtained from these drawings without creative effort. In the attached image:

图1示意性地示出了本申请技术方案在一个应用场景中的示例性系统构架示意图;FIG. 1 schematically shows a schematic diagram of an exemplary system architecture of the technical solution of the present application in an application scenario;

图2为本申请实施例中预测过程的示意性流程图;2 is a schematic flowchart of a prediction process in an embodiment of the present application;

图3是本申请实施例提供的一种基于网络模型的预测方法的流程图;3 is a flowchart of a prediction method based on a network model provided by an embodiment of the present application;

图4示意性地示出了本申请实施例中基于网络模型的预测装置的组成框图;FIG. 4 schematically shows a block diagram of the composition of a prediction apparatus based on a network model in an embodiment of the present application;

图5示出了适于用来实现本申请实施例的电子设备的计算机系统的结构示意图。FIG. 5 shows a schematic structural diagram of a computer system suitable for implementing the electronic device according to the embodiment of the present application.

具体实施方式Detailed ways

现在将参考附图更全面地描述示例实施方式。然而,示例实施方式能够以多种形式实施,且不应被理解为限于在此阐述的范例;相反,提供这些实施方式使得本申请将更加全面和完整,并将示例实施方式的构思全面地传达给本领域的技术人员。Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments, however, can be embodied 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 thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art.

此外,所描述的特征、结构或特性可以以任何合适的方式结合在一个或更多实施例中。在下面的描述中,提供许多具体细节从而给出对本申请的实施例的充分理解。然而,本领域技术人员将意识到,可以实践本申请的技术方案而没有特定细节中的一个或更多,或者可以采用其它的方法、组元、装置、步骤等。在其它情况下,不详细示出或描述公知方法、装置、实现或者操作以避免模糊本申请的各方面。Furthermore, 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 in order to give a thorough understanding of the embodiments of the present application. However, those skilled in the art will appreciate that the technical solutions of the present 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 have not been shown or described in detail to avoid obscuring aspects of the present application.

附图中所示的方框图仅仅是功能实体,不一定必须与物理上独立的实体相对应。即,可以采用软件形式来实现这些功能实体,或在一个或多个硬件模块或集成电路中实现这些功能实体,或在不同网络和/或处理器装置和/或微控制器装置中实现这些功能实体。The block diagrams shown in the figures are merely functional entities and do not necessarily necessarily correspond to physically separate entities. That is, these functional entities may be implemented in software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices entity.

附图中所示的流程图仅是示例性说明,不是必须包括所有的内容和操作/步骤,也不是必须按所描述的顺序执行。例如,有的操作/步骤还可以分解,而有的操作/步骤可以合并或部分合并,因此实际执行的顺序有可能根据实际情况改变。The flowcharts shown in the figures are only exemplary illustrations and do not necessarily include all contents and operations/steps, nor do they have to be performed in the order described. For example, some operations/steps can be decomposed, and some operations/steps can be combined or partially combined, so the actual execution order may be changed according to the actual situation.

应理解,本申请的方案可以应用于机器学习领域,并且具体用于利用机器模型进行实时计算的场景中。本申请的方案可以对动态解析各类模型包的输出,归一化为统一模型执行对象,然后根据各个子树依赖的入参变量,动态生产DAG执行图,再将DAG执行图依据依赖项,并入应用整体DAG流程图中。实际应用中,依赖拓扑排序算法,将模型的计算融合到应用执行流程中,同时进行分布式计算,从而降低模型引入带给系统的耗时。It should be understood that the solution of the present application can be applied to the field of machine learning, and is specifically used in a scenario where a machine model is used for real-time computing. The solution of the present application can dynamically parse the output of various model packages, normalize it into a unified model execution object, and then dynamically generate a DAG execution graph according to the input parameters that each subtree depends on, and then base the DAG execution graph on the dependencies. Incorporated into the overall DAG flow chart of the application. In practical applications, relying on the topological sorting algorithm, the calculation of the model is integrated into the application execution process, and distributed computing is performed at the same time, thereby reducing the time-consuming of model introduction to the system.

图1示意性地示出了本申请技术方案在一个应用场景中的示例性系统构架示意图。如图1所示,该应用场景中包括服务器以及多个终端设备。服务器中部署实时性服务,该实时性服务则通过根据本申请的方案配置的机器模型来进行相关运算。终端可以通过网络访问服务器上的实时性服务来请求进行运算。服务则调用机器模型对终端发送的数据进行实时运算并且返回运算结果。FIG. 1 schematically shows a schematic diagram of an exemplary system architecture of the technical solution of the present application in an application scenario. As shown in Figure 1, 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 related operations through the machine model configured according to the solution of the present application. The terminal can access the real-time service on the server through the network to request the operation. The service calls the machine model to perform real-time operation on the data sent by the terminal and returns the operation result.

图1中所示出的服务器具体可以是一台服务器、包括多台服务器的服务器集群或者云服务器。在一个实施例中,该系统架构中可以不采用任何终端设备,上述终端设备所进行的操作由服务器上的后台服务运行,或者由专用的服务器运行。The server shown in FIG. 1 may specifically be a server, a server cluster including multiple servers, or a cloud server. In one embodiment, the system architecture may not use any terminal device, and the operations performed by the terminal device are run by a background service on a server, or run by a dedicated server.

可以理解的是,图1中所示出的场景仅为本申请的方案所应用的场景示例,实际的应用场景可以采用其他适合网络结构,例如加入代理服务器和多级网络等,本申请对此不作限制。It can be understood that the scenario shown in FIG. 1 is only an example of the scenario applied by the solution of the present application, and the actual application scenario may adopt other suitable network structures, such as adding a proxy server and a multi-level network, etc. No restrictions apply.

图2为本申请实施例中预测过程的示意性流程图。如图2所述,以PMML或者SPARK等编写的模型会被动态编译为模型对象,并且归一化为统一的模型执行对象,即子树。随后,根据各个子树的变量依赖关系构建DAG执行图,从而确定子树的执行过程,随后对模型拟合得出模型结果。在实际的应用中,会按照模型的输入数据从外部信息中提出模型需要的变量并进行计算,从而得到模型的结果并且根据结果进行决策。FIG. 2 is a schematic flowchart of a prediction process in an embodiment of the present application. As shown in Figure 2, models written in PMML or SPARK are dynamically compiled into model objects and normalized into a unified model execution object, that is, a subtree. Then, the DAG execution graph is constructed according to the variable dependencies of each subtree, so as to determine the execution process of the subtree, and then the model result is obtained by fitting the model. In practical applications, the variables required by the model are proposed from external information according to the input data of the model and calculated, so as to obtain the results of the model and make decisions based on the results.

下面结合具体实施方式对本申请提供的技术方案做出详细说明。为了便于介绍,请参阅图3,图3是本申请实施例提供的一种基于网络模型的预测方法的流程图。该方法可以应用于上述服务器执行,服务器可以视为一种计算机设备,在本申请实施例中,以计算机设备作为执行主体,对该基于网络模型的预测进行介绍,该基于网络模型的预测方法可以包括以下步骤S310至S350:The technical solutions provided by the present application will be described in detail below with reference to specific embodiments. For the convenience of introduction, please refer to FIG. 3 , which is a flowchart of a prediction method based on a network model provided by an embodiment of the present application. This method can be applied to the execution of the above-mentioned server, and the server can be regarded as a kind of computer equipment. In the embodiment of the present application, the computer equipment is used as the execution subject to introduce the prediction based on the network model. The prediction method based on the network model can be It includes the following steps S310 to S350:

步骤S310,获取目标网络模型的原始模型参数,其中,所述目标网络模型的输入为K个变量,所述K为大于1的整数;Step S310, obtaining the original model parameters of the target network model, wherein the input of the target network model is K variables, and the K is an integer greater than 1;

原始模型参数包括目标网络模型本身的结构、计算过程、模型变量等内容。原始模型参数通常是文件或者文件包的形式,其中,原始模型参数以各类编程语言的形式编写并导出成相应的文件,例如PMML、PYTHON等语言。目标网络模型本身是训练好的机器学习模型。目标网络模型可以是用于实现任意目标的网络模型,模型所采用的结构也可以采用各类常用网络模型。例如,可目标网络模型可以是用于对银行交易进行风险评估的模型,其输入的数据为每笔信用卡交易的各类数据,例如首付款双方的账户、金额、备注、双方的交易历史等等,而输出结果为该笔交易是否为不合法行为等预测结果。The original model parameters include the structure of the target network model itself, the calculation process, and the model variables. The original model parameters are usually in the form of files or file packages, wherein the original model parameters are written in various programming languages and exported into corresponding files, such as PMML, PYTHON and other languages. The target network model itself is a trained machine learning model. The target network model can be a network model used to achieve any target, and the structure adopted by the model can also adopt various common network models. For example, the targetable network model can be a model for risk assessment of bank transactions, and the input data are various types of data of each credit card transaction, such as the account, amount, remarks, transaction history of both parties, etc. , and the output result is the prediction result of whether the transaction is illegal or not.

步骤S320,根据所述原始模型参数生成T个子网络模型,其中,所述T个子网络模型中的每个子网络模型用于输入一个变量组,不同子网络模型所输入的变量组互不相同,T个变量组包括所述K个变量,每个变量组包括至少一个变量;Step S320, generating 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, and the variable groups input by different sub-network models are different from each other, and T variable groups include the K variables, and each variable group includes at least one variable;

具体地,子网络模型通常采用树形结构,T个子网络模型可以组成有向无环图的形式。T个子网络模型总体实现的效果与目标网络模型相同。原始模型参数被转换为一个或多个树形结构的网络,并且每个网络均对应于原始模型参数中的一个或者多个计算过程。T个子网络模型中的每个子网络模型用于输入一个变量组,不同子网络模型所输入的变量组互不相同,T个变量组包括所述K个变量。所有子网络模型的变量组的交集即是目标网络模型原始的输入变量。各个子网络模型的变量组是不同的,但不同子网络模型的变量组件之间有部分变量冲突。T个子网络模型之间可以并行执行。Specifically, the sub-network model usually adopts a tree structure, and the T sub-network models can be formed in the form of a directed acyclic graph. The overall effect of the T sub-network models is the same as that of the target network model. The original model parameters are transformed into one or more tree-structured networks, and each network corresponds to one or more computation processes in the original model parameters. Each of 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, and 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 some variable conflicts among the variable components of different sub-network models. The T sub-network models can be executed in parallel.

在本申请的一个实施例中,所述根据所述原始模型参数生成T个子网络模型的过程包括如下步骤:根据所述原始模型参数的实现语言,对所述原始模型参数进行解析,得到多个计算单元,所述计算单元用于基于对应的变量组计算输出结果;根据所述多个计算单元输入参数和输出结果之间的依赖关系,将相互之间存在依赖关系的计算单元组合为子网络模型,得到T个子网络模型。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 multiple a calculation unit, which is used to calculate the output result based on the corresponding variable group; according to the dependencies between the input parameters and the output results of the plurality of calculation units, the calculation units with mutual dependencies are combined into a sub-network model to obtain T sub-network models.

在本申请的一个实施例中,所述根据所述原始模型参数生成T个子网络模型的过程包括如下步骤:根据所述原始模型参数的实现语言,对所述原始模型参数进行解析,得到第一计算单元、第二计算单元以及第三计算单元,其中,所述第三计算单元的输入参数为所述第一计算单元和所述第二计算单元的输出结果;基于所述第一计算单元、所述第二计算单元和所述第三计算单元,生成子网络模型,得到所述T个子网络模型。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 the first A calculation unit, a second calculation unit and a third calculation unit, wherein the input parameter of the third calculation unit is the output result of the first calculation unit and the second calculation unit; based on the first calculation unit, The second computing unit and the third computing unit generate sub-network models to obtain the T sub-network models.

步骤S330,获取待预测数据,其中,所述待预测数据包括所述K个变量中每个变量对应的数据特征;Step S330, obtaining data to be predicted, wherein the data to be predicted includes data features corresponding to each of the K variables;

待预测数据是在实际的系统中产生的实际数据。在获取的过程中,可以根据K个变量的属性和分类的情况来从实际的系统中收集相关数据。根据所收集到的实际数据,可以对数据进行特征提取,从而得到每个变量所对应的数据特征。可以理解,待预测数据通常是在预定时间段内的数据,例如,三个月内的业务数据或者内的业务数据等。The data to be predicted is the actual data generated in the actual system. During the acquisition process, relevant data can be collected from the actual system according to the attributes and classification of the K variables. According to the actual data collected, 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 three months.

在本申请的一个实施例中,所述获取待预测数据的过程包括如下的步骤:根据所述K个变量,确定各个变量所对应的数据查询语句以及相应的数据源;根据所述数据查询语句从所述数据源获取所述K个变量对对应的业务数据特征,得到待预测数据。In an embodiment of the present application, the process of acquiring the data to be predicted includes the following steps: according to the K variables, determine a data query statement corresponding to each variable and a corresponding data source; according to the data query statement The business data features corresponding to the K variable pairs are obtained from the data source to obtain the data to be predicted.

步骤S340,根据所述每个子网络模型对应的变量组,将所述待预测数据划分为所述T个变量组对应的数据特征组;Step S340, according to the variable group corresponding to each sub-network model, divide the to-be-predicted data into data feature groups corresponding to the T variable groups;

每个子网络模型的输入的变量组包括K个变量中的一部分变量,因此,根据该对应关系,则可以按照变量组中包括的变量根据待预测数据来生成变量组对应的数据特征组。The input variable group of each sub-network model includes a part of the K variables. Therefore, according to the corresponding relationship, a data feature group corresponding to the variable group can be generated according to the variables to be predicted according to the variables included in the variable group.

步骤S350,分别向所述每个子网络模型输入相应的数据特征组,以生成所述目标网络模型的模型预测结果。Step S350: Input corresponding data feature groups to each of the sub-network models to generate a model prediction result of the target network model.

子网络模型分别对输入的数据特征组进行运算。由于子网络模型之间的输入参数均来自于K个变量,因此,子网络模型的运算过程之间没有相互依赖的关系,从而可以并行执行。在所有的子网络模型都计算完成之后,则可以将各个子网络模型的输出结果进行汇总,并且进一步进行损失函数的回归运算,从而得到目标网络模型的模型预测结果。在实际的应用中,基于模型预测结果,可以对待预测数据所对应的业务操作进行进一步的处理。例如,若判断该交易涉嫌不合法行为,则可以对该交易进行冻结以便于进行进一步确认。The sub-network model operates on the input data feature groups respectively. Since the input parameters between the sub-network models all come from K variables, there is no interdependence between the operation processes of the sub-network models, so they can be executed in parallel. After all the sub-network models are calculated, the output results of each sub-network model can be summarized, and the regression operation of the loss function can be further performed to obtain the model prediction result of the target network model. In practical applications, based on the model prediction results, 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 being illegal, the transaction can be frozen for further confirmation.

在本申请的一个实施例中,所述分别向所述每个子网络模型输入相应的数据特征组,以生成所述目标网络模型的模型预测结果的过程包括如下步骤:分别向所述每个子网络模型输入相应的数据特征组,以得到T个输出结果;根据所述T个输出结果,通过所述目标网络模型的损失函数进行模型拟合,得到所述目标网络模型的模型预测结果。In an embodiment of the present application, the process of inputting corresponding data feature groups to each sub-network model to generate a model prediction result of the target network model includes the following steps: The model inputs corresponding data feature groups to obtain T output results; according to the T output results, model fitting is performed through the loss function of the target network model to obtain model prediction results of the target network model.

在本申请的一个实施例中,在所述分别向所述每个子网络模型输入相应的数据特征组,以生成所述目标网络模型的模型预测结果之后,所述方法还包括如下步骤:从所述待预测数据中获取独立数据特征,所述独立数据特征不对应于所述K个变量中的变量;根据所述独立数据特征与所述模型预测结果,确定所述待预测数据对应的决策规则,所述决策规则用于确定所述待预测数据对应的业务交易的风险等级。In an embodiment of the present application, after the corresponding data feature groups are respectively input to the each sub-network model to generate the model prediction result of the target network model, the method further includes the following steps: Obtain independent data features from the data to be predicted, and the independent data features do not correspond to variables in the K variables; according to the independent data features and the model prediction result, determine the decision rule corresponding to the data to be predicted , the decision rule is used to determine the risk level of the business transaction corresponding to the data to be predicted.

在本申请的实施例中,通过改变模型本身的执行顺序,在编译的过程中对于模型的原始执行逻辑进行拆分和重组,从而使得模型中计算的并行性增加,提升模型的运行速度,从而提升计算的实时性,以便于应用在实时计算的应用领域中。In the 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 calculation in the model is increased, and the running speed of the model is improved, thereby Improve the real-time performance of computing, so that it can be applied in the application field of real-time computing.

应当注意,尽管在附图中以特定顺序描述了本申请中方法的各个步骤,但是,这并非要求或者暗示必须按照该特定顺序来执行这些步骤,或是必须执行全部所示的步骤才能实现期望的结果。附加的或备选的,可以省略某些步骤,将多个步骤合并为一个步骤执行,以及/或者将一个步骤分解为多个步骤执行等。It should be noted that although the various steps of the methods of the present application are depicted in the figures in a particular order, this does not require or imply that the steps must be performed in that particular order, or that all illustrated steps must be performed to achieve the desired the result of. Additionally or alternatively, certain 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, and the like.

以下介绍本申请的装置实施,可以用于执行本申请上述实施例中的基于网络模型的预测方法。图4示意性地示出了本申请实施例中基于网络模型的预测装置的组成框图。如图4所示,基于网络模型的预测装置400主要可以包括:The following describes the implementation of the apparatus of the present application, which can be used to execute the prediction method based on the network model in the foregoing embodiments of the present application. FIG. 4 schematically shows a block diagram of the composition of the prediction apparatus based on the network model in the embodiment of the present application. As shown in FIG. 4 , the prediction apparatus 400 based on the network model may mainly include:

参数获取模块410,用于获取目标网络模型的原始模型参数,其中,所述目标网络模型的输入为K个变量,所述K为大于1的整数;A parameter obtaining module 410, configured to obtain the original model parameters of the target network model, wherein the input of the target network model is K variables, and the K is an integer greater than 1;

子网络模型生成模块420,用于根据所述原始模型参数生成T个子网络模型,其中,所述T个子网络模型中的每个子网络模型用于输入一个变量组,不同子网络模型所输入的变量组互不相同,T个变量组包括所述K个变量,每个变量组包括至少一个变量;The sub-network model generation module 420 is 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, and the variables input by different sub-network models The groups are different from each other, the T variable groups include the K variables, and each variable group includes at least one variable;

数据获取模块430,用于获取待预测数据,其中,所述待预测数据包括所述K个变量中每个变量对应的数据特征;A data acquisition module 430, configured to acquire data to be predicted, wherein the data to be predicted includes data features corresponding to each of the K variables;

数据划分模块440,用于根据所述每个子网络模型对应的变量组,将所述待预测数据划分为所述T个变量组对应的数据特征组;A data division module 440, configured to divide the to-be-predicted data into data feature groups corresponding to the T variable groups according to the variable group corresponding to each sub-network model;

结果生成模块450,用于分别向所述每个子网络模型输入相应的数据特征组,以生成所述目标网络模型的模型预测结果。The result generating module 450 is configured to respectively input corresponding data feature groups to each of the sub-network models, so as to generate a model prediction result of the target network model.

在本申请的一些实施例中,基于以上技术方案,所述子网络模型生成模块,包括:In some embodiments of the present application, based on the above technical solutions, 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 calculation units, the calculation units are used to calculate the output result based on the corresponding variable group;

组合单元,用于根据所述多个计算单元输入参数和输出结果之间的依赖关系,将相互之间存在依赖关系的计算单元组合为子网络模型,得到T个子网络模型。The combining unit is configured to combine the computing units with mutual dependencies into a sub-network model according to the dependencies between the input parameters and output results of the plurality of computing units to obtain T sub-network models.

在本申请的一些实施例中,基于以上技术方案,所述子网络模型生成模块,包括:In some embodiments of the present application, based on the above technical solutions, the sub-network model generation module includes:

根据所述原始模型参数的实现语言,对所述原始模型参数进行解析,得到第一计算单元、第二计算单元以及第三计算单元,其中,所述第三计算单元的输入参数为所述第一计算单元和所述第二计算单元的输出结果;According to the implementation language of the original model parameters, the original model parameters are parsed 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 first calculation unit. an output result of a computing unit and the second computing unit;

基于所述第一计算单元、所述第二计算单元和所述第三计算单元,生成子网络模型,得到所述T个子网络模型。Based on the first computing unit, the second computing unit, and the third computing unit, a sub-network model is generated, and the T sub-network models are obtained.

在本申请的一些实施例中,基于以上技术方案,所述数据获取模块包括:In some embodiments of the present application, based on the above technical solutions, the data acquisition module includes:

数据源确定单元,用于根据所述K个变量,确定各个变量所对应的数据查询语句以及相应的数据源;a data source determination unit, configured to determine the data query statement corresponding to each variable and the corresponding data source according to the K variables;

特征获取单元,用于根据所述数据查询语句从所述数据源获取所述K个变量对对应的业务数据特征,得到待预测数据。A feature acquisition unit, configured to acquire 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.

在本申请的一些实施例中,基于以上技术方案,所述结果生成模块包括:In some embodiments of the present application, based on the above technical solutions, the result generation module includes:

特征值输入单元,用于分别向所述每个子网络模型输入相应的数据特征组,以得到T个输出结果;an eigenvalue input unit for inputting corresponding data feature groups to each of the sub-network models respectively, to obtain T output results;

模型拟合单元,用于根据所述T个输出结果,通过所述目标网络模型的损失函数进行模型拟合,得到所述目标网络模型的模型预测结果。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 a model prediction result of the target network model.

在本申请的一些实施例中,基于以上技术方案,所述基于网络模型的预测装置还包括:In some embodiments of the present application, based on the above technical solutions, the network model-based prediction apparatus further includes:

独立特征获取模块,用于从所述待预测数据中获取独立数据特征,所述独立数据特征不对应于所述K个变量中的变量;an independent feature acquisition module, used for acquiring independent data features from the data to be predicted, the independent data features not corresponding to the variables in the K variables;

决策规则确定模块,用于根据所述独立数据特征与所述模型预测结果,确定所述待预测数据对应的决策规则,所述决策规则用于确定所述待预测数据对应的业务交易的风险等级。A decision rule determination module, configured to determine a decision rule corresponding to the to-be-predicted data according to the independent data feature and the model prediction result, where the decision-making rule is used to determine the risk level of the business transaction corresponding to the to-be-predicted data .

需要说明的是,上述实施例所提供的装置与上述实施例所提供的方法属于同一构思,其中各个模块执行操作的具体方式已经在方法实施例中进行了详细描述,此处不再赘述。It should be noted that the apparatuses provided in the above embodiments and the methods provided by the above embodiments belong to the same concept, and the specific manners in which each module performs operations have been described in detail in the method embodiments, which will not be repeated here.

图5示出了适于用来实现本申请实施例的电子设备的计算机系统的结构示意图。FIG. 5 shows a schematic structural diagram of a computer system suitable for implementing the electronic device according to the embodiment of the present application.

需要说明的是,图5示出的电子设备的计算机系统500仅是一个示例,不应对本申请实施例的功能和使用范围带来任何限制。It should be noted that the computer system 500 of the electronic device shown in FIG. 5 is only an example, and should not impose any limitations on the functions and scope of use of the embodiments of the present application.

如图5所示,计算机系统500包括中央处理单元(Central Processing Unit,CPU)501,其可以根据存储在只读存储器(Read-Only Memory,ROM)502中的程序或者从储存部分508加载到随机访问存储器(Random Access Memory,RAM)503中的程序而执行各种适当的动作和处理。在RAM 503中,还存储有系统操作所需的各种程序和数据。CPU 501、ROM 502以及RAM 503通过总线504彼此相连。输入/输出(Input/Output,I/O)接口505也连接至总线504。As shown in FIG. 5 , the computer system 500 includes a central processing unit (Central Processing Unit, CPU) 501, which can be loaded into a random device according to a program stored in a read-only memory (Read-Only Memory, ROM) 502 or from a storage part 508 Various appropriate operations and processes are executed by accessing a program in a memory (Random Access Memory, RAM) 503 . In the RAM 503, various programs and data necessary for system operation are also stored. The CPU 501 , the ROM 502 , and the RAM 503 are connected to each other through a bus 504 . An Input/Output (I/O) interface 505 is also connected to the bus 504 .

以下部件连接至I/O接口505:包括键盘、鼠标等的输入部分506;包括诸如阴极射线管(Cathode Ray Tube,CRT)、液晶显示器(Liquid Crystal Display,LCD)等以及扬声器等的输出部分507;包括硬盘等的储存部分508;以及包括诸如LAN(Local Area Network,局域网)卡、调制解调器等的网络接口卡的通信部分509。通信部分509经由诸如因特网的网络执行通信处理。驱动器510也根据需要连接至I/O接口505。可拆卸介质511,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器510上,以便于从其上读出的计算机程序根据需要被安装入储存部分508。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 part 508 including a hard disk and the like; and a communication part 509 including a network interface card such as a LAN (Local Area Network) card, a modem, and the like. 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 mounted on the drive 510 as needed so that a computer program read therefrom is installed into the storage section 508 as needed.

特别地,根据本申请的实施例,各个方法流程图中所描述的过程可以被实现为计算机软件程序。例如,本申请的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分509从网络上被下载和安装,和/或从可拆卸介质511被安装。在该计算机程序被中央处理单元(CPU)501执行时,执行本申请的系统中限定的各种功能。In particular, according to the embodiments of the present application, the processes described in the flowcharts of the respective methods may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the method illustrated in the flowchart. In such an embodiment, the computer program may be downloaded and installed from the network via the communication portion 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.

需要说明的是,本申请实施例所示的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(Erasable Programmable Read Only Memory,EPROM)、闪存、光纤、便携式紧凑磁盘只读存储器(Compact Disc Read-Only Memory,CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本申请中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本申请中,计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:无线、有线等等,或者上述的任意合适的组合。It should be noted that the computer-readable medium shown in the embodiments of the present application may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the above 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 a combination of any of the above. More specific examples of computer readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable Erasable Programmable Read Only Memory (EPROM), flash memory, optical fiber, portable Compact Disc Read-Only Memory (CD-ROM), optical storage device, magnetic storage device, or any suitable of the above The combination. In this application, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, however, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code therein. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device . Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination of the foregoing.

附图中的流程图和框图,图示了按照本申请各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,上述模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图或流程图中的每个方框、以及框图或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations 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 diagrams may represent a module, segment, or portion of code that contains one or more logical functions for implementing the specified functions executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It is also noted that each block of the block diagrams or flowchart illustrations, and combinations of blocks in the block diagrams or flowchart illustrations, can be implemented in special purpose hardware-based systems that perform the specified functions or operations, or can be implemented using A combination of dedicated hardware and computer instructions is implemented.

应当注意,尽管在上文详细描述中提及了用于动作执行的设备的若干模块或者单元,但是这种划分并非强制性的。实际上,根据本申请的实施方式,上文描述的两个或更多模块或者单元的特征和功能可以在一个模块或者单元中具体化。反之,上文描述的一个模块或者单元的特征和功能可以进一步划分为由多个模块或者单元来具体化。It should be noted that although several modules or units of the apparatus for action performance are mentioned in the above detailed description, this division is not mandatory. Indeed, according to embodiments of the present application, the features and functions of two or more modules or units described above may be embodied in one module or unit. Conversely, the features and functions of one module or unit described above may be further divided into multiple modules or units to be embodied.

通过以上的实施方式的描述,本领域的技术人员易于理解,这里描述的示例实施方式可以通过软件实现,也可以通过软件结合必要的硬件的方式来实现。因此,根据本申请实施方式的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中或网络上,包括若干指令以使得一台计算设备(可以是个人计算机、服务器、触控终端、或者网络设备等)执行根据本申请实施方式的方法。From the description of the above embodiments, those skilled in the art can easily understand that the exemplary embodiments described herein may be implemented by software, or may be implemented by software combined with necessary hardware. Therefore, the technical solutions according to the embodiments of the present application may be embodied in the form of software products, and the software products may be stored in a non-volatile storage medium (which may be CD-ROM, U disk, mobile hard disk, etc.) or on the network , which includes several instructions to cause a computing device (which may be 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.

本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本申请的其它实施方案。本申请旨在涵盖本申请的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本申请的一般性原理并包括本申请未公开的本技术领域中的公知常识或惯用技术手段。Other embodiments of the present application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses or adaptations of this application that follow the general principles of this application and include common knowledge or conventional techniques in the technical field not disclosed in this application .

应当理解的是,本申请并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本申请的范围仅由所附的权利要求来限制。It is to be understood that the present application is not limited to the precise structures described above and illustrated in the accompanying drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (10)

1.一种基于网络模型的预测方法,其特征在于,包括:1. a prediction method based on a network model, is characterized in that, comprises: 获取目标网络模型的原始模型参数,其中,所述目标网络模型的输入为K个变量,所述K为大于1的整数;Obtain the original model parameters of the target network model, wherein the input of the target network model is K variables, and the K is an integer greater than 1; 根据所述原始模型参数生成T个子网络模型,其中,所述T个子网络模型中的每个子网络模型用于输入一个变量组,不同子网络模型所输入的变量组互不相同,T个变量组包括所述K个变量,每个变量组包括至少一个变量;T sub-network models are generated according to the original model parameters, wherein 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, and the T variable groups Including the K variables, each variable group includes at least one variable; 获取待预测数据,其中,所述待预测数据包括所述K个变量中每个变量对应的数据特征;Obtaining data to be predicted, wherein the data to be predicted includes data features corresponding to each of the K variables; 根据所述每个子网络模型对应的变量组,将所述待预测数据划分为所述T个变量组对应的数据特征组;According to the variable group corresponding to each sub-network model, the to-be-predicted data is divided into data feature groups corresponding to the T variable groups; 分别向所述每个子网络模型输入相应的数据特征组,以生成所述目标网络模型的模型预测结果。Corresponding data feature groups are respectively input to each of the sub-network models to generate a model prediction result of the target network model. 2.根据权利要求1所述的方法,其特征在于,所述根据所述原始模型参数生成T个子网络模型,包括:2. The method according to claim 1, wherein the generating T sub-network models according to the original model parameters comprises: 根据所述原始模型参数的实现语言,对所述原始模型参数进行解析,得到多个计算单元,所述计算单元用于基于对应的变量组计算输出结果;According to the implementation language of the original model parameters, the original model parameters are analyzed to obtain a plurality of calculation units, and the calculation units are used to calculate the output result based on the corresponding variable group; 根据所述多个计算单元输入参数和输出结果之间的依赖关系,将相互之间存在依赖关系的计算单元组合为子网络模型,得到T个子网络模型。According to the dependencies between the input parameters and the output results of the plurality of computing units, the computing units with mutual dependencies are combined into a sub-network model to obtain T sub-network models. 3.根据权利要求1所述的方法,其特征在于,所述根据所述原始模型参数生成T个子网络模型,包括:3. The method according to claim 1, wherein the generating T sub-network models according to the original model parameters comprises: 根据所述原始模型参数的实现语言,对所述原始模型参数进行解析,得到第一计算单元、第二计算单元以及第三计算单元,其中,所述第三计算单元的输入参数为所述第一计算单元和所述第二计算单元的输出结果;According to the implementation language of the original model parameters, the original model parameters are parsed 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 first calculation unit. an output result of a computing unit and the second computing unit; 基于所述第一计算单元、所述第二计算单元和所述第三计算单元,生成子网络模型,得到所述T个子网络模型。Based on the first computing unit, the second computing unit, and the third computing unit, a sub-network model is generated, and the T sub-network models are obtained. 4.根据权利要求1所述的方法,其特征在于,所述获取待预测数据,包括:4. The method according to claim 1, wherein the obtaining the data to be predicted comprises: 根据所述K个变量,确定各个变量所对应的数据查询语句以及相应的数据源;According to the K variables, determine the data query statement corresponding to each variable and the corresponding data source; 根据所述数据查询语句从所述数据源获取所述K个变量对对应的业务数据特征,得到待预测数据。The business data characteristics corresponding to the K variable pairs are obtained from the data source according to the data query statement, and the data to be predicted is obtained. 5.根据权利要求1所述的方法,其特征在于,所述分别向所述每个子网络模型输入相应的数据特征组,以生成所述目标网络模型的模型预测结果,包括:5. The method according to claim 1, wherein the inputting a corresponding data feature group to the each sub-network model respectively, to generate a model prediction result of the target network model, comprising: 分别向所述每个子网络模型输入相应的数据特征组,以得到T个输出结果;Input corresponding data feature groups to each of the sub-network models to obtain T output results; 根据所述T个输出结果,通过所述目标网络模型的损失函数进行模型拟合,得到所述目标网络模型的模型预测结果。According to the T output results, model fitting is performed through the loss function of the target network model to obtain a model prediction result of the target network model. 6.根据权利要求1至5中任一项所述的方法,其特征在于,所述分别向所述每个子网络模型输入相应的数据特征组,以生成所述目标网络模型的模型预测结果之后,所述方法还包括:6. The method according to any one of claims 1 to 5, wherein after inputting corresponding data feature groups to each sub-network model respectively, to generate a model prediction result of the target network model , the method also includes: 从所述待预测数据中获取独立数据特征,所述独立数据特征不对应于所述K个变量中的变量;Obtain independent data features from the data to be predicted, and the independent data features do not correspond to variables in the K variables; 根据所述独立数据特征与所述模型预测结果,确定所述待预测数据对应的决策规则,所述决策规则用于确定所述待预测数据对应的业务交易的风险等级。According to the independent data feature and the model prediction result, a decision rule corresponding to the to-be-predicted data is determined, and the decision-making rule is used to determine the risk level of the business transaction corresponding to the to-be-predicted data. 7.一种基于网络模型的预测装置,其特征在于,包括:7. A prediction device based on a network model, characterized in that, comprising: 参数获取模块,用于获取目标网络模型的原始模型参数,其中,所述目标网络模型的输入为K个变量,所述K为大于1的整数;A parameter obtaining module, used for obtaining the original model parameters of the target network model, wherein the input of the target network model is K variables, and the K is an integer greater than 1; 子网络模型生成模块,用于根据所述原始模型参数生成T个子网络模型,其中,所述T个子网络模型中的每个子网络模型用于输入一个变量组,不同子网络模型所输入的变量组互不相同,T个变量组包括所述K个变量,每个变量组包括至少一个变量;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, and the variable groups input by different sub-network models Different from each other, T variable groups include the K variables, and each variable group includes at least one variable; 数据获取模块,用于获取待预测数据,其中,所述待预测数据包括所述K个变量中每个变量对应的数据特征;A data acquisition module, configured to acquire data to be predicted, wherein the data to be predicted includes data features corresponding to each of the K variables; 数据划分模块,用于根据所述每个子网络模型对应的变量组,将所述待预测数据划分为所述T个变量组对应的数据特征组;a data division module, configured to divide the to-be-predicted data into data feature groups corresponding to the T variable groups according to the variable group corresponding to each sub-network model; 结果生成模块,用于分别向所述每个子网络模型输入相应的数据特征组,以生成所述目标网络模型的模型预测结果。The result generating module is used for inputting corresponding data feature groups to each sub-network model respectively, so as to generate a model prediction result of the target network model. 8.根据权利要求7所述的方法,其特征在于,所述子网络模型生成模块,包括:8. The method according to claim 7, wherein the sub-network model generation module comprises: 参数解析单元,用于根据所述原始模型参数的实现语言,对所述原始模型参数进行解析,得到多个计算单元,所述计算单元用于基于对应的变量组计算输出结果;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 calculation units, the calculation units are used to calculate the output result based on the corresponding variable group; 组合单元,用于根据所述多个计算单元输入参数和输出结果之间的依赖关系,将相互之间存在依赖关系的计算单元组合为子网络模型,得到T个子网络模型。The combining unit is configured to combine the computing units with mutual dependencies into a sub-network model according to the dependencies between the input parameters and output results of the plurality of computing units to obtain T sub-network models. 9.一种电子设备,其特征在于,包括:9. An electronic device, characterized in that, comprising: 处理器;processor; 存储器,用于存储所述处理器的可执行指令;a memory for storing executable instructions for the processor; 其中,所述处理器配置为经由执行所述可执行指令来执行权利要求1至6中任意一项所述的基于网络模型的预测方法。Wherein, the processor is configured to execute the network model-based prediction method of any one of claims 1 to 6 by executing the executable instructions. 10.一种计算机可读介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至6中任一项所述的基于网络模型的预测方法。10 . A computer-readable medium having a computer program stored thereon, wherein the computer program implements the prediction method based on a network model according to any one of claims 1 to 6 when the computer program is executed by a processor. 11 .
CN202210664356.XA 2022-06-13 2022-06-13 Prediction method, device, electronic device and readable medium based on network model Active CN115099415B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210664356.XA CN115099415B (en) 2022-06-13 2022-06-13 Prediction method, device, electronic device and readable medium based on network model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210664356.XA CN115099415B (en) 2022-06-13 2022-06-13 Prediction method, device, electronic device and readable medium based on network model

Publications (2)

Publication Number Publication Date
CN115099415A true CN115099415A (en) 2022-09-23
CN115099415B CN115099415B (en) 2025-05-27

Family

ID=83290003

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210664356.XA Active CN115099415B (en) 2022-06-13 2022-06-13 Prediction method, device, electronic device and readable medium based on network model

Country Status (1)

Country Link
CN (1) CN115099415B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200293910A1 (en) * 2019-03-15 2020-09-17 International Business Machines Corporation System for automatic deduction and use of prediction model structure for a sequential process dataset
CN111723526A (en) * 2020-06-24 2020-09-29 中国地质大学(北京) Dynamic regression committee machine logging reservoir parameter prediction method and system
KR20210042992A (en) * 2019-11-25 2021-04-20 베이징 바이두 넷컴 사이언스 앤 테크놀로지 코., 엘티디. Method and apparatus for training a deep learning model
CN113205214A (en) * 2021-04-30 2021-08-03 南京邮电大学 Photovoltaic power ultra-short-term prediction method based on parallel dendritic neural network
WO2022012119A1 (en) * 2020-07-17 2022-01-20 Oppo广东移动通信有限公司 Data processing method and apparatus, electronic device, and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200293910A1 (en) * 2019-03-15 2020-09-17 International Business Machines Corporation System for automatic deduction and use of prediction model structure for a sequential process dataset
KR20210042992A (en) * 2019-11-25 2021-04-20 베이징 바이두 넷컴 사이언스 앤 테크놀로지 코., 엘티디. Method and apparatus for training a deep learning model
CN111723526A (en) * 2020-06-24 2020-09-29 中国地质大学(北京) Dynamic regression committee machine logging reservoir parameter prediction method and system
WO2022012119A1 (en) * 2020-07-17 2022-01-20 Oppo广东移动通信有限公司 Data processing method and apparatus, electronic device, and storage medium
CN113205214A (en) * 2021-04-30 2021-08-03 南京邮电大学 Photovoltaic power ultra-short-term prediction method based on parallel dendritic neural network

Also Published As

Publication number Publication date
CN115099415B (en) 2025-05-27

Similar Documents

Publication Publication Date Title
Zhang et al. AGL: A scalable system for industrial-purpose graph machine learning
CN113168583B (en) Method and apparatus for gate fusion for measurement in quantum computing simulation
US11194554B2 (en) Efficient quantum adaptive execution method for quantum circuits
CN114462532A (en) Model training method, method, device, equipment and medium for predicting transaction risk
US11521076B2 (en) Architecture-independent approximation discovery
US20200242510A1 (en) System for constructing effective machine-learning pipelines with optimized outcomes
US11847546B2 (en) Automatic data preprocessing
CN113762702B (en) Workflow deployment method, device, computer system and readable storage medium
CN114925591A (en) An automatic parallel strategy search method and related equipment based on polyhedral model modeling
CN114565158A (en) Data prediction method and device, electronic equipment and storage medium
CN118377936A (en) Event association analysis method and device based on graph rules integrated into computing model
CN116541069A (en) Key function evaluation method, device, electronic equipment, medium and program product
Morichetta et al. Demystifying deep learning in predictive monitoring for cloud-native SLOs
CN114138679A (en) Test data construction method and device, computer readable medium and electronic equipment
US20240160924A1 (en) Automated surrogate training performance by incorporating simulator information
US20210286785A1 (en) Graph-based application performance optimization platform for cloud computing environment
CN115099415A (en) Prediction method, apparatus, electronic device and readable medium based on network model
CN111949259A (en) Risk decision configuration method, system, electronic equipment and storage medium
CN113902567B (en) Method and device for executing tasks and electronic equipment
JP7589260B2 (en) Method and apparatus for processing information - Patents.com
CN114492844A (en) Method and device for constructing machine learning workflow, electronic equipment and storage medium
JP7705887B2 (en) SYSTEM AND METHOD FOR CALCULATING A RISK METRICS ON A NETWORK OF PROCESSING NODES - Patent application
CN113762972A (en) Data storage control method and device, electronic equipment and storage medium
CN115409636A (en) Product risk prediction method, device, equipment and medium
CN114692970A (en) User intention prediction model training method, user intention prediction method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant