CN109801136B - Food ordering method, system, terminal, server and medium for preventing malicious ordering - Google Patents

Food ordering method, system, terminal, server and medium for preventing malicious ordering Download PDF

Info

Publication number
CN109801136B
CN109801136B CN201910042570.XA CN201910042570A CN109801136B CN 109801136 B CN109801136 B CN 109801136B CN 201910042570 A CN201910042570 A CN 201910042570A CN 109801136 B CN109801136 B CN 109801136B
Authority
CN
China
Prior art keywords
ordering
user
terminal
server
link
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.)
Active
Application number
CN201910042570.XA
Other languages
Chinese (zh)
Other versions
CN109801136A (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.)
Guangzhou Qilong Network Technology Co ltd
Original Assignee
Guangzhou Qilong Network 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 Guangzhou Qilong Network Technology Co ltd filed Critical Guangzhou Qilong Network Technology Co ltd
Priority to CN201910042570.XA priority Critical patent/CN109801136B/en
Publication of CN109801136A publication Critical patent/CN109801136A/en
Application granted granted Critical
Publication of CN109801136B publication Critical patent/CN109801136B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The invention discloses a food ordering method, a system, a terminal, a server and a medium for preventing malicious ordering, wherein the method comprises the following steps: receiving a signal triggered by a user and sending a food ordering request to a server; the display server responds to the ordering request and then sends an ordering link, the ordering link is provided with an ordering random code, and the ordering random code is provided with a time stamp and is bound with the order number; after clicking the ordering link, the user sends the ordering random code to the server, so that the server judges whether the ordering link is overdue or not after receiving the ordering random code, and if not, sends a geographical position acquisition request to the terminal; responding to a geographic position acquisition request sent by a server, acquiring the geographic position of a user, and sending the geographic position of the user to the server so that the server judges whether the user orders within a preset ordering range, and if so, sending an ordering page to a terminal; and displaying an ordering page and storing an ordering random code. The invention can prevent the user from maliciously ordering and improve the safety of ordering.

Description

