CN109120586A - Method for secure transactions, terminal and the storage medium of network are incuded based on neighbours - Google Patents

Method for secure transactions, terminal and the storage medium of network are incuded based on neighbours Download PDF

Info

Publication number
CN109120586A
CN109120586A CN201810682565.0A CN201810682565A CN109120586A CN 109120586 A CN109120586 A CN 109120586A CN 201810682565 A CN201810682565 A CN 201810682565A CN 109120586 A CN109120586 A CN 109120586A
Authority
CN
China
Prior art keywords
data
field
public key
neighbours
payment
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
CN201810682565.0A
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.)
Nubia Technology Co Ltd
Original Assignee
Nubia Technology 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 Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN201810682565.0A priority Critical patent/CN109120586A/en
Publication of CN109120586A publication Critical patent/CN109120586A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/30Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy
    • 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/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3829Payment protocols; Details thereof insuring higher security of transaction involving key management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/0442Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply asymmetric encryption, i.e. different keys for encryption and decryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/56Financial cryptography, e.g. electronic payment or e-cash
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2463/00Additional details relating to network architectures or network communication protocols for network security covered by H04L63/00
    • H04L2463/102Additional details relating to network architectures or network communication protocols for network security covered by H04L63/00 applying security measure for e-commerce

Abstract

The invention discloses a kind of method for secure transactions that network is incuded based on neighbours, terminal and storage medium, this method is by expanding out the field of pay mark and public key in payment data frame to be sent in cash receiving terminal, and the field of pay mark and public key is encapsulated to payment data frame, obtain broadcast data, then broadcast data is broadcast to checkout terminal, checkout terminal is after receiving the broadcast data, extract corresponding public key, and cash receiving terminal is sent to after being encrypted according to the public key to sent payment data packet, and then cash receiving terminal is decrypted in use private key corresponding with public key, and gathering manipulation is carried out to the payment data packet after decryption.It is lower to solve the existing transaction security for incuding network based on neighbours, it may appear that phenomena such as Transaction Information leaks, the low problem of the Experience Degree of user.The invention also discloses a kind of terminal and storage mediums to substantially increase the transaction security that network is incuded based on neighbours by implementing above scheme.

Description

Method for secure transactions, terminal and the storage medium of network are incuded based on neighbours
Technical field
The present invention relates to wireless communication technology fields, more specifically to a kind of safety for incuding network based on neighbours Method of commerce, terminal and storage medium.
Background technique
With the fast development of the communication technology, existing mobile terminal all supports WiFi communication substantially, passes through WiFi technology It is in communication with each other with some other WIFI equipments, especially one kind can realize that short-range perception is logical by neighbours' sensing network Letter, such as WIFI Aware are (NAN) agreement, neighbours' sensing network, also known as adjacent locations aware services, " the periphery sense of behind Know " technology can send indivisible message in backstage continuous operation, and a variety of applications is helped to realize service discovery function.But It is that in the process of exchange currently based on neighbours' sensing network, the Transaction Information to transmission is all by the way of cleartext information It is communicated, any cipher mode, therefore the transaction security based on neighbours' sensing network is not used to the Transaction Information of transmission It is lower, it may appear that phenomena such as Transaction Information leaks can also bring property loss to user in severe case, reduce user's Experience satisfaction.
Summary of the invention
The technical problem to be solved in the present invention is that solve the existing transaction security based on neighbours' sensing network compared with It is low, it may appear that phenomena such as Transaction Information leaks, the low problem of the Experience Degree of user.For the technical problem, one kind is provided and is based on Method for secure transactions, terminal and the storage medium of neighbours' induction network.
In order to solve the above technical problems, the present invention provides a kind of method for secure transactions that network is incuded based on neighbours, it is described Based on neighbours incude network method for secure transactions include:
Obtain the number of cash receiving terminal payment data frame to be sent and the cash receiving terminal when sending payment data frame According to cipher mode, the data encryption mode includes at least pay mark and public key corresponding with the pay mark;
The data encryption mode is encapsulated into the payment data frame, broadcast data is obtained;
The broadcast data is sent to checkout terminal in a broadcast manner;
Receive the payment data packet encrypted from the checkout terminal according to the public key;
The payment data packet is decrypted using private key corresponding with the public key;
Gathering manipulation is carried out to the payment data packet after decryption, to complete transactional operation.
Optionally, described to encapsulate the data encryption mode into the payment data frame, obtaining broadcast data includes:
Extract the custom field in the payment data frame;
The custom field is divided into pay mark field and pay content field;
The pay mark is inserted into the pay mark field of the custom field;
The public key is inserted into the pay content field of the custom field;
Payment data frame after insertion is converted into broadcast data.
Optionally, length field, the length word are additionally provided between the pay mark field and pay content field Section is for identifying the total length for the public key being inserted into the pay content field.
It optionally, is the number being made of attribute identification field, length field and custom field in the payment data packet When according to frame, the payment data packet, which is decrypted, in use private key corresponding with the public key includes:
Using private key corresponding with the public key to the data content in the custom field in the payment data packet It is decrypted, obtains decrypted result, the decrypted result includes one of both balance data and payment amount data.
Optionally, when the decrypted result is balance data, the payment data packet after described pair of decryption is received Money manipulates, and includes: to complete transactional operation
Determine the current account payable amount of money of user;
Be deducted from the balance data according to the current account payable amount of money, and to the balance data after deduction into Row updates.
Optionally, when the decrypted result be payment amount data when, described pair decryption after the payment data packet into Row gathering manipulates, and includes: to complete transactional operation
Determine the current account payable amount of money of user;
Judge whether the current account payable amount of money is consistent with the payment amount data;
If so, directly carrying out gathering operation.
Further, described the embodiment of the invention also provides a kind of method for secure transactions for incuding network based on neighbours Based on neighbours incude network method for secure transactions include:
Receive the broadcast data that cash receiving terminal is sent;
Extract the pay mark in the broadcast data;
The public key in the pay content field being stored in the broadcast data is read according to the pay mark;
Payment data packet to be sent in checkout terminal is encrypted according to the public key;
Encrypted payment data packet is sent to the cash receiving terminal.
Optionally, the payment data packet is the data being made of attribute identification field, length field and custom field Frame;
It is described according to the public key to payment data packet to be sent in checkout terminal carry out encryption include: to the data Corresponding data content is encrypted in custom field in frame.
Further, the embodiment of the invention also provides a kind of terminal, the terminal includes processor, memory and communication Bus;
The communication bus is for realizing the connection communication between the processor and the memory;
The processor is for executing one or more first program stored in the memory, to realize as above-mentioned The step of described method for secure transactions that network is incuded based on neighbours;
Or,
The processor is for executing one or more second program stored in the memory, to realize as above-mentioned The step of described method for secure transactions that network is incuded based on neighbours.
Further, the embodiment of the invention also provides a kind of storage medium, the storage medium be stored with one or Multiple first programs, one or more of first programs can be executed by one or more processor, to realize as above-mentioned The step of described method for secure transactions that network is incuded based on neighbours;
Or,
The storage medium is stored with one or more the second program, and one or more of second programs can be by one A or multiple processors execute, the step of to realize the method for secure transactions as described above for incuding network based on neighbours.
Beneficial effects of the present invention:
The present invention provides a kind of method for secure transactions, terminal and storage medium that network is incuded based on neighbours, and this method is logical Cross the field that pay mark and public key are expanded out in payment data frame to be sent in cash receiving terminal, and by pay mark and public affairs The field of key is encapsulated to payment data frame, obtains broadcast data, and broadcast data is then broadcast to checkout terminal, and checkout terminal exists After receiving the broadcast data, corresponding public key is extracted, and send out after being encrypted with public key to sent payment data packet Cash receiving terminal is given, and then cash receiving terminal is decrypted in use private key corresponding with public key, and to the payment data after decryption Packet carries out gathering manipulation.It is lower to solve the existing transaction security for incuding network based on neighbours, it may appear that Transaction Information is let out Phenomena such as leakage, the low problem of the Experience Degree of user.Namely in the present invention, it is interacted between cash receiving terminal and checkout terminal Transaction data transmits again after being encrypted, and greatly improves the safety of transmission of transaction data, further reduced Transaction Information Leakage, provide guarantee for the transaction security of user, improve the experience satisfaction of user.
Detailed description of the invention
Present invention will be further explained below with reference to the attached drawings and examples, in attached drawing:
The hardware structural diagram of Fig. 1 each embodiment one optional mobile terminal to realize the present invention;
Fig. 2 is the Secure Transaction side that network is incuded based on neighbours for cash receiving terminal that first embodiment of the invention provides Method basic flow chart;
Fig. 3 is that one kind that first embodiment of the invention provides feasible encapsulates data encryption mode into payment data frame Obtain broadcast data basic flow chart;
Fig. 4 is the Secure Transaction side that network is incuded based on neighbours for checkout terminal that first embodiment of the invention provides Method basic flow chart;
Fig. 5 is a kind of method for secure transactions that network is specifically incuded based on neighbours that second embodiment of the invention provides Basic flow chart;
Fig. 6 is the structural schematic diagram for the terminal that third embodiment of the invention provides.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
In subsequent description, it is only using the suffix for indicating such as " module ", " component " or " unit " of element Be conducive to explanation of the invention, itself there is no a specific meaning.Therefore, " module ", " component " or " unit " can mix Ground uses.
Terminal can be implemented in a variety of manners.For example, terminal described in the present invention may include such as mobile phone, plate Computer, laptop, palm PC, personal digital assistant (Personal Digital Assistant, PDA), portable The branch such as media player (Portable Media Player, PMP), navigation device, wearable device, Intelligent bracelet, pedometer It holds mobile terminal of WIFI Aware technology, and number TV, desktop computer etc. and supports consolidating for WIFI Aware technology Determine terminal.
By to be illustrated for supporting the mobile terminal of WIFI Aware technology in subsequent descriptions, those skilled in the art It will be appreciated that the construction of embodiment according to the present invention can also answer other than the element for being used in particular for mobile purpose Terminal for fixed type.
Referring to Fig. 1, a kind of hardware structural diagram of its mobile terminal of each embodiment to realize the present invention, the shifting Dynamic terminal 100 may include: RF (Radio Frequency, radio frequency) unit 101, communication component 102, audio output unit 103, A/V (audio/video) input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, the components such as memory 109, processor 110 and power supply 111.It will be understood by those skilled in the art that shown in Fig. 1 Mobile terminal structure does not constitute the restriction to mobile terminal, and mobile terminal may include components more more or fewer than diagram, Perhaps certain components or different component layouts are combined.
It is specifically introduced below with reference to all parts of the Fig. 1 to mobile terminal:
Radio frequency unit 101 can be used for receiving and sending messages or communication process in, signal sends and receivees, specifically, by base station Downlink information receive after, to processor 110 handle;In addition, the data of uplink are sent to base station.In general, radio frequency unit 101 Including but not limited to antenna, at least one amplifier, transceiver, coupler, low-noise amplifier, duplexer etc..In addition, penetrating Frequency unit 101 can also be communicated with network and other equipment by wireless communication.Any communication can be used in above-mentioned wireless communication Standard or agreement, including but not limited to GSM (Global System of Mobile communication, global system for mobile telecommunications System), GPRS (General Packet Radio Service, general packet radio service), CDMA2000 (Code Division Multiple Access 2000, CDMA 2000), WCDMA (Wideband Code Division Multiple Access, wideband code division multiple access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access, TD SDMA), FDD-LTE (Frequency Division Duplexing-Long Term Evolution, frequency division duplex long term evolution) and TDD-LTE (Time Division Duplexing-Long Term Evolution, time division duplex long term evolution) etc..
Communication component 102 is configured to facilitate the communication of wired or wireless way between mobile terminal 100 and other equipment. Mobile terminal 100 can access the wireless network based on communication standard, such as WiFi, 2G or 3G or their combination.Show at one In example property embodiment, communication component 102 receives broadcast singal or broadcast from external broadcasting management system via broadcast channel Relevant information.In one exemplary embodiment, the communication component 102 further includes near-field communication (NFC) module or WIFI Aware communication module, to promote short range communication.For example, radio frequency identification (RFID) technology, infrared data can be based in NFC module Association (IrDA) technology, ultra wide band (UWB) technology, bluetooth (BT) technology and other technologies realize that WIFI Aware communicates mould Block also supports the mobile terminal of WIFI Aware technology to carry out realizing phase intercommunication by WIFI Aware (i.e. NAN agreement) with other Letter, although Fig. 1 shows communication component 102, but it is understood that, and it is not belonging to must be configured into for mobile terminal, it is complete It can according to need within the scope of not changing the essence of the invention and omit entirely, or change the specific communication mechanism of module.
In practical applications, communication component can be realized using WiFi module, and WiFi belongs to short range wireless transmission Technology, mobile terminal can help user to send and receive e-mail by WiFi module, browses webpage and access streaming video etc., it Wireless broadband internet access is provided for user.
Audio output unit 103 can be in call signal reception pattern, call mode, record mould in mobile terminal 100 When under the isotypes such as formula, speech recognition mode, broadcast reception mode, by radio frequency unit 101 or communication component 102 it is received or The audio data stored in memory 109 is converted into audio signal and exports to be sound.Moreover, audio output unit 103 Audio output relevant to the specific function that mobile terminal 100 executes can also be provided (for example, call signal receives sound, disappears Breath receives sound etc.).Audio output unit 103 may include loudspeaker, buzzer etc..
A/V input unit 104 is for receiving audio or video signal.A/V input unit 104 may include graphics processor (Graphics Processing Unit, GPU) 1041 and microphone 1042, graphics processor 1041 is in video acquisition mode Or the image data of the static images or video obtained in image capture mode by image capture apparatus (such as camera) carries out Reason.Treated, and picture frame may be displayed on display unit 106.Through graphics processor 1041, treated that picture frame can be deposited Storage is sent in memory 109 (or other storage mediums) or via radio frequency unit 101 or communication component 102.Mike Wind 1042 can connect in telephone calling model, logging mode, speech recognition mode etc. operational mode via microphone 1042 Quiet down sound (audio data), and can be audio data by such acoustic processing.Audio that treated (voice) data can To be converted to the format output that can be sent to mobile communication base station via radio frequency unit 101 in the case where telephone calling model. Microphone 1042 can be implemented various types of noises elimination (or inhibition) algorithms and send and receive sound to eliminate (or inhibition) The noise generated during frequency signal or interference.
Mobile terminal 100 further includes at least one sensor 105, such as optical sensor, motion sensor and other biographies Sensor.Specifically, optical sensor includes ambient light sensor and proximity sensor, wherein ambient light sensor can be according to environment The light and shade of light adjusts the brightness of display panel 1061, and proximity sensor can close when mobile terminal 100 is moved in one's ear Display panel 1061 and/or backlight.As a kind of motion sensor, accelerometer sensor can detect in all directions (general For three axis) size of acceleration, it can detect that size and the direction of gravity when static, can be used to identify the application of mobile phone posture (such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, percussion) etc.; The fingerprint sensor that can also configure as mobile phone, pressure sensor, iris sensor, molecule sensor, gyroscope, barometer, The other sensors such as hygrometer, thermometer, infrared sensor, details are not described herein.
Display unit 106 is for showing information input by user or being supplied to the information of user.Display unit 106 can wrap Display panel 1061 is included, liquid crystal display (Liquid Crystal Display, LCD), Organic Light Emitting Diode can be used Forms such as (Organic Light-Emitting Diode, OLED) configure display panel 1061.
User input unit 107 can be used for receiving the number or character information of input, and generate the use with mobile terminal Family setting and the related key signals input of function control.Specifically, user input unit 107 may include touch panel 1071 with And other input equipments 1072.Touch panel 1071, also referred to as touch screen collect the touch operation of user on it or nearby (for example user uses any suitable objects or attachment such as finger, stylus on touch panel 1071 or in touch panel 1071 Neighbouring operation), and corresponding attachment device is driven according to preset formula.Touch panel 1071 may include touch detection Two parts of device and touch controller.Wherein, the touch orientation of touch detecting apparatus detection user, and detect touch operation band The signal come, transmits a signal to touch controller;Touch controller receives touch information from touch detecting apparatus, and by it It is converted into contact coordinate, then gives processor 110, and order that processor 110 is sent can be received and executed.In addition, can To realize touch panel 1071 using multiple types such as resistance-type, condenser type, infrared ray and surface acoustic waves.In addition to touch panel 1071, user input unit 107 can also include other input equipments 1072.Specifically, other input equipments 1072 can wrap It includes but is not limited in physical keyboard, function key (such as volume control button, switch key etc.), trace ball, mouse, operating stick etc. It is one or more, specifically herein without limitation.
Further, touch panel 1071 can cover display panel 1061, when touch panel 1071 detect on it or After neighbouring touch operation, processor 110 is sent to determine the type of touch event, is followed by subsequent processing device 110 according to touch thing The type of part provides corresponding visual output on display panel 1061.Although in Fig. 1, touch panel 1071 and display panel 1061 be the function that outputs and inputs of realizing mobile terminal as two independent components, but in certain embodiments, it can The function that outputs and inputs of mobile terminal is realized so that touch panel 1071 and display panel 1061 is integrated, is not done herein specifically It limits.
Interface unit 108 be used as at least one external device (ED) connect with mobile terminal 100 can by interface.For example, External device (ED) may include wired or wireless headphone port, external power supply (or battery charger) port, wired or nothing Line data port, memory card port, the port for connecting the device with identification module, audio input/output (I/O) end Mouth, video i/o port, ear port etc..Interface unit 108 can be used for receiving the input from external device (ED) (for example, number It is believed that breath, electric power etc.) and the input received is transferred to one or more elements in mobile terminal 100 or can be with For transmitting data between mobile terminal 100 and external device (ED).
Memory 109 can be used for storing software program and various data.Memory 109 can mainly include storing program area The storage data area and, wherein storing program area can (such as the sound of application program needed for storage program area, at least one function Sound playing function, image player function etc.) etc.;Storage data area can store according to mobile phone use created data (such as Audio data, phone directory etc.) etc..In addition, memory 109 may include high-speed random access memory, it can also include non-easy The property lost memory, a for example, at least disk memory, flush memory device or other volatile solid-state parts.
Processor 110 is the control centre of mobile terminal, utilizes each of various interfaces and the entire mobile terminal of connection A part by running or execute the software program and/or module that are stored in memory 109, and calls and is stored in storage Data in device 109 execute the various functions and processing data of mobile terminal, to carry out integral monitoring to mobile terminal.Place Managing device 110 may include one or more processing units;Preferably, processor 110 can integrate application processor and modulatedemodulate is mediated Manage device, wherein the main processing operation system of application processor, user interface and application program etc., modem processor is main Processing wireless communication.It is understood that above-mentioned modem processor can not also be integrated into processor 110.
Mobile terminal 100 can also include the power supply 111 (such as battery) powered to all parts, it is preferred that power supply 111 Can be logically contiguous by power-supply management system and processor 110, to realize management charging by power-supply management system, put The functions such as electricity and power managed.
Although Fig. 1 is not shown, mobile terminal 100 can also be including bluetooth module etc., and details are not described herein.
Hardware configuration based on above-mentioned mobile terminal and wearable device proposes each embodiment of the method for the present invention.
First embodiment
It is lower in order to solve to solve the existing transaction security for incuding network based on neighbours, it may appear that Transaction Information is let out Phenomena such as leakage, the low problem of the Experience Degree of user.The present embodiment provides it is a kind of based on neighbours incude network method for secure transactions, For details, reference can be made to shown in Fig. 2 for the method for secure transactions based on neighbours' induction network:
S201: cash receiving terminal payment data frame and its data when sending payment data frame to be sent are obtained and is added Close mode.
It is understood that a side of the cash receiving terminal as gathering, a side of the checkout terminal as payment.It should be specific It is that method for secure transactions provided in an embodiment of the present invention is suitable for various terminals, such as portable terminal, wearable device, this is worn The formula equipment of wearing specifically includes existing common bracelet and flexible screen bracelet, or even can also be the mobile terminal that can be dressed, But these terminals are all based on neighbours and incude the equipment that network technology realizes communication.It should also be noted that, the present invention is implemented Example provides method for secure transactions and is suitable for the arbitrary means of payment, such as wechat payment, Alipay payment, payment by using short messages.
In the present embodiment, payment data frame is mainly used for providing the cipher mode of payment data for checkout terminal, I other words then needing to get cash receiving terminal requirement when checkout terminal is wanted to realize that transaction data is in communication with each other with cash receiving terminal Rule of communication is specifically exactly the data encryption mode of cash receiving terminal requirement to encrypt to payment data.
It is understood that data encryption mode includes at least pay mark and public key, wherein pay mark is mainly used In data content type of the traffic sign placement in payment data frame, such as pay mark mark public key mark, then it is public in write-in After key mark, write-in is public key content corresponding with public key mark, which is used for whole to cash receiving terminal and payment The transaction data of interaction is encrypted between end.
S202: data encryption mode is encapsulated into payment data frame, broadcast data is obtained.
Firstly, it is necessary to explanation, the composed structure of payment data frame are as follows: Attribute ID+Length+ Attribute Body Field, wherein Attribute Body Field field is customized field.It is understood that The data encryption mode is encapsulated into the pay mark referred to by data encryption mode and public key corresponding with the pay mark It is respectively written into Attribute Body Field field, and during write-in, it is necessary first to be made by oneself original Adopted field carries out fractionation expansion, expands out pay mark field and pay content field, pay mark and with the pay mark pair In corresponding two fields being written to after expanding of the public key answered, to obtain broadcast data.Specifically, the lattice of payment data frame Formula are as follows: Attribute ID+Length+Sub ID+Variable, it is pay mark field that wherein Sub ID is corresponding, is passed through Sub ID provides the information particular content being written in Variable, and in the present embodiment, Sub ID write-in is public key mark, Specific public key content is written in corresponding Variable, identifies for example, setting number 0 as public key, then corresponding in the position Sub ID Upper write-in number 0, is then written specific public key in the position Variable;Or set number 1 and identified as public key, then it is corresponding Number 1 is written on the position Sub ID, specific public key is then written in the position Variable.It is worth noting that, here It is only to be illustrated with example, in practical applications, flexible setting is carried out according to experiment or experience by developer, while can be with Understand, the difference of payment data frame and broadcast data is the variation of data content and data structure.
In some other embodiment, extraction for the ease of checkout terminal to the broadcast data received can also be By in data encryption mode pay mark and public key corresponding with the pay mark be respectively written into the process of custom field In, original custom field is subjected to fractionation expansion, successively expands out pay mark field, length field and pay content word Section, i.e., split again between pay mark field and pay content field and expand out length field, and the length field is for identifying The total length for the public key being inserted into pay content field, specifically, payment data frame format: Attribute ID+Length+ Sub ID+Sub lenth+Variable。
In the present embodiment, data encryption mode is encapsulated into payment data frame, obtains broadcast data, include at least with Lower step, for details, reference can be made to shown in Fig. 3:
S301: custom field is extracted from payment data frame.
It is understood that extracting custom field Attribute Body Field from payment data frame.
S302: custom field is divided into pay mark field and pay content field.
In order to better understand the present invention, here custom field Attribute Body Field is divided into payment It is illustrated for identification field Sub ID and pay content field Variabl.
It is understood that the total length of pay mark field, pay content field the two fields after dividing with from The equal length of field is defined, and the content in two fields after expanding in pay content field should be according to pay mark word Content in section obtains, for example the pay mark field in the present invention is public key mark, then being public key in pay mark field After mark, must correspond to write-in in pay content field is public key content.
S303: pay mark is inserted into the pay mark field in custom field.
In the present embodiment, pay mark field is specially public key mark, and public key mark is inserted into customized word at this time In pay mark field Sub ID in section Attribute Body Field.
S304: public key is inserted into the pay content field in custom field.
The corresponding specific public key content of public key mark is further inserted into custom field by example in undertaking In pay content field Variable in Attribute Body Field.
S305: the payment data frame after insertion is converted into broadcast data.
Payment data frame after insertion is further converted to broadcast data, specifically, broadcast data by example in undertaking Frame format be Attribute ID+Length+Sub ID+Variable, it is to be understood that Sub ID corresponds to public key mark Know, Variable corresponds to public key content.
S203: broadcast data is sent to checkout terminal in a broadcast manner.
It is understood that in the present embodiment, it, specifically can be by cash receiving terminal when broadcasting broadcast data Communication module realize broadcast, certainly in other embodiments, can also be by the gateway that is connect with cash receiving terminal or wide Equipment is broadcast to realize.As long as in fact, being able to achieve broadcast data in a manner of broadcast transmission to checkout terminal in the present invention Protection scope in, the present invention is not specifically limited in this embodiment.
S204: it receives and carrys out the payment data packet that self check-out terminal is encrypted according to public key.
In the present embodiment, cash receiving terminal also receives the payment data packet for carrying out self check-out terminal, it is to be understood that the branch Paying data packet is that checkout terminal gets public key from the broadcast data that cash receiving terminal is sent, and according to the public key to payment data Packet carries out encrypted.
S205: payment data packet is decrypted using private key corresponding with public key.
It will be clear that in practical applications, there is the setting of public key, that corresponding generation for requiring private key, Cash receiving terminal is able to achieve the encrypted payment data received is decrypted.In the present embodiment, the Encryption Algorithm of use It is realized with decipherment algorithm is the asymmetrical Encryption Algorithm of selection, specifically, encapsulating by data encryption mode to payment data After in frame, it is also necessary to determine corresponding private key according to the corresponding Encryption Algorithm of public key, and be stored on cash receiving terminal, that is to say Say while obtaining public key according to Encryption Algorithm, can also export a corresponding private key, the private key be only cash receiving terminal from Oneself knows, when cash receiving terminal receives the payment data packet that checkout terminal is encrypted by the public key that the Encryption Algorithm obtains When, the private key for directlying adopt preservation is decrypted.
In this step, payment data packet is specially to be made of attribute identification field, length field and custom field Data frame, and the format of the data frame can be using existing frame format, be also possible to the frame after expanding in the present invention Format.
In the present embodiment, when payment data packet being decrypted, specifically to right in the custom field in data frame The data content answered is decrypted.When data frame is using existing data frame format: Attribute ID+Length+ When Attribute Body Field, then the data content in Attribute Body Field byte is solved using private key It is close;Data frame format after data frame is expanded using the present invention: Attribute ID+Length+Sub ID+Sub When lenth+Variable or Attribute ID+Length+Sub ID+Variable, by Sub ID mark from Data type in Variable reads the content according to public key encryption, and then it is decrypted using private key.
S206: gathering manipulation is carried out to the payment data packet after decryption, to complete transactional operation.
In the present embodiment, gathering manipulation is carried out to the payment data packet after decryption, is included at least with completing transactional operation Following two situation:
The first situation determines the current account payable amount of money of user, root when the decrypted result obtained after decryption is balance data It is deducted from balance data according to the current account payable amount of money, and the balance data after deduction is updated.
In order to better understand the present invention, it is illustrated here with an example, for example, setting the current account payable amount of money as A Member, while setting and the data content in the custom field in payment data packet is decrypted using private key, obtained remaining sum number According to for B member, current account payable amount of money A member is deducted from balance data B member at this time, if the balance data after being deducted is C first, Balance data B member before the balance data C member replacement after deduction is deducted at this time, namely the balance data after deduction is carried out more Newly.It is worth noting that, while being deducted from balance data according to the current account payable amount of money, necessarily including cash receiving terminal Gathering operation, the two is the process being performed simultaneously.
Second situation when the decrypted result obtained after decryption is payment amount data, determines the current account payable gold of user Whether consistent with payment amount data volume judges the current account payable amount of money, if so, directly carrying out gathering operation.
In order to better understand the present invention, be still illustrated here with an example, for example, set the current account payable amount of money as D member, while setting and the data content in the custom field in payment data packet is decrypted using private key, obtained payment gold Current account payable amount of money D member is compared by specified number with payment amount K member at this time according to being K member, judges whether the two is identical, if Current account payable amount of money D member is identical as payment amount K member, directly carries out gathering operation at this time.
It will be clear that when above-mentioned two situations are all completed gathering and are operated, just represent this transactional operation at Function.It is worth noting that, above-mentioned to be by balance data and payment amount data of decrypted result respectively be explanation that example carries out, The present invention is simultaneously confined to both decrypted results, in practical applications, need to be done according to specific decrypted result to transactional operation suitable It should adjust.
It is lower in order to solve the existing transaction security based on neighbours' sensing network, it may appear that Transaction Information leakage etc. is existing As the low problem of the Experience Degree of user.The present embodiment also provides a kind of method for secure transactions that network is incuded based on neighbours, the base In neighbours incude network method for secure transactions for details, reference can be made to shown in Fig. 4:
S401: the broadcast data that cash receiving terminal is sent is received.
It is understood that including in the pay mark field expanded out by cash receiving terminal and payment in the broadcast data Hold field, and is respectively written into public key mark and public key content in pay mark field and pay content field.
S402: the pay mark in broadcast data is extracted.
Example in undertaking further carries out analysis identification to the broadcast data, identifies correspondence from broadcast data first Pay mark field, pay mark is extracted from pay mark field, pay mark is specially public key in the present embodiment Mark.
S403: the public key in the pay content field being stored in broadcast data is read according to pay mark.
Example in undertaking, further, determine the pay mark it is specific it is corresponding be public key mark when, read public key mark Corresponding next field contents, i.e. public key content in reading broadcast data in pay content field.
In this step, when being additionally provided between pay mark field and pay content field in the broadcast data extracted When length field, checkout terminal first obtains the information in length field before reading public key content, determines reading in next step The byte length of public key content finally reads public key content according to byte length.
S404: payment data packet to be sent in checkout terminal is encrypted according to public key.
In this step, payment data packet is specially to be made of attribute identification field, length field and custom field Data frame, or the data frame set formed with the data frame, and the format of the data frame can be using existing frame lattice Formula is also possible to the frame format after expanding in the present invention.
In the present embodiment, when being encrypted to payment data packet, specifically to the customized word being set in data frame Corresponding data content is encrypted in section.When data frame is using existing data frame format: Attribute ID+ When Length+Attribute Body Field, then Attribute Body will be written to according to the content of public key encryption Data content in Field byte;Data frame format after data frame is expanded using the present invention: Attribute ID+ When Length+Sub ID+Sub lenth+Variable or Attribute ID+Length+Sub ID+Variable, pass through Sub ID mark will be written in the data type in Variable according to the content of public key encryption, in this way be convenient for cash receiving terminal from Payment information is read in this data frame and is classified to payment information.
S405: encrypted payment data packet is sent to cash receiving terminal.
In the present embodiment, it can be sent by way of broadcast when sending payment data packet, a pair can also be passed through One communication link is sent.As long as in fact, being able to achieve the side that encrypted payment data packet is sent to cash receiving terminal Formula is within the scope of the invention, and the present invention is not specifically limited in this embodiment, in practical applications, by developer according to tool Body scene does adaptation adjustment.
It is understood that in the present embodiment, the public key in broadcast data that same cash receiving terminal is broadcasted is identical , it is indifferent to the quantity of checkout terminal.Certainly, in some embodiments, for the peace of payment data between days of grace terminal Quan Xing, public key content received by different checkout terminals are also possible to what different namely each checkout terminal was got Public key in broadcast data be it is different, multiple public key contents arranged side by side, Mei Gegong are specifically set in custom field Unique corresponding private key is all arranged in key content, saves into corresponding public-private key relation list, receives broadcast in checkout terminal After data, encrypted using the public key in broadcast data to sent payment data, cash receiving terminal is anti-according to checkout terminal It is fed back to the sequence number of the public key in the payment data come, searches public-private key relation list, uses local decipherment algorithm and right Payment data is decrypted in the private key answered, namely the public key that different checkout terminal encryptions use is different, and cash receiving terminal is not for It is also just different with the private key of checkout terminal decryption, the safety of payment data between checkout terminal can be made higher in this way.Value It obtains it is noted that in practical applications, being done flexibly according to concrete scene to the custom field in broadcast data by developer Setting.
The method for secure transactions provided by the invention that network is incuded based on neighbours, passes through branch to be sent in cash receiving terminal It pays in data frame and expands out the field of pay mark and public key, and the field of pay mark and public key is encapsulated to payment data Frame obtains broadcast data, and broadcast data is then broadcast to checkout terminal, and checkout terminal mentions after receiving the broadcast data Corresponding public key is taken out, and is sent to cash receiving terminal after being encrypted with public key to sent payment data packet, and then is collected money Terminal is decrypted in use private key corresponding with public key, and carries out gathering manipulation to the payment data packet after decryption.It solves The existing transaction security based on neighbours' sensing network is lower, it may appear that phenomena such as Transaction Information leaks, the Experience Degree of user Low problem.Namely in the present embodiment, after the transaction data interacted between cash receiving terminal and checkout terminal is encrypted It transmits again, greatly improves the safety of transmission of transaction data, further reduced the leakage of Transaction Information, be the transaction of user Safety provides guarantee, improves the experience satisfaction of user.Also, in the present embodiment, for different checkout terminals Different public keys is set, it is ensured that the safety of payment data between different checkout terminals further improves the body of user Test satisfaction.
Second embodiment
The present embodiment is on the basis of first embodiment, with a kind of Secure Transaction for specifically incuding network based on neighbours Present invention work is further illustrated for method, specifically may refer to Fig. 5:
This implementation is by taking the scene for carrying out fare transaction of taking transit bus as an example.
S501: cash receiving terminal payment data frame and its data when sending payment data frame to be sent are obtained and is added Close mode.
It is understood that cash receiving terminal here is in public transport when being specifically applied in public transport fare trading floor scape Cash collecting equipment, the Cash collecting equipment are the equipment for realizing communication based on neighbours' sensing network technology.
If the composed structure of the payment data frame got is specially Attribute ID+Length+Attribute Body Field, wherein Attribute Body Field field is customized field.
S502: data encryption mode is encapsulated into payment data frame, broadcast data is obtained.
Example in undertaking, further, cash receiving terminal carry out original custom field Attribute Body Field It splits and expands, specifically expand out pay mark field Sub ID, length field Sub lenth and pay content field Variable, then the pay mark in data encryption mode is written into pay mark field Sub ID, by the overall length of public key Angle value is written into length field Sub lenth, and the corresponding public key of pay mark is written to pay content field Variable In, to obtain broadcast data, namely the broadcast data obtained at this time is rule of communication signal.
S503: broadcast data is sent to checkout terminal in a broadcast manner.
Example in undertaking, further, cash receiving terminal will broadcast number in the range of the covering of its signal by way of broadcast According to being broadcasted.
It is understood that checkout terminal here is to take pubic transport when being specifically applied in public transport fare trading floor scape, And the interaction of transaction data is carried out using the cash receiving terminal on the checkout terminal and public transport, and then complete the transaction behaviour of public transport fare Make, which is also based on the equipment that neighbours' sensing network technology realizes communication.
S504: the pay mark in broadcast data is extracted.
Example in undertaking further after checkout terminal enters the signal coverage areas of cash receiving terminal, receives communication Regular signal broadcast data, and the pay mark in broadcast data is therefrom extracted, specifically from custom field Attribute Pay mark is extracted in pay mark field Sub ID in Body Field, which is public key mark.
S505: the public key in the pay content field being stored in broadcast data is read according to pay mark.
Example in undertaking, further, determine the pay mark it is specific it is corresponding be public key mark when, read length field Content in Sub lenth after the byte length for determining public key content to be read, is read in public key further according to byte length Hold.
S506: payment data packet to be sent in checkout terminal is encrypted according to public key.
It is understood that payment data packet to be sent opens payment interface in user, just generate, has when being paid The payment of the expense of this time being taken pubic transport by two dimensional code of body.
Example in undertaking, further, if payment data packet to be sent be specially by attribute identification field, length field and The data frame of custom field composition, while the format of the data frame is set using existing frame format Attribute ID+ Length+Attribute Body Field will be written to Attribute Body according to the content of public key encryption at this time In data content in Field byte.
S507: encrypted payment data packet is sent to cash receiving terminal.
Example in undertaking further will use the payment data packet after public key encryption to be sent to cash receiving terminal.
S508: payment data packet is decrypted using private key corresponding with public key.
Example in undertaking, further, when the payment data packet got is decrypted in cash receiving terminal, specifically using solution Close algorithm and private key solve corresponding data content in the custom field Attribute Body Field in data frame It is close, obtain decrypted result.
S509: gathering manipulation is carried out to the payment data packet after decryption, to complete transactional operation.
Example in undertaking, further, if using private key to the custom field Attribute Body in payment data packet Data content in Field is decrypted, and obtains balance data, if the balance data is 30 yuan, while setting current account payable gold Volume is 2 yuan, deducts 2 yuan from 30 yuan of balance data at this time, and 28 yuan of balance data after deduction are replaced to the remaining sum not deducted 30 yuan of data, complete this fare transactional operation.
It is understood that this implementation is to carry out the explanation that the scene of fare transaction carries out as example using a kind of take transit bus, In practical applications, cash receiving terminal needs that specific charging standard is combined to charge, and checkout terminal is according to actual needs to branch It pays data packet to be configured, for example, payment data packet further includes time of payment etc. namely in practical applications, specifically to sit Public transport carries out subject to the scene of fare transaction.
The method for secure transactions provided by the invention that network is incuded based on neighbours, passes through branch to be sent in cash receiving terminal It pays in data frame and expands out the field of pay mark and public key, and the field of pay mark and public key is encapsulated to payment data Frame obtains broadcast data, and broadcast data is then broadcast to checkout terminal, and checkout terminal mentions after receiving the broadcast data Corresponding public key is taken out, and is sent to cash receiving terminal after being encrypted with public key to sent payment data packet, and then is collected money Terminal is decrypted in use private key corresponding with public key, and carries out gathering manipulation to the payment data packet after decryption.It solves The existing transaction security based on neighbours' sensing network is lower, it may appear that phenomena such as Transaction Information leaks, the Experience Degree of user Low problem.Namely in embodiment, the transaction data interacted between cash receiving terminal and checkout terminal encrypted after again Transmission, greatly improves the safety of transmission of transaction data, further reduced the leakage of Transaction Information, is that the transaction of user is pacified Full property provides guarantee, improves the experience satisfaction of user.
3rd embodiment
Shown in Figure 6 the present embodiment provides a kind of terminal, terminal provided in this embodiment includes processor 601, deposits Reservoir 602 and communication bus 603.
Wherein, the communication bus 603 in the present embodiment is logical for realizing the connection between processor 601 and memory 602 Letter, processor 601 is for executing one or more first program stored in memory 602, to perform the steps of
The data of cash receiving terminal payment data frame and cash receiving terminal to be sent when sending payment data frame are obtained to add Close mode, data encryption mode include at least pay mark and public key corresponding with pay mark;
Data encryption mode is encapsulated into payment data frame, broadcast data is obtained;
Broadcast data is sent to checkout terminal in a broadcast manner;
It receives and carrys out the payment data packet that self check-out terminal is encrypted according to public key;
Payment data packet is decrypted using private key corresponding with public key;
Gathering manipulation is carried out to the payment data packet after decryption, to complete transactional operation.
Processor 601 is also used to execute one or more second program stored in memory 602, to realize following step It is rapid:
Receive the broadcast data that cash receiving terminal is sent;
Extract the pay mark in broadcast data;
The public key in the pay content field being stored in broadcast data is read according to pay mark;
Payment data packet to be sent in checkout terminal is encrypted according to public key;
Encrypted payment data packet is sent to cash receiving terminal.
It is worth noting that, not fully expounding the institute in embodiment one, two in the present embodiment in order not to burden explanation There is example, it is understood that, all examples in embodiment one, two are suitable for the present embodiment.
The present embodiment also provides a kind of storage medium, and storage medium is stored with one or more the first program, one or Multiple first programs of person can be executed by one or more processor, to realize such as the above-mentioned safety for incuding network based on neighbours The step of method of commerce;Or, storage medium is stored with one or more the second program, one or more second program can quilt One or more processor executes, to realize such as the step of the above-mentioned method for secure transactions for incuding network based on neighbours.
Terminal provided in this embodiment and storage medium can also realize a kind of peace that network is specifically incuded based on neighbours Full process of exchange:
The present embodiment is by taking the scene for going supermarket shopping to trade as an example.
Step 1: cash receiving terminal payment data frame and its data when sending payment data frame to be sent are obtained Cipher mode.
It is understood that cash receiving terminal here is Cash collecting equipment set by supermarket, it is to perceive net based on neighbours The equipment that network technology realizes communication.
If the composed structure of the payment data frame got is specially Attribute ID+Length+Attribute Body Field, wherein Attribute Body Field field is customized field.
Step 2: data encryption mode is encapsulated into payment data frame, broadcast data is obtained.
Example in undertaking, further, cash receiving terminal carry out original custom field Attribute Body Field It splits and expands, specifically expand out pay mark field Sub ID and pay content field Variable, then by data encryption side Pay mark in formula is written into pay mark field Sub ID, and the corresponding public key of pay mark is written to pay content word In section Variable, to obtain broadcast data, namely the broadcast data obtained at this time is rule of communication signal.
Step 3: broadcast data is sent to terminal in a broadcast manner.
Example in undertaking, further, cash receiving terminal will broadcast number in the range of the covering of its signal by way of broadcast According to being broadcasted.
It is understood that when being specifically applied in the scene that supermarket shopping is traded, checkout terminal here is Into supermarket shopping, and using the interaction of the terminal and the cash receiving terminal progress payment data of supermarket's setting, and then complete shopping The operation of transaction, the checkout terminal are also based on the equipment that neighbours' sensing network technology realizes communication.
Step 4: the pay mark in broadcast data is extracted.
Example in undertaking further after checkout terminal enters the signal coverage areas of cash receiving terminal, receives communication Regular signal broadcast data, and the pay mark in broadcast data is therefrom extracted, specifically from custom field Attribute Pay mark is extracted in pay mark field Sub ID in Body Field, which is public key mark.
Step 5: the public key in the pay content field being stored in broadcast data is read according to pay mark.
Example in undertaking, further, determine the pay mark it is specific it is corresponding be public key mark when, from pay content word Public key content is read in section.
Step 6: encrypted payment data packet is sent to cash receiving terminal.
Example in undertaking, further, if payment data packet to be sent be specially by attribute identification field, length field and The data frame of custom field composition, while the format of the data frame is set using the frame format Attribute ID+ after extension Length+Sub ID+Variable will be written in the data of Sub ID and Variable at this time according to the content of public key encryption Rong Zhong.
Step 7: payment data packet to be sent in terminal is encrypted according to public key.
Example in undertaking further will use the payment data packet after public key encryption to be sent to cash receiving terminal.
Step 8: payment data packet is decrypted using private key corresponding with public key.
Example in undertaking, further, when the payment data packet got is decrypted in cash receiving terminal, specifically using private Corresponding data content in the Sub ID and Variable in data frame is decrypted in key, obtains decrypted result.
Step 9: gathering manipulation is carried out to the payment data packet after decryption, to complete transactional operation.
Example in undertaking, further, if using private key to the data in the Sub ID and Variable in payment data packet Content is decrypted, and gets paid value data, if the payment amount data be 1.8 yuan, while set the current account payable amount of money as 1.8 yuan, the current account payable amount of money is identical with payment amount data at this time, and cash receiving terminal is directly collected money, and completes this purchase Object transactional operation.
Terminal provided in this embodiment, by expanding out pay mark in payment data frame to be sent in cash receiving terminal With the field of public key, and the field of pay mark and public key is encapsulated to payment data frame, obtains broadcast data, it then will broadcast For data broadcasting to checkout terminal, checkout terminal extracts corresponding public key after receiving the broadcast data, and is treated with public key The payment data packet of transmission is sent to cash receiving terminal after being encrypted, so cash receiving terminal use private key corresponding with public key into Row decryption, and gathering manipulation is carried out to the payment data packet after decryption.It realizes and is carried out between cash receiving terminal and checkout terminal Interactive transaction data transmits again after being encrypted, and greatly improves the safety of transmission of transaction data, so and the prior art It compares, the safety of terminal transaction provided in this embodiment is higher, and the experience satisfaction of user is also higher.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, method, article or the device that include a series of elements not only include those elements, and And further include other elements that are not explicitly listed, or further include for this process, method, article or device institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, method of element, article or device.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in a storage medium In (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal (can be mobile phone, computer, service Device, air conditioner or network equipment etc.) execute method described in each embodiment of the present invention.
The embodiment of the present invention is described with above attached drawing, but the invention is not limited to above-mentioned specific Embodiment, the above mentioned embodiment is only schematical, rather than restrictive, those skilled in the art Under the inspiration of the present invention, without breaking away from the scope protected by the purposes and claims of the present invention, it can also make very much Form, all of these belong to the protection of the present invention.

Claims (10)

1. a kind of method for secure transactions for incuding network based on neighbours, which is characterized in that the peace for incuding network based on neighbours Method of commerce includes: entirely
The data of cash receiving terminal payment data frame to be sent and the cash receiving terminal when sending payment data frame are obtained to add Close mode, the data encryption mode include at least pay mark and public key corresponding with the pay mark;
The data encryption mode is encapsulated into the payment data frame, broadcast data is obtained;
The broadcast data is sent to checkout terminal in a broadcast manner;
Receive the payment data packet encrypted from the checkout terminal according to the public key;
The payment data packet is decrypted using private key corresponding with the public key;
Gathering manipulation is carried out to the payment data packet after decryption, to complete transactional operation.
2. the method for secure transactions of network is incuded based on neighbours as described in claim 1, which is characterized in that described by the number It encapsulates according to cipher mode into the payment data frame, obtaining broadcast data includes:
Extract the custom field in the payment data frame;
The custom field is divided into pay mark field and pay content field;
The pay mark is inserted into the pay mark field of the custom field;
The public key is inserted into the pay content field of the custom field;
Payment data frame after insertion is converted into broadcast data.
3. the method for secure transactions of network is incuded based on neighbours as claimed in claim 2, which is characterized in that marked in the payment Length field is additionally provided between character learning section and pay content field, the length field is for identifying in the pay content field The total length of the public key of insertion.
4. the method for secure transactions as described in any one of claims 1-3 for incuding network based on neighbours, which is characterized in that in institute When to state payment data packet be the data frame being made of attribute identification field, length field and custom field, the use and institute It states public key corresponding private key and the payment data packet is decrypted and include:
The data content in the custom field in the payment data packet is carried out using private key corresponding with the public key Decryption, obtains decrypted result, the decrypted result includes one of both balance data and payment amount data.
5. the method for secure transactions of network is incuded based on neighbours as claimed in claim 4, which is characterized in that when the decryption is tied When fruit is balance data, the payment data packet after described pair of decryption carries out gathering manipulation, includes: to complete transactional operation
Determine the current account payable amount of money of user;
It is deducted from the balance data according to the current account payable amount of money, and the balance data after deduction is carried out more Newly.
6. the method for secure transactions of network is incuded based on neighbours as claimed in claim 4, which is characterized in that when the decryption is tied When fruit is payment amount data, the payment data packet after described pair of decryption carries out gathering manipulation, to complete transactional operation packet It includes:
Determine the current account payable amount of money of user;
Judge whether the current account payable amount of money is consistent with the payment amount data;
If so, directly carrying out gathering operation.
7. a kind of method for secure transactions for incuding network based on neighbours, which is characterized in that the peace for incuding network based on neighbours Method of commerce includes: entirely
Receive the broadcast data that cash receiving terminal is sent;
Extract the pay mark in the broadcast data;
The public key in the pay content field being stored in the broadcast data is read according to the pay mark;
Payment data packet to be sent in checkout terminal is encrypted according to the public key;
Encrypted payment data packet is sent to the cash receiving terminal.
8. the method for secure transactions of network is incuded based on neighbours as claimed in claim 7, which is characterized in that the payment data Packet is the data frame being made of attribute identification field, length field and custom field;
It is described according to the public key to payment data packet to be sent in checkout terminal carry out encryption include: in the data frame Custom field in corresponding data content encrypted.
9. a kind of terminal, which is characterized in that the terminal includes processor, memory and communication bus;
The communication bus is for realizing the connection communication between the processor and the memory;
The processor is for executing one or more first program stored in the memory, to realize such as claim 1-6 it is described in any item based on neighbours incude network method for secure transactions the step of;
Or,
The processor is for executing one or more second program stored in the memory, to realize such as claim 7-8 it is described in any item based on neighbours incude network method for secure transactions the step of.
10. a kind of storage medium, which is characterized in that the storage medium is stored with one or more the first program, and described one A or multiple first programs can be executed by one or more processor, as claimed in any one of claims 1 to 6 to realize The step of incuding the method for secure transactions of network based on neighbours;
Or,
The storage medium is stored with one or more the second program, one or more of second programs can by one or The multiple processors of person execute, to realize such as the described in any item Secure Transaction sides for incuding network based on neighbours claim 7-8 The step of method.
CN201810682565.0A 2018-06-27 2018-06-27 Method for secure transactions, terminal and the storage medium of network are incuded based on neighbours Pending CN109120586A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810682565.0A CN109120586A (en) 2018-06-27 2018-06-27 Method for secure transactions, terminal and the storage medium of network are incuded based on neighbours

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810682565.0A CN109120586A (en) 2018-06-27 2018-06-27 Method for secure transactions, terminal and the storage medium of network are incuded based on neighbours

Publications (1)

Publication Number Publication Date
CN109120586A true CN109120586A (en) 2019-01-01

Family

ID=64822316

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810682565.0A Pending CN109120586A (en) 2018-06-27 2018-06-27 Method for secure transactions, terminal and the storage medium of network are incuded based on neighbours

Country Status (1)

Country Link
CN (1) CN109120586A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109993532A (en) * 2019-04-03 2019-07-09 安庆师范大学 A kind of intelligent Service information-pushing method, device and terminal
CN110930143A (en) * 2019-11-21 2020-03-27 刘占飞 Electronic payment method, device and equipment
CN111429129A (en) * 2020-03-20 2020-07-17 上海依图网络科技有限公司 Service processing method and device based on identification information verification

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102905257A (en) * 2012-09-18 2013-01-30 陕西海创中盈信息技术有限公司 Intelligent-terminal-based non-contact information transmission system and transmission method thereof
CN104584602A (en) * 2012-08-29 2015-04-29 高通股份有限公司 Encrypting a service announcement message in a discovery packet
CN106507437A (en) * 2016-11-08 2017-03-15 北京小米移动软件有限公司 Smart machine networking method and device
CN107251534A (en) * 2015-02-23 2017-10-13 高通股份有限公司 The method and apparatus set for the formation of NAN data link group and data frame address
CN107258069A (en) * 2015-01-27 2017-10-17 高通股份有限公司 Group cipher declaration and distribution for data link group
US20170331696A1 (en) * 2016-05-10 2017-11-16 Motorola Mobility Llc System and method for determining a master device in a neighborhood aware network

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104584602A (en) * 2012-08-29 2015-04-29 高通股份有限公司 Encrypting a service announcement message in a discovery packet
CN102905257A (en) * 2012-09-18 2013-01-30 陕西海创中盈信息技术有限公司 Intelligent-terminal-based non-contact information transmission system and transmission method thereof
CN107258069A (en) * 2015-01-27 2017-10-17 高通股份有限公司 Group cipher declaration and distribution for data link group
CN107251534A (en) * 2015-02-23 2017-10-13 高通股份有限公司 The method and apparatus set for the formation of NAN data link group and data frame address
US20170331696A1 (en) * 2016-05-10 2017-11-16 Motorola Mobility Llc System and method for determining a master device in a neighborhood aware network
CN106507437A (en) * 2016-11-08 2017-03-15 北京小米移动软件有限公司 Smart machine networking method and device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109993532A (en) * 2019-04-03 2019-07-09 安庆师范大学 A kind of intelligent Service information-pushing method, device and terminal
CN109993532B (en) * 2019-04-03 2022-12-09 安庆师范大学 Intelligent service information pushing method and device and terminal
CN110930143A (en) * 2019-11-21 2020-03-27 刘占飞 Electronic payment method, device and equipment
CN111429129A (en) * 2020-03-20 2020-07-17 上海依图网络科技有限公司 Service processing method and device based on identification information verification

Similar Documents

Publication Publication Date Title
CN108696631A (en) Method and its electronic equipment for providing content corresponding with accessory device
CN110321790A (en) The detection method and electronic equipment of a kind of pair of resisting sample
CN107153961A (en) A kind of method of payment, paying server, trading server and readable storage medium storing program for executing
CN107527200A (en) A kind of payment management method, mobile terminal and computer-readable recording medium
CN107507007A (en) One kind pays 2 D code verification method, terminal and computer-readable recording medium
CN107885474A (en) Multi-screen terminal mobile payment control method, terminal and computer-readable recording medium
CN109739602A (en) A kind of mobile terminal wallpaper setting method and device, mobile terminal and storage medium
CN109120586A (en) Method for secure transactions, terminal and the storage medium of network are incuded based on neighbours
CN110162241A (en) A kind of message treatment method and terminal
CN109886686A (en) A kind of safe payment method, equipment and computer readable storage medium
CN110457879A (en) Object displaying method and terminal device
CN109799912A (en) A kind of display control method, equipment and computer readable storage medium
CN108241808A (en) identification code display control method, terminal and computer readable storage medium
CN107133795A (en) A kind of method, equipment and computer-readable recording medium for switching payment environment
CN109544139A (en) A kind of method of payment, terminal and readable storage medium storing program for executing
CN109828668A (en) A kind of display control method and electronic equipment
CN109544140A (en) A kind of identification code scan method, terminal and readable storage medium storing program for executing
CN109451235A (en) A kind of image processing method and mobile terminal
CN108833233A (en) Apparatus control method, terminal and computer readable storage medium
CN111028071B (en) Bill processing method and device, electronic equipment and storage medium
CN108182582A (en) A kind of method of payment, terminal and computer readable storage medium
CN111523871A (en) Payment processing method and electronic equipment
CN109068317A (en) Communication means, communication processing apparatus and computer readable storage medium
CN109121087A (en) Communication means, terminal and computer readable storage medium
CN109801061A (en) Delay in payment method, mobile terminal and storage medium

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190101