E commerce transactions Risk Identification Method and device based on own coding neural network
Technical field
This application involves Internet technical field more particularly to a kind of e commerce transactions risks based on own coding neural network
Recognition methods and device.
Background technology
With the fast development of Internet technology, more and more business can by real-time performance, such as:Shopping turns
Account etc..However, since Internet service has sightless characteristic, lawless people may carry out e commerce transactions fraud, to use
Bring loss in family.
Invention content
In view of this, the application provides a kind of e commerce transactions Risk Identification Method and dress based on own coding neural network
It puts.
Specifically, the application is achieved by the following technical solution:
A kind of e commerce transactions Risk Identification Method based on own coding neural network, the method includes:
The primitive character information of target electronic business is extracted, and determines the primitive character value of the primitive character information;
Using the primitive character value as the own coding neural network model trained of ginseng input is entered, by the own coding
Neural network model output assessment characteristic value;
The risk of the e commerce transactions is determined according to the error between the assessment characteristic value and the primitive character value.
A kind of e commerce transactions risk identification device based on own coding neural network, described device include:
Feature extraction unit extracts the primitive character information of target electronic business, and determines the primitive character information
Primitive character value;
Feature input unit, using the primitive character value as entering the own coding neural network model trained of ginseng input,
Assessment characteristic value is exported by the own coding neural network model;
Risk determination unit determines the electronics according to the error between the assessment characteristic value and the primitive character value
The risk of business.
The application can identify target electricity by the own coding neural network model trained it can be seen from above description
The risk of subservice without carrying out the accumulation of risk historical electronic business, without manually carrying out Feature Selection, saves black sample
Time cost caused by accumulation and Feature Selection also efficiently solves people and understands that business not deep caused feature is sieved
The problems such as choosing is inaccurate, risk identification is inaccurate.
Description of the drawings
Fig. 1 is that a kind of e commerce transactions risk based on own coding neural network shown in one exemplary embodiment of the application is known
The flow diagram of other method.
Fig. 2 is a kind of training flow signal of own coding neural network model shown in one exemplary embodiment of the application
Figure.
Fig. 3 is a kind of schematic diagram of own coding neural network model shown in one exemplary embodiment of the application.
Fig. 4 is a kind of for the e commerce transactions wind based on own coding neural network shown in one exemplary embodiment of the application
One structure chart of dangerous identification device.
Fig. 5 is that a kind of e commerce transactions risk based on own coding neural network shown in one exemplary embodiment of the application is known
The block diagram of other device.
Specific embodiment
Here exemplary embodiment will be illustrated in detail, example is illustrated in the accompanying drawings.Following description is related to
During attached drawing, unless otherwise indicated, the same numbers in different attached drawings represent the same or similar element.Following exemplary embodiment
Described in embodiment do not represent all embodiments consistent with the application.On the contrary, they be only with it is such as appended
The example of the consistent device and method of some aspects be described in detail in claims, the application.
It is only merely for the purpose of description specific embodiment in term used in this application, and is not intended to be limiting the application.
It is also intended in the application and " one kind " of singulative used in the attached claims, " described " and "the" including majority
Form, unless context clearly shows that other meanings.It is also understood that term "and/or" used herein refers to and wraps
Containing one or more associated list items purposes, any or all may be combined.
It will be appreciated that though various information, but this may be described using term first, second, third, etc. in the application
A little information should not necessarily be limited by these terms.These terms are only used for same type of information being distinguished from each other out.For example, not departing from
In the case of the application range, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as
One information.Depending on linguistic context, word as used in this " if " can be construed to " ... when " or " when ...
When " or " in response to determining ".
In the relevant technologies, the risk identification of e commerce transactions is mainly carried out using following two modes:
Mode one can respectively set some rules for risk identification according to business experience per electron-like business, than
Such as:For an account, when the transaction amount involved by the electronic transaction of the account at a certain moment become more suddenly or tail off,
The device address information involved in equipment changing, upstream and downstream electronic transaction with account binding fluctuates larger etc..Based on these
Default rule, it can be determined that e commerce transactions whether there is risk.
However, such realization method is strongly dependent upon understanding of the people to business, it is possible that wrongheaded situation,
It can not consider the situation of change of business.
Risk identification based on the machine learning algorithm for having supervision, can be converted to two classification problems by mode two, such as:It can
Whether risky mark historical electronic business, then extracting black, white sample respectively, (wherein, black sample is risky electronics industry
Business, white sample is does not have risky e commerce transactions), training has two disaggregated models of supervision, such as:Logic Regression Models, decision
Tree-model etc. can carry out risk identification according to two disaggregated model to e commerce transactions.
However, such realization method is strongly dependent upon black, the white sample of handmarking, if the quantity of current black sample compared with
It is few, then the accumulation taken a long time, in addition to this, it is also necessary to devote a tremendous amount of time the cleaning and screening for carrying out feature.
In view of the above-mentioned problems, the application provides a kind of e commerce transactions risk identification scheme based on own coding neural network.
Fig. 1 is that a kind of e commerce transactions risk based on own coding neural network shown in one exemplary embodiment of the application is known
The flow diagram of other method.
It please refers to Fig.1, the e commerce transactions Risk Identification Method based on own coding neural network, which can be applied, to be serviced
In the server or server cluster of provider's deployment, include following steps:
Step 101, the primitive character information of target electronic business is extracted, and determines the original spy of the primitive character information
Value indicative.
In the present embodiment, the target electronic business is the e commerce transactions for needing to carry out risk identification, the target electricity
Subservice can be payment transaction, transferred account service etc., and the application is not intended to limit the type of service of the target electronic business.
In the present embodiment, for ease of description, can the characteristic information of the target electronic business be known as primitive character
Information, the primitive character information can include the target electronic business characteristic information in each dimension, without carrying out
Clearly, it screens.For example, the primitive character information can include:Business account, business object, facility information, business ring
Border, service interaction both sides' relationship etc..Wherein, the business object is usually the account information of business opposite end, the equipment letter
Breath can be MAC Address, equipment string number of terminal device etc., and the service environment can be business launch position, business initiation
Network environment (cable network, Wi-Fi network, mobile wireless network) etc., the service interaction both sides can include:Good friend is closed
System, strange relationship etc..
It in the present embodiment, can be according to preset after the primitive character information for extracting the target electronic business
Quantizing rule determines the characteristic value of each primitive character information, is subsequently referred to as primitive character value.
Step 102, using the primitive character value as the own coding neural network model trained of ginseng input is entered, by institute
State own coding neural network model output assessment characteristic value.
In the present embodiment, the own coding nerve trained can be input to using the primitive character value as ginseng is entered
The input layer of network model, by hidden layer, characteristic value corresponding with the primitive character value can be exported by reaching output layer,
It is referred to as assessment characteristic value in this example.
In the present embodiment, since own coding neural network model is identical with output node quantity with input node quantity
The characteristics of, therefore the quantity of original characteristic value is also identical with the quantity of the assessment characteristic value in the application.It is assumed that abovementioned steps
The primitive character information of N number of dimension is extracted in 101, then the quantity of primitive character value is N, and the quantity for assessing characteristic value is also N.
Step 103, the e commerce transactions are determined according to the error between the assessment characteristic value and the primitive character value
Risk.
In the present embodiment, formula can be passed throughCalculate it is described assessment characteristic value and
Error between the primitive character value.In general, error is bigger, illustrate to assess the difference between characteristic value and primitive character value
It is different bigger.
It in the present embodiment, can be in institute's commentary if carrying out the training of own coding neural network model based on white sample
When estimating error between characteristic value and the primitive character value and being more than predetermined threshold value, target electronic business is determined there are risk, when
When above-mentioned error is less than or equal to the predetermined threshold value, determine that risk is not present in target electronic business.Wherein, the predetermined threshold value can
To be configured by developer according to service conditions, for the e commerce transactions that risk management and control is more stringent, can set opposite
Higher threshold value, such as:0.7 or 0.8 etc.;For the e commerce transactions that risk management and control is more loose, can set relatively low
Threshold value, such as:0.4 or 0.5 etc..
It, can be in the assessment characteristic value and described if carrying out the training of own coding neural network model based on black sample
When error between primitive character value is less than predetermined threshold value, target electronic business is determined there are risk, when above-mentioned error is more than etc.
When the predetermined threshold value, determine that risk is not present in target electronic business.Here the default threshold in predetermined threshold value and the preceding paragraph
Value is not necessarily same value, can be determines according to actual conditions.
The application can identify target electricity by the own coding neural network model trained it can be seen from above description
The risk of subservice without carrying out the accumulation of risk historical electronic business, without manually carrying out Feature Selection, saves black sample
Time cost caused by accumulation and Feature Selection also efficiently solves people and understands that business not deep caused feature is sieved
The problems such as choosing is inaccurate, risk identification is inaccurate.
Fig. 2 is a kind of training flow signal of own coding neural network model shown in one exemplary embodiment of the application
Figure.
It please refers to Fig.2, the training process of the own coding neural network model may comprise steps of:
Step 201, training sample and verification sample are determined in historical electronic business.
In the present embodiment, a certain number of historical electronic business can be extracted at random carries out own coding neural network model
Training.Specifically, for e-payment business, since the quantity of sample white in historical electronic payment transaction is far more than black sample
This quantity can then extract the instruction that a certain number of white samples carry out own coding neural network model in historical electronic business
Practice.White sample refers to the payment of those devoids of risk, such as the non-payment for stealing account, the non-payment for stealing card in e-payment business.
Certainly, in other application scene, if the historical electronic number of services of black sample can also be extracted certain far more than white sample
The black sample of quantity carries out the training of own coding neural network model, and the application is not particularly limited this.
In the present embodiment, the historical electronic business of extraction can also be divided into training sample and verification sample, at this
In the process, developer can pre-set training sample and verify the ratio of sample, such as:7:3 or 6:4 etc..With 7:3 are
70% historical electronic business can be determined as training sample by example, developer at random, by remaining 30% historical electronic industry
Business is determined as verifying sample.
In the present embodiment, after training sample and verification sample is determined, carrying for sample characteristics information can also be carried out
It takes and characteristic value determines, the processing of this part is referred to abovementioned steps 101 with realization, this is no longer going to repeat them.For
Convenient for subsequent descriptions, the characteristic value of training sample can be known as training characteristics value, the characteristic value for verifying sample is known as verifying
Characteristic value.
Step 202, original own coding neural network model is trained according to the training sample, wherein, the original
The weight for starting from encoding nerve network model is preset original weight.
In the present embodiment, original own coding neural network model can be trained, wherein, the original own coding
The weight (model parameter) of neural network model can be preset original weight, it is of course also possible to the power for random initializtion
Weight.
In the present embodiment, own coding neural network model is introduced first.
The example please referred to Fig.3, the own coding neural network model can be divided into three layers:Input layer, hidden layer and defeated
Go out layer, input node and output node are 6, and intermediate concealed nodes are 3, and the quantity of concealed nodes is less than input node
Quantity.Wherein, hidden layer can use tanh functions, sigmoid functions etc. to be used as activation primitive.
In the present embodiment, back-propagation algorithm may be used to be trained original own coding neural network model.Tool
Body, can the training characteristics value of training sample first be inputted into the original own coding neural network model from input layer, passed through
The original own coding neural network model output Training valuation value.Please continue to refer to Fig. 3, X can be usediTo represent training characteristics
Value, it is assumed that the quantity of the training characteristics value is 6, then can be by training characteristics value X1、X2、…、X6The original is inputted from input layer
Encoding nerve network model is started from, by hidden layer, corresponding Training valuation value can be exported from output layer
Then, the error of the Training valuation value and the training characteristics value can be calculated, and using the error as training
Error.Wherein, training error exCalculation formula can be
It is then possible to using the training error as enter ginseng reversely from the output of the original own coding neural network model
Layer inputs the original own coding neural network model, to update the original weight of the original own coding neural network model.
In the present embodiment, above-mentioned backpropagation training process can be repeated based on training sample, with to it is original from
The weight of encoding nerve network model is updated.
Step 203, whether restrained according to the original own coding neural network model after the verification sample verification training.
It, can be according to verification sample after being trained to original own coding neural network model based on abovementioned steps 202
It verifies whether to have completed training process, wherein, the opportunity of verification can be empirically configured by developer.Such as:It can
With according to 1000 training samples to original own coding neural network model carry out 1000 training after, using verify sample into
Row verification.
When being verified, first the verification characteristic value for verifying sample can be inputted from input layer original self-editing after training
Code neural network model, the original own coding neural network model output verification assessed value after the training, then still may be used
To calculate the error between the verification assessed value and the verification characteristic value, as validation error.Wherein, the meter of validation error
Training error can be referred to by calculating formula, and this is no longer going to repeat them by the application.
In the present embodiment, when validation error tends towards stability, it may be determined that the original own coding nerve after the training
Network model is restrained.Specifically, it can determine that validation error tends towards stability when validation error no longer reduces, and then determine institute
State the original own coding neural network model convergence after training.
In the present embodiment, however, it is determined that the original own coding neural network model after training is not yet restrained, then can be returned
Step 202 continues training process.
It step 204, will be original after the training if the original own coding neural network model after the training is restrained
Own coding neural network model is determined as the own coding neural network model trained.
Based on abovementioned steps 203, in the original own coding neural network model convergence after determining the training, can incite somebody to action
Original own coding neural network model after the training is determined as the own coding neural network model trained, for follow-up mesh
Mark the risk identification of e commerce transactions.
Corresponding with the embodiment of the aforementioned e commerce transactions Risk Identification Method based on own coding neural network, the application is also
Provide the embodiment of the e commerce transactions risk identification device based on own coding neural network.
The embodiment of e commerce transactions risk identification device of the application based on own coding neural network, which can be applied, to be serviced
On device.Device embodiment can be realized by software, can also be realized by way of hardware or software and hardware combining.With software
It is by nonvolatile memory by the processor of server where it as the device on a logical meaning for realization
In corresponding computer program instructions read in memory what operation was formed.For hardware view, as shown in figure 4, for this Shen
Please a kind of hardware structure diagram of server where the e commerce transactions risk identification device based on own coding neural network, in addition to Fig. 4
Except shown processor, memory, network interface and nonvolatile memory, the server in embodiment where device leads to
Often according to the actual functional capability of the server, other hardware can also be included, this is repeated no more.
Fig. 5 is that a kind of e commerce transactions risk based on own coding neural network shown in one exemplary embodiment of the application is known
The block diagram of other device.
Fig. 5 is please referred to, the e commerce transactions risk identification device 400 based on own coding neural network, which can be applied, is scheming
In server shown in 4, include:Feature extraction unit 401, feature input unit 402, risk determination unit 403, sample are true
Order member 404, model training unit 405, model authentication unit 406 and model determination unit 407.
Wherein, the primitive character information of target electronic business is extracted, and determines the original spy in feature extraction unit 401
The primitive character value of reference breath;
Feature input unit 402, using the primitive character value as entering the own coding neural network mould trained of ginseng input
Type exports assessment characteristic value by the own coding neural network model;
Risk determination unit 403, according to determining the error between the assessment characteristic value and the primitive character value
The risk of e commerce transactions.
Sample determination unit 404 determines training sample and verification sample in historical electronic business;
Model training unit 405 is trained original own coding neural network model according to the training sample,
In, the weight of the original own coding neural network model is preset original weight;
Model authentication unit 406, the original own coding neural network model after being trained according to the verification sample verification are
No convergence;
Model determination unit 407, if the original own coding neural network model convergence after the training, by the training
Original own coding neural network model afterwards is determined as the own coding neural network model trained.
Optionally, the model training unit 405, the training characteristics value of training sample is described original from input layer input
Own coding neural network model exports Training valuation value by the original own coding neural network model;Calculate the training
The error of assessed value and the training characteristics value, as training error;Using the training error as enter ginseng reversely from output layer
The original own coding neural network model is inputted, to update the weight of the original own coding neural network model.
Optionally, the verification characteristic value for verifying sample is inputted the training by the model authentication unit 406 from input layer
Original own coding neural network model afterwards, the original own coding neural network model output verification assessment after the training
Value;When the error between the verification assessed value and the verification characteristic value is stablized, determine original self-editing after the training
Code neural network model convergence.
Optionally, the risk determination unit 403, according to formulaCalculate institute's commentary
Estimate the error between characteristic value and the primitive character value, N represents feature quantity, XiIt is i-th of target electronic business original
Characteristic value,It is i-th of assessment characteristic value, i is the natural number no more than N;When the assessment characteristic value and the primitive character
When error between value is more than predetermined threshold value, determine that there are risks for the target electronic business.
Optionally, the e commerce transactions are e-payment business.
The function of each unit and the realization process of effect specifically refer to and step are corresponded in the above method in above device
Realization process, details are not described herein.
For device embodiment, since it corresponds essentially to embodiment of the method, so related part is referring to method reality
Apply the part explanation of example.The apparatus embodiments described above are merely exemplary, wherein described be used as separating component
The unit of explanation may or may not be physically separate, and the component shown as unit can be or can also
It is not physical unit, you can be located at a place or can also be distributed in multiple network element.It can be according to reality
It needs that some or all of module therein is selected to realize the purpose of application scheme.Those of ordinary skill in the art are not paying
In the case of going out creative work, you can to understand and implement.
System, device, module or the unit that above-described embodiment illustrates can specifically realize by computer chip or entity,
Or it is realized by having the function of certain product.A kind of typical realization equipment is computer, and the concrete form of computer can
To be personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media play
In device, navigation equipment, E-mail receiver/send equipment, game console, tablet computer, wearable device or these equipment
The combination of arbitrary several equipment.
The foregoing is merely the preferred embodiment of the application, not limiting the application, all essences in the application
God and any modification, equivalent substitution, improvement and etc. within principle, done, should be included within the scope of the application protection.