CN112232824A - Abstract syntax tree-based risk result calculation method and equipment - Google Patents

Abstract syntax tree-based risk result calculation method and equipment Download PDF

Info

Publication number
CN112232824A
CN112232824A CN201910636577.4A CN201910636577A CN112232824A CN 112232824 A CN112232824 A CN 112232824A CN 201910636577 A CN201910636577 A CN 201910636577A CN 112232824 A CN112232824 A CN 112232824A
Authority
CN
China
Prior art keywords
calculation
risk
syntax tree
abstract syntax
risk result
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.)
Pending
Application number
CN201910636577.4A
Other languages
Chinese (zh)
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.)
China Merchants Securities Co ltd
Original Assignee
China Merchants Securities 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 China Merchants Securities Co ltd filed Critical China Merchants Securities Co ltd
Priority to CN201910636577.4A priority Critical patent/CN112232824A/en
Publication of CN112232824A publication Critical patent/CN112232824A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • 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
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Abstract

The invention is suitable for the technical field of computers, and provides a risk result calculation method and equipment based on an abstract syntax tree, wherein the risk result calculation method comprises the following steps: receiving a risk result calculation request, wherein the risk result calculation request comprises a risk type; generating risk result calculation information based on the risk type and a preset calculation element and a calculation strategy corresponding to the risk type; the risk result calculation information comprises risk types, calculation elements corresponding to the risk types and calculation strategies; obtaining a current value of the computing element; the current value of the calculation element is obtained by real-time iterative calculation of an AST data structure; the abstract syntax tree AST data structure comprises abstract syntax tree AST data nodes; calculating a risk result based on the current values of the computational policy and the computational element. According to the method, the current value of the calculation element can be actively calculated by constructing the AST data structure of the risk result calculation element, and the speed of calculating the risk result is improved.

Description

