CN109933997A - A kind of automatic vending machine data interactive method, device, equipment and storage medium - Google Patents

A kind of automatic vending machine data interactive method, device, equipment and storage medium Download PDF

Info

Publication number
CN109933997A
CN109933997A CN201910121717.4A CN201910121717A CN109933997A CN 109933997 A CN109933997 A CN 109933997A CN 201910121717 A CN201910121717 A CN 201910121717A CN 109933997 A CN109933997 A CN 109933997A
Authority
CN
China
Prior art keywords
instruction
command
vending machine
automatic vending
shipment
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.)
Granted
Application number
CN201910121717.4A
Other languages
Chinese (zh)
Other versions
CN109933997B (en
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.)
Hunan Yunshu Information Technology Co Ltd
Original Assignee
Hunan Yunshu Information 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 Hunan Yunshu Information Technology Co Ltd filed Critical Hunan Yunshu Information Technology Co Ltd
Priority to CN201910121717.4A priority Critical patent/CN109933997B/en
Publication of CN109933997A publication Critical patent/CN109933997A/en
Application granted granted Critical
Publication of CN109933997B publication Critical patent/CN109933997B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Control Of Vending Devices And Auxiliary Devices For Vending Devices (AREA)

Abstract

The invention discloses a kind of automatic vending machine data interactive method, device, equipment and storage mediums, including sending command instruction to server, the command instruction includes first interface number, the first command context information and the first signing messages for verification command instruction;And receive response corresponding with the command instruction instruction from server, the response instruction includes second interface number, the second command context information and the second signing messages for verifying response instruction, the second interface number is identical as first interface number, and the second command context information is corresponding with the first command context information.It instructs to form transmission and acknowledgement mechanism by command instruction and response, and by being rebuild to the command context information in command instruction and response instruction, the signature for generating safety, improves the accuracy, stability and safety of transmission, improves the consumption impression and property safety of consumer.

Description