Food ordering method, system, terminal, server and medium for preventing malicious ordering
Technical Field
The invention relates to a food ordering method, a food ordering system, a food ordering terminal, a food ordering server and a food ordering medium, which can prevent malicious ordering, and belongs to the field of Internet food ordering application.
Background
With the rapid development of the internet, the ordering system is widely popularized in the catering industry as a scheme of internet and catering, and the ordering efficiency is greatly improved. However, how to prevent the user from maliciously ordering food also becomes one of the safety problems to be solved urgently by the ordering system. For example, after the user clicks a food ordering link which is consumed before, re-orders food, takes a two-dimensional code for table top food ordering, performs malicious food ordering on the table by scanning the code in other places outside the storefront, and maliciously modifies orders of other tables.
Although the functions of ordering systems on the market are relatively perfect, the ordering systems are slightly deficient in the problem of preventing users from ordering maliciously, at present, a part of ordering systems realize the function of setting effective duration for ordering links in a time dimension, but most of the ordering systems do not realize ordering range control in a space dimension, sensitive information such as order id is not hidden but directly exposed on the links, so that the users can freely change order information when ordering, and then ordering operations are carried out on other orders.
Disclosure of Invention
In order to solve the problems of malicious ordering and malicious order modification in the prior art, the invention provides an ordering method, an ordering system, a terminal, a server and a medium for preventing malicious ordering.
The first purpose of the invention is to provide a food ordering method applied to a terminal and used for preventing malicious ordering.
The second purpose of the invention is to provide a food ordering method applied to the server and used for preventing malicious ordering.
The third purpose of the invention is to provide a food ordering system which is applied to the terminal and prevents malicious ordering.
A fourth object of the present invention is to provide a food ordering system applied to a server for preventing malicious ordering.
A fifth object of the present invention is to provide a terminal.
A sixth object of the present invention is to provide a server.
It is a seventh object of the present invention to provide a storage medium.
The first purpose of the invention can be achieved by adopting the following technical scheme:
a food ordering method for preventing malicious ordering is applied to a terminal, and comprises the following steps:
receiving a signal triggered by a user and sending a food ordering request to a server;
displaying the food ordering link sent by the server after responding to the food ordering request; the ordering link is provided with an ordering random code, and the ordering random code is provided with a time stamp and is bound with an order number;
after clicking the ordering link, the user sends the ordering random code to the server, so that the server judges whether the ordering link is overdue or not after receiving the ordering random code, and if not, sends a geographical position acquisition request to the terminal;
responding to a geographic position acquisition request sent by a server, acquiring the geographic position of a user, and sending the geographic position of the user to the server so that the server judges whether the user orders within a preset ordering range, and if so, sending an ordering page to a terminal;
and displaying an ordering page and storing an ordering random code.
Further, before acquiring the geographic location of the user, the method further includes:
and judging whether the user authorizes to obtain the geographic position of the user, if not, prompting that the geographic position is unauthorized and requesting the user authorization.
The second purpose of the invention can be achieved by adopting the following technical scheme:
an ordering method for preventing malicious ordering is applied to a server and comprises the following steps:
receiving a meal ordering request sent by a terminal;
responding to a food ordering request sent by the terminal, generating a food ordering random code, and sending a food ordering link with the food ordering random code to the terminal; the ordering random code is provided with a time stamp and is bound with the order number;
after a user clicks the ordering link through the terminal, receiving an ordering random code sent by the terminal, judging whether the ordering link is overdue or not, and if not, sending a geographical position acquisition request to the terminal;
and receiving user geographical position information sent by the terminal after responding to the geographical position acquisition request, judging whether the user orders within a preset ordering range, if so, sending an ordering page to the terminal so as to enable the terminal to display the ordering page, and storing an ordering random code.
Further, the determining whether the ordering link is expired specifically includes:
and judging whether the difference between the receiving time and the sending time is within a preset time range or not according to the sending time and the receiving time recorded by the ordering random code, if so, determining that the ordering link is not expired, and if not, determining that the ordering link is expired.
Further, before the determining whether the order link is expired, the method further includes:
and judging whether the user related information is in the database or not, and if not, storing the user information into the database.
The third purpose of the invention can be achieved by adopting the following technical scheme:
an ordering system for preventing malicious ordering is applied to a terminal and comprises:
the ordering request sending module is used for receiving a signal triggered by a user and sending an ordering request to the server;
the ordering link receiving module is used for displaying an ordering link sent by the server after responding to the ordering request; the ordering link is provided with an ordering random code, and the ordering random code is provided with a time stamp and is bound with an order number;
the food ordering random code sending module is used for sending the food ordering random code to the server after the user clicks the food ordering link, so that the server judges whether the food ordering link is overdue or not after receiving the food ordering random code, and if not, sends the geographical position acquisition request to the terminal;
the geographic position information acquisition module is used for responding to a geographic position acquisition request sent by the server, acquiring the geographic position of the user, and sending the geographic position of the user to the server so that the server judges whether the user orders within a preset ordering range, and if so, sending an ordering page to the terminal;
and the ordering page display module is used for displaying the ordering page and storing the ordering random code.
The fourth purpose of the invention can be achieved by adopting the following technical scheme:
an ordering system for preventing malicious ordering, which is applied to a server and comprises:
the ordering request receiving module is used for receiving an ordering request sent by the terminal;
the ordering request response module is used for responding to an ordering request sent by the terminal, generating an ordering random code and sending an ordering link with the ordering random code to the terminal; the ordering random code is provided with a time stamp and is bound with the order number;
the food ordering random code receiving module is used for receiving a food ordering random code sent by the terminal after a user clicks a food ordering link through the terminal, judging whether the food ordering link is overdue or not, and sending a geographical position acquisition request to the terminal if the food ordering link is overdue;
and the ordering page sending module is used for receiving the geographical position information of the user sent by the terminal after responding to the geographical position acquisition request, judging whether the user orders within a preset ordering range, and if so, sending the ordering page to the terminal so as to enable the terminal to display the ordering page and store the ordering random code.
The fifth purpose of the invention can be achieved by adopting the following technical scheme:
the terminal comprises a processor and a memory for storing an executable program of the processor, and when the processor executes the program stored in the memory, the food ordering method applied to the terminal and used for preventing malicious ordering is realized.
The sixth purpose of the invention can be achieved by adopting the following technical scheme:
the server comprises a processor and a memory for storing a processor executable program, and when the processor executes the program stored in the memory, the server is used for realizing the food ordering method which is applied to the server and prevents malicious ordering.
The seventh purpose of the invention can be achieved by adopting the following technical scheme:
a storage medium stores a program that, when executed by a processor, implements the above-described order-ordering method for preventing malicious ordering applied to a terminal, or implements the above-described order-ordering method for preventing malicious ordering applied to a server.
Compared with the prior art, the invention has the following beneficial effects:
1. the server sends the ordering request to the server through the terminal, sends the ordering link with the ordering random code to the terminal after responding to the ordering request, the ordering random code is provided with a timestamp, after the user clicks the ordering link, the server can prevent the user from maliciously ordering in a time dimension by judging whether the ordering link is overdue or not, and when the ordering link is judged not to be overdue, the server can prevent the user from maliciously ordering in a space dimension by judging whether the user orders within a preset ordering range or not after acquiring the geographical position of the user through the terminal, namely the server can prevent the user from maliciously ordering by combining two dimensions of time and space.
2. The server is used for generating the ordering random code, the ordering random code is stored by the terminal after the ordering page is sent to the terminal, and when a user places an order or pays, the ordering random code is used to the background for verification and exchange for an order number, sensitive information such as the order number is hidden, the traditional method of directly transmitting the order number in an interface is replaced, the safety of an ordering system is improved, the user is prevented from modifying the order number, malicious ordering of the user is prevented to a certain extent, and the method for introducing the ordering random code is simple to implement and has high verification and replacement efficiency.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the structures shown in the drawings without creative efforts.
Fig. 1 is a flowchart of an ordering method for preventing malicious ordering according to embodiment 1 of the present invention.
Fig. 2 is a flowchart of a food ordering method for preventing malicious ordering according to embodiment 2 of the present invention.
Fig. 3 is a block diagram of a structure of a food ordering system for preventing malicious ordering according to embodiment 3 of the present invention.
Fig. 4 is a block diagram of a structure of a food ordering system for preventing malicious ordering according to embodiment 4 of the present invention.
Fig. 5 is a block diagram of a terminal according to embodiment 5 of the present invention.
Fig. 6 is a block diagram of a server according to embodiment 6 of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer and more complete, the technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some embodiments of the present invention, but not all embodiments, and all other embodiments obtained by a person of ordinary skill in the art without creative efforts based on the embodiments of the present invention belong to the protection scope of the present invention.
Example 1:
as shown in fig. 1, the present embodiment provides a food ordering method for preventing malicious ordering, which is applied to a terminal and includes the following steps:
and S101, receiving a signal triggered by a user, and sending a food ordering request to a server.
In this embodiment, the signal that the user triggered is the signal that the user triggered when using the terminal scanning two-dimensional code, and wherein the two-dimensional code is for arranging the desktop two-dimensional code of ordering on each table of restaurant in, and the user uses the terminal scanning two-dimensional code can pass through the little letter scanning two-dimensional code of installation on the terminal, and when scanning the two-dimensional code successfully, the terminal receives its signal that triggers, and the terminal receives the signal that the user triggered after, will order the request and send for the server.
Those skilled in the art can understand that, in addition to scanning the two-dimensional code through the WeChat, the user can scan the two-dimensional code through a common APP (Application program) such as a Payment treasure, and can also scan the two-dimensional code through a pre-downloaded and installed APP special for a restaurant.
And S102, displaying the ordering link sent by the server after responding to the ordering request.
After receiving the ordering request, the server responds to the ordering request to generate an ordering random code order _ key, the ordering random code order _ key is provided with a timestamp, is bound with an order number (order id), has a length of 256 bits, and sends an ordering link with the ordering random code order _ key to the terminal.
After receiving the food ordering link sent by the server, the terminal displays the food ordering link, so that the user can click the food ordering link, and after the user clicks the food ordering link, the step S103 is performed.
And S103, sending the random ordering code to a server.
The terminal sends the random ordering code to the server, so that the server judges whether the ordering link is expired or not after receiving the random ordering code, if yes, the information that the ordering link is expired is sent to the terminal, the terminal prompts a user to scan the two-dimensional code again, the step S101 is returned, if not, a geographic position acquisition request is sent to the terminal, and the step S104 is entered.
Because the random order code _ key of ordering has the timestamp, it has recorded the time that the server sent random order code _ key of ordering to and the time of receiving random order code order _ key of ordering, consequently judge whether the link of ordering is outdated, specifically do:
according to the sending time and the receiving time recorded by the ordering random code order _ key, whether the difference between the receiving time and the sending time is within a preset time range is judged, if yes, an ordering link is not expired, if not, the ordering link is expired, the preset time range of the embodiment is 0-10 minutes, within the preset time range, the ordering link is clicked within 10 minutes by a user, the ordering link is not expired and is not within the preset time range, the ordering link is clicked by the user after exceeding 10 minutes, the ordering link is expired, and the ordering link is judged to be expired or not, so that the user can be prevented from maliciously ordering in the time dimension.
And S104, responding to the geographic position acquisition request sent by the server, acquiring the geographic position of the user, and sending the geographic position of the user to the server.
Before acquiring the geographic location of the user, the present embodiment may further include: and judging whether the user authorizes to obtain the geographic position of the user. Specifically, whether the user authorizes to obtain the geographic position of the user is judged, according to APP judgment used by the user, by taking WeChat as an example, if the WeChat is authorized by the user to obtain the geographic position of the user before, the judgment is yes, the geographic position of the user is directly obtained, and if the WeChat is not authorized by the user to obtain the geographic position of the user before, the judgment is no, and the geographic position of the user is obtained after the user is authorized.
The method comprises the steps that after a terminal receives a geographic position acquisition request sent by a server, the geographic position of a user is acquired by responding to the geographic position acquisition request, the geographic position of the user is sent to the server, so that the server judges whether the user orders within a preset ordering range, if yes, an ordering page is sent to the terminal, the step S105 is entered, if not, the user does not order within the preset ordering range and sends the terminal, the terminal prompts that the current position of the user is not within the preset ordering range, for example, the preset ordering range is a circular area of a restaurant range, the user can order normally only within the circular area, and the user can be prevented from ordering maliciously in the spatial dimension by judging whether the user orders within the preset ordering range or not.
And S105, displaying a food ordering page, and storing a food ordering random code.
The terminal displays the ordering page after receiving the ordering page sent by the server, and stores the ordering random code order _ key, the user can place an order through the ordering page, the ordering random code order _ key can be stored in cookies of the terminal, the user can use the ordering random code order _ key to verify the background and exchange an order number when placing an order or paying every time, sensitive information such as the order number is hidden, and the user is prevented from maliciously ordering by modifying the order number.
Example 2:
as shown in fig. 2, the present embodiment provides a food ordering method for preventing malicious ordering, which is applied to a server and includes the following steps:
s201, receiving a meal ordering request sent by a terminal.
The user uses the terminal to scan the two-dimensional code and can scan the two-dimensional code through a WeChat APP (Application) installed on the terminal, when the two-dimensional code is scanned successfully, the two-dimensional code orders the two-dimensional code for a desktop arranged on each table of a restaurant, the terminal receives a signal triggered by the two-dimensional code, and after the terminal receives the signal triggered by the user, the terminal sends an ordering request to the server and the ordering request is received by the server.
S202, responding to a food ordering request sent by the terminal, generating a food ordering random code, and sending a food ordering link with the food ordering random code to the terminal.
After receiving the ordering request, the server responds to the ordering request to generate an ordering random code order _ key, the ordering random code order _ key is provided with a timestamp, is bound with an order number (order id), has a length of 256 bits, and sends an ordering link with the ordering random code order _ key to the terminal.
After receiving the food ordering link sent by the server, the terminal displays the food ordering link, so that a user can click the food ordering link, and after the user clicks the food ordering link, the terminal sends a food ordering random code to the server, and the step S203 is entered.
S203, receiving the random ordering code sent by the terminal, and judging whether the ordering link is overdue or not.
The server receives the random ordering code sent by the terminal, judges whether the ordering link is expired or not, sends the information that the ordering link is expired to the terminal if the ordering link is expired, prompts a user to scan the two-dimensional code again by the terminal, returns to the step S201, and sends the geographic position acquisition request to the terminal if the ordering link is not expired.
Because the random order code _ key of ordering has the timestamp, it has recorded the time that the server sent random order code _ key of ordering to and the time of receiving random order code order _ key of ordering, consequently judge whether the link of ordering is outdated, specifically do:
according to the sending time and the receiving time recorded by the ordering random code order _ key, whether the difference between the receiving time and the sending time is within a preset time range is judged, if yes, an ordering link is not expired, if not, the ordering link is expired, the preset time range of the embodiment is 0-10 minutes, within the preset time range, the ordering link is clicked within 10 minutes by a user, the ordering link is not expired and is not within the preset time range, the ordering link is clicked by the user after exceeding 10 minutes, the ordering link is expired, and the ordering link is judged to be expired or not, so that the user can be prevented from maliciously ordering in the time dimension.
Before determining whether the meal ordering link expires, the embodiment may further include: and judging whether the user related information is in the database. Specifically, whether the relevant information of the user is in the database or not is judged, whether the relevant information of the user, such as a mobile phone number and a micro signal, is in the database or not can be judged, if yes, the fact that the user has already ordered a meal in the restaurant is indicated, whether the ordering link is expired or not is judged, if not, the fact that the user has not ordered a meal in the restaurant is indicated, the relevant information of the user, such as the mobile phone number and the micro signal, is stored in the database, and then whether the ordering link is expired or not is judged.
S204, receiving the user geographic position information sent by the terminal after responding to the geographic position acquisition request, and judging whether the user orders within a preset ordering range.
After receiving the geographic position acquisition request sent by the server, the terminal responds to the geographic position acquisition request to acquire the geographic position of the user and sends the geographic position of the user to the server.
The server judges whether the user orders within a preset ordering range or not after receiving user geographical position information sent by the terminal, if so, the ordering page is sent to the terminal, if not, the user does not order within the preset ordering range and is sent to the terminal, the terminal prompts that the current position of the user is not within the preset ordering range, for example, the preset ordering range is a circular area within the range of a restaurant, the user can order normally only in the circular area, and the server can prevent the user from ordering maliciously in the spatial dimension by judging whether the user orders within the preset ordering range or not.
The terminal displays the ordering page after receiving the ordering page sent by the server, and stores the ordering random code order _ key, the user can place an order through the ordering page, the ordering random code order _ key can be stored in cookies of the terminal, the user can use the ordering random code order _ key to verify the background and exchange an order number when placing an order or paying every time, sensitive information such as the order number is hidden, and the user is prevented from maliciously ordering by modifying the order number.
Those skilled in the art will appreciate that all or part of the steps in the method of embodiments 1-2 may be implemented by a program to instruct related hardware, and the corresponding program may be stored in a computer readable storage medium.
It should be noted that although the method operations of embodiments 1-2 above are depicted in the drawings in a particular order, this does not require or imply that these operations must be performed in this particular order, or that all of the illustrated operations must be performed, to achieve desirable results. Rather, the depicted steps may change the order of execution. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions.
Example 3:
as shown in fig. 3, the present embodiment provides an ordering system for preventing malicious ordering, which is applied to a terminal, and includes an ordering request sending module 301, an ordering link receiving module 302, an ordering random code sending module 303, a geographic location information obtaining module 304, and an ordering page display module 305, where specific functions of the modules are as follows:
the ordering request sending module 301 is configured to receive a signal triggered by a user, and send an ordering request to a server.
The meal ordering link receiving module 302 is configured to display a meal ordering link sent by the server after responding to the meal ordering request; the ordering link is provided with an ordering random code, and the ordering random code is provided with a time stamp and is bound with the order number.
The food ordering random code sending module 303 is configured to send the food ordering random code to the server after the user clicks the food ordering link, so that the server determines whether the food ordering link is expired after receiving the food ordering random code, and if not, sends the geographic position acquisition request to the terminal.
The geographic position information obtaining module 304 is configured to respond to a geographic position obtaining request sent by the server, obtain a geographic position of the user, and send the geographic position of the user to the server, so that the server determines whether the user orders within a preset ordering range, and if so, sends an ordering page to the terminal.
The ordering page display module 305 is configured to display an ordering page and store an ordering random code.
For specific implementation of each module in this embodiment, reference may be made to embodiment 1, which is not described herein again.
Example 4:
as shown in fig. 4, the present embodiment provides an ordering system for preventing malicious ordering, which is applied to a server and includes an ordering request receiving module 401, an ordering request responding module 402, an ordering random code receiving module 403, and an ordering page sending module 404, where specific functions of the modules are as follows:
the meal ordering request receiving module 401 is configured to receive a meal ordering request sent by a terminal.
The food ordering request responding module 402 is configured to respond to a food ordering request sent by the terminal, generate a food ordering random code, and send a food ordering link with the food ordering random code to the terminal; and the ordering random code is provided with a time stamp and is bound with the order number.
The food ordering random code receiving module 403 is configured to receive a food ordering random code sent by the terminal after the user clicks the food ordering link through the terminal, determine whether the food ordering link is expired, and send the geographic position acquisition request to the terminal if the food ordering link is not expired.
The ordering page sending module 404 is configured to receive the user geographical location information sent by the terminal, determine whether the user orders within a preset ordering range, and if so, send the ordering page to the terminal, so that the terminal displays the ordering page and stores an ordering random code.
For specific implementation of each module in this embodiment, reference may be made to embodiment 2 above, and details are not described here.
It should be noted that the systems provided in embodiments 3 to 4 are only illustrated by dividing the functional modules, and in practical applications, the functions may be distributed by different functional modules according to needs, that is, the internal structure is divided into different functional modules to complete all or part of the functions described above.
Example 5:
the present embodiment provides a terminal, which may be a smart phone, a tablet computer, etc. carried by a user, and the present embodiment takes the smart phone as an example to explain the terminal, as shown in fig. 5, the terminal may include components such as a radio frequency circuit 501, a memory 502, an input unit 503, a display unit 504, a sensor 505, an audio circuit 506, a camera 507, a processor 508, and a power supply 509.
The rf circuit 501 is used for receiving and transmitting electromagnetic waves, and implementing interconversion between the electromagnetic waves and electrical signals, so as to communicate with a communication network or other devices. The radio frequency circuit 501 may include various existing circuit elements for performing these functions, such as an antenna, a radio frequency transceiver, a digital signal processor, an encryption/decryption chip, a Subscriber Identity Module (SIM) card, memory, and so forth. The rf circuit 501 may communicate with various networks such as the internet, an intranet, a wireless network, or with other devices via a wireless network. The wireless network may comprise a cellular telephone network, a wireless local area network, or a metropolitan area network. The Wireless network may use various Communication standards, protocols, and technologies, including but not limited to Global System for Mobile Communication (GSM), Enhanced Data GSM Environment (EDGE), wideband Code division multiple Access (W-CDMA), Code Division Multiple Access (CDMA), Time Division Multiple Access (TDMA), Wireless Fidelity (WiFi), Voice over internet protocol (VoIP), world wide Microwave Access (Wi-Max), other protocols for mail, instant messaging, and short messaging, and any other suitable Communication protocols, which may include even those not currently developed.
The memory 502 includes a computer-readable storage medium for storing a computer program, and the processor 508 executes various functional applications and data processing by running the computer program stored in the memory 502, that is, functions of acquiring resources corresponding to preset events. The memory 502 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory; additionally, the memory 502 may further include memory located remotely from the processor 508, which may be connected to the terminal through a network; wherein the network includes, but is not limited to, the internet, an intranet, a local area network, a mobile communications network, and combinations thereof; the processor 1008 implements the ordering method of embodiment 1 described above by running the computer program stored in the memory 502, as follows:
receiving a signal triggered by a user and sending a food ordering request to a server;
displaying the food ordering link sent by the server after responding to the food ordering request; the ordering link is provided with an ordering random code, and the ordering random code is provided with a time stamp and is bound with an order number;
after clicking the ordering link, the user sends the ordering random code to the server, so that the server judges whether the ordering link is overdue or not after receiving the ordering random code, and if not, sends a geographical position acquisition request to the terminal;
responding to a geographic position acquisition request sent by a server, acquiring the geographic position of a user, and sending the geographic position of the user to the server so that the server judges whether the user orders within a preset ordering range, and if so, sending an ordering page to a terminal;
and displaying an ordering page and storing an ordering random code.
The input unit 503 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control; in particular, the input unit 503 may include a touch-sensitive surface, also referred to as a touch display screen or a touch pad, which may collect touch operations by a user (such as operations by a user on or near the touch-sensitive surface using any suitable object or accessory, such as a finger, a stylus, etc.) on or near the touch-sensitive surface, and drive the corresponding connection device according to a preset program, as well as other input devices. Alternatively, the touch sensitive surface may comprise two parts, a touch detection means and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts it to touch point coordinates, and sends the touch point coordinates to the processor 180, and can receive and execute commands from the processor 508. In addition, touch sensitive surfaces may be implemented using various types of resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch-sensitive surface, the input unit 503 may also include other input devices, in particular, but not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 504 may be used to display information input by the user or information provided to the user for various graphical user interfaces of the terminal, which may be made up of graphics, text, icons, video, and any combination thereof; the Display unit 504 may include a Display panel, and optionally, the Display panel may be configured in the form of an LCD (Liquid Crystal Display), an OLED (Organic Light-Emitting Diode), or the like; further, the touch-sensitive surface may overlie the display panel, and when a touch operation is detected on or near the touch-sensitive surface, the touch-sensitive surface may be passed to the processor 508 to determine the type of touch event, and the processor 508 may then provide a corresponding visual output on the display panel in accordance with the type of touch event, with the touch-sensitive surface and the display panel being provided as two separate components to perform input and output functions, and in some cases, the touch-sensitive surface may be integrated with the display panel to perform input and output functions.
The sensors 505 can be at least one of, for example, light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display panel according to the brightness of ambient light, and a proximity sensor that may turn off the display panel and/or the backlight when the terminal moves to the ear; as one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when the mobile phone is stationary, and can be used for applications of recognizing the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; the terminal can also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., which are not described in detail herein.
Audio circuitry 506, coupled to a speaker and microphone, may provide an audio interface between the user and the terminal. The audio circuit 506 may transmit the electrical signal converted from the received audio data to a speaker, and convert the electrical signal into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electric signal, which is received by the audio circuit 506 and converted into audio data, which is then processed by the audio data output processor 508, and then transmitted to, for example, another terminal via the RF circuit 601, or the audio data is output to the memory 502 for further processing. The audio circuit 506 may also include an earbud jack to provide communication of peripheral headphones with the terminal.
The camera 507 can collect image information, such as face images, environment images and the like, and in application programs such as WeChat and Paibao, the two-dimensional code can be scanned through the camera 507.
The processor 508 is a control center of the terminal, connects various parts of the entire mobile phone by using various interfaces and lines, and performs various functions of the terminal and processes data by operating or executing software programs and/or modules stored in the memory 502 and calling data stored in the memory 502, thereby integrally monitoring the mobile phone. Optionally, processor 508 may include one or more processing cores; preferably, the processor 508 may integrate an application processor, which primarily handles operating systems, user interfaces, application programs, etc., and a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 508.
A power supply 509 (e.g., a battery) is used to power the various components, and is preferably logically connected to the processor 508 via a power management system to manage charging, discharging, and power consumption via the power management system. The power supply 509 may also include any component such as one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
Example 6:
the present embodiment provides a server, as shown in fig. 5, comprising a processor 602, a memory, and a network interface 603 connected by a system bus 601. Wherein, the processor 602 is used for providing calculation and control capability, the memory includes a nonvolatile storage medium 604 and an internal memory 605, the nonvolatile storage medium 604 stores an operating system, a computer program and a database, the internal memory 605 provides an environment for the operating system and the computer program in the nonvolatile storage medium to run, and when the computer program is executed by the processor 602, the ordering method of the above embodiment 2 is implemented as follows:
receiving a meal ordering request sent by a terminal;
responding to a food ordering request sent by the terminal, generating a food ordering random code, and sending a food ordering link with the food ordering random code to the terminal; the ordering random code is provided with a time stamp and is bound with the order number;
after a user clicks the ordering link through the terminal, receiving an ordering random code sent by the terminal, judging whether the ordering link is overdue or not, and if not, sending a geographical position acquisition request to the terminal;
and receiving user geographical position information sent by the terminal after responding to the geographical position acquisition request, judging whether the user orders within a preset ordering range, if so, sending an ordering page to the terminal so as to enable the terminal to display the ordering page, and storing an ordering random code.
Example 7:
the present embodiment provides a storage medium, which is a computer-readable storage medium, and stores a computer program, and when the program is executed by a processor and the processor executes the computer program stored in the memory, the method for ordering food in embodiment 1 above is implemented as follows:
receiving a signal triggered by a user and sending a food ordering request to a server;
displaying the food ordering link sent by the server after responding to the food ordering request; the ordering link is provided with an ordering random code, and the ordering random code is provided with a time stamp and is bound with an order number;
after clicking the ordering link, the user sends the ordering random code to the server, so that the server judges whether the ordering link is overdue or not after receiving the ordering random code, and if not, sends a geographical position acquisition request to the terminal;
responding to a geographic position acquisition request sent by a server, acquiring the geographic position of a user, and sending the geographic position of the user to the server so that the server judges whether the user orders within a preset ordering range, and if so, sending an ordering page to a terminal;
and displaying an ordering page and storing an ordering random code.
Example 8:
the present embodiment provides a storage medium, which is a computer-readable storage medium, and stores a computer program, and when the program is executed by a processor and the processor executes the computer program stored in the memory, the method for ordering food in embodiment 2 is implemented as follows:
receiving a meal ordering request sent by a terminal;
responding to a food ordering request sent by the terminal, generating a food ordering random code, and sending a food ordering link with the food ordering random code to the terminal; the ordering random code is provided with a time stamp and is bound with the order number;
after a user clicks the ordering link through the terminal, receiving an ordering random code sent by the terminal, judging whether the ordering link is overdue or not, and if not, sending a geographical position acquisition request to the terminal;
and receiving user geographical position information sent by the terminal after responding to the geographical position acquisition request, judging whether the user orders within a preset ordering range, if so, sending an ordering page to the terminal so as to enable the terminal to display the ordering page, and storing an ordering random code.
The storage medium in embodiments 7 to 8 may be a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a Random Access Memory (RAM), a usb disk, a removable hard disk, or the like.
In summary, the ordering request can be sent to the server through the terminal, after the server responds to the ordering request, the ordering link with the ordering random code is sent to the terminal, the ordering random code has a timestamp, after the user clicks the ordering link, the server can prevent the user from maliciously ordering in a time dimension by judging whether the ordering link is expired or not, and when the ordering link is judged not to be expired, after the server obtains the geographical position of the user through the terminal, the server can prevent the user from maliciously ordering in a space dimension by judging whether the user orders within a preset ordering range or not, namely, the server can prevent the user from maliciously ordering by combining two dimensions of time and space; in addition, the server is used for generating the ordering random code, the ordering random code is stored by the terminal after the ordering page is sent to the terminal, and when a user places an order or pays, the ordering random code is used by the user to a background for verification and exchange for an order number, sensitive information such as the order number is hidden, the traditional method of directly transmitting the order number in an interface is replaced, the safety of an ordering system is improved, the user is prevented from modifying the order number, malicious ordering of the user is prevented to a certain extent, and the method for introducing the ordering random code is simple to implement and has high verification and replacement efficiency.
The above description is only for the preferred embodiments of the present invention, but the protection scope of the present invention is not limited thereto, and any person skilled in the art can substitute or change the technical solution and the inventive concept of the present invention within the scope of the present invention.