Abstract syntax tree-based risk result calculation method and equipment
Technical Field
The invention belongs to the technical field of computers, and particularly relates to a risk result calculation method and device based on an abstract syntax tree.
Background
Risk control refers to the risk manager taking various measures and methods to eliminate or reduce the various possibilities of occurrence of a risk event, or the risk controller reducing the losses incurred when a risk event occurs. When the action occurs, the risk of the action needs to be evaluated, and when the risk of the action is within a safe threshold value, the operation can be continued to prevent unnecessary loss.
The current wind control computing method in the financial industry is to trigger wind control computing when entrusting behavior occurs, and to calculate risk results according to rules after various data and indexes required by the wind control computing are obtained by a user. However, when the wind control range is wide and the associated factors are complex and variable, the wind control calculation method can result in the multiplied increase of the wind control calculation time and the too slow speed of the generation of the order.
Disclosure of Invention
In view of this, embodiments of the present invention provide a risk result calculation method and device based on an abstract syntax tree, so as to solve the problems of long time for wind control calculation and excessively slow ordering speed in the prior art.
The first aspect of the embodiments of the present invention provides a risk result calculation method based on an abstract syntax tree, including:
receiving a risk result calculation request, wherein the risk result calculation request comprises a risk type;
generating risk result calculation information based on the risk type and a preset calculation element and a calculation strategy corresponding to the risk type; the risk result calculation information comprises risk types, calculation elements corresponding to the risk types and calculation strategies;
obtaining a current value of the computing element; the current value of the calculation element is obtained by real-time iterative calculation of an AST data structure; the abstract syntax tree AST data structure comprises abstract syntax tree AST data nodes;
calculating a risk result based on the current values of the computational policy and the computational element.
A second aspect of the embodiments of the present invention provides an apparatus for calculating a risk result based on an abstract syntax tree, including:
a receiving unit, configured to receive a risk result calculation request, where the risk result calculation request includes a risk type;
the processing unit is used for generating risk result calculation information based on the risk type, and a preset calculation element and a preset calculation strategy corresponding to the risk type; the risk result calculation information comprises risk types, calculation elements corresponding to the risk types and calculation strategies;
an acquisition unit configured to acquire a current value of the calculation element; the current value of the calculation element is obtained by real-time iterative calculation of an AST data structure; the abstract syntax tree AST data structure comprises abstract syntax tree AST data nodes;
and the calculation unit is used for calculating a risk result based on the calculation strategy and the current value of the calculation element.
A third aspect of the embodiments of the present invention provides a risk result calculation device based on an abstract syntax tree, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the steps of the risk result calculation method according to the first aspect.
A fourth aspect of embodiments of the present invention provides a computer-readable storage medium, which stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the risk result calculation method according to the first aspect.
In the embodiment of the invention, a risk result calculation request is received, wherein the risk result calculation request comprises a risk type; generating risk result calculation information based on the risk type and a preset calculation element and a calculation strategy corresponding to the risk type; the risk result calculation information comprises risk types, calculation elements corresponding to the risk types and calculation strategies; obtaining a current value of the computing element; the current value of the calculation element is obtained by real-time iterative calculation of an AST data structure; the abstract syntax tree AST data structure comprises abstract syntax tree AST data nodes; calculating a risk result based on the current values of the computational policy and the computational element. According to the method, the current value of each calculation element can be actively calculated by constructing the AST data structure of each risk result calculation element, the current value of the calculation element can be directly obtained when the risk result is calculated, the speed of calculating the risk result is improved, and the risk result can be rapidly calculated when the association factors are complex and changeable.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a flowchart of a risk result calculation method based on an abstract syntax tree according to an embodiment of the present invention;
FIG. 2 is a flowchart of another risk result calculation method based on an abstract syntax tree according to an embodiment of the present invention;
FIG. 3 is a flowchart of another risk result calculation method based on an abstract syntax tree according to an embodiment of the present invention;
fig. 4 is a flowchart of S305 in another risk result calculation method based on an abstract syntax tree according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of an abstract syntax tree-based risk result calculation apparatus according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a risk result calculation device based on an abstract syntax tree according to an embodiment of the present invention.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
In order to explain the technical means of the present invention, the following description will be given by way of specific examples.
Referring to fig. 1, fig. 1 is a flowchart of a risk result calculation method based on an abstract syntax tree according to an embodiment of the present invention. The main execution body of the image fusion method in the embodiment is risk result calculation equipment. The device includes, but is not limited to, a mobile terminal, a desktop computer, a cloud device, such as a cloud server. The risk result calculation method as shown in the figure may include the steps of:
s101: a risk result calculation request is received, the risk result calculation request including a risk type.
With the development of networks, each financial institution opens mobile financial services on a network platform, and flexibly provides financial services for different crowds and different scenes. Before various financial transactions, transaction risks need to be evaluated in advance, for example, before a purchasing behavior occurs, risk results are calculated for the behavior, the risks are evaluated, and when the calculated results meet conditions, the purchasing behavior is allowed to continue to be executed.
The risk result calculation device based on the abstract syntax tree receives a risk result calculation request, wherein the risk result calculation request is used for triggering risk result calculation, the risk result calculation request comprises a risk type, and the risk type is used for classifying various types of risks due to different behaviors corresponding to different risk assessment elements and different strategies, for example, the risk type can comprise a risk of purchasing futures and a risk of purchasing gold, and different futures products can also correspond to different risk types in the risks of purchasing futures.
The risk result calculation request may be triggered and generated by a purchase behavior of the user, for example, the user clicks a virtual button "confirm purchase" on the interface to confirm the purchase behavior, and the calculation request for generating the risk result is triggered.
S102: generating risk result calculation information based on the risk type, the preset calculation elements and the preset calculation strategy; the risk result calculation information comprises risk types, calculation elements corresponding to the risk types and calculation strategies.
And setting a calculation element and a calculation strategy and a corresponding relation between a risk type and the calculation element and the calculation strategy in the risk result calculation equipment based on the abstract syntax tree in advance. The calculation element is used for calculating the risk result, and the calculation element is an element having influence on the risk result, such as position taking situation, related security information and the like. Each risk type can correspond to one or more computing elements, and the computing elements corresponding to each risk type can be set artificially. The calculation strategy is an operation rule of the calculation element when calculating the risk result. It will be appreciated that different risk types correspond to different computational elements and different computational strategies.
And the risk result calculation equipment based on the abstract syntax tree determines the calculation element and the calculation strategy corresponding to the risk type according to the risk type and the corresponding relation between the risk type and the calculation element and the calculation strategy. The risk result calculation device generates risk result calculation information based on the risk type, the calculation element corresponding to the risk type and the calculation strategy corresponding to the risk type. The risk result calculation information is related information required for calculating the risk result, and comprises a risk type, a calculation element corresponding to the risk type and a calculation strategy.
S103: obtaining a current value of the computing element; the current value of the calculation element is obtained by real-time iterative calculation of an AST data structure; the abstract syntax tree AST data structure includes abstract syntax tree AST data nodes.
A risk result computing device based on the abstract syntax tree obtains current values of the computing elements. The risk result calculation device is preset with an Abstract Syntax Tree (AST) data structure of calculation elements, each calculation element has a corresponding Abstract Syntax Tree AST data structure, the Abstract Syntax Tree AST data structure comprises Abstract Syntax Tree AST data nodes, and node information of each Abstract Syntax Tree AST data node comprises a node identification and a next-level branch node, wherein the node identification is used for operation among the nodes and can comprise + plus, "-", "&", "| |" and the like.
An abstract Syntax tree, or Syntax tree for short (Syntax tree), is an abstract representation of the Syntax structure of the source code. It represents the syntactic structure of the programming language in the form of a tree, each node on the tree representing a structure in the source code. The syntax is said to be "abstract" in that the syntax does not represent every detail that appears in the true syntax. For example, nesting brackets are implicit in the structure of the tree and are not present in the form of nodes; whereas a conditional jump statement like the if-condition-then may be represented using a node with two branches. Therefore, the current value of the compute element can be computed from the data nodes in the abstract syntax tree AST data structure of the compute element. And carrying out iterative computation on the AST data structure of the abstract syntax tree in real time to obtain the current value of the computation element. For example, r is a compute element and α and β are data nodes of the compute element, then the data nodes in the compute element may be computed as
Figure BDA0002130527930000061
α&&Beta, alpha | beta. Wherein the calculated identification is set artificially according to the risk type and the risk element.
In addition, each calculation element can set an early warning threshold, and a data node in the AST data structure of the abstract syntax tree of each calculation element can also set an early warning threshold, so that when the calculated value is smaller than the early warning threshold, the risk can be ensured to be small, and the risk control can be further improved.
S104: calculating a risk result based on the current values of the computational policy and the computational element.
And the risk result calculation equipment based on the abstract syntax tree performs operation based on the obtained calculation strategy of the calculation element and the current value of the calculation element to calculate a risk result. Wherein the risk result can be identified by a numerical value, e.g., a calculated risk result of 0.5.
Further, in order to perform a wind control verification based on the calculated risk result, after S104, the method may include: and if the risk result is smaller than or equal to a preset threshold value, marking the wind control verification result as passing.
A check threshold, namely a safety threshold, is preset in the risk result calculation device based on the abstract syntax tree and is used for judging whether the risk result corresponding to the behavior is safe or not, and when the risk result is smaller than or equal to the preset threshold, the risk of the behavior is smaller, and the behavior can be judged to be safe; when the risk result is greater than the preset threshold, the risk of the behavior is relatively high, the behavior can be judged to be unsafe, and the user can be reminded or the transaction can be suspended. And the risk result calculation device based on the abstract syntax tree judges whether the calculated risk result is less than or equal to a preset threshold value, when the risk result is less than or equal to the preset threshold value, the risk of the risk behavior is small, the safety can be judged, and the wind control verification result is marked as pass.
In this embodiment, a risk result calculation request is received, where the risk result calculation request includes a risk type; generating risk result calculation information based on the risk type and a preset calculation element and a calculation strategy corresponding to the risk type; the risk result calculation information comprises risk types, calculation elements corresponding to the risk types and calculation strategies; obtaining a current value of the computing element; the current value of the calculation element is obtained by real-time iterative calculation of an AST data structure; the abstract syntax tree AST data structure comprises abstract syntax tree AST data nodes; calculating a risk result based on the current values of the computational policy and the computational element. According to the method, the current value of each calculation element can be actively calculated by constructing the AST data structure of each risk result calculation element, the current value of the calculation element can be directly obtained when the risk result is calculated, the speed of calculating the risk result is improved, and the risk result can be rapidly calculated when the association factors are complex and changeable.
Referring to fig. 2, fig. 2 is a flowchart of another risk result calculation method based on an abstract syntax tree according to an embodiment of the present invention. The main execution body of the image fusion method in the embodiment is risk result calculation equipment. The device includes, but is not limited to, a mobile terminal, a desktop computer, a cloud device, such as a cloud server. In order to construct an abstract syntax tree AST data structure of a computing element, in this embodiment, S203 is added compared with the first embodiment, where S203 may be executed before S201 to S202, or may be executed after S201 to S202, and S203 may be executed before S204 to S205, where S201 to S202 in this embodiment are the same as S101 to S102 in the first embodiment, and S204 to S205 are the same as S103 to S104 in the previous embodiment, which is not described herein again, and S203 is specifically as follows:
s203: constructing an abstract syntax tree AST data structure for the computational elements.
The risk result calculation device based on the abstract syntax tree first determines nodes in an abstract syntax tree AST data structure of a calculation element, acquires node information and mapping relations between the nodes based on the setting of a user, wherein the node information includes node identifiers and next-level branch nodes, and the abstract syntax tree AST data nodes are constructed by using identifiers, such as "+", "&", "|", and the like, and the identifiers are only given by way of example and are not limited herein. An abstract syntax tree AST data structure of computational elements is constructed based on the above.
Referring to fig. 3, fig. 3 is a flowchart of another risk result calculation method based on an abstract syntax tree according to an embodiment of the present invention. The main execution body of the image fusion method in the embodiment is risk result calculation equipment. The device includes, but is not limited to, a mobile terminal, a desktop computer, a cloud device, such as a cloud server. The difference between this embodiment and the second embodiment is S305, where S305 is executed after S301 to S304 and before S306, and when the current value of the calculation element is obtained for the first time, S306 may be directly executed after S301 to S304 is executed, where S301 to S304 in this embodiment are the same as S201 to S204 in the second embodiment, and S306 is the same as S205 in the second embodiment, which is not described herein again, and S305 is specifically as follows:
s305: updating the current value of the computing element based on the AST data structure of the computing element and the updated source data when the source data of the computing element is updated.
The AST data structure of the computing element is a structure represented in a tree form, so the structure has a plurality of levels of nodes, the node data at the bottom layer, which can drive the whole structure to perform iterative computation, is called as the source data of the computing element, and in practical applications, related information of securities, market information of securities, fund information of accounts, and the like can be used as the source data of the computing element. The risk result computing device may obtain, in real-time, a value of the source data of the computing element, the source data of the computing element corresponding to a "dependent variable," and when the source data of the computing element is updated, the risk result computing device may update the current value of the computing element accordingly.
When the risk result computing device based on the abstract syntax tree detects a source data update of the computing element, the current value of the computing element is updated based on the AST data structure of the computing element and the source data of the updated computing element.
Further, in order to more accurately obtain the current value of the updated calculation element, as shown in fig. 4, S305 may include S3051-S3052, where S3051-S3052 are specifically as follows:
s3051: and acquiring the source data of the computing element in real time.
The risk result computing device based on the abstract syntax tree obtains source data of the computing elements in real time. The risk result calculation device based on the abstract syntax tree can subscribe a source channel of the source data of the calculation element, and when the source channel of the source data of the calculation element updates the source data of the calculation element, the channel sends the updated source data of the calculation element to the risk result calculation device based on the abstract syntax tree, so that the risk result calculation device based on the abstract syntax tree can acquire the source data of the calculation element in real time.
S3052: when the source data of the computing element changes, recalculating the current value of the computing element based on the updated source data of the computing element, a preset source data calculation policy and the AST data structure of the computing element.
A source data calculation strategy, namely identification among all nodes, is preset in the risk result calculation equipment based on the abstract syntax tree, and the source data calculation strategy is used for calculating source data so as to obtain the current value of a calculation element. When detecting that the source data of the computing element changes, recalculating the current value of the computing element based on the updated source data of the computing element, a preset source data calculation policy, and the AST data structure of the computing element.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
Referring to fig. 5, fig. 5 is a schematic diagram of an apparatus for calculating risk results based on abstract syntax trees according to an embodiment of the present invention. The units are included for performing the steps in the respective corresponding embodiments of fig. 1-4. Please refer to the related description of the embodiments in fig. 1 to 5. For convenience of explanation, only the portions related to the present embodiment are shown. Referring to fig. 5, the abstract syntax tree-based risk result calculation means 6 includes:
a receiving unit 510, configured to receive a risk result calculation request, where the risk result calculation request includes a risk type;
a processing unit 520, configured to generate risk result calculation information based on the risk type and a preset calculation element and a calculation policy corresponding to the risk type; the risk result calculation information comprises risk types, calculation elements corresponding to the risk types and calculation strategies;
an obtaining unit 530, configured to obtain a current value of the computing element; the current value of the calculation element is obtained by real-time iterative calculation of an AST data structure; the abstract syntax tree AST data structure comprises abstract syntax tree AST data nodes;
a calculating unit 540, which calculates a risk result based on the calculation strategy and the current value of the calculation element.
Further, the risk result calculation device based on the abstract syntax tree further includes:
a construction unit for constructing an abstract syntax tree AST data structure of the computational elements.
Further, the risk result calculation device based on the abstract syntax tree further includes:
an updating unit configured to update a current value of the computing element based on the AST data structure of the computing element and the updated source data when the source data of the computing element is updated.
Further, the update unit is specifically configured to:
acquiring source data of the computing elements in real time;
when the source data of the computing element changes, recalculating the current value of the computing element based on the updated source data of the computing element, a preset source data calculation policy and the AST data structure of the computing element.
Further, the risk result calculation device based on the abstract syntax tree further includes:
and the marking unit is used for marking the wind control verification result as pass if the risk result is less than or equal to a preset threshold value.
Fig. 6 is a schematic diagram of a risk result calculation device based on an abstract syntax tree according to an embodiment of the present invention. As shown in fig. 6, the risk result calculation device 6 based on the abstract syntax tree of this embodiment includes: a processor 60, a memory 61 and a computer program 62, such as a risk result calculation program, stored in said memory 61 and executable on said processor 60. The processor 60, when executing the computer program 62, implements the steps in the above-described embodiments of the abstract syntax tree based risk result calculation method, such as the steps 101 to 104 shown in fig. 1. Alternatively, the processor 60, when executing the computer program 62, implements the functions of the units in the above-mentioned device embodiments, such as the functions of the modules 510 to 540 shown in fig. 5.
Illustratively, the computer program 62 may be divided into one or more units, which are stored in the memory 61 and executed by the processor 60 to accomplish the present invention. The one or more units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program 62 in the abstract syntax tree based risk result calculation device 6. For example, the computer program 62 may be divided into a receiving unit, a processing unit, an obtaining module, and a calculating unit, and the specific functions of each unit are as follows:
a receiving unit, configured to receive a risk result calculation request, where the risk result calculation request includes a risk type;
the processing unit is used for generating risk result calculation information based on the risk type, and a preset calculation element and a preset calculation strategy corresponding to the risk type; the risk result calculation information comprises risk types, calculation elements corresponding to the risk types and calculation strategies;
an acquisition unit configured to acquire a current value of the calculation element; the current value of the calculation element is obtained by real-time iterative calculation of an AST data structure; the abstract syntax tree AST data structure comprises abstract syntax tree AST data nodes;
and the calculation unit is used for calculating a risk result based on the calculation strategy and the current value of the calculation element.
The risk result calculation device 6 based on the abstract syntax tree may be a desktop computer, a notebook, a palm computer, a cloud server, or other calculation devices. The risk result calculation device may include, but is not limited to, a processor 60, a memory 61. Those skilled in the art will appreciate that fig. 6 is merely an example of an abstract syntax tree based risk result computing device 6 and does not constitute a limitation of an abstract syntax tree based risk result computing device 6, and may include more or less components than those shown, or combine certain components, or different components, e.g., the risk result computing device may also include input output devices, network access devices, buses, etc.
The Processor 60 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 61 may be an internal storage unit of the risk result calculation device 6 based on the abstract syntax tree, for example, a hard disk or a memory of the risk result calculation device 6 based on the abstract syntax tree. The memory 61 may also be an external storage device of the risk result calculation device 6 based on the abstract syntax tree, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a flash memory Card (FlashCard), and the like, which are equipped on the risk result calculation device 6 based on the abstract syntax tree. Further, the memory 61 may also include both an internal storage unit and an external storage device of the abstract syntax tree based risk result calculating device 6. The memory 61 is used to store the computer program and other programs and data required by the risk result calculation device. The memory 61 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. . Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (10)