A kind of automatic vending machine data interactive method, device, equipment and storage medium
Technical field
The present invention relates to fields of communication technology, more particularly to a kind of automatic vending machine data interactive method, device, equipment And storage medium.
Background technique
Automatic vending machine be it is a kind of can be after consumer payment expense, 24 hourly worker of one kind for the corresponding cargo that spues automatically The automation equipment of work, it is not limited by business hours and the location of business, and consumer, which can insert notes here, pays also barcode scanning net Upper payment, automatic vending machine have been able to satisfy what consumer can buy snacks, beverage, drinks, cigarette and lottery ticket and other items at any time Demand.
Traditional automatic vending machine uses the means of payment of cash input, but the mode of pure paper coin payment is faced with identification paper Coin is true and false with some inconvenient processes of processing zero paper money etc., and also with the fast development of internet, internet payment mode becomes market Mainstream, therefore using the automatic vending machine of noncash payment type by market.Current automatic vending is all supported to interconnect The net means of payment, consumer's available handsets or other equipment with internet payment function pay expense, to obtain Want the article bought, increases the convenience that consumer buys commodity in this way, consumer is by internet on automatic vending machine The premise of purchase commodity is automatic vending machine and server is able to carry out stable data interaction, automatic vending machine and server it Between can all transmit the interaction of a large amount of message data daily, current communication network is extremely complex, how to improve automatic vending machine with The stability and safety of server-side transmission message data become to ensure the consumption impression and property safety of consumer One new problem.
Summary of the invention
For overcome the deficiencies in the prior art, the purpose of the present invention is to provide a kind of automatic vending machine data interaction sides Method, device, equipment and storage medium.It instructs to form transmission and acknowledgement mechanism by command instruction and response, improves transmission Stability, and the guarantor of communication data is carried out by generating signature to the command context information in command instruction and response instruction Shield, guarantees the accuracy, stability and safety of communication data transfer.
Technical solution used by the present invention solves the problems, such as it is:
In a first aspect, the present invention provides a kind of automatic vending machine data interactive methods, comprising the following steps:
The command instruction sent from server is received, the command instruction includes first interface number, the first command context Information and the first signing messages instructed for verification command;
Send corresponding with command instruction response instruction to server, the response instruction including second interface number, Second command context information and the second signing messages instructed for verifying response, the second interface number and first interface phase Together, the second command context information is corresponding with the first command context information.
Further, first signing messages is generated based on the first command context information, and second signing messages is based on Second command context information generates.
Further, the first command context information includes the first machine number, at the first time stamp and first information parameter; The second command context information includes the second machine number, the second timestamp and the second information parameter;Second machine number Identical as the first machine number, second timestamp stabs identical with first time.
Further, raw after the first binary-coded decimal group encryption that first signing messages is converted based on the first command context information At;It is generated after the second binary-coded decimal group encryption that second signing messages is converted based on the second command context information.First binary-coded decimal Group and the second binary-coded decimal group are respectively 16 bytes.After encrypting to the first binary-coded decimal group, take preceding 4 bytes as described first Signing messages;After encrypting to the second binary-coded decimal group, take preceding 4 bytes as second signing messages.First signature Information and second signing messages carry out encryption generation using aes algorithm.First signing messages and second label Name information is verified using aes algorithm.
Further, the first binary-coded decimal group is by first machine number, at the first time stamp and the first command context information Conversion binary-coded decimal generates respectively;The second binary-coded decimal group is by second machine number, the second timestamp and the second command context Information converts binary-coded decimal generation respectively.The first binary-coded decimal group is added by the binary-coded decimal that first machine number is converted to 5 bytes The binary-coded decimal that the first time stamp is converted to 5 bytes adds the verification of the first command context information and is converted to 5 words The binary-coded decimal of section is constituted along with the fixation binary-coded decimal of 1 byte;The second binary-coded decimal group is converted to 5 by second machine number The binary-coded decimal of a byte is converted to the binary-coded decimal of 5 bytes plus the second command context information plus second timestamp The binary-coded decimal of 5 bytes is verified and is converted to along with the fixation binary-coded decimal of 1 byte is constituted.
Further, further comprising the steps of:
Automatic vending machine receives the shipment command instruction for being used to control automatic vending machine shipment sent from server, institute Stating command instruction includes shipment command instruction;
Automatic vending machine sends shipment response instruction corresponding with the shipment command instruction, the response to server Instruction includes that shipment response instructs.
Further, it is received in the step automatic vending machine and is used to control automatic vending machine shipment from what server was sent Shipment command instruction before it is further comprising the steps of:
Automatic vending machine, which is received, orders from what server was sent for detecting the whether online on-line checking of automatic vending machine Instruction is enabled, the command instruction includes online sense command instruction;
Automatic vending machine sends on-line checking response instruction corresponding with the on-line checking command instruction to server, It is instructed when server receives the on-line checking response, then judges that the automatic vending machine is online;When server does not receive It is instructed to the on-line checking response, then judges that the automatic vending machine is offline, and execute automatic reimbursement operation, the response Instruction includes that on-line checking response instructs.
Further, shipment corresponding with the shipment command instruction is sent to server in the step automatic vending machine It is further comprising the steps of after response instruction:
Automatic vending machine execute shipment operation, and cycle through for report the shipment result command of shipment situation instruct to Server;
Server receives shipment result command instruction, judge shipment as a result, and to automatic vending machine send with it is described Shipment result command instructs corresponding shipment result response instruction;Refer to alternatively, server does not receive the shipment result command It enables, judges that automatic vending machine is offline.
Second aspect, the present invention provides a kind of automatic vending machine data interaction devices, it is characterised in that: connects including instruction Circuit module, instruction issue circuitry module and command process module, described instruction processing module is received to connect with described instruction respectively Circuit module and the electrical connection of described instruction transmitting line module are received, described instruction receiving circuit module is for receiving from service The command instruction that device is sent;Described instruction transmitting line module is used to send response corresponding with the command instruction to server Instruction.
The third aspect, the present invention provides a kind of automatic vending machine application systems, including command reception circuit module, instruction Transmitting line module, command process module and server.In the present embodiment, the server can be carried out with automatic vending machine Data interaction, the server can be transmitted response and instruct to described instruction receiving circuit module, also can receive and come from described instruction The response instruction that transmitting line module is sent.
Fourth aspect, the present invention provides a kind of automatic vending machine data interaction equipment, including at least one control to handle Device and memory for being communicated to connect at least one described control processor;The memory be stored with can by it is described at least The instruction that one control processor executes, described instruction is executed by least one described control processor, so that described at least one A control processor is able to carry out automatically vending system data interactive method as described above.
5th aspect, it is computer-readable to deposit the present invention provides a kind of automatic vending machine data interaction readable storage medium storing program for executing Storage media is stored with computer executable instructions, and the computer executable instructions are for executing computer as described above certainly Dynamic vending machine data interactive method.
The one or more technical solutions provided in the embodiment of the present invention, at least have the following beneficial effects:
The present invention uses a kind of automatic vending machine data interactive method, comprising the following steps: sends order to server and refers to It enables, the command instruction includes first interface number, the first command context information and the first A.L.S. for verification command instruction Breath;Receive response corresponding with the command instruction instruction from server, response instruction includes second interface number, the Two command context information and the second signing messages instructed for verifying response, the second interface number and first interface phase Together, the second command context information is corresponding with the first command context information.It instructs to form hair by command instruction and response Send and acknowledgement mechanism, improve the stability of transmission, and by the command context information in command instruction and response instruction again Building generates signature to carry out the protection of communication data, guarantees the accuracy, stability and safety of communication data transfer, mention The high consumption impression and property safety of consumer.
Detailed description of the invention
The invention will be further described with example with reference to the accompanying drawing.
Fig. 1 is a kind of flow chart of automatic vending machine data interactive method provided by one embodiment of the invention;
Fig. 2 is a kind of entire protocol figure of automatic vending machine data interactive method provided by one embodiment of the invention;
Fig. 3 is a kind of structural schematic diagram of automatic vending machine data interaction equipment provided by one embodiment of the invention.
Specific embodiment
Automatic vending machine be it is a kind of can be after consumer payment expense, 24 hourly worker of one kind for the corresponding cargo that spues automatically The automation equipment of work, it is not limited by business hours and the location of business, and consumer, which can insert notes here, pays also barcode scanning net Upper payment, automatic vending machine have been able to satisfy what consumer can buy snacks, beverage, drinks, cigarette and lottery ticket and other items at any time Demand.
Traditional automatic vending machine uses the means of payment of cash input, and the mode of pure paper coin payment is faced with identification bank note Some inconvenient processes such as true and false and zero paper money of processing, also with the fast development of internet, internet payment mode becomes market master Stream, therefore using the automatic vending machine of noncash payment type by market.Internet is all supported in current automatic vending The means of payment, consumer's available handsets or other equipment with internet payment function pay expense, to be thought The article bought, increases the convenience that consumer buys commodity in this way, and consumer is purchased on automatic vending machine by internet The premise for buying commodity is automatic vending machine and server is able to carry out stable data interaction, though current communication network development is fast Speed, but communication network be also it is extremely complex, can all transmit a large amount of communication data daily between automatic vending machine and server, from It moves and lacks reasonable transmission and acknowledgement mechanism when transmitting communication data between vending machine and server, and these communication datas Signature protection is also unreasonable, when encountering network fluctuation, it may occur that the situation of communication data transfer mistake, thereby executing mistake behaviour Make, affects the consumption impression and property safety of consumer.
The present invention uses a kind of automatic vending machine data interactive method, comprising the following steps: sends order to server and refers to It enables, the command instruction includes first interface number, the first command context information and the first A.L.S. for verification command instruction Breath;Receive response corresponding with the command instruction instruction from server, response instruction includes second interface number, the Two command context information and the second signing messages instructed for verifying response, the second interface number and first interface phase Together, the second command context information is corresponding with the first command context information.It instructs to form hair by command instruction and response Send and acknowledgement mechanism, improve the stability of transmission, and by the command context information in command instruction and response instruction again Building generates signature to carry out the protection of communication data, guarantees the accuracy, stability and safety of communication data transfer, mention The high consumption impression and property safety of consumer.
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right The present invention is further elaborated.It should be appreciated that described herein, specific examples are only used to explain the present invention, not For limiting the present invention.
It should be noted that each feature in the embodiment of the present invention can be combined with each other, in this hair if do not conflicted Within bright protection scope.In addition, though logical order is shown in flow charts, but in some cases, it can be with not Sequence in the module division being same as in device or flow chart executes shown or described step.
Referring to Fig.1, one embodiment of the present of invention provides a kind of automatic vending machine data interactive method, including following Step:
Step S1, receives the command instruction sent from server, and the command instruction includes first interface number, the first life Enable content information and the first signing messages for verification command instruction.
Step S2 sends response instruction corresponding with the command instruction to server, and the response instruction includes second Interface number, the second command context information and the second signing messages for verifying response instruction, the second interface number and first Interface number is identical, and the second command context information is corresponding with the first command context information.
Wherein, in the present embodiment, the command instruction further include be arranged in the command header of the command instruction front end with The order tail of the command instruction rear end is set, and command header and order tail are used to provide format about to the command instruction Beam.The response instruction is the same with the command instruction, also includes command header and order tail.The first interface number indicates instruction Type, the second interface number is identical as first interface number, for example, when first interface number be " 3000 " when, instruction type indicate For " long-range shipment ", second interface number is also " 3000 " so that it is convenient to the response instructions match command instruction.Signature is to be used for Guarantee the integrality of communication data transfer, the authentication of sender, prevent the denial in transaction from occurring, first A.L.S. For breath for carrying out effect to the command instruction, second signing messages is similar to the effect of the first signing messages, for institute It states response instruction and carries out effect.The command instruction and the data of response instruction pass with the transmission of UTF8 format compared to using The ASCLL format of system can make the use scope of automatic vending machine and service range wider using UTF8 format.In the present embodiment In step S2, the second command context information is corresponding with the first command context information, is because of the second command context information In with include identical machine number and timestamp in the first command context information.
Further, in another embodiment of the present invention, the first command context information includes the first machine number, the One timestamp and first information parameter;The second command context information includes the second machine number, the second timestamp and the Two informations parameter;Second machine number is identical as the first machine number, and second timestamp stabs identical with first time.According to The type of the command instruction, the first command context information must include the first machine number, at the first time two ginsengs such as stamp Number, first information parameter can be zero;According to the type that the response instructs, the second command context information must include the Two parameters such as two machine numbers, second timestamp, the second information parameter can be zero.
Wherein, in the present embodiment, machine number is expressed as the network numbering of automatic vending machine, carries out net to automatic vending machine Network number is conducive to server and distinguishes each automatic vending machine, avoids mistaking automatic vending machine and causing to malfunction.Timestamp table It is shown as the system time of the command instruction transmission, the second timestamp and the first command context in the second command context information are believed It is to facilitate institute in order to ensure response instruction and command instruction are consistent in the system time of transmission that the first time of breath, which stabs identical, Command instruction is stated to be matched with response instruction.In the present embodiment, when the command instruction and the response instruct nothing When the parameter that need to submit necessary information, the first information parameter and second information parameter can be zero, and the order refers to Enabling in response instruction need to include two parameters of machine number and timestamp.Such as when server needs to detect automatically When whether vending machine online, the first command context information of on-line checking command instruction be " Mid ": " 1808130043 ", " TimeSp ": " 1534173031 " } it only include machine number and timestamp, and the second command context of on-line checking response instruction is believed Breath is that { " Mid ": " 1808130043 ", " TimeSp ": " 1534173031 " } only includes machine number and timestamp.
Further, in another embodiment of the present invention, first signing messages is based on the first command context information It generates, second signing messages is generated based on the second command context information.
Further, in another embodiment of the present invention, first signing messages is based on the first command context information It is generated after first binary-coded decimal group encryption of conversion;The 2nd BCD that second signing messages is converted based on the second command context information It is generated after code character encryption.First signing messages and second signing messages carry out encryption generation using aes algorithm.Institute The first signing messages is stated to be verified using aes algorithm with second signing messages.
Signature be integrality for guaranteeing communication data transfer, sender authentication, prevent denial in transaction Occur.
Wherein, in the present embodiment, first signing messages is turned by the character string in the first command context information After alternatively, then generated with private key encryption;Second signing messages is turned by the character string in the second command context information After alternatively, then generated with private key encryption.Information parameter in first command context information and in the second command context information It is both needed to be parsed into corresponding format before calculating, such as when information parameter has price " Price ": " 2.50 ", need are first " 2.50 " " 2.50 " for being parsed into floating type are calculated again, when information parameter has public key " PubKey ": " E9AA8BF8 ", need first handle " E9AA8BF8 " is parsed into " 0xE90xAA 0x8B 0xF8 " and is calculated again.First signing messages and second signature Information public key can be used to be decrypted, and then carry out effect.In the present embodiment, preferably the first binary-coded decimal group and the second binary-coded decimal Group is respectively the character string of 16 bytes, very convenient using binary-coded decimal, can be reduced the amount of calculation of computer, preferably 16 A byte can mitigate the amount of calculation of computer, improve efficiency.After encrypting to the first binary-coded decimal group, encrypted result is taken Preceding 4 bytes are as first signing messages;After encrypting to the second binary-coded decimal group, preceding 4 bytes of encrypted result is taken to make For second signing messages, not only guarantee the reliability of encryption, but also reduce the workload of computer encryption and decryption, greatly Improve efficiency.First signing messages and second signing messages carry out encryption using aes algorithm and generate and test Card, aes algorithm can be with promising AES128, AES192 and AES256 algorithm, the preferred AES256 of the present embodiment, because of AES256 key Length longest, cipher round results are good, and the difficulty cracked is very big, can be good at protect data safety.Key be divided into private key with Public key is just encrypted using public spoon only when command instruction is application private key, when command instruction is not configured to application private key When, general private spoon is encrypted.
Further, in another embodiment of the present invention, the first binary-coded decimal group is by first machine number, first Timestamp and the first command context information convert binary-coded decimal generation respectively;The second binary-coded decimal group by second machine number, Second timestamp and the second command context information convert binary-coded decimal generation respectively.
Wherein, in the present embodiment, the first binary-coded decimal group is added by the binary-coded decimal that the first machine number is converted to 5 bytes The binary-coded decimal that stamp is converted to 5 bytes at the first time adds the verification of the first command context information and is converted to the BCD of 5 bytes Code is constituted along with the fixation binary-coded decimal of 1 byte;The second binary-coded decimal group is converted to the BCD of 5 bytes by the second machine number The binary-coded decimal that code is converted to 5 bytes plus the second timestamp adds the verification of the second command context information and is converted to 5 bytes Binary-coded decimal constitute along with the fixation binary-coded decimal of 1 byte, can guarantee the safety of signature in this way.Such as work as machine number are as follows: " 1802020002 ", timestamp are as follows: " 1511936017 ", verification and are as follows: when " 0000044751 ", then participate in encryption content Are as follows: " 0x18,0x02,0x02,0x00,0x02,0x15,0x11,0x93,0x60,0x17,0x00,0x00,0x04,0x47, 0x51,0x00 ".
It is in another embodiment of the present invention, further comprising the steps of referring to Fig. 2:
Step S300, automatic vending machine receive the shipment life for controlling automatic vending machine shipment sent from server Enable instruction.
Step S400, automatic vending machine send shipment response corresponding with the shipment command instruction to server and refer to It enables.
Wherein, in the step S300 of the present embodiment, server has had received user before sending shipment command instruction The information of payment, shipment command instruction carry out shipment operation for controlling automatic vending machine, include timestamp, machine in the instruction The parameter informations such as device number, merchandise news, the means of payment, payment amount and order number, machine number represent the automatic vending machine and exist The unique identifier of communication system, timestamp then represent the system time of instruction transmission, and merchandise news represents consumer in visitor The commodity details bought on the end of family, the means of payment represent the payment expense mode that consumer selects on the client, payment Expense mode can generate after consumer buys and pays the bill for Alipay, wechat and the software with payment function Order number.Server will send a shipment order to automatic vending machine by the wireless transmission method of 3G, 4G or Wifi etc. The instruction of instruction, transmission is received by the command reception circuit module of automatic vending machine.The structure of shipment command instruction is ###3000 $ " Slot ": " 2 ", " SKU ": " 4710088422064 ", " Price ": " 0.01 ", " PayType ": " A ", " OrderNo ": " 180813151030197 ", " Mid ": " 1808130043 ", " TimeSp ": " 1534173031 " } 1CB780B6&&&, it can be with Self defined interface number according to actual needs, the present embodiment, which preferably sets interface number " 3000 ", indicates that instruction type is " out Goods ", the command context information in shipment command instruction include machine number, timestamp, merchandise news, the means of payment, payment amount And the parameter informations such as order number, by machine number, the effect of timestamp and command context information and respectively convert binary-coded decimal, Preceding 4 bytes are taken to be signed " 1CB780B6 " after encryption.
Wherein, it in the step S400 of the present embodiment, after automatic vending machine receives shipment command instruction, is sent by instruction Circuit module selection sends a shipment response instruction to server by the wireless transmission method of 3G, 4G or Wifi etc., uses In prompt server, the instruction sent is received by automatic vending machine, and the command context information of shipment response instruction is only Include machine number and two parameter informations of timestamp.
It is in another embodiment of the present invention, further comprising the steps of referring to Fig. 2:
Step S100, successful payment, automatic vending machine is received is for detecting automatic vending machine from what server was sent No online on-line checking command instruction.
Step S200, automatic vending machine send on-line checking corresponding with the on-line checking command instruction to server Response instruction instructs when server receives the on-line checking response, then judges that the automatic vending machine is online;Work as service Device does not receive the on-line checking response instruction, then judges that the automatic vending machine is offline, and executes automatic reimbursement operation.
Wherein, in the step S100 of the present embodiment, for consumer by client successful payment, client can be mobile phone App or computer site etc..It needs to be determined that the online situation of automatic vending machine before automatic vending machine executes shipment.Server Can be by the wireless transmission on-line checking command instruction of 3G, 4G or Wifi etc., the preferred 4G of the present embodiment is passed Defeated instruction.The structure of on-line checking command instruction be ###2002 $ " Mid ": " 1808130043 ", " TimeSp ": " 1534173031 " } $ 01B86EF1&&&, it self defined interface number, the present embodiment preferred settings can connect according to actual needs Slogan " 2002 " indicates that instruction type is " on-line checking ", and the command context information of on-line checking command instruction only includes machine number With two parameters of timestamp, judging convenient for server, machine number first converts the binary-coded decimal for generating 5 bytes, such as " 0x18,0x08, 0x13,0x00,0x43 ", then the effect and successively conversion of timestamp and command context information generate the binary-coded decimal of 5 bytes, then In addition a fixed binary-coded decimal 0x00, is formed binary-coded decimal group, is encrypted using AES256 algorithm to binary-coded decimal group, take encrypted result Signature of the first four byte " 01B86EF1 " as this on-line checking command instruction, the present embodiment preferably " ### " and " &&& " is used as command header and order tail, as format constraints.Server is at least every to be sent by 100 seconds to automatic vending machine On-line checking command instruction is conducive to judge whether automatic vending machine or network go offline at any time.
Wherein, in the step S200 of the present embodiment, on-line checking response instruction is opposite with on-line checking command instruction It answers, interface number is consistent with the interface number of step S100, and the command context information of on-line checking response instruction also only includes machine Number with two parameter informations of timestamp, it is consistent with timestamp with the machine number of step S100, thus generate signing messages synchronization The signature of rapid S100 is consistent.Server demonstrates the correctness of instruction after receiving on-line checking response instruction, and judges Automatic vending machine is online, can execute shipment operation.Refer to when server is not received by on-line checking response within the set time When enabling, that is, judge the automatic vending machine be it is offline, execute automatic reimbursement operation, the safety of payment of consumption is protected, in the present embodiment In, the set time can set according to demand, and the present embodiment preferred set time is 10 seconds.
It is in another embodiment of the present invention, further comprising the steps of referring to Fig. 2:
Step S500, automatic vending machine executes shipment operation, and cycles through the shipment result for reporting shipment situation Command instruction is to server.
Step S600, server receive the shipment result command instruction, judge shipment as a result, and sending out to automatic vending machine Shipment result response corresponding with the shipment result command instruction is sent to instruct;Alternatively, server does not receive the shipment knot Fruit command instruction judges that automatic vending machine is offline.
Wherein, in the step S500 of the present embodiment and step S600, after automatic vending machine has executed shipment operation, i.e., Shipment result command is successively sent to instruct to server, the machine number in N shipment result command that continuously transmits and when Between stab and will remain unchanged.When server receives the instruction of shipment result command, that is, shipment is judged as a result, simultaneously to automatic vending Machine sends shipment result response instruction, when shipment result is shipment success, feeds back consumer;When shipment result is shipment failure When, execute automatic reimbursement operation.In the present embodiment, when the instruction of shipment result command is continuously transmitted more than 10, server is still It does not receive, then judges that automatic vending machine is offline.
Referring to Fig. 2, in another embodiment of the present invention, comprising the following steps:
Step S100, successful payment, automatic vending machine is received is for detecting automatic vending machine from what server was sent No online on-line checking command instruction.
Step S200, automatic vending machine send on-line checking corresponding with the on-line checking command instruction to server Response instruction instructs when server receives the on-line checking response, then judges that the automatic vending machine is online;Work as service Device does not receive the on-line checking response instruction, then judges that the automatic vending machine is offline, and executes automatic reimbursement operation.
Step S300, automatic vending machine receive the shipment life for controlling automatic vending machine shipment sent from server Enable instruction.
Step S400, automatic vending machine send shipment response corresponding with the shipment command instruction to server and refer to It enables.
Step S500, automatic vending machine executes shipment operation, and cycles through the shipment result for reporting shipment situation Command instruction is to server.
Step S600, server receive the shipment result command instruction, judge shipment as a result, and sending out to automatic vending machine Shipment result response corresponding with the shipment result command instruction is sent to instruct;Alternatively, server does not receive the shipment knot Fruit command instruction judges that automatic vending machine is offline.
A kind of automatic vending machine data interaction equipment is additionally provided in another embodiment of the present invention referring to Fig. 3, Memory including at least one control processor and for being communicated to connect at least one described control processor;The storage Device is stored with the instruction that can be executed by least one described control processor, and described instruction is by least one described control processor It executes, so that at least one described control processor is able to carry out a kind of automatically vending system data interaction side of above-described embodiment Method, for example, the method and step S1 to S2 in Fig. 1 described above is executed, the method and step S100 to S600 in Fig. 2.
Further, in another embodiment of the present invention, a kind of automatic vending machine, including command reception electricity are additionally provided Road module, instruction issue circuitry module and command process module, described instruction processing module receive electricity with described instruction respectively Road module and the electrical connection of described instruction transmitting line module, described instruction receiving circuit module are sent out for receiving from server The command instruction sent;Described instruction transmitting line module, which is used to send response corresponding with the command instruction to server, to be referred to It enables.The information and selection that described instruction processing module is used to execute in command instruction carry the response instruction of corresponding informance.
Further, in another embodiment of the present invention, a kind of automatic vending machine application system is additionally provided, including is referred to Enable receiving circuit module, instruction issue circuitry module, command process module and server.In the present embodiment, the service Device can carry out data interaction with automatic vending machine, and the server can be transmitted response and instruct to described instruction receiving circuit module, Also it can receive the response instruction sent from described instruction transmitting line module.
Further, in another embodiment of the present invention, a kind of computer readable storage medium, the meter are additionally provided Calculation machine readable storage medium storing program for executing is stored with computer executable instructions, and the computer executable instructions are for executing computer The automatic vending machine data interactive method of embodiment is stated, for example, executing the method and step S1 to S2 in Fig. 1 described above, Fig. 2 In method and step S100 to S600.
Further, in another embodiment of the present invention, a kind of computer program product, the computer journey are also provided Sequence product includes the computer program being stored on computer readable storage medium, and the computer program includes program instruction, When described program instruction is computer-executed, for example, may make said one or multiple by the processor execution in Fig. 3 Processor executes the automatic vending machine data interactive method of above-described embodiment, for example, executing the method step in Fig. 1 described above Method and step S100 to S600 in rapid S1 to S2, Fig. 2.
Through the above description of the embodiments, those skilled in the art can be understood that each embodiment can borrow Help software that the mode of general hardware platform is added to realize.It will be appreciated by those skilled in the art that realizing in above-described embodiment method All or part of the process is relevant hardware can be instructed to complete by computer program, and the program can be stored in one In computer-readable storage medium, the program is when being executed, it may include such as the process of the embodiment of the above method.Wherein, institute The storage medium stated can be magnetic disk, CD, read-only memory (ReadOnly Memory, ROM) or random access memory (Random Access Memory, RAM) etc..
It is to be illustrated to preferable implementation of the invention, but the invention is not limited to above-mentioned embodiment party above Formula, those skilled in the art can also make various equivalent variations on the premise of without prejudice to spirit of the invention or replace It changes, these equivalent deformations or replacement are all included in the scope defined by the claims of the present application.

