CN117040778A - Unmanned vending system and method - Google Patents

Unmanned vending system and method Download PDF

Info

Publication number
CN117040778A
CN117040778A CN202310727407.3A CN202310727407A CN117040778A CN 117040778 A CN117040778 A CN 117040778A CN 202310727407 A CN202310727407 A CN 202310727407A CN 117040778 A CN117040778 A CN 117040778A
Authority
CN
China
Prior art keywords
server
vending
terminal
key
connection
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
CN202310727407.3A
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.)
Extreme Fresh Technology Shenzhen Co ltd
Original Assignee
Extreme Fresh Technology Shenzhen 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 Extreme Fresh Technology Shenzhen Co ltd filed Critical Extreme Fresh Technology Shenzhen Co ltd
Priority to CN202310727407.3A priority Critical patent/CN117040778A/en
Publication of CN117040778A publication Critical patent/CN117040778A/en
Pending legal-status Critical Current

Links

Classifications

    • 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
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07FCOIN-FREED OR LIKE APPARATUS
    • G07F9/00Details other than those peculiar to special kinds or types of apparatus
    • G07F9/002Vending machines being part of a centrally controlled network of vending machines
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/06Network architectures or network communication protocols for network security for supporting key management in a packet data network

Abstract

The application provides an unmanned vending system and a method, wherein the unmanned vending system comprises a server, a vending terminal and a client terminal, wherein the vending terminal is in communication connection with the server, requests heartbeat connection from the server every unit time, and acquires a key; the client terminal is in communication connection with the server to send a connection request to the server, and the server generates an encrypted connection code by utilizing a key according to the connection request and sends the encrypted connection code to the client terminal; the vending terminal identifies the connection code using a key. By adopting the unmanned vending system and the unmanned vending method, the problem that the vending terminal in the prior art cannot normally provide service in a network-free environment can be effectively solved.

Description