Claims (7)

1. A food ordering method for preventing malicious ordering is applied to a terminal, and is characterized in that the method comprises the following steps:
receiving a signal triggered by a user and sending a food ordering request to a server; the two-dimensional code comprises a two-dimensional code and a signal triggered by a user, wherein the signal triggered by the user is a signal triggered when the user scans the two-dimensional code by using a terminal, and the two-dimensional code is a desktop ordering two-dimensional code arranged on each table of a restaurant;
displaying the food ordering link sent by the server after responding to the food ordering request; the ordering link is provided with an ordering random code order _ key, and the ordering random code order _ key is provided with a timestamp and is bound with an order number;
after a user clicks a food ordering link, sending the food ordering random code to a server, so that the server judges whether relevant information of the user is in a database or not after receiving the food ordering random code, if so, the user orders in the restaurant, directly judges whether the food ordering link is expired or not, if not, the user does not order in the restaurant, stores the relevant information of the user in the database, judges whether the food ordering link is expired or not, and if so, sends a geographic position acquisition request to a terminal;
responding to a geographic position acquisition request sent by a server, judging whether a user authorizes to acquire the geographic position of the user, if so, directly acquiring the geographic position of the user, if not, prompting that the geographic position is not authorized and requesting user authorization, acquiring the geographic position of the user after the user authorization, sending the geographic position of the user to the server so as to enable the server to judge whether the user orders within a preset ordering range, and if so, sending an ordering page to a terminal;
displaying an ordering page and storing an ordering random code; the ordering random code order _ key is stored in cookies of the terminal, and when a user places an order or pays for each time, the ordering random code order _ key is used for verification to the server and is exchanged for an order number, and the order number is hidden;
the judgment of whether the food ordering link is expired specifically comprises the following steps: according to the time of sending the ordering random code order _ key by the server and the time of receiving the ordering random code order _ key by the server, judging whether the difference between the receiving time and the sending time is within a preset time range, if so, judging that the ordering link is not expired, otherwise, judging that the ordering link is expired, and if not, judging that the ordering link is not expired, otherwise, judging that the ordering link is expired.
2. An ordering method for preventing malicious ordering is applied to a server and is characterized by comprising the following steps:
after receiving a signal triggered by a user, a terminal receives a food ordering request sent by the terminal; the two-dimensional code comprises a two-dimensional code and a signal triggered by a user, wherein the signal triggered by the user is a signal triggered when the user scans the two-dimensional code by using a terminal, and the two-dimensional code is a desktop ordering two-dimensional code arranged on each table of a restaurant;
responding to a food ordering request sent by the terminal, generating a food ordering random code, and sending a food ordering link with the food ordering random code to the terminal; the ordering random code is provided with a time stamp and is bound with the order number;
after a user clicks a food ordering link through a terminal, receiving a food ordering random code sent by the terminal, judging whether relevant information of the user is in a database, if so, indicating that the user has already ordered food in the restaurant, directly judging whether the food ordering link is overdue, otherwise, indicating that the user does not order food in the restaurant, storing the relevant information of the user in the database, then judging whether the food ordering link is overdue, if not, sending a geographical position acquisition request to the terminal, so that the terminal responds to the geographical position acquisition request sent by a server, judging whether the user is authorized to acquire the geographical position of the user, if so, directly acquiring the geographical position of the user, if not, prompting that the geographical position is unauthorized and requesting user authorization, acquiring the geographical position of the user after the user authorization, and sending the geographical position of the user to the server;
receiving user geographic position information sent by a terminal after responding to a geographic position acquisition request, judging whether a user orders within a preset ordering range, if so, sending an ordering page to the terminal so that the terminal displays the ordering page and stores an ordering random code; the ordering random code order _ key is stored in cookies of the terminal, and when a user places an order or pays for each time, the ordering random code order _ key is used for verification to the server and is exchanged for an order number, and the order number is hidden;
the judgment of whether the food ordering link is expired specifically comprises the following steps: according to the time of sending the ordering random code order _ key by the server and the time of receiving the ordering random code order _ key by the server, judging whether the difference between the receiving time and the sending time is within a preset time range, if so, judging that the ordering link is not expired, otherwise, judging that the ordering link is expired, and if not, judging that the ordering link is not expired, otherwise, judging that the ordering link is expired.
3. An ordering system for preventing malicious ordering is applied to a terminal, and is characterized in that the system comprises:
the ordering request sending module is used for receiving a signal triggered by a user and sending an ordering request to the server; the two-dimensional code comprises a two-dimensional code and a signal triggered by a user, wherein the signal triggered by the user is a signal triggered when the user scans the two-dimensional code by using a terminal, and the two-dimensional code is a desktop ordering two-dimensional code arranged on each table of a restaurant;
the ordering link receiving module is used for displaying an ordering link sent by the server after responding to the ordering request; the ordering link is provided with an ordering random code order _ key, and the ordering random code order _ key is provided with a timestamp and is bound with an order number;
the food ordering random code sending module is used for sending the food ordering random code to the server after the user clicks the food ordering link, so that the server judges whether relevant information of the user is in the database or not after receiving the food ordering random code, if so, the user orders food in the restaurant and directly judges whether the food ordering link is overdue or not, if not, the user does not order food in the restaurant, the relevant information of the user is stored in the database and then judged whether the food ordering link is overdue or not, and if so, a geographic position obtaining request is sent to the terminal;
the geographic position information acquisition module is used for responding to a geographic position acquisition request sent by the server, judging whether the user authorizes to acquire the geographic position of the user, if so, directly acquiring the geographic position of the user, if not, prompting that the geographic position is not authorized and requesting user authorization, acquiring the geographic position of the user after the user authorization, sending the geographic position of the user to the server so that the server judges whether the user orders within a preset ordering range, and if so, sending an ordering page to the terminal;
the ordering page display module is used for displaying an ordering page and storing an ordering random code; the ordering random code order _ key is stored in cookies of the terminal, and when a user places an order or pays for each time, the ordering random code order _ key is used for verification to the server and is exchanged for an order number, and the order number is hidden;
the judgment of whether the food ordering link is expired specifically comprises the following steps: according to the time of sending the ordering random code order _ key by the server and the time of receiving the ordering random code order _ key by the server, judging whether the difference between the receiving time and the sending time is within a preset time range, if so, judging that the ordering link is not expired, otherwise, judging that the ordering link is expired, and if not, judging that the ordering link is not expired, otherwise, judging that the ordering link is expired.
4. An ordering system for preventing malicious ordering, which is applied to a server, and is characterized in that the system comprises:
the ordering request receiving module is used for receiving an ordering request sent by the terminal after the terminal receives a signal triggered by a user; the two-dimensional code comprises a two-dimensional code and a signal triggered by a user, wherein the signal triggered by the user is a signal triggered when the user scans the two-dimensional code by using a terminal, and the two-dimensional code is a desktop ordering two-dimensional code arranged on each table of a restaurant;
the ordering request response module is used for responding to an ordering request sent by the terminal, generating an ordering random code and sending an ordering link with the ordering random code to the terminal; the ordering random code is provided with a time stamp and is bound with the order number;
a receiving module of the random ordering code, which is used for receiving the random ordering code sent by the terminal after the user clicks the ordering link through the terminal, judging whether the relevant information of the user is in the database or not, if yes, the user orders at the restaurant, whether the ordering link is expired is directly judged, if not, the user does not order at the restaurant, the related information of the user is stored in the database, whether the ordering link is expired is judged, if the ordering link is not expired, the geographic position acquisition request is sent to the terminal, so that the terminal responds to the geographic position acquisition request sent by the server, judges whether the user authorizes to acquire the geographic position of the user, directly acquires the geographic position of the user if the user authorizes to acquire the geographic position, prompts that the geographic position is not authorized and requests the user to authorize if the user does not authorize, acquiring the geographical position of the user after the user authorizes the user, and sending the geographical position of the user to a server;
the ordering page sending module is used for receiving the geographical position information of the user sent by the terminal after responding to the geographical position acquisition request, judging whether the user orders within a preset ordering range, and if so, sending the ordering page to the terminal so that the terminal displays the ordering page and stores an ordering random code; the ordering random code order _ key is stored in cookies of the terminal, and when a user places an order or pays for each time, the ordering random code order _ key is used for verification to the server and is exchanged for an order number, and the order number is hidden;
the judgment of whether the food ordering link is expired specifically comprises the following steps: according to the time of sending the ordering random code order _ key by the server and the time of receiving the ordering random code order _ key by the server, judging whether the difference between the receiving time and the sending time is within a preset time range, if so, judging that the ordering link is not expired, otherwise, judging that the ordering link is expired, and if not, judging that the ordering link is not expired, otherwise, judging that the ordering link is expired.
5. A terminal comprising a processor and a memory for storing a program executable by the processor, wherein the processor implements the ordering method of claim 1 when executing the program stored in the memory.
6. A server comprising a processor and a memory for storing processor-executable programs, wherein the processor, when executing the programs stored in the memory, implements the ordering method of claim 2.
7. A storage medium storing a program, wherein the program, when executed by a processor, implements the ordering method of any one of claims 1-2.
CN201910042570.XA 2019-01-17 2019-01-17 Food ordering method, system, terminal, server and medium for preventing malicious ordering Active CN109801136B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910042570.XA CN109801136B (en) 2019-01-17 2019-01-17 Food ordering method, system, terminal, server and medium for preventing malicious ordering

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910042570.XA CN109801136B (en) 2019-01-17 2019-01-17 Food ordering method, system, terminal, server and medium for preventing malicious ordering