1. A risk result calculation method based on an abstract syntax tree is characterized by comprising the following steps:
receiving a risk result calculation request, wherein the risk result calculation request comprises a risk type;
generating risk result calculation information based on the risk type and a preset calculation element and a calculation strategy corresponding to the risk type; the risk result calculation information comprises risk types, calculation elements corresponding to the risk types and calculation strategies;
obtaining a current value of the computing element; the current value of the calculation element is obtained by real-time iterative calculation of an AST data structure; the abstract syntax tree AST data structure comprises abstract syntax tree AST data nodes;
calculating a risk result based on the current values of the computational policy and the computational element.
2. The abstract syntax tree-based risk result calculation method of claim 1, wherein prior to said obtaining the current value of the computational element, comprising:
constructing an abstract syntax tree AST data structure for the computational elements.
3. The abstract syntax tree-based risk result calculation method of claim 2, wherein after said constructing the abstract syntax tree AST data structure of the calculation element, before said calculating a risk result based on the calculation policy and the current value of the calculation element, further comprises:
updating the current value of the computing element based on the AST data structure of the computing element and the updated source data when the source data of the computing element is updated.
4. The abstract syntax tree-based risk result calculation method of claim 3, wherein the updating the current value of the compute element based on the AST data structure of the compute element and the updated source data when the source data of the compute element is updated comprises:
acquiring source data of the computing elements in real time;
when the source data of the computing element changes, recalculating the current value of the computing element based on the updated source data of the computing element, a preset source data calculation policy and the AST data structure of the computing element.
5. The abstract syntax tree-based risk result calculation method according to any one of claims 1 to 4, wherein after calculating the risk result based on the calculation policy and the current value of the calculation element, comprising:
and if the risk result is smaller than or equal to a preset threshold value, marking the wind control verification result as passing.
6. An abstract syntax tree-based risk result calculation apparatus, comprising:
a receiving unit, configured to receive a risk result calculation request, where the risk result calculation request includes a risk type;
the processing unit is used for generating risk result calculation information based on the risk type, and a preset calculation element and a preset calculation strategy corresponding to the risk type; the risk result calculation information comprises risk types, calculation elements corresponding to the risk types and calculation strategies;
an acquisition unit configured to acquire a current value of the calculation element; the current value of the calculation element is obtained by real-time iterative calculation of an AST data structure; the abstract syntax tree AST data structure comprises abstract syntax tree AST data nodes;
and the calculation unit is used for calculating a risk result based on the calculation strategy and the current value of the calculation element.
7. The abstract syntax tree-based risk result calculation apparatus of claim 6, further comprising:
a construction unit for constructing an abstract syntax tree AST data structure of the computational elements.
8. The abstract syntax tree-based risk result calculation apparatus of claim 7, further comprising:
an updating unit configured to update a current value of the computing element based on the AST data structure of the computing element and the updated source data when the source data of the computing element is updated.
9. An abstract syntax tree based risk result calculation device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor when executing the computer program realizes the steps of the method according to any one of claims 1 to 5.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 5.
CN201910636577.4A 2019-07-15 2019-07-15 Abstract syntax tree-based risk result calculation method and equipment Pending CN112232824A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910636577.4A CN112232824A (en) 2019-07-15 2019-07-15 Abstract syntax tree-based risk result calculation method and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910636577.4A CN112232824A (en) 2019-07-15 2019-07-15 Abstract syntax tree-based risk result calculation method and equipment

Publications (1)

Publication Number Publication Date
CN112232824A true CN112232824A (en) 2021-01-15

Family

ID=74111548

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910636577.4A Pending CN112232824A (en) 2019-07-15 2019-07-15 Abstract syntax tree-based risk result calculation method and equipment

Country Status (1)

Country Link
CN (1) CN112232824A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112950078A (en) * 2021-04-01 2021-06-11 山东省计算中心(国家超级计算济南中心) Method and system for generating trial risk emergency disposal scheme

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013250631A (en) * 2012-05-30 2013-12-12 Ntt Data Corp Information processor, information processing method and program
CN105938519A (en) * 2016-04-14 2016-09-14 北京思特奇信息技术股份有限公司 System-based business health degree calculating method and system
WO2017052318A1 (en) * 2015-09-25 2017-03-30 (주)씽크포비엘 Method and apparatus for analyzing software
CN108428178A (en) * 2018-02-01 2018-08-21 深圳市资本在线金融信息服务有限公司 financing risk control method, device, equipment and storage medium
CN109584056A (en) * 2018-09-20 2019-04-05 招商证券股份有限公司 A kind of share-selecting method and device based on natural language

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013250631A (en) * 2012-05-30 2013-12-12 Ntt Data Corp Information processor, information processing method and program
WO2017052318A1 (en) * 2015-09-25 2017-03-30 (주)씽크포비엘 Method and apparatus for analyzing software
CN105938519A (en) * 2016-04-14 2016-09-14 北京思特奇信息技术股份有限公司 System-based business health degree calculating method and system
CN108428178A (en) * 2018-02-01 2018-08-21 深圳市资本在线金融信息服务有限公司 financing risk control method, device, equipment and storage medium
CN109584056A (en) * 2018-09-20 2019-04-05 招商证券股份有限公司 A kind of share-selecting method and device based on natural language

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
楚郢: "风险价值度的计算方法与实证研究", 中国优秀硕士学位论文全文数据库, no. 2017, pages 145 - 295 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112950078A (en) * 2021-04-01 2021-06-11 山东省计算中心(国家超级计算济南中心) Method and system for generating trial risk emergency disposal scheme
CN112950078B (en) * 2021-04-01 2022-02-11 山东省计算中心(国家超级计算济南中心) Method and system for generating trial risk emergency disposal scheme