Unmanned vending system and method
Technical Field
The application relates to the technical field of unmanned vending, in particular to an unmanned vending system and method.
Background
With the rapid development of the internet of things in recent years, many unmanned vending devices are moving into the field of view of people. After the unmanned vending equipment is configured with a network and a related system for identifying commodities and settling accounts is installed, the goods can be loaded and sold.
However, in the setting manner of the related art, when the network of the unmanned vending device fails, the situation that the network cannot be used easily occurs, and the user experience is affected.
Disclosure of Invention
The embodiment of the application aims to provide a vending system and a vending method capable of normally providing services in a network-free environment.
In a first aspect, an embodiment of the present application provides an unmanned vending system, including a server, a vending terminal, and a client terminal, where the vending terminal is in communication connection with the server, and the vending terminal requests heartbeat connection from the server every unit time, and obtains a key; the client terminal is in communication connection with the server to send a connection request to the server, and the server generates an encrypted connection code by utilizing a key according to the connection request and sends the encrypted connection code to the client terminal; the vending terminal identifies the connection code using a key.
According to one embodiment of the first aspect of the application, the vending terminal comprises a scanning head and a central controller, wherein the scanning head is connected with the central controller and is used for identifying the connection code; the central controller is used for analyzing the connection code by utilizing the key.
According to one embodiment of the first aspect of the application, the vending terminal further comprises a clock module, the clock module being connected to the central controller, the central controller obtaining time data from the clock module, the central controller requesting connection to the server at intervals of unit time from the time data.
According to one embodiment of the first aspect of the application, the key comprises a public key and a private key, the public key and the private key are generated when the server is connected with each heartbeat of the vending terminal, the public key is issued to the vending terminal, and the server holds the private key; the server generates an encrypted connection code by using the private key, and the vending terminal analyzes the connection code by using the public key.
In a second aspect, the embodiment of the present application further provides a vending method, including the following steps:
step S1, a vending terminal requests heartbeat connection from a server every unit time and acquires a key;
step S2, the client terminal is connected with the server, a connection request is sent to the server, and the server generates an encrypted connection code according to the connection request and sends the encrypted connection code to the client terminal;
s3, the vending terminal analyzes the connection code by using the key, then unlocks the vending terminal and records order information;
step S4, when the selling terminal is in the network environment, the selling terminal sends order information to the server;
and S5, the server realizes the transaction according to the order information.
According to one embodiment of the second aspect of the application, step S1 comprises the sub-steps of:
step S11, the central controller acquires time data according to the clock module, and requests heartbeat connection from the server every unit time according to the time data;
step S12, the server generates a public key and a private key which are matched with each other when the server is connected with the heartbeat of the vending terminal every time;
step S13, the server issues the public key to the selling terminal and holds the private key.
According to an embodiment of the second aspect of the present application, in step S2, the server generates an encrypted connection code using a private key; in step S3, the selling terminal uses the public key to identify the connection code and stores the order information after the identification is successful.
According to an embodiment of the second aspect of the present application, in step S31, the ORDER information is used to encrypt the TIME stamp oder_time and the ORDER number order_no to generate an encrypted string order_info encrypt And sending to the client terminal; wherein,
the TIME stamp ODER_TIME is generated in real TIME when the client terminal is connected with the server;
ORDER number ORDER_NO, which is generated when the server finds that the vending terminal is disconnected;
the encryption formula is:
ORDER_INFO encrypt =ENCRYPT_BY_ASYMMETRIC(ODER_TIME+ORDER_
NO,KEY_PRIV)。
according to an embodiment of the second aspect of the present application, in step S3, the vending terminal decrypts the encrypted string using the public key to obtain the decryption result order_info decrypt The decryption formula is:
ORDER_INFO decrypt =DECRYPT_BY_ASYMMETRIC(ORDER_INFO encrypt ,
KEY_PUB)。
according to one embodiment of the second aspect of the application, step S33 comprises the sub-steps of:
step S31, verifying ORDER number ORDER_NO;
step S32, verifying the timestamp oder_time and the real-TIME clock retail_running of the vending terminal, where the verification formula is:
RETAIL_RUNTIME-ORDER_TIME < N, N is a preset constant.
The unmanned vending system and the method provided by the embodiment of the application have at least the following beneficial effects:
requesting heartbeat connection from a server every unit time by setting a vending terminal, and acquiring a key; the client terminal can be connected with the vending terminal through the encrypted connection code so as to unlock the vending terminal, and the situation that the vending terminal is out of connection with the server due to network failure can be dealt with, and in the situation, the user can unlock the vending terminal through the connection code requested by the server, and purchase the service of the vending terminal; and the heartbeat connection between the selling terminal and the server can ensure the uniqueness of the key, and reduce the probability of decoding or illegal use of the key.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application as claimed.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments of the present application will be briefly described below, and it is obvious that the drawings described below are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort to a person of ordinary skill in the art.
FIG. 1 is a block diagram of a vending system provided in accordance with a first aspect of the present application;
FIG. 2 is a flow chart of a method of vending according to a second aspect of the present application;
fig. 3 is a flow chart of one embodiment of a method of vending according to the second aspect of the present application.
The reference numerals in the drawings are as follows: 100. an unmanned vending system; 10. a server; 20. selling a terminal; 21. a central controller; 22. a wharf is scanned; 23. a clock module; 30. and a client terminal.
Detailed Description
Features and exemplary embodiments of various aspects of the application are described in detail below. In the following detailed description, numerous specific details are set forth in order to provide a thorough understanding of the application. It will be apparent, however, to one skilled in the art that embodiments of the application may be practiced without these specific details. The following description of the embodiments is merely intended to provide a better understanding of the application by showing examples of the application.
In the description of the present application, it should be understood that references to orientation descriptions such as upper, lower, front, rear, left, right, etc. are based on the orientation or positional relationship shown in the drawings, are merely for convenience in describing embodiments of the present application and to simplify the description, and do not indicate or imply that the devices or elements referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus should not be construed as limiting the embodiments of the present application.
In the description of the embodiments of the present application, the meaning of several is one or more, the meaning of several is two or more, greater than, less than, exceeding, etc. are understood to not include the present number, and above, below, within, etc. are understood to include the present number. The description of the first and second is for the purpose of distinguishing between technical features only and should not be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated or implicitly indicating the precedence of the technical features indicated.
In the description of the embodiments of the present application, unless explicitly defined otherwise, terms such as arrangement, installation, connection, etc. should be construed broadly, and those skilled in the art may reasonably ascertain the specific meaning of the terms in the present application by combining the specific contents of the technical solutions.
It should be noted that, without conflict, the embodiments of the present application and features of the embodiments may be combined with each other. The embodiments will be described in detail below with reference to the accompanying drawings.
With the rapid development of the internet of things in recent years, many unmanned terminal equipment for selling goods is in the field of vision of people. In public places such as subway stations, railway stations, scenic spots, highways and the like, people can often see their statues. As long as a merchant puts a plurality of cabinets in the places, the system for identifying commodities and settling accounts can be arranged on the network, and the goods can be delivered and sold. The technology of identifying the commodity by installing a 4G router or configuring a WiFi module is realized by the network, and the following technologies are commonly used in the mainstream at present:
RFID identification technology, i.e. radio frequency identification technology. Each RFID tag is internally provided with a unique TID, and the RFID identification system on the cabinet can clearly judge the commodity taken by the user through the one-to-one correspondence between the TID and the product.
And the gravity sensor recognition technology is to install a gravity sensor on a goods shelf of the vending terminal, and judge goods taken by a consumer by sensing gravity change on the goods shelf.
The static vision recognition technology is based on the principle that lacking commodities are obtained by comparing pictures before and after picking up the commodities after unlocking through a camera installed in a vending terminal, so that the commodities taken by a user are judged.
The dynamic visual recognition technology is characterized in that a plurality of cameras are installed in a vending terminal, a process of taking commodities by a user after a door is opened is recorded, and then the commodities taken by the consumer are analyzed and judged through videos.
However, regardless of the technology used, there is a drop in the network selling the terminal, such as, for example, SIM card arrearages, network operator maintenance, road construction fiber cut-outs, 4G router failures, and so forth. At this time, the selling terminal and the server are out of connection, so that the user cannot directly unlock the selling terminal through the communication between the server and the selling terminal, and further the selling terminal cannot be used, and under some use scenes (such as unmanned high-speed service areas), great inconvenience is brought to the user who needs to purchase goods urgently, and the experience of the user is greatly influenced.
Based on the above problems, the present application provides a vending system and method, which can be used to solve the above problems.
Fig. 1 is a block diagram of the vending system provided by the present application.
As shown in fig. 1, an embodiment of the first aspect of the present application provides an unmanned vending system 100, where the unmanned vending system 100 includes a server 10, a vending terminal 20, and a client terminal 30, where the vending terminal 20 is communicatively connected to the server 10, and the vending terminal 20 requests a heartbeat connection from the server 10 every unit time, and acquires a key; the client terminal 30 is communicatively connected with the server 10 to send a connection request to the server 10, and the server 10 generates an encrypted connection code by using a key according to the connection request and issues the encrypted connection code to the client terminal 30; the vending terminal 20 identifies the connection code using a key.
The server 10 is a remote device of the vending terminals 20, the number of vending terminals 20 may be plural, and the server 10 is operative to store data of each vending terminal 20 and to interact with each vending terminal 20.
The server 10 is communicatively coupled to the vending terminals 20, possibly by way of a wireless terminal (such as a WiFi, 3G, 4G, 5G network) for each vending terminal 20, or by way of an ethernet network connection to the server. In this way, in the normal use process of the vending terminals 20 and the server 10, the user may connect to the server 10 through the login module installed on each vending terminal 20 by the client terminal 30, and control the vending terminals 20 to unlock and pick up the required goods by using the communication between the server 10 and the vending terminals 20, after the order is completed, the vending terminals 20 communicate with the server 10 to implement interaction of order information, and then implement deduction of the order by the communication between the server 10 and the client terminal 30.
The vending terminal 20 requests heartbeat connection from the server 10 and acquires a key every unit time, which means that when the vending terminal 20 is in a network environment, the vending terminal requests heartbeat connection from the server 10 every unit time, the server 10 generates a key when each heartbeat connection occurs, and the server 10 issues a public key in the key to the vending terminal 20 and reserves a private key.
In these embodiments of the application, the key may be a re-agreed encryption and decryption rule between the vending terminal 20 and the server 10 each time a heartbeat connection is made. By arranging the vending terminal 20 to be connected with the heartbeat of the server 10 every unit time, the uniqueness of the key is improved, and the reliability is better.
The heartbeat connection between the vending terminal 20 and the server 10 refers to a connection between the vending terminal 20 and the server 10 at intervals of a unit time, similar to the heartbeat of a human being, so that the server 10 can learn that the vending terminal 20 is in an on-line state.
The vending terminal 20 and the server 10 acquire a key at the time of heartbeat connection, and the key generated at each heartbeat connection has uniqueness. In some embodiments, the new key generated at each heartbeat connection of the vending terminal 20 to the server 10 may cover the old key to save storage space between the vending terminal 20 and the server 10.
In these embodiments of the present application, by setting the vending terminal 20 and the server 10 to generate a brand new key when the server 10 is connected in a heartbeat, the authenticity of the purchasing requirement of the user can be improved, and the possibility that the user illegally unlocks the vending terminal 20 can be reduced. That is, after the vending terminal 20 is connected to the server 10 every heartbeat, the connection code acquired by the user by connecting the client terminal 30 to the server 10 immediately fails, and the vending terminal 20 cannot be unlocked, so that the reliability is better.
The unit time is a preset time interval, and the value of the unit time can be adjusted according to the positions where the different vending terminals 20 are placed. For example, when the vending terminal 20 is in a more stable network environment, the value of the unit time may be set to be larger to relieve the load pressure of the server 10, and when the vending terminal 20 is in an environment where network fluctuation easily occurs, the value of the unit time may be set to be smaller to strengthen the connection between the vending terminal 20 and the server 10.
In some embodiments, the unit time may be set to 10 seconds to 24 hours. Specifically, a unit time of 30 seconds, 15 minutes, 1 hour, 2 hours, 8 hours, 16 hours, or the like may be set.
The client terminal 30 is communicatively connected to the server 10, and it is possible that the client terminal 30 may be communicatively connected to the server 10 through a login module provided on the vending terminal 20. For example, in some embodiments, a two-dimension code of a device may be attached to the vending terminal 20, and the user may scan the two-dimension code with the client terminal 30, and then enter mobile application software (such as an applet, APP, etc.) connected to the server 10, so as to connect the client terminal 30 to the server 10.
After the client terminal 30 sends a request for connecting the vending terminal to the server 10, the server 10 may generate an encrypted connection code using the latest key, and issue the connection code to the client terminal 30, and the client terminal 30 may connect with the vending terminal 20 through the connection code. In this way, the unlocking of the vending terminal 20 is not limited to the connection state with the server 10, so as to unlock the vending terminal 20 in the network-free environment, so as to solve the problem that the vending terminal 20 cannot provide service for the user in the network-free environment, ensure the capability of continuously providing service, and ensure the security.
The client terminal 30 may be connected with the vending terminal 20 through a connection code to unlock the vending terminal 20, and in a possible implementation manner, a member for identifying the connection code and decrypting and identifying the connection code is provided in the vending terminal 20, so as to verify the authenticity and instantaneity of the connection code provided by the client terminal 30, thereby further improving the security and reliability of the transaction.
In these embodiments of the present application, the connection code may be a two-dimensional code or a bar code.
According to the unmanned vending system 100 provided by the embodiment of the application, the vending terminal 20 is set to request heartbeat connection from the server 10 every unit time, and a key is acquired; the client terminal 30 can be connected with the vending terminal 20 through the connection code to unlock the vending terminal 20, and can cope with the situation that the vending terminal 20 is out of connection with the server 10 due to network failure, in this case, the user can unlock the vending terminal 20 through the encrypted order information requested by the server 10, and purchase the service of the vending terminal 20; and the heartbeat connection between the vending terminal 20 and the server 10 can ensure the uniqueness of the key, and reduce the probability of decoding or illegal use of the key.
According to an embodiment of the first aspect of the present application, the vending terminal 20 comprises a central controller 21 and a scanning head 22, wherein the scanning head 22 is connected to the central controller 21 for identifying the connection code; the central controller 21 is used for resolving the connection code using the key.
The central controller 21 is a core component of the vending terminal 20 for controlling unlocking, locking, loading, shipment, connection with the server 10, etc. of the vending terminal 20.
The scanning head 22 is an identification terminal of the vending terminal 20 for identifying the connection code provided by the client terminal 30.
In the use process of the unmanned vending system 100, after the connection code provided by the client terminal 30 is acquired, the scanning terminal 22 may transmit the connection code to the central controller 21, and the central controller 21 may identify the connection code by using the key acquired during the connection of the latest heartbeat, and perform the next unlocking or reject unlocking operation.
According to one embodiment of the first aspect of the present application, the vending terminal 20 further comprises a clock module 23, the clock module 23 being connected to the central controller 21, the central controller 21 obtaining time data from the clock module 23, the central controller 21 requesting a connection to the server 10 per unit time according to the time data.
The purpose of the clock module 23 is to ensure that the real time of the vending terminals 20 is consistent with the real time of the server 10 to provide the server 10 with the authenticity of identifying each vending terminal 20 transaction. For example, the server 10 may determine whether the difference between the real-time of the vending terminal 20 corresponding to the client terminal 30 and the real-time of the server 10 is too large when each client terminal 30 logs in, so as to determine whether the order is truly valid, thereby reducing the probability of processing an invalid order by the server 10, improving the information processing efficiency and the security of the server 10.
In some embodiments, the clock module 23 may be set as an RTC clock module.
In these embodiments of the present application, the clock module 23 may also be used to monitor the time interval between the heartbeat connection of the vending terminal 20 and the server 10, so as to improve the accuracy of implementing the heartbeat connection between the vending terminal 20 and the server 10 in unit time.
According to an embodiment of the first aspect of the present application, the key comprises a public key and a private key, the server 10 generates the public key and the private key when connected with each heartbeat of the vending terminal 20, the public key is issued to the vending terminal 20, and the server 10 holds the private key; the server 10 generates an encrypted connection code using a private key and the vending terminal 20 parses the connection code using a public key.
Fig. 2 is a flow chart of a method of vending machine provided in a second aspect of the application.
As shown in fig. 2, the embodiment of the second aspect of the present application further provides a vending method, including the following steps:
step S1, the vending terminal 20 requests heartbeat connection from the server 10 every unit time and acquires a key;
step S2, the client terminal 30 is connected with the server 10, and sends a connection request to the server 10, and the server 10 generates an encrypted connection code according to the connection request and sends the encrypted connection code to the client terminal 30;
step S3, the vending terminal 20 uses the key to identify the connection code and then unlock, and records order information;
step S4, the vending terminal 20 sends order information to the server 10 when in a network environment;
in step S5, the server 10 performs a transaction according to the order information.
In these embodiments of the present application, step S1 is a step performed when the vending terminal 20 is in a network environment, and when the vending terminal 20 cannot connect to the server 10 due to a network failure, the key between the vending terminal 20 and the server 10 is the key generated when the last heartbeat connection is performed.
In step S2, the client terminal 30 connects with the server 10 and sends a connection request to the server 10, and the server 10 generates an encrypted connection code according to the connection request and issues the encrypted connection code to the client terminal 30, and in a possible implementation manner, the client terminal 30 connects with the server 10 through a login module provided on the vending terminal 20 and sends a connection request for connecting with the vending terminal 20 to the server 10, at this time, the server 10 may generate an encrypted connection code according to a key generated when the client terminal 20 is connected with the vending terminal 20 at the latest time, and issues the encrypted connection code to the client terminal 30 by using the key.
It should be noted that, when the vending terminal 20 is in the network environment, the client terminal 30 does not need to apply for connecting the vending terminal 20 to the server 10, and at this time, the server 10 may directly communicate with the vending terminal 20, so that the vending terminal 20 controls unlocking or locking.
Step S2 is a remedial step when the vending terminal 20 is in a non-network environment, to provide a more way for the client terminal 30 to unlock the vending terminal 20.
In step S3, the server 10 transmits the connection code to the client terminal 30, and the vending terminal 20 unlocks and records the order information after verifying the connection code. The key is generated when the server 10 is connected with the vending terminal 20 in the last heartbeat, and the reliability and the security of the transaction can be improved due to the uniqueness of the key.
It should be noted that, in these embodiments of the present application, the key may be an encryption and decryption manner agreed between the server 10 and each of the independent vending terminals 20, when the client terminal 30 sends to the server to connect each of the vending terminals 20, the server 10 may generate an encrypted connection code according to the key generated when the client terminal 30 is connected with the heartbeat of the vending terminal 20 at the latest time, and send the connection code to the client terminal 30, and the vending terminal 20 may decrypt the connection code by using the key acquired at the latest time, that is, only the order information after decryption by the vending terminal is valid (order formThe number satisfies the decryption formula ORDER_INFO decrypt =DECRYPT_BY_ASYMMETRIC(ORDER_INFO encrypt Key_pub); ORDER TIME satisfies the formula RETAIL_RUNTIME-ORDER_TIME described above<N, N is a preset constant), the client terminal 30 can unlock the vending terminal 20 using the connection code. The method can meet the purchasing demands of customers and ensure the safety and reliability of transactions to the maximum extent.
In this step, the user may unlock the vending terminal via the key and normally conduct a transaction, with the specific order information for the transaction being saved to the vending terminal 20.
According to one embodiment of the second aspect of the application, step S1 comprises the sub-steps of:
step S11, the central controller 21 obtains time data according to the clock module 23, and requests heartbeat connection to the server 10 every unit time according to the time data;
step S12, the server 10 generates a public key and a private key that are matched with each other each time when the server is connected with the heartbeat of the vending terminal 20;
in step S13, the server 10 issues the public key to the vending terminal 20 and holds the private key.
The public key and the private key are generated when the vending terminal 20 is connected with the server 10 in the heartbeat, so that the vending terminal 20 cannot be used when being in a network-free environment, the malicious key manufacturing behavior is avoided, potential security holes when the vending terminal 20 is in the network-free environment are made up, the urgent purchasing demands of users can be met, and the security of the unmanned vending system 100 can be ensured.
According to one embodiment of the second aspect of the present application, in step S2, the server 10 generates an encrypted connection code using a private key; in step S3, the selling terminal uses the public key to identify the connection code and stores the order information after the identification is successful.
According to an embodiment of the second aspect of the present application, in step S31, the private key is used to encrypt the timestamp oder_time and the ORDER number order_no to generate the encrypted string order_info encrypt And transmitted to the client terminal 30; wherein,
the timestamp oder_time is generated in real TIME when the client terminal 30 connects to the server 10;
ORDER number order_no, generated when server 10 finds that vending terminal 20 is offline;
the encryption formula is:
ORDER_INFO encrypt =ENCRYPT_BY_ASYMMETRIC(ODER_TIME+ORDER_NO,KEY_PRIV)。
according to one embodiment of the second aspect of the present application, in step S3, the vending terminal 20 decrypts the encrypted string with the public key to obtain the decryption result order_info decrypt The decryption formula is:
ORDER_INFO decrypt =DECRYPT_BY_ASYMMETRIC(ORDER_INFO encrypt ,
KEY_PUB)。
according to one embodiment of the second aspect of the application, step S33 comprises the sub-steps of:
step S31, verifying ORDER number ORDER_NO;
in step S32, the verification formula is that the verification timestamp oder_time and the real-TIME clock retail_running of the vending terminal 20 are:
RETAIL_RUNTIME-ORDER_TIME < N, N is a preset constant.
Illustratively, the value of N may be set to 10 seconds, 20 seconds, 30 seconds, or 60 seconds in some embodiments.
In these embodiments of the present application, there is also a case where the vending terminal 20 is in a network environment when the user applies for unlocking, and is in a non-network environment after the vending terminal 20 is unlocked. At this time, the problem can be solved by software logic, when the vending terminal 20 receives an unlocking instruction, if the network is disconnected when the door is closed, the central controller 21 stores the taken commodity and the order number together in the database. When the network is restored, the order and its corresponding merchandise information are submitted to the server 10 for settlement.
Fig. 3 is a flow chart of one embodiment of a method of vending according to the second aspect of the present application.
As shown in fig. 3, according to a specific embodiment of the second aspect of the present application, the vending method includes the steps of:
the user scans and sells cabinet equipment two-dimensional code and opens the door.
If the network is normal at this time, the door lock is opened, and the user opens the door to purchase goods.
The user closes the door, and the central control module commands the commodity identification module to identify the taken commodity.
After the identification is completed, if the network is normal, submitting the order and the identification result to a background server for settlement.
After the identification is completed, if the network is abnormal, the order and the identification result are stored into a database as an outstanding order, namely a storage module of the vending cabinet.
If the step 1 user does not have a network when scanning the two-dimension code of the vending cabinet equipment, the server returns order information encrypted by the private key of the mobile phone application software.
And the two-dimensional code generated by the mobile phone application software is close to the vending cabinet scanning terminal.
After the central control module of the vending cabinet obtains the order information transmitted by the scanning port, the order information is decrypted by the public key, and the order information comprises an order number and an order time stamp.
If the verification is valid, the order information is stored in the database, the electromagnetic lock is opened, and the user opens the door to purchase goods.
After the user closes the door, the central control module commands the commodity identification module to identify the taken commodity.
After the identification is completed, the order and the identification result are stored into a database as an outstanding order, namely a storage module of the vending cabinet.
And the central control module of the vending cabinet circularly inquires the network state in idle time.
If the network is normal, inquiring a database to not account the order, submitting the order to a server for settlement, and updating the order to a settled order after the settlement is successful.
If the settlement fails, no processing is done for the order in the database.
Although the present application is not limited to the embodiments, those skilled in the art will readily appreciate that various modifications and substitutions are possible, and these are within the scope of the embodiments disclosed herein. Therefore, the protection scope of the embodiments of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A vending system, comprising:
a server;
the selling terminal is in communication connection with the server, requests heartbeat connection from the server every unit time, and acquires a key;
the client terminal is in communication connection with the server so as to send a connection request to the server, and the server generates an encrypted connection code by utilizing the key according to the connection request and sends the encrypted connection code to the client terminal;
and the vending terminal identifies the connection code by using the key.
2. The unmanned vending system of claim 1, wherein the vending terminal comprises:
the scanning terminal is connected with the central controller and used for identifying the connection code;
and the central controller is used for analyzing the connection code by utilizing the key.
3. The unmanned vending system of claim 2, wherein the vending terminal further comprises:
the central controller acquires time data according to the clock module, and the central controller requests connection to the server every unit time according to the time data.
4. The unmanned vending system of claim 1, wherein the key comprises a public key and a private key, the server generates the public key and the private key each time the server is connected with each heartbeat of the vending terminal, the public key is issued to the vending terminal, and the server holds the private key;
and the server generates the encrypted connection code by using the private key, and the vending terminal analyzes the connection code by using the public key.
5. A method of unmanned vending comprising the steps of:
step S1, a vending terminal requests heartbeat connection from the server every unit time and acquires a key;
step S2, the client terminal is connected with the server, a connection request is sent to the server, and the server generates an encrypted connection code according to the connection request and sends the encrypted connection code to the client terminal;
step S3, the vending terminal uses the key to identify the connection code and then unlock the connection code, and records order information;
step S4, the vending terminal sends the order information to the server when the vending terminal is in a network environment;
and S5, the server realizes transaction according to the order information.
6. The unmanned vending method of claim 5, wherein step S1 comprises the sub-steps of:
step S11, the central controller acquires time data according to the clock module, and requests heartbeat connection to the server every unit time according to the time data;
step S12, the server generates a public key and a private key which are matched with each other when the server is connected with the heartbeat of the vending terminal every time;
and step S13, the server issues the public key to the vending terminal and holds the private key.
7. The unmanned vending method of claim 6, wherein in step S2, the server generates the encrypted connection code using the secret key; in step S3, the vending terminal uses the public key to identify the connection code, and stores the order information after the identification is successful.
8. The method of claim 7, wherein in step S3, the private key is used to encrypt the timestamp oder_time and the ORDER number order_no to generate the encrypted string order_info encrypt And sending to the client terminal; wherein,
a TIME stamp oder_time generated in real TIME when the client terminal is connected to the server;
ORDER number ORDER_NO, which is generated when the server finds that the vending terminal is disconnected;
the encryption formula is:
ORDER_INFO encrypt =ENCRYPT_BY_ASYMMETRIC(ODER_TIME+ORDER_
NO,KEY_PRIV)。
9. the unmanned vending method of claim 8, wherein in step S3, the vending terminal decrypts the encrypted string using the public key to obtain a decrypted result order_info decrypt The decryption formula is:
ORDER_INFO decrypt =DECRYPT_BY_ASYMMETRIC(ORDER_INFO encrypt ,
KEY_PUB)。
10. the unmanned vending method of claim 9, wherein step S3 comprises the sub-steps of:
step S31, verifying ORDER number ORDER_NO;
step S32, verifying the timestamp oder_time and the real-TIME clock retail_running of the vending terminal, where the verification formula is:
RETAIL_RUNTIME-ORDER_TIME < N, N is a preset constant.
CN202310727407.3A 2023-06-19 2023-06-19 Unmanned vending system and method Pending CN117040778A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310727407.3A CN117040778A (en) 2023-06-19 2023-06-19 Unmanned vending system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310727407.3A CN117040778A (en) 2023-06-19 2023-06-19 Unmanned vending system and method

Publications (1)

Publication Number Publication Date
CN117040778A true CN117040778A (en) 2023-11-10

Family

ID=88601076

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310727407.3A Pending CN117040778A (en) 2023-06-19 2023-06-19 Unmanned vending system and method

Country Status (1)

Country Link
CN (1) CN117040778A (en)

Similar Documents

Publication Publication Date Title
US11403635B2 (en) Payment system
US9646174B2 (en) Learning a new peripheral using a security provisioning manifest
US6991174B2 (en) Method and apparatus for authenticating a shipping transaction
EP0668580B1 (en) Method of authenticating a terminal in a transaction execution system
US8588415B2 (en) Method for securing a telecommunications terminal which is connected to a terminal user identification module
US9344281B2 (en) Detecting fraud using operational parameters for a peripheral
US20020138761A1 (en) Authentication system
US20140188732A1 (en) Secure provisioning manifest for controlling peripherals attached to a computer
US20140241523A1 (en) Installable Secret Functions for a Peripheral
CN202383724U (en) All-in-one machine for handling service
US10701561B1 (en) System and techniques for secret key transfer in benefit denial system
CN103678966A (en) Security module and method of securing payment information
CN103824170A (en) Mobile phone buying and selling client based on two-dimension codes, system and buying and selling management method
CN110415414A (en) The unlocking method and device of dynamic puzzle-lock based on both sides&#39; verifying
US20040187038A1 (en) Electronic equipment, equipment managing apparatus, equipment maintenance system, equipment maintenance method and computer-readable storage medium
US11562346B2 (en) Contactless card with multiple rotating security keys
JP2010533913A (en) License enforcement
CN117040778A (en) Unmanned vending system and method
CN1275744A (en) Computer applycation layer network safety control and management system and relative program method thereof
CN1862556B (en) Method and apparatus for controlling computer 10g-in by contactless smart card
US20080203155A1 (en) Reader with Integrated Encryption
CN114500061A (en) Data transmission method, Internet of things system, electronic device and storage medium
KR101159984B1 (en) On line door lock control system for automatic teller machine
JP2002015254A (en) System and managing method for electronic money and storage medium
CN115859389B (en) Software serial number authorization method and system based on privately-distributed deployment

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