Specific embodiment
In order to make those skilled in the art more fully understand the technical solution in this specification embodiment, below in conjunction with this
Attached drawing in specification embodiment is described in detail the technical solution in this specification embodiment, it is clear that described
Embodiment is only a part of the embodiment of this specification, instead of all the embodiments.The embodiment of base in this manual,
Those of ordinary skill in the art's every other embodiment obtained, all should belong to the range of protection.
To solve the above-mentioned problems, this specification embodiment provides a kind of method of discrimination of off-line transaction, to realize all
Off-line transaction data are identified in more transaction data, to improve the subsequent battalion based on off-line transaction data assessment based on scene under line
Sell the accuracy of effect.
Illustrate first, in the method for discrimination for the off-line transaction that this specification embodiment provides, mainly two levels is divided to sentence
Other off-line transaction: the first level is based on transaction data relevant to cooperation businessman, differentiates the conjunction as unit of cooperating businessman
Make businessman it is whether online under, i.e., be equipped with red packet two dimensional code inside StoreFront or in StoreFront environs, rather than by red packet two dimension
Code is published on network;Second level further differentiates under conditions of being equipped with red packet two dimensional code under cooperation businessman is online
Whether transaction data relevant to cooperation businessman results from off-line transaction.
In above-mentioned the first level, it is contemplated that if red packet two dimensional code is published on network by cooperation businessman, and the biography of network
Broadcast that range is very extensive, involved territorial scope is also just very extensive, thus, if numerous online friends complete red packet by network
It gets and is checked and write off with red packet, it is (such as red to will lead to involved geographical location during red packet is got and checks and writes off this with red packet
Packet gets position, red packet checks and writes off position) widely distributed namely involved geographical location dispersion degree is larger;On the contrary, if
Red packet two dimensional code is layed under line in scene, while for the daily life of user by cooperation businessman, and user is usually fixed to live
It moves in a panel region, for true off-line transaction, red packet gets position and red packet checks and writes off the distribution of position
It just more concentrates namely the dispersion degree in involved geographical location is smaller, thus, it is based on the description, in above-mentioned first layer
In face, it is mainly based upon that red packet gets position and red packet checks and writes off the dispersion degree of position and differentiates whether cooperation businessman is lower online and be laid with
There is red packet two dimensional code.
In above-mentioned second level, position can be checked and write off based on red packet and cooperates the pass between businessman geographic location
System, determines off-line transaction.
It is as follows, following embodiments are shown, the method for discrimination of the off-line transaction is described in detail:
It referring to Figure 1, is a kind of implementation of the method for discrimination of off-line transaction shown in one exemplary embodiment of this specification
Example flow chart, this method may comprise steps of:
Step 102: the red packet for obtaining specified businessman, which checks and writes off data and the red packet and checks and writes off the corresponding red packet of data, gets data,
Wherein, it includes that identical red packet identifies that red packet, which is checked and write off the corresponding red packet of data and got in data,.
In this specification embodiment, the data that scanning input red packet two dimensional code is got this behavior of red packet generation are referred to as red
Packet gets data, and scanning input two dimensional code is paid, and is known as when payment using the data for having this behavior of red packet to generate
Red packet checks and writes off data, and every generation single pass red packet two dimensional code gets red packet behavior as a result, will generate a red packet and gets number
According to every generation single pass two dimensional code is paid, and will be generated a red packet using there is red packet behavior when payment and checked and write off data.
In this specification embodiment, it may include: that red packet identifies, red packet gets position, red that red packet, which gets data at least,
Packet gets moment, the red packet amount of money etc..
Wherein, red packet mark can be used for one red packet of unique identification, can be by red packet code value and red packet number two parts group
At for example, red packet is identified as " C0001 ", wherein " C0 " is red packet code value, and " 001 " is red packet number, and red packet code value can
The referred to as code value of red packet two dimensional code, that is to say, that same by scanning if different user or same user are in different time
The red packet that red packet two dimensional code is got red packet code value having the same, and numbered with different red packets, for example, two differences
User is identified as " C0002 ", " C0003 " by scanning same red packet two dimensional code, the red packet for the red packet respectively got;And it is same
User or different user, which pass through the red packet that the different red packet two dimensional code of scanning is got, then has different red packet code values, example
Such as, the different red packet two dimensional code of twice sweep before and after same user, the red packet for the red packet got, which identifies, is respectively
“C0001”、“D0001”。
In this specification embodiment, it at least may include: that Receiving information, red packet check and write off position, red packet that red packet, which checks and writes off data,
Check and write off moment, red packet mark etc..
Wherein, red packet mark is then used to indicate used red packet when user's payment.
Seen from the above description, if must there is red packet to get behavior namely red packet core before in payment using there is red packet
Pin data must be corresponding with a red packet and get data, and correspondence mentioned here can then embody are as follows: it is right with it that red packet checks and writes off data
It includes that identical red packet identifies that the red packet answered, which is got in data,.
In this specification embodiment, using one of cooperation businessman as specifying businessman, when available specified
Between the red packet of the specified businessman checks and writes off data and the red packet in section, such as in June 21 0:00 to this period of 0:00 on June 23
It checks and writes off the corresponding red packet of data and gets data.Wherein it is possible to check and write off Receiving information and specified businessman in data by red packet
Receiving information, at the appointed time all red packets in section, which are checked and write off, filters out the red packet of the specified businessman and checks and writes off data in data,
Namely when this is specified and pays in businessman, generated red packet checks and writes off data, then identifies acquisition red packet according to red packet and checks and writes off
The corresponding red packet of data gets data.
Step 104: determine red packet check and write off the red packet in data check and write off position red packet corresponding with its get it is red in data
Packet gets the dispersion degree of position.
It is available to arrive multiple geographical locations including more by executing above-mentioned steps 102 in this specification embodiment
A red packet checks and writes off position, multiple red packets get position.
In this step, then clustering algorithm can be used, such as K- CENTER ALGORITHM is grouped multiple geographical location,
Final group result is obtained, as clustering algorithm is used, obtains the detailed process of the final group result, art technology
Personnel may refer to description in the related technology, this is no longer described in detail in this specification embodiment.
It is subsequent, it can be based on group result, obtain the difference parameter for indicating difference situation between each grouping, such as
Gini coefficient, comentropy etc. determine the discrete system for indicating dispersion degree according to the difference parameter and the number of grouping in turn
Number illustrates, coefficient of dispersion is bigger first, indicates that dispersion degree is bigger, conversely, coefficient of dispersion is smaller, indicates that dispersion degree is smaller.
In one embodiment, coefficient of dispersion can be calculated by following formula (one), for convenience, by coefficient of dispersion
It is denoted as k.
K=100*p*x formula (one)
In above-mentioned formula (one), p indicates difference parameter, calculates above-mentioned difference as according to obtained each grouping
Parameter, such as Gini coefficient, the detailed process of comentropy, those skilled in the art may refer to description in the related technology, this
This is no longer described in detail in specification embodiment.
X in above-mentioned formula (one) can then be determined by the number of obtained grouping, for example, as described in Table 1, being
A kind of example of x is determined according to the number of grouping:
Table 1
By above-mentioned formula (one) i.e. table 1 it is found that coefficient of dispersion is positively correlated with difference parameter and grouping number, that is, poor
Different parameter is bigger, and coefficient of dispersion is bigger, i.e., dispersion degree is bigger;Grouping number is more, and coefficient of dispersion is bigger, i.e., dispersion degree is got over
Greatly.
Step 106: imposing a condition if dispersion degree meets first, it is determined that red packet two dimension is equipped under specified businessman is online
Code.
By above-mentioned associated description it is found that if dispersion degree is smaller, then it represents that each geographical location is more concentrated, thus the specified quotient
The probability that family is equipped with red packet two dimensional code on line is also bigger, and dispersion degree is smaller, then it is smaller to correspond to coefficient of dispersion, is based on
This can be set as coefficient of dispersion for first and be less than preset coefficient threshold in this specification embodiment, that
, if calculated coefficient of dispersion is less than the coefficient threshold in step 104, can determine be equipped under specified businessman is online it is red
Packet two dimensional code.
Step 108: checking and writing off data for any bar red packet, the red packet in data is checked and write off according to red packet and checks and writes off position and specifies
The geographical location of businessman determines that the red packet checks and writes off whether data meet the second setting condition, if meeting second setting condition,
Determine that the red packet checks and writes off data and results from off-line transaction.
In this specification embodiment, data can be checked and write off for any bar red packet, calculate the red packet and check and write off in data
Red packet check and write off the distance between position and the geographical location of specified businessman.
In one embodiment, the standard deviation between each distance can be calculated, using the standard deviation as acceptable inclined
Distance is moved, i.e., acceptable red packet checks and writes off the distance between position and the geographical location of specified businessman.
It is subsequent, then data can be checked and write off for any bar red packet, determine that its red packet checks and writes off the geography of position and specified businessman
Whether the distance between position meets the second setting condition, second setting condition are as follows: distance is less than standard deviation, i.e. actual distance
In receivable distance range, if meeting second setting condition, which can be checked and write off to data and be determined as online
It is generated when lower transaction.
It should be noted that the above-mentioned described standard deviation calculated between each distance, as just citing, in reality
In the application of border, other parameters can also be calculated, such as calculate the average value between each distance, using the average value as can
The offset distance of receiving, this specification embodiment to this with no restriction.
Technical solution provided by this specification embodiment, the red packet by obtaining specified businessman check and write off data and red packet core
The corresponding red packet of pin data gets data, determines that red packet checks and writes off the red packet in data and checks and writes off position red packet corresponding with its and gets number
Red packet in gets the dispersion degree of position;It imposes a condition if the dispersion degree meets first, it is determined that specified businessman is online
Under be equipped with red packet two dimensional code;Data are checked and write off for any bar red packet, the red packet in data is checked and write off according to the red packet and checks and writes off position
It determines that red packet checks and writes off whether data meet the second setting condition with the geographical location of specified businessman, imposes a condition if meeting second,
It then determines that red packet checks and writes off data and results from off-line transaction, may be implemented in many transaction data, the friendship that off-line transaction is generated
Easy data screening comes out, and assesses the marketing effectiveness based on scene under line to improve the subsequent transaction data generated based on off-line transaction
Accuracy.
Corresponding to above method embodiment, this specification embodiment also provides a kind of discriminating gear of off-line transaction, please join
See Fig. 2, is a kind of embodiment block diagram of the discriminating gear of off-line transaction shown in one exemplary embodiment of this specification, the device
It may include: data acquisition module 210, dispersion degree determining module 220, the first determining module 230, the second determining module 240.
Wherein, data acquisition module 210, the red packet that can be used for obtaining specified businessman checks and writes off data and the red packet is checked and write off
The corresponding red packet of data gets data, wherein it includes identical that the red packet, which is checked and write off the corresponding red packet of data and got in data,
Red packet mark;
Dispersion degree determining module 220 is determined for the red packet that the red packet is checked and write off in data and checks and writes off position and its
Corresponding red packet gets the dispersion degree that the red packet in data gets position;
First determining module 230 imposes a condition, it is determined that described specified if can be used for the dispersion degree and meet first
Red packet two dimensional code is equipped under businessman is online;
Second determining module 240 can be used for checking and writing off data for red packet described in any bar, check and write off number according to the red packet
The geographical location that red packet in checks and writes off position and the specified businessman determines that the red packet checks and writes off data and whether meets second and sets
Fixed condition imposes a condition, it is determined that the red packet checks and writes off data and results from off-line transaction if meeting described second.
In one embodiment, the dispersion degree determining module 220 may include (being not shown in Fig. 2):
Submodule is clustered, checks and writes off position and its correspondence for checking and writing off the red packet in data to the red packet using clustering algorithm
Red packet get the red packet in data and get position and be grouped;
Difference parameter determines submodule, for determining the difference for indicating difference situation between obtained each grouping
Parameter;
Coefficient of dispersion determines submodule, determines for the number according to the difference parameter and obtained grouping and is used for table
Show the coefficient of dispersion of dispersion degree.
In one embodiment, first setting condition includes at least:
The coefficient of dispersion is less than preset coefficient threshold.
In one embodiment, the difference parameter is at least following one of them:
Comentropy, Gini coefficient.
In one embodiment, described device can also include (being not shown in Fig. 2):
Distance calculation module calculates the red packet and checks and writes off in data for checking and writing off data for red packet described in any bar
Red packet check and write off the distance between the geographical location of position and the specified businessman;
Standard deviation computing module, for calculating the standard deviation between each distance;
Second determining module is specifically used for, and checks and writes off the red packet in data according to the standard deviation, the red packet and checks and writes off
Position and the geographical location of the specified businessman determine that the red packet checks and writes off whether data meet the second setting condition.
In one embodiment, second setting condition includes at least:
Red packet checks and writes off the red packet in data and checks and writes off the distance between position and the geographical location of the specified businessman less than institute
State standard deviation.
It is understood that data acquisition module 210, dispersion degree determining module 220, the first determining module 230, and
Module of second determining module 240 as four kinds of functional independences, both can configuration in a device, can also be with simultaneously as shown in Figure 2
It individually configures in a device, therefore structure shown in Fig. 2 should not be construed as the restriction to this specification example scheme.
In addition, the function of modules and the realization process of effect are specifically detailed in the above method corresponding step in above-mentioned apparatus
Rapid realization process, details are not described herein.
This specification embodiment also provides a kind of computer equipment, includes at least memory, processor and is stored in
On reservoir and the computer program that can run on a processor, wherein processor is realized under line above-mentioned when executing described program
The method of discrimination of transaction.This method includes at least: the red packet for obtaining specified businessman checks and writes off data and the red packet checks and writes off data pair
The red packet answered gets data, wherein it includes identical red packet in data that the red packet, which is checked and write off the corresponding red packet of data and got,
Mark;It determines that the red packet checks and writes off the red packet in data and checks and writes off the red packet that position red packet corresponding with its is got in data and gets position
The dispersion degree set;It imposes a condition if the dispersion degree meets first, it is determined that be equipped under the specified businessman is online red
Packet two dimensional code;Data are checked and write off for red packet described in any bar, the red packet in data is checked and write off according to the red packet and checks and writes off position and institute
The geographical location for stating specified businessman determines that the red packet checks and writes off whether data meet the second setting condition, sets if meeting described second
Fixed condition, it is determined that the red packet checks and writes off data and results from off-line transaction.
Fig. 3 shows one kind provided by this specification embodiment and more specifically calculates device hardware structural schematic diagram,
The equipment may include: processor 310, memory 320, input/output interface 330, communication interface 340 and bus 350.Wherein
Processor 310, memory 320, input/output interface 330 and communication interface 340 between the realization of bus 350 by setting
Standby internal communication connection.
Processor 310 can use general CPU (Central Processing Unit, central processing unit), micro process
Device, application specific integrated circuit (Application Specific Integrated Circuit, ASIC) or one or
The modes such as multiple integrated circuits are realized, for executing relative program, to realize technical solution provided by this specification embodiment.
Memory 320 can use ROM (Read Only Memory, read-only memory), RAM (Random Access
Memory, random access memory), static storage device, the forms such as dynamic memory realize.Memory 320 can store
Operating system and other applications are realizing technical solution provided by this specification embodiment by software or firmware
When, relevant program code is stored in memory 320, and execution is called by processor 310.
Input/output interface 330 is for connecting input/output module, to realize information input and output.Input and output/
Module can be used as component Configuration and (be not shown in Fig. 3) in a device, can also be external in equipment to provide corresponding function.Wherein
Input equipment may include keyboard, mouse, touch screen, microphone, various kinds of sensors etc., output equipment may include display,
Loudspeaker, vibrator, indicator light etc..
Communication interface 340 is used for connection communication module (being not shown in Fig. 3), to realize the communication of this equipment and other equipment
Interaction.Wherein communication module can be realized by wired mode (such as USB, cable etc.) and be communicated, can also be wirelessly
(such as mobile network, WIFI, bluetooth etc.) realizes communication.
Bus 350 includes an access, in various components (such as the processor 310, memory 320, input/output of equipment
Interface 330 and communication interface 340) between transmit information.
It should be noted that although above equipment illustrates only processor 310, memory 320, input/output interface
330, communication interface 340 and bus 350, but in the specific implementation process, which can also include realizing to operate normally
Necessary other assemblies.In addition, it will be appreciated by those skilled in the art that, it can also be only comprising realizing in above equipment
Component necessary to this specification example scheme, without including all components shown in figure.
This specification embodiment also provides a kind of computer readable storage medium, is stored thereon with computer program, the journey
The method of discrimination of off-line transaction above-mentioned is realized when sequence is executed by processor, this method includes at least: obtaining the red of specified businessman
Packet checks and writes off data and the red packet checks and writes off the corresponding red packet of data and gets data, wherein it is corresponding that the red packet checks and writes off data
Red packet get in data include identical red packet identify;Determine that the red packet checks and writes off that the red packet in data checks and writes off position and its is right
The red packet answered gets the dispersion degree that the red packet in data gets position;It imposes a condition if the dispersion degree meets first,
It determines and is equipped with red packet two dimensional code under the specified businessman is online;Data are checked and write off for red packet described in any bar, according to described red
Packet checks and writes off the red packet in data and checks and writes off the geographical location of position and the specified businessman determine whether the red packet checks and writes off data full
Foot second imposes a condition, and imposes a condition if meeting described second, it is determined that the red packet checks and writes off data and results from off-line transaction.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method
Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data.
The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves
State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable
Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM),
Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices
Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates
Machine readable medium does not include temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
As seen through the above description of the embodiments, those skilled in the art can be understood that this specification
Embodiment can be realized by means of software and necessary general hardware platform.Based on this understanding, this specification is implemented
Substantially the part that contributes to existing technology can be embodied in the form of software products the technical solution of example in other words,
The computer software product can store in storage medium, such as ROM/RAM, magnetic disk, CD, including some instructions are to make
It is each to obtain computer equipment (can be personal computer, server or the network equipment etc.) execution this specification embodiment
Method described in certain parts of a embodiment or embodiment.
System, device, module or the unit that above-described embodiment illustrates can specifically realize by computer chip or entity,
Or it is realized by the product with certain function.A kind of typically to realize that equipment is computer, 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 any several equipment.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment
Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for device reality
For applying example, since it is substantially similar to the method embodiment, so describing fairly simple, related place is referring to embodiment of the method
Part explanation.The apparatus embodiments described above are merely exemplary, wherein described be used as separate part description
Module may or may not be physically separated, can be each module when implementing this specification example scheme
Function realize in the same or multiple software and or hardware.Can also select according to the actual needs part therein or
Person's whole module achieves the purpose of the solution of this embodiment.Those of ordinary skill in the art are not the case where making the creative labor
Under, it can it understands and implements.
The above is only the specific embodiment of this specification embodiment, it is noted that for the general of the art
For logical technical staff, under the premise of not departing from this specification embodiment principle, several improvements and modifications can also be made, this
A little improvements and modifications also should be regarded as the protection scope of this specification embodiment.