Publications (2)

Publication Number Publication Date
CN109801136A CN109801136A (en) 2019-05-24
CN109801136B true CN109801136B (en) 2021-04-23

Family

ID=66559430

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910042570.XA Active CN109801136B (en) 2019-01-17 2019-01-17 Food ordering method, system, terminal, server and medium for preventing malicious ordering

Country Status (1)

Country Link
CN (1) CN109801136B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111786938B (en) * 2020-03-06 2021-10-15 北京沃东天骏信息技术有限公司 Method, system and electronic equipment for preventing malicious resource acquisition
CN111524041A (en) * 2020-03-31 2020-08-11 北京辰森世纪科技股份有限公司 Ordering processing method, device and system based on dynamic content service
CN111737667A (en) * 2020-06-24 2020-10-02 刘高峰 Method, device and system for preventing malicious food ordering
JP7093577B2 (en) * 2020-12-04 2022-06-30 株式会社ビジネスラボ Ordering system, ordering method, computer program

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103279684A (en) * 2013-06-10 2013-09-04 广州市沃希信息科技有限公司 Ordering method and system based on two-dimensional code
KR20140128514A (en) * 2013-04-26 2014-11-06 에스케이플래닛 주식회사 Commodity odering method and device using mobile application
CN104809612A (en) * 2015-04-23 2015-07-29 联动优势电子商务有限公司 Order payment method, server and mobile terminal
CN104867068A (en) * 2015-05-28 2015-08-26 冯林 Intelligent food ordering system based on graphic code
CN105512881A (en) * 2015-12-09 2016-04-20 联动优势电子商务有限公司 Method and terminal for completing payment on the basis of two-dimensional code
CN107886449A (en) * 2017-11-29 2018-04-06 芽米科技成都有限公司 A kind of smart machine scans method for ordering

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20140128514A (en) * 2013-04-26 2014-11-06 에스케이플래닛 주식회사 Commodity odering method and device using mobile application
CN103279684A (en) * 2013-06-10 2013-09-04 广州市沃希信息科技有限公司 Ordering method and system based on two-dimensional code
CN104809612A (en) * 2015-04-23 2015-07-29 联动优势电子商务有限公司 Order payment method, server and mobile terminal
CN104867068A (en) * 2015-05-28 2015-08-26 冯林 Intelligent food ordering system based on graphic code
CN105512881A (en) * 2015-12-09 2016-04-20 联动优势电子商务有限公司 Method and terminal for completing payment on the basis of two-dimensional code
CN107886449A (en) * 2017-11-29 2018-04-06 芽米科技成都有限公司 A kind of smart machine scans method for ordering

Also Published As

Publication number Publication date
CN109801136A (en) 2019-05-24

Similar Documents

Publication Publication Date Title
AU2018421189B2 (en) Method for quickly opening application or application function, and terminal
CN109801136B (en) Food ordering method, system, terminal, server and medium for preventing malicious ordering
CN105933904B (en) Network connection method and device
US10956280B2 (en) Data backup method, electronic device, and storage medium
CN106332307B (en) Method for accessing application program to network and mobile terminal
CN105471931B (en) Method, device and system for inquiring service data
US20170316781A1 (en) Remote electronic service requesting and processing method, server, and terminal
CN110166439B (en) Equipment sharing method, terminal, router and server
CN110674490B (en) Application permission display method and device and mobile terminal
CN108834132B (en) Data transmission method and equipment and related medium product
WO2014206143A1 (en) Method, apparatus and device for displaying number of unread messages
CN105653220B (en) Screen data display method and device in remote control
CN104426919A (en) Page sharing method, device and system
CN111478849B (en) Service access method, device and storage medium
CN108334755A (en) Private space creation method and device, storage medium, electronic equipment
CN108632454B (en) Information processing method and device, computer readable storage medium and terminal
CN106203228A (en) Two-dimensional code information transmission method, device and equipment
CN108573169A (en) Nearest task list display methods and device, storage medium, electronic equipment
CN104573437A (en) Information authentication method, device and terminal
CN112749074B (en) Test case recommending method and device
CN109428871B (en) Defense strategy determination method and device
CN107104930A (en) It is a kind of that the methods, devices and systems for checking authority are set
US20190340601A1 (en) Method And Mobile Device For Transmitting Data By Using Barcode
CN104917905A (en) Strange incoming call processing method, terminal and server
CN110719361B (en) Information transmission method, mobile terminal and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant