Specific embodiment
Many details are explained in the following description in order to fully understand this specification.But this specification energy
Enough to be implemented with being much different from other way described herein, those skilled in the art can be without prejudice to this specification intension
In the case where do similar popularization, therefore this specification is not limited by following public specific implementation.
The term used in this specification one or more embodiment be only merely for for the purpose of describing particular embodiments,
It is not intended to be limiting this specification one or more embodiment.In this specification one or more embodiment and appended claims
The "an" of singular used in book, " described " and "the" are also intended to including most forms, unless context is clearly
Indicate other meanings.It is also understood that term "and/or" used in this specification one or more embodiment refers to and includes
One or more associated any or all of project listed may combine.
It will be appreciated that though may be retouched using term first, second etc. in this specification one or more embodiment
Various information are stated, but these information should not necessarily be limited by these terms.These terms are only used to for same type of information being distinguished from each other
It opens.For example, first can also be referred to as second, class in the case where not departing from this specification one or more scope of embodiments
As, second can also be referred to as first.Depending on context, word as used in this " if " can be construed to
" ... when " or " when ... " or " in response to determination ".
In the present specification, it provides a kind of data query method, apparatus, calculate equipment and storage medium, following
It is described in detail one by one in embodiment.
Fig. 1 is to show the structural block diagram of the calculating equipment 100 according to one embodiment of this specification.The calculating equipment 100
Component include but is not limited to memory 110 and processor 120.Processor 120 is connected with memory 110 by bus 130,
Database 150 is for saving data.
Calculating equipment 100 further includes access device 140, access device 140 enable calculate equipment 100 via one or
Multiple networks 160 communicate.The example of these networks includes public switched telephone network (PSTN), local area network (LAN), wide area network
(WAN), the combination of the communication network of personal area network (PAN) or such as internet.Access device 140 may include wired or wireless
One or more of any kind of network interface (for example, network interface card (NIC)), such as IEEE802.11 wireless local area
Net (WLAN) wireless interface, worldwide interoperability for microwave accesses (Wi-MAX) interface, Ethernet interface, universal serial bus (USB) connect
Mouth, cellular network interface, blue tooth interface, near-field communication (NFC) interface, etc..
In one embodiment of this specification, unshowned other component in above-mentioned and Fig. 1 of equipment 100 is calculated
It can be connected to each other, such as pass through bus.It should be appreciated that calculating device structure block diagram shown in FIG. 1 is merely for the sake of example
Purpose, without including the limitation to this specification range.Those skilled in the art can according to need, and increases or replaces other
Component.
Calculating equipment 100 may include any kind of static or mobile computing device, including mobile computer or movement
It calculates equipment (for example, tablet computer, personal digital assistant, laptop computer, notebook computer, net book etc.), move
Mobile phone (for example, smart phone), wearable calculating equipment (for example, smartwatch, intelligent glasses etc.) or other kinds of
Mobile device, or the static calculating equipment of such as desktop computer or PC.It can also include mobile or quiet for calculating equipment 100
The only server of formula.
Wherein, processor 120 can execute the step in data query method shown in Fig. 2.Fig. 2 is shown according to this theory
The flow chart of the data query method of bright one embodiment of book, including step 202 is to step 208.
Step 202: extracting the unique identification and corresponding characteristic variable and feature of service node in business procession
Value, the unique identification, characteristic variable and characteristic value of service node are recorded.
It is described to record the unique identification, characteristic variable and characteristic value of service node in one embodiment of this specification
It include: to record the unique identification of service node and corresponding characteristic variable and characteristic value.
In practical applications, the unique identification can include but is not limited to User ID, device id or user account etc.;
The characteristic variable can include but is not limited to the customer transaction amount of money, customer transaction number etc.;The characteristic value may include but
It is not limited to number, character or Boolean.
In one embodiment of this specification, the service node includes:
History service node or current business node.
In one embodiment of this specification, in business procession, to the characteristic variable and feature of the history service node
Value is recorded, and is recorded to the characteristic variable and characteristic value of the current business node.
In one embodiment of this specification, the service node includes:
Business start node, business procedure node and/or service ending node.
The history service node includes history service start node, history service process node and/or history service knot
Shu Jiedian, the current business node include that current business start node, current business process node and/or current business terminate
Node.
In one embodiment of this specification, the characteristic variable includes:
Velocity class cumulative variations and index class query interface.
By taking payment as an example, the velocity class cumulative variations may include the day amount paid in user's past 7, calculate
The value come is the expenditure full amount that the user goes over 7 days.
In practical application, the index class query interface is to judge whether user uses credible equipment to pay debt, according to
Existing index, inputs the ID and device id of user, and output includes whether to pay debt, the value packet calculated for credible equipment
It includes 0 or 1,1 expression user and pays debt using credible equipment, 0 indicates that user pays debt using untrusted devices.
In practical application, velocity class cumulative variations can be set according to actual needs with index class query interface
It sets, this specification is not limited in any way this.
In one embodiment of this specification, the index class query interface includes:
Static number strong point query interface and reflux class index query interface.
Static number strong point query interface may include opening the card time for income card, the reflux class index query interface
It may include the characteristic variable pushed offline.
In one embodiment of this specification, it is described by the characteristic variable of service node and characteristic value carry out record include:
The characteristic variable of the service node and characteristic value are recorded in feature snapshot table.
Wherein, the feature snapshot table may include multiple feature snapshot tables, when the feature of feature snapshot table record
Variable and characteristic value reach the feature snapshot table record upper limit, and also Unrecorded characteristic variable and characteristic value are recorded in next spy
It levies in snapshot table, the characteristic variable of the service node and characteristic value is all recorded in feature snapshot table.
By user for carrying out online shopping on the net, feature is recorded in by the characteristic variable of the service node and characteristic value
It is described in detail in snapshot table.
User submit order, at this time submit order process in characteristic variable and characteristic value carry out being recorded in feature snapshot
In table, when user-pay, in course of payment at this time characteristic variable and characteristic value be recorded in feature snapshot table.Wherein
The characteristic variable may include the amount paid that user goes over 7 days, and characteristic value at this time includes all gold of user 7 days expenditures
The value of volume.Amount of money number when order is submitted to be recorded in corresponding feature snapshot table user, amount of money number when by user-pay
It is recorded in corresponding feature snapshot table.
Step 204: being stored by characteristic variable and characteristic value of the major key to the service node of the unique identification.
It is major key by the characteristic variable and feature of the service node using the unique identification in one embodiment of this specification
Value carries out storage
The feature snapshot table is stored in distributed memory system database using the unique identification as major key.
It is described to be stored in distribution by characteristic variable and characteristic value of the major key to the service node of the unique identification
In storage system (Hbase) database, the distributed memory system can store mass data, and in the storage of each data
Generate corresponding timestamp, so as to it is subsequent storing data is inquired when can reach more accurate according to the timestamp
Inquiry, such as timestamp is 8:00 when storage, it is corresponding directly accurately can to inquire 8:00 according to the timestamp in inquiry
Whole storing datas.
Step 206: receiving report information, unique identification to be checked is determined according to the report information.
In one embodiment of this specification, the reception report information determines to be checked unique according to the report information
Mark includes receiving report information, and unique identification to be checked is obtained according to the report information.
Step 208: characteristic variable and spy using the unique identification to be checked as major key, from the service node stored
It is inquired in value indicative, and using the characteristic value inquired as return value.
It is described using the unique identification to be checked as major key in one embodiment of this specification, from the business section stored
Inquiry is carried out in the characteristic variable and characteristic value of point includes:
The unique identification to be checked is assigned to interface variables, by interface variables from the distributed memory system
Query characteristics variable and characteristic value in database.
By taking certain online shopping event of user's report as an example, to the feature by the interface variables from the service node stored
Inquiry is carried out in variable and characteristic value to be described in detail.It is recorded in feature snapshot table when according to customer transaction number to transaction
Characteristic variable is inquired with characteristic value, and the characteristic variable being recorded in feature snapshot table when to report is looked into characteristic value
It askes, using the characteristic value inquired as return value, judges whether this online shopping is swindle event according to return value.
In one embodiment of this specification, by extracting in business procession the unique identification of service node and corresponding
Characteristic variable and characteristic value record the unique identification, characteristic variable and characteristic value of service node;With the unique identification
It is stored for characteristic variable and characteristic value of the major key to the service node;Report information is received, according to the report information
Determine unique identification to be checked;Using the unique identification to be checked as major key, the unique identification to be checked is assigned to
Interface variables are inquired from the characteristic variable and characteristic value of the service node stored by the interface variables, and will
The characteristic value inquired realizes real-time query as return value, according to interface polls method, and can be with query history business
The characteristic variable and characteristic value of node improve the timeliness of data query method.
Fig. 3 is to show the data query method of one embodiment of this specification, and the data query method is to transfer accounts to debt
For be described, including step 302 is to step 314.
Step 302: creation transaction.
In one embodiment of this specification, the creation transaction includes that user transfers accounts, and creates money transfer transactions.
Step 304: being recorded in fisrt feature snapshot table.
In one embodiment of this specification, according to user create money transfer transactions, extract creation during unique identification with
And corresponding characteristic variable and characteristic value, and the unique identification and corresponding characteristic variable and characteristic value are recorded in first
In feature snapshot table, wherein the unique identification includes Transaction Identification Number 111, the characteristic variable includes customer transaction number, described
Characteristic value includes customer transaction number 10 times.
Step 306: user transfers accounts.
In one embodiment of this specification, the user, which transfers accounts, transfers accounts debt including user.
Step 308: being recorded in second feature snapshot table.
In one embodiment of this specification, according to the money transfer transactions of user, unique identification in transfer procedure and right is extracted
The characteristic variable and characteristic value answered, and the unique identification and corresponding characteristic variable and characteristic value are recorded in second feature
In snapshot table, wherein the unique identification includes Transaction Identification Number 111, the characteristic variable includes customer transaction number, the feature
Value includes customer transaction number 11 times.
Wherein, creation transaction and user transfer accounts in unique identification and corresponding characteristic variable and characteristic value can recorde
It, can also be in the spy of fisrt feature snapshot table record in the fisrt feature snapshot table or the second feature snapshot table
It, will also Unrecorded characteristic variable and characteristic value in the case that sign variable and characteristic value reach the fisrt feature snapshot table record upper limit
It is recorded in the second feature snapshot table, reaches second in the characteristic variable and characteristic value of second feature snapshot table record
In the case that feature snapshot table records the upper limit, also Unrecorded characteristic variable and characteristic value can also be recorded in next feature
In snapshot table, and so on, whole characteristic variables and characteristic value are recorded in feature snapshot table, therefore, feature is fast
Number according to table is to determine that the application does not make this according to the unique identification of record and corresponding characteristic variable and characteristic value
Any restriction.
According to the unique identification of user as major key, the fisrt feature snapshot table and the second feature snapshot table are deposited
Storage is in distributed memory system database.
Step 310: user's report.
In one embodiment of this specification, the user's report includes receiving user's report information, is believed according to user's report
Breath determines characteristic variable to be checked.
Step 312: extracting characteristic variable.
In one embodiment of this specification, the characteristic variable to be checked includes Transaction Identification Number of the user when this is transferred accounts.
Step 314: query characteristics variable and characteristic value.
In one embodiment of this specification, according to described using unique identification to be checked as major key, from distributed storage system
It is inquired in system database, obtains corresponding feature snapshot table, characteristic variable and characteristic value are extracted from feature snapshot table, and
Interface variables are assigned to, the interface is passed through according to the Transaction Identification Number that user provides using the characteristic value inquired as return value
Variable is inquired from the characteristic value being recorded in feature snapshot table, realizes real-time query, and the characteristic value inquired is made
It for return value, transfers accounts and tries to this, the return value is output in the model of this application, judges that this is transferred accounts
Whether it is case of victimization, when model output result is high, determines that this is transferred accounts as case of victimization, determined and compensated according to the transfer amounts of user
User's amount of money has largely ensured the financing security of user, promotes user to the trust of this platform.
In one embodiment of this specification, become in the process with the feature of service node when transferring accounts by extracting creation money transfer transactions
Amount and characteristic value, respectively by Transaction Identification Number and creation money transfer transactions when characteristic variable and characteristic value and characteristic variable when transferring accounts and
Characteristic value be recorded in fisrt feature snapshot table and in second feature snapshot table, is major key to the industry using the Transaction Identification Number
The characteristic variable of node of being engaged in and characteristic value be stored in distributed memory system database, receive user's report information, root
Transaction Identification Number to be checked is determined according to the report information;Using the Transaction Identification Number to be checked as major key, by the friendship to be checked
Easy number is assigned to interface variables, is looked into from the characteristic variable and characteristic value of the service node stored by the interface variables
It askes, and using the characteristic value inquired as return value, real-time query is realized by interface method, improves data query
Timeliness, and by unique identification be used as major key, carry out inquire storage characteristic variable and characteristic value, characteristic variable is made
It is more acurrate to the judgement of trial with characteristic variable and characteristic value more flexible, and that any time can be inquired.
Fig. 4 is to show the data query method of one embodiment of this specification, and the data query method is to shopping at network
For be described, including step 402 is to step 418.
Step 402: creation order extracts characteristic variable and characteristic value.
In one embodiment of this specification, it includes that user carries out on the net that the creation order, which extracts characteristic variable and characteristic value,
Shopping, when create order, unique identification and corresponding characteristic variable and characteristic value when extraction current business node are described
Unique identification includes Transaction Identification Number 222, and the characteristic variable includes the user account amount of money, and the characteristic value includes the user account amount of money
2000 yuan.
Step 404: user-pay extracts characteristic variable and characteristic value.
In one embodiment of this specification, the user-pay extracts characteristic variable and characteristic value includes that user passes through payment
When, the unique identification of service node and corresponding characteristic variable and characteristic value at this time are extracted, the unique identification includes transaction
Numbers 222, the characteristic variable includes the user account amount of money, and the characteristic value includes 1000 yuan of the user account amount of money, will it is described only
One mark and corresponding characteristic variable and characteristic value are recorded in feature snapshot table.
Feature according to the unique identification as major key to the characteristic variable and characteristic value when creating order and when paying the bill
The feature snapshot table that variable and characteristic value are recorded be stored in the database of distributed memory system, and the distribution is deposited
The database of storage system can store mass data, and accurately data query may be implemented.
Step 406: trading successfully, user is satisfied.
In one embodiment of this specification, customer transaction success, user is satisfied with this transaction, waits seller's delivery.
Step 408: it trades successfully, customer complaint transaction.
In one embodiment of this specification, customer transaction success, user is unsatisfied with this transaction, it is understood that there may be fraud feelings
Condition, user report this transaction according to Transaction Identification Number.
Step 410: query characteristics value and as return value tries this transaction.
In one embodiment of this specification, the inquiry characteristic value and as return value, trying this transaction includes according to user
Report information, determines characteristic variable to be checked, and the Transaction Identification Number when characteristic variable to be checked includes customer transaction will be handed over
Easy number is assigned to interface variables, the user account amount of money and User ID when by interface variables from creation order with user-pay,
Device id is inquired, and using the characteristic value inquired as return value, is judged this transaction event.
Step 412: non-fraud.
In one embodiment of this specification, by inquiring user in the characteristic variable of history service node and current business node
With characteristic value, determines that this transaction is non-fraud according to return value, carry out processing of winding up the case.
Step 414: other events.
In one embodiment of this specification, other described events include by inquiry user in history service node and current industry
The characteristic variable and characteristic value of business node determine that this transaction is other events according to return value, other described events can wrap
The events such as the violated event such as porns, gambling and drugs, feudalistic superstition or internet dating love be cheated are included, above-mentioned event is carried out to submit related portion
Door is further processed;Such as the violated event of above-mentioned porns, gambling and drugs occurs, public security department can be committed to and be further processed.
Step 416: fraud.
In one embodiment of this specification, the fraud includes by inquiry user in history service node and current industry
The characteristic variable and characteristic value of business node determine that this transaction is fraud according to return value, carry out reparation processing.
Step 418: being compensated according to user's loss.
In one embodiment of this specification, it is described according to user loss carry out reparation include that this transaction is determined according to return value
It determines that user loses property according to user's property of record for fraud, property is lost to user and is compensated, ensures and uses
The fund security at family improves the experience of user, trust of the enhancing user to platform.
In one embodiment of this specification, by extract creation order process in payment when service node unique identification with
And corresponding characteristic variable and characteristic value, characteristic variable when characteristic variable and characteristic value and payment when will create order respectively
Be recorded in feature snapshot table with characteristic value, is major key by the characteristic variable of the service node and spy using the Transaction Identification Number
Value indicative be stored in distributed memory system database, receive user's report information, according to the report information determine to
The Transaction Identification Number of inquiry;Using the Transaction Identification Number to be checked as major key, the Transaction Identification Number to be checked is assigned to interface variables, is passed through
The interface variables are inquired from the characteristic variable and characteristic value of the service node stored, and by the spy inquired
Value indicative realizes real-time query as return value, by interface method, improves the timeliness of data query, and by uniquely marking
Know and be used as major key, carry out the characteristic variable and characteristic value of inquiry storage, to characteristic variable using more flexible, and can inquire and to appoint
The characteristic variable and characteristic value at meaning moment, it is more acurrate to the judgement of trial.
Corresponding with above method embodiment, this specification additionally provides data query device embodiment, and Fig. 5 shows this
The module map of the data query device of specification one embodiment.As shown in figure 5, the device 500 includes:
Extraction module 502: it is configured as extracting the unique identification of service node and corresponding spy in business procession
Variable and characteristic value are levied, the unique identification, characteristic variable and characteristic value of service node are recorded;
Memory module 504: it is configured as using the unique identification being major key by the characteristic variable of the service node and spy
Value indicative is stored;
Receiving module 506: it is configured as receiving report information, unique mark to be checked is determined according to the report information
Know;
Enquiry module 508: it is configured as using the unique identification to be checked as major key, from the service node stored
It is inquired in characteristic variable and characteristic value, and using the characteristic value inquired as return value.
In an optional embodiment, the service node includes:
History service node and/or current business node.
In an optional embodiment, the service node includes:
Business start node, business procedure node and/or service ending node.
In an optional embodiment, the characteristic variable includes:
Velocity class cumulative variations and index class query interface.
In an optional embodiment, the index class query interface includes:
Static number strong point query interface and reflux class index query interface.
In an optional embodiment, the extraction module is configured to:
The characteristic variable of the service node and characteristic value are recorded in feature snapshot table.
In an optional embodiment, the memory module is configured to:
The feature snapshot table is stored in distributed memory system database using the unique identification as major key.
In an optional embodiment, the enquiry module is configured to:
The unique identification to be checked is assigned to interface variables, by the interface variables from the service node stored
Characteristic variable and characteristic value in inquired.
In an optional embodiment, by extracting in business procession the unique identification of service node and corresponding
Characteristic variable and characteristic value record the unique identification, characteristic variable and characteristic value of service node, with the unique identification
The characteristic variable of the service node and characteristic value are stored for major key, report information is received, according to the report information
It determines unique identification to be checked, using the unique identification to be checked as major key, becomes from the feature of the service node stored
It is inquired in amount and characteristic value, and will be unique according to the storage method using the characteristic value inquired as return value
Mark is used as major key, can be inquired with characteristic value the characteristic variable of any service node.
A kind of calculating equipment is also provided in one embodiment of this specification, including memory, processor and is stored in memory
Computer instruction that is upper and can running on a processor, the processor realize the data query side when executing described instruction
The step of method.
One embodiment of this specification also provides a kind of computer readable storage medium, is stored with computer instruction, this refers to
The step of data query method as previously described is realized when order is executed by processor.
A kind of exemplary scheme of above-mentioned computer readable storage medium for the present embodiment.It should be noted that this is deposited
The technical solution of the technical solution of storage media and above-mentioned data query method belongs to same design, the technical solution of storage medium
The detail content being not described in detail may refer to the description of the technical solution of above-mentioned data query method.
The computer instruction includes computer program code, the computer program code can for source code form,
Object identification code form, executable file or certain intermediate forms etc..The computer-readable medium may include: that can carry institute
State any entity or device, recording medium, USB flash disk, mobile hard disk, magnetic disk, CD, the computer storage of computer program code
Device, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory),
Electric carrier signal, telecommunication signal and software distribution medium etc..It should be noted that the computer-readable medium include it is interior
Increase and decrease appropriate can be carried out according to the requirement made laws in jurisdiction with patent practice by holding, such as in certain jurisdictions of courts
Area does not include electric carrier signal and telecommunication signal according to legislation and patent practice, computer-readable medium.
It should be noted that for the various method embodiments described above, describing for simplicity, therefore, it is stated as a series of
Combination of actions, but those skilled in the art should understand that, this specification is not limited by the described action sequence, because
For according to this specification, certain steps can use other sequences or carry out simultaneously.Secondly, those skilled in the art also should
Know, the embodiments described in the specification are all preferred embodiments, and related actions and modules might not all be this
Necessary to specification.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, there is no the portion being described in detail in some embodiment
Point, it may refer to the associated description of other embodiments.
This specification preferred embodiment disclosed above is only intended to help to illustrate this specification.Alternative embodiment is not
All details of detailed descriptionthe, do not limit the invention to the specific embodiments described.Obviously, according in this specification
Hold, can make many modifications and variations.These embodiments are chosen and specifically described to this specification, is in order to preferably explain this theory
The principle and practical application of bright book, so that skilled artisan be enable to better understand and utilize this specification.This
Specification is limited only by the claims and their full scope and equivalents.