Claims (10)

1. a kind of automatic vending machine data interactive method, which comprises the following steps:
The command instruction sent from server is received, the command instruction includes first interface number, the first command context information With the first signing messages instructed for verification command;
Response instruction corresponding with the command instruction is sent to server, the response instruction includes second interface number, second Command context information and the second signing messages instructed for verifying response, the second interface number is identical as first interface number, The second command context information is corresponding with the first command context information.
2. a kind of automatic vending machine data interactive method according to claim 1, it is characterised in that: in first order Holding information includes the first machine number, at the first time stamp and first information parameter;The second command context information includes second Machine number, the second timestamp and the second information parameter;Second machine number is identical as the first machine number, second time Stamp stabs identical with first time.
3. a kind of automatic vending machine data interactive method according to claim 1, it is characterised in that: first A.L.S. It is generated after ceasing the first binary-coded decimal group encryption converted based on the first command context information;Second signing messages is based on the second life It is generated after the second binary-coded decimal group encryption for enabling content information convert.
4. a kind of automatic vending machine data interactive method according to claim 3, it is characterised in that: first binary-coded decimal Group is stabbed by the first machine number, at the first time and the first command context information is converted binary-coded decimal respectively and generated;Second binary-coded decimal Group is converted binary-coded decimal by the second machine number, the second timestamp and the second command context information respectively and is generated.
5. a kind of automatic vending machine data interactive method according to claim 1, which is characterized in that further include following step It is rapid:
Automatic vending machine receives the shipment command instruction for being used to control automatic vending machine shipment sent from server, the life Enabling instruction includes shipment command instruction;
Automatic vending machine sends shipment response instruction corresponding with the shipment command instruction, the response instruction to server It is instructed including shipment response.
6. a kind of automatic vending machine data interactive method according to claim 5, which is characterized in that in the automatic vending Machine receives further comprising the steps of before the shipment command instruction for controlling automatic vending machine shipment that server is sent:
Automatic vending machine, which is received, to be referred to from what server was sent for detecting the whether online on-line checking order of automatic vending machine It enables, the command instruction includes online sense command instruction;
Automatic vending machine sends on-line checking response instruction corresponding with the on-line checking command instruction to server, works as clothes Business device receives the on-line checking response instruction, then judges that the automatic vending machine is online;When server does not receive institute On-line checking response instruction is stated, then judges that the automatic vending machine is offline, and executes automatic reimbursement operation, the response instruction It is instructed including on-line checking response.
7. a kind of automatic vending machine data interactive method according to claim 5, which is characterized in that in the automatic vending Machine is further comprising the steps of after sending shipment response instruction corresponding with the shipment command instruction to server:
Automatic vending machine executes shipment operation, and cycles through for reporting the shipment result command of shipment situation to instruct to service Device;
Server receives the shipment result command instruction, judges shipment as a result, and sending and the shipment to automatic vending machine Result command instructs corresponding shipment result response instruction;Alternatively, server does not receive the shipment result command instruction, sentence Disconnected automatic vending machine is offline.
8. a kind of automatic vending machine data interaction device, it is characterised in that: including command reception circuit module, instruction issue circuitry Module and command process module, described instruction processing module are sent out with described instruction receiving circuit module and described instruction respectively Circuit module is sent to be electrically connected, described instruction receiving circuit module is used to receive the command instruction sent from server;The finger Enable transmitting line module for sending response instruction corresponding with the command instruction to server.
9. a kind of automatic vending machine data interaction equipment, it is characterised in that: including at least one control processor and be used for and institute State the memory of at least one control processor communication connection;The memory, which is stored with, to be handled by least one described control The instruction that device executes, described instruction is executed by least one described control processor, so that at least one described control processor It is able to carry out such as a kind of described in any item automatically vending system data interactive methods of claim 1-7.
10. a kind of computer readable storage medium, it is characterised in that: the computer-readable recording medium storage has computer can It executes instruction, the computer executable instructions are for executing computer such as the described in any item one kind of claim 1-7 certainly Dynamic vending system data interactive method.
CN201910121717.4A 2019-02-19 2019-02-19 Vending machine data interaction method, device, equipment and storage medium Active CN109933997B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910121717.4A CN109933997B (en) 2019-02-19 2019-02-19 Vending machine data interaction method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910121717.4A CN109933997B (en) 2019-02-19 2019-02-19 Vending machine data interaction method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109933997A true CN109933997A (en) 2019-06-25
CN109933997B CN109933997B (en) 2022-10-28

Family

ID=66985628

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910121717.4A Active CN109933997B (en) 2019-02-19 2019-02-19 Vending machine data interaction method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109933997B (en)

Citations (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1162156A (en) * 1997-02-03 1997-10-15 张跃明 Digital automatic vending-machine controlling system
JP2001338327A (en) * 2000-05-30 2001-12-07 Dokomo Eng Kk Automatic vending system and automatic vending machine, and method for vending commodities
CN1722049A (en) * 1995-02-13 2006-01-18 英特特拉斯特技术公司 Systems and methods for secure transaction management and electronic rights protection
CN1756150A (en) * 2004-09-30 2006-04-05 飞力凯网路股份有限公司 Information management apparatus, information management method, and program
TW200713132A (en) * 2005-07-13 2007-04-01 Mastercard International Inc Apparatus and method for integrated payment and electronic merchandise transfer
CN101454794A (en) * 2006-03-30 2009-06-10 奥博佩公司 Mobile person-to-person payment system
JP2013117845A (en) * 2011-12-02 2013-06-13 Nippon Telegr & Teleph Corp <Ntt> Service provision method, system server, and program
CN103942685A (en) * 2014-04-25 2014-07-23 天地融科技股份有限公司 Data security interactive system
CN104106270A (en) * 2011-12-06 2014-10-15 高通股份有限公司 Systems and methods for machine to machine device control and triggering
CN104335237A (en) * 2012-05-24 2015-02-04 Jvl风险投资有限责任公司 Systems, methods, and computer program products for providing a contactless protocol
CN104348792A (en) * 2013-07-30 2015-02-11 阿里巴巴集团控股有限公司 Data processing method, device and system
US20150235202A1 (en) * 2014-02-20 2015-08-20 Eazy Coin Corp. Method and system for cashless transactions at vending machines
CN105282148A (en) * 2015-09-17 2016-01-27 褚维戈 Data remote authentication system and method
CN107395340A (en) * 2017-06-14 2017-11-24 云丁网络技术(北京)有限公司 Data transmission method, apparatus and system
CN107679962A (en) * 2017-10-17 2018-02-09 黄山市昌臣食品有限公司 A kind of intelligent automatic good selling method and vending system
CN107743633A (en) * 2015-04-10 2018-02-27 万事达卡国际股份有限公司 Automatic vending machine is merchandised
CN108830615A (en) * 2018-06-06 2018-11-16 富士电机(中国)有限公司 Automatic vending machine trade managing system and intelligence sharing method
CN109104283A (en) * 2018-06-26 2018-12-28 北京云迹科技有限公司 intelligent distribution system communication encryption method and device
CN109284996A (en) * 2018-09-25 2019-01-29 江小平 Self-service system and method

Patent Citations (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1722049A (en) * 1995-02-13 2006-01-18 英特特拉斯特技术公司 Systems and methods for secure transaction management and electronic rights protection
CN1162156A (en) * 1997-02-03 1997-10-15 张跃明 Digital automatic vending-machine controlling system
JP2001338327A (en) * 2000-05-30 2001-12-07 Dokomo Eng Kk Automatic vending system and automatic vending machine, and method for vending commodities
CN1756150A (en) * 2004-09-30 2006-04-05 飞力凯网路股份有限公司 Information management apparatus, information management method, and program
TW200713132A (en) * 2005-07-13 2007-04-01 Mastercard International Inc Apparatus and method for integrated payment and electronic merchandise transfer
CN101454794A (en) * 2006-03-30 2009-06-10 奥博佩公司 Mobile person-to-person payment system
JP2013117845A (en) * 2011-12-02 2013-06-13 Nippon Telegr & Teleph Corp <Ntt> Service provision method, system server, and program
CN104106270A (en) * 2011-12-06 2014-10-15 高通股份有限公司 Systems and methods for machine to machine device control and triggering
CN104335237A (en) * 2012-05-24 2015-02-04 Jvl风险投资有限责任公司 Systems, methods, and computer program products for providing a contactless protocol
CN104348792A (en) * 2013-07-30 2015-02-11 阿里巴巴集团控股有限公司 Data processing method, device and system
US20150235202A1 (en) * 2014-02-20 2015-08-20 Eazy Coin Corp. Method and system for cashless transactions at vending machines
CN103942685A (en) * 2014-04-25 2014-07-23 天地融科技股份有限公司 Data security interactive system
CN107743633A (en) * 2015-04-10 2018-02-27 万事达卡国际股份有限公司 Automatic vending machine is merchandised
CN105282148A (en) * 2015-09-17 2016-01-27 褚维戈 Data remote authentication system and method
CN107395340A (en) * 2017-06-14 2017-11-24 云丁网络技术(北京)有限公司 Data transmission method, apparatus and system
CN107679962A (en) * 2017-10-17 2018-02-09 黄山市昌臣食品有限公司 A kind of intelligent automatic good selling method and vending system
CN108830615A (en) * 2018-06-06 2018-11-16 富士电机(中国)有限公司 Automatic vending machine trade managing system and intelligence sharing method
CN109104283A (en) * 2018-06-26 2018-12-28 北京云迹科技有限公司 intelligent distribution system communication encryption method and device
CN109284996A (en) * 2018-09-25 2019-01-29 江小平 Self-service system and method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李战明等: "基于ARM+GPRS的IC卡自动售货机的设计与应用", 《科学技术与工程》 *

Also Published As

Publication number Publication date
CN109933997B (en) 2022-10-28

Similar Documents

Publication Publication Date Title
CN109191108B (en) Two-dimensional code aggregation payment system based on block chain and working method thereof
AU2012294451B2 (en) Payment device with integrated chip
CN103577983B (en) Load method of electronic currency for off-line consumption
CN104915829B (en) Exchange method and device are applied based on NFC technique
CN107798517A (en) Bill payment method, apparatus and system
US11694182B2 (en) Systems and methods for displaying payment device specific functions
CN103714485B (en) A kind of e-commerce system and method for realizing staple commodities spot transaction
CN109003067A (en) A kind of dynamic two-dimension code polymerization payment system and its working method based on electronic scale
CA2287960A1 (en) Internet payment and loading system using smart card
CN101685512A (en) Computer, payment system and method thereof for realizing on-line payment
CN101686225A (en) Methods of data encryption and key generation for on-line payment
CN103077462A (en) Electronic receipt system based on terminal
CN107730243A (en) A kind of card user and POS interactive system and method
CN106204019B (en) Information processing method, first terminal, second terminal and server
CN109146523B (en) Commodity anti-counterfeiting and authenticity-checking system and method based on block chain
CN1430760A (en) Method and system for wireless electronic commerce using portable, wireless communication device having unique identifying information
WO2017059765A1 (en) Electronic bill sending method and apparatus
US20130297451A1 (en) Method and system for product or service source authentication
CN104303198A (en) Method and System for Enhancing the Security of Electronic Transactions
CN101673443B (en) Network cash register system and realization method thereof
Hall et al. WPP: A secure payment protocol for supporting credit-and debit-card transactions over wireless networks
CN112581113A (en) Shopping settlement method, related device and system
CN109933997A (en) A kind of automatic vending machine data interactive method, device, equipment and storage medium
CN113962690A (en) Prepayment type consumption business operation guarantee system and method
Källström Business solutions for mobile e-commerce

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
GR01 Patent grant
GR01 Patent grant