Similar Documents

Publication Publication Date Title
CN107679995B (en) Electronic device, insurance case claim settlement auditing method and computer-readable storage medium
CN111783142B (en) Data protection method, device, server and medium
CN107784063B (en) Algorithm generation method and terminal equipment
CN110033365A (en) A kind of loan on personal security approval system and method
CN113034274A (en) Supply chain financial service system and method based on block chain and terminal equipment
CN112395630A (en) Data encryption method and device based on information security, terminal equipment and medium
CN108446270B (en) Electronic device, early warning method of system sensitive content and storage medium
CN112214402B (en) Code verification algorithm selection method, device and storage medium
CN112232824A (en) Abstract syntax tree-based risk result calculation method and equipment
CN116524206B (en) Target image identification method and device
CN112507323A (en) Model training method and device based on unidirectional network and computing equipment
US11409502B2 (en) Intelligent controls for end-user computing
CN116563860A (en) Data desensitization method, device, computer equipment and medium based on artificial intelligence
CN113283766B (en) Contract management method, contract management device, electronic equipment and storage medium
CN113435502B (en) Site flow determination method, device, equipment and storage medium
CN114022246A (en) Product information pushing method and device, terminal equipment and storage medium
CN111027824A (en) Risk scoring method and device
CN113343577A (en) Parameter optimization method and device, computer equipment and readable storage medium
CN111882416A (en) Training method and related device of risk prediction model
CN113379062B (en) Method and device for training model
CN110852083A (en) Method and device for generating short message template
CN111967043B (en) Method, device, electronic equipment and storage medium for determining data similarity
CN116720214A (en) Model training method and device for privacy protection
CN115187263A (en) Risk control method and device for payment transaction
CN113821699A (en) Method, apparatus, device and medium for processing data

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