CN113362061A - Method, system, device, storage medium and electronic equipment for responding to user request - Google Patents

Method, system, device, storage medium and electronic equipment for responding to user request Download PDF

Info

Publication number
CN113362061A
CN113362061A CN202010152500.2A CN202010152500A CN113362061A CN 113362061 A CN113362061 A CN 113362061A CN 202010152500 A CN202010152500 A CN 202010152500A CN 113362061 A CN113362061 A CN 113362061A
Authority
CN
China
Prior art keywords
user
electronic
user request
electronic certificate
time period
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
CN202010152500.2A
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202010152500.2A priority Critical patent/CN113362061A/en
Publication of CN113362061A publication Critical patent/CN113362061A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3821Electronic credentials
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/90335Query processing
    • G06F16/90344Query processing by using string matching techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/387Payment using discounts or coupons
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0207Discounts or incentives, e.g. coupons or rebates
    • G06Q30/0239Online discounts or incentives

Abstract

The application provides a method for responding to a user request, a system for responding to the user request, a device for responding to the user request, a computer readable storage medium and an electronic device; relates to the technical field of computers; the method comprises the following steps: generating and outputting a verification image when a first user request is detected within a first preset time period; if the first user input data aiming at the verification image is matched with the verification image, selecting and outputting an electronic certificate applied to a specific event from preset electronic certificates; when a second user request is detected within a second preset time period, matching the received second user input data with the electronic certificate; the first preset time interval and the second preset time interval have no intersection; and if the matching is successful, responding to the second user request according to the electronic certificate. The method can solve the problem of high concurrency to a certain extent and improve the processing efficiency of the user request.

Description

Method, system, device, storage medium and electronic equipment for responding to user request
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method for responding to a user request, a system for responding to a user request, an apparatus for responding to a user request, a computer-readable storage medium, and an electronic device.
Background
Currently, for an e-commerce platform, users are generally attracted to purchase goods through some preferential policies. For example, the e-commerce platform may push coupons "fresh zone full 99 minus 50", "daily zone slow 199 minus 100", etc. which the user may purchase at a more favorable price for a given item after the user has picked up on the activity page. However, the number of user pick-up requests and user purchase requests that the server needs to process in parallel varies depending on the degree of preference of the coupon. When the number of user requests is large, a problem of high concurrency is usually caused, and the processing efficiency of the server for the user requests is further influenced.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present application and therefore may include information that does not constitute prior art known to a person of ordinary skill in the art.
Disclosure of Invention
The present application aims to provide a method for responding to a user request, a system for responding to a user request, a device for responding to a user request, a computer-readable storage medium and an electronic device, which solve the problem of high concurrency at least to some extent and improve the processing efficiency of a user request.
Other features and advantages of the present application will be apparent from the following detailed description, or may be learned by practice of the application.
According to a first aspect of the present application, there is provided a method of responding to a user request, comprising:
when a first user request is detected within a first preset time period, generating and outputting a verification image; a first user requesting an electronic voucher for application to a specific event;
if the first user input data aiming at the verification image is matched with the verification image, selecting and outputting an electronic certificate applied to a specific event from preset electronic certificates;
when a second user request is detected within a second preset time period, matching the received second user input data with the electronic certificate; the second user request is for applying the electronic certificate to a specific event, the first preset time period and the second preset time period do not intersect;
and if the matching is successful, responding to the second user request according to the electronic certificate.
In an exemplary embodiment of the present application, before generating and outputting the verification image when the first user request is detected within the first preset time period, the method may further include:
detecting whether the current time is later than the upper limit time of a first preset time period;
if so, adjusting the current state of the identifier corresponding to the specific event into an interactive state; if not, adjusting the current state of the identifier to be a non-interactive state;
while the identification is in an interactable state, a first user request is received.
In an exemplary embodiment of the present application, after receiving the first user request, the method may further include:
requesting a first display page corresponding to a specific event from a content distribution server and outputting the first display page;
detecting whether the request time corresponding to the first user request is in a first preset time period;
and if the electronic certificate is not in the first preset time period, outputting prompt information in the first display page, wherein the prompt information is used for indicating that the electronic certificate applied to the specific event cannot be acquired.
In an exemplary embodiment of the present application, after generating and outputting the verification image, the method may further include:
when user operation corresponding to the specific input area is detected, first user input data corresponding to the user operation is acquired.
In an exemplary embodiment of the present application, before the verification character is included in the verification image and the electronic certificate applied to the specific event is selected from the preset electronic certificates and output, the method may further include the following steps:
detecting whether an electronic certificate which corresponds to the user account and is applied to a specific event exists in the cache; wherein the user account corresponds to the first user request;
if the verification character does not exist, comparing the input character corresponding to the detected first user input data with the verification character;
and if the input character is the same as the verification character, judging that the first user input data is matched with the verification image.
In an exemplary embodiment of the present application, if it is detected that an electronic credential corresponding to a user account and specific to a specific event exists in a cache, the method may further include the following steps:
and requesting a second display page containing the electronic certificate from the content distribution server and outputting the second display page.
In an exemplary embodiment of the present application, selecting and outputting an electronic certificate applied to a specific event from preset electronic certificates includes:
detecting whether a preset electronic certificate exists in the cache;
if the electronic certificate exists, selecting the electronic certificate applied to the specific event from the preset electronic certificates and outputting the electronic certificate;
and deleting the electronic certificate applied to the specific event in the preset electronic certificate.
In an exemplary embodiment of the present application, if the preset electronic credential does not exist in the cache, the method may further include the following steps:
and outputting prompt information for indicating that the preset electronic certificate is completely received.
In an exemplary embodiment of the present application, after selecting and outputting an electronic certificate applied to a specific event from preset electronic certificates, the method may further include:
storing the user account and the electronic certificate in a cache in a key value structure; the key value structure is used for representing the binding relationship between the user account and the electronic certificate;
the key-value structure is persisted into the key-value database through caching.
In an exemplary embodiment of the present application, matching the received second user input data with the electronic credential includes:
determining a first character sequence corresponding to the second user input data and a second character sequence corresponding to the electronic certificate;
carrying out same sequence bit comparison on the characters in the first character sequence and the characters in the second character sequence according to the character arrangement sequence;
and if the same sequence position of the characters in the first character sequence and the characters in the second character sequence is the same, judging that the second user input data is successfully matched with the electronic certificate.
In an exemplary embodiment of the present application, the electronic certificate is a coupon code, the specific event is a specific commodity purchase event, and responding to the second user request according to the electronic certificate includes:
determining the commodity price corresponding to the specific commodity purchasing event according to the discount code;
the specific goods purchase event is performed according to the goods price.
According to a second aspect of the present application, there is provided a system for responding to a user request, comprising a client and a server, wherein:
the client is used for sending a first user request to the server;
a server for receiving a first user request; detecting whether the request time corresponding to the first user request is in a first preset time period; when a first user request is detected within a first preset time period, generating a verification image and outputting the verification image to a client; a first user requesting an electronic voucher for application to a specific event;
the client is also used for receiving the verification image; transmitting first user input data for the verification image to a server;
a server further configured to receive first user input data; when the first user input data is detected to be matched with the verification image, selecting an electronic certificate applied to a specific event from preset electronic certificates and outputting the electronic certificate to the client;
the client is also used for receiving the electronic certificate; transmitting second user input data for the electronic credential to the server;
the server is also used for receiving second user input data; detecting whether the request time corresponding to the second user request is in a second preset time period; when a second user request is detected within a second preset time period, matching second user input data with the electronic certificate; the second user request is for applying the electronic certificate to a specific event, the first preset time period and the second preset time period do not intersect; and if the matching is successful, responding to the second user request according to the electronic certificate.
According to a third aspect of the present application, there is provided an apparatus for responding to a user request, comprising an authentication image generation unit, an electronic certificate selection unit, a data matching unit, and a user request response unit, wherein:
a verification image generation unit for generating and outputting a verification image when a first user request is detected within a first preset time period; a first user requesting an electronic voucher for application to a specific event;
the electronic certificate selecting unit is used for selecting and outputting an electronic certificate applied to a specific event from preset electronic certificates when detecting that first user input data aiming at the verification image is matched with the verification image;
the data matching unit is used for matching the received second user input data with the electronic certificate when a second user request is detected in a second preset time period; the second user request is for applying the electronic certificate to a specific event, the first preset time period and the second preset time period do not intersect;
and the user request response unit is used for responding to the second user request according to the electronic certificate when the matching is successful.
In an exemplary embodiment of the present application, the apparatus may further include a period detecting unit, a state adjusting unit, and a user request receiving unit, wherein:
a period detection unit configured to detect whether the current time is later than an upper limit time of a first preset period before generating and outputting a verification image when the verification image generation unit detects the first user request within the first preset period;
the state adjusting unit is used for adjusting the current state of the identifier corresponding to the specific event into an interactive state after the time interval detecting unit detects that the current time is in the upper limit time of the first preset time interval;
the state adjusting unit is further used for adjusting the current state of the identifier to be in a non-interactive state after the time interval detecting unit detects that the current time is not in the upper limit time of the first preset time interval;
and the user request receiving unit is used for receiving the first user request when the identifier is in the interactive state.
In an exemplary embodiment of the present application, the apparatus may further include a page request unit and a prompt information output unit, where:
the page request unit is used for requesting a first display page corresponding to a specific event from the content distribution server and outputting the first display page after the user request receiving unit receives the first user request;
the time interval detection unit is also used for detecting whether the request time corresponding to the first user request is in a first preset time interval;
and the prompt information output unit is used for outputting prompt information in the first display page when the time interval detection unit detects that the request time corresponding to the first user request is not in a first preset time interval, wherein the prompt information is used for indicating that the electronic certificate applied to the specific event cannot be acquired.
In an exemplary embodiment of the present application, the apparatus may further include a data obtaining unit, wherein:
a data acquisition unit configured to acquire first user input data corresponding to a user operation when the user operation corresponding to the specific input area is detected after the user generates the verification image at the verification image generation unit and outputs the verification image.
In an exemplary embodiment of the present application, the verification image includes a verification character, and the apparatus may further include a character matching unit, where:
the electronic certificate selecting unit is also used for detecting whether the electronic certificate which corresponds to the user account and is applied to the specific event exists in the cache before the electronic certificate applied to the specific event is selected from the preset electronic certificates and output; wherein the user account corresponds to the first user request;
the character comparison unit is used for comparing the input characters corresponding to the detected first user input data with the verification characters when the electronic certificate selection unit detects that the electronic certificate which corresponds to the user account and is applied to the specific event does not exist in the cache;
the electronic certificate selecting unit is also used for judging that the first user input data is matched with the verification image when the comparison result of the character comparison unit is that the input character is the same as the verification character.
In an exemplary embodiment of the application, the page requesting unit is further configured to, when the electronic certificate selecting unit detects that the electronic certificate corresponding to the user account and targeting at the specific event exists in the cache, request the content distribution server for a second presentation page including the electronic certificate and output the second presentation page.
In an exemplary embodiment of the application, the electronic certificate selecting unit selects an electronic certificate applied to a specific event from preset electronic certificates and outputs the selected electronic certificate, which may specifically be:
the electronic certificate selection unit detects whether a preset electronic certificate exists in the cache;
if the electronic certificate exists, the electronic certificate selection unit selects the electronic certificate applied to the specific event from the preset electronic certificates and outputs the electronic certificate;
the electronic certificate selecting unit deletes the electronic certificate applied to the specific event in the preset electronic certificates.
In an exemplary embodiment of the application, the prompt information output unit is further configured to output a prompt information indicating that the pre-set electronic certificate is completely received when the electronic certificate selection unit detects that the pre-set electronic certificate does not exist in the cache.
In an exemplary embodiment of the present application, the apparatus may further include a key value storage unit, wherein:
the key value storage unit is used for storing the user account and the electronic certificate into a cache in a key value structure after the electronic certificate selection unit selects and outputs the electronic certificate applied to a specific event from preset electronic certificates; the key value structure is used for representing the binding relationship between the user account and the electronic certificate;
and the key value storage unit is also used for persisting the key value structure into the key value database through caching.
In an exemplary embodiment of the application, the way of matching the received second user input data with the electronic certificate by the data matching unit may specifically be:
the data matching unit determines a first character sequence corresponding to second user input data and a second character sequence corresponding to the electronic certificate;
the data matching unit carries out same sequence bit comparison on the characters in the first character sequence and the characters in the second character sequence according to the character arrangement sequence;
and if the same sequence position of the characters in the first character sequence is the same as that of the characters in the second character sequence, the data matching unit judges that the second user input data is successfully matched with the electronic certificate.
In an exemplary embodiment of the application, the electronic certificate is a coupon code, the specific event is a specific commodity purchasing event, and a manner of the user request responding unit responding to the second user request according to the electronic certificate may specifically be:
the user request response unit determines the commodity price corresponding to the specific commodity purchasing event according to the discount code;
the user request response unit executes a specific commodity purchase event according to the commodity price.
According to a fourth aspect of the present application, there is provided an electronic device comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the method of any one of the above via execution of the executable instructions.
According to a fifth aspect of the present application, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method of any one of the above.
The exemplary embodiments of the present application may have some or all of the following advantages:
in the method for responding to the user request provided by an example embodiment of the present application, the verification image may be generated and output when the first user request (e.g., the coupon retrieval request) is detected within a first preset time period (e.g., 1/2020, 9: 00-10: 00); if the first user input data aiming at the verification image is detected to be matched with the verification image, selecting an electronic certificate (such as 123456) applied to a specific event from preset electronic certificates and outputting the electronic certificate; matching the received second user input data (e.g., 123456) with the electronic credential (e.g., 123456) when a second user request (e.g., a specific merchandise purchase request) is detected within a second predetermined time period (e.g., 11: 00-12: 00 on 1/2020); the first preset time interval and the second preset time interval have no intersection; and if the matching is successful, responding to the second user request according to the electronic certificate. According to the scheme description, on one hand, the problem of high concurrency can be solved to a certain extent by processing different user requests at different time intervals, and the processing efficiency of the user requests is improved; on the other hand, whether the identity of the user is the script or not can be verified through the verification image, so that the user can be prevented from carrying out abnormal electronic certificate obtaining through the script to a certain extent.
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.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application. It is obvious that the drawings in the following description are only some embodiments of the application, and that for a person skilled in the art, other drawings can be derived from them without inventive effort.
Fig. 1 is a schematic diagram illustrating an exemplary system architecture of a method for responding to a user request and an apparatus for responding to a user request to which an embodiment of the present application may be applied;
FIG. 2 illustrates a schematic structural diagram of a computer system suitable for use in implementing an electronic device of an embodiment of the present application;
FIG. 3 schematically shows a flow diagram of a method of responding to a user request according to an embodiment of the present application;
FIG. 4 schematically illustrates a flow chart of a method of responding to a user request according to another embodiment of the present application;
FIG. 5 schematically illustrates a flow chart of a method of responding to a user request according to yet another embodiment of the present application;
FIG. 6 schematically shows a block diagram of a system for responding to a user request according to an embodiment of the present application;
FIG. 7 schematically illustrates a block diagram of a system for responding to a user request, in accordance with another embodiment of the present application;
fig. 8 schematically shows a block diagram of an apparatus for responding to a user request in an embodiment according to the present application.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the application. One skilled in the relevant art will recognize, however, that the subject matter of the present application can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known technical solutions have not been shown or described in detail to avoid obscuring aspects of the present application.
Furthermore, the drawings are merely schematic illustrations of the present application and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repetitive description will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
Fig. 1 is a schematic diagram illustrating a system architecture of an exemplary application environment to which a method for responding to a user request and an apparatus for responding to a user request according to an embodiment of the present application may be applied.
As shown in fig. 1, the system architecture 100 may include one or more of terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few. The terminal devices 101, 102, 103 may be various electronic devices having a display screen, including but not limited to desktop computers, portable computers, smart phones, tablet computers, and the like. It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation. For example, server 105 may be a server cluster comprised of multiple servers, or the like.
The method for responding to the user request provided by the embodiment of the application is generally executed by the terminal device 101, 102 or 103, and accordingly, the device for responding to the user request is generally arranged in the terminal device 101, 102 or 103. However, it is easily understood by those skilled in the art that the method for responding to the user request provided in the embodiment of the present application may also be executed by the server 105, and accordingly, a device for responding to the user request may also be disposed in the server 105, which is not particularly limited in the exemplary embodiment. For example, in one exemplary embodiment, the server 105 may generate and output a verification image when a first user request is detected within a first preset time period; if the first user input data aiming at the verification image is matched with the verification image, selecting and outputting an electronic certificate applied to a specific event from preset electronic certificates; when a second user request is detected within a second preset time period, matching the received second user input data with the electronic certificate; the first preset time interval and the second preset time interval have no intersection; and if the matching is successful, responding to the second user request according to the electronic certificate.
FIG. 2 illustrates a schematic structural diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present application.
It should be noted that the computer system 200 of the electronic device shown in fig. 2 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 2, the computer system 200 includes a Central Processing Unit (CPU)201 that can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)202 or a program loaded from a storage section 208 into a Random Access Memory (RAM) 203. In the RAM 203, various programs and data necessary for system operation are also stored. The CPU 201, ROM 202, and RAM 203 are connected to each other via a bus 204. An input/output (I/O) interface 205 is also connected to bus 204.
The following components are connected to the I/O interface 205: an input portion 206 including a keyboard, a mouse, and the like; an output section 207 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 208 including a hard disk and the like; and a communication section 209 including a network interface card such as a LAN card, a modem, or the like. The communication section 209 performs communication processing via a network such as the internet. A drive 210 is also connected to the I/O interface 205 as needed. A removable medium 211 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 210 as necessary, so that a computer program read out therefrom is mounted into the storage section 208 as necessary.
In particular, according to embodiments of the present application, the processes described below with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 209 and/or installed from the removable medium 211. The computer program, when executed by a Central Processing Unit (CPU)201, performs various functions defined in the methods and apparatus of the present application.
With the development of e-commerce platforms, products are more and more popular, the number of corresponding users is more and more, and when a company releases new products or promotes activities, many companies can choose to carry out the new products on the own shopping malls of the company. However, there is typically no professional and powerful development team to develop and maintain a mall for some non-e-commerce or non-internet industry companies. That is, the general company's own mall is often unable to resist the high concurrency problems of new product release or promotion. Under the general condition, the solution idea of the problem is capacity expansion: bandwidth is increased, and servers are increased. However, this method causes a problem of high cost, and the improvement of this method for high complication is also limited.
Based on one or more of the problems discussed above, the present example embodiment provides a method of responding to a user request. The method for responding to the user request may be applied to the server 105, and may also be applied to one or more of the terminal devices 101, 102, and 103, which is not particularly limited in this exemplary embodiment. Referring to fig. 3, the method of responding to the user request may include the following steps S310 to S340:
step S310: when a first user request is detected within a first preset time period, generating and outputting a verification image; the first user requests for electronic credentials that apply to a particular event.
Step S320: and if the first user input data aiming at the verification image is matched with the verification image, selecting the electronic certificate applied to the specific event from the preset electronic certificates and outputting the electronic certificate.
Step S330: when a second user request is detected within a second preset time period, matching the received second user input data with the electronic certificate; the second user request is for applying the electronic credential to a particular event, the first predetermined time period being disjoint from the second predetermined time period.
Step S340: and if the matching is successful, responding to the second user request according to the electronic certificate.
The above steps of the present exemplary embodiment will be described in more detail below.
In step S310, when a first user request is detected within a first preset time period, generating and outputting a verification image; the first user requests for electronic credentials that apply to a particular event.
The first preset time period may include an upper limit time (e.g., 8:00) and a lower limit time (e.g., 9:00), where the upper limit time and the lower limit time of the first preset time period are used to limit a range of the first preset time period, and the first preset time period may be a coupon code picking time period. In addition, the electronic certificate may be a character sequence, such as 5461423461234, 6 preferred 6 when limited 6, 201211546 limited time preferential, etc., and the electronic certificate may include chinese characters, english characters, or numbers, etc., which is not limited in the embodiments of the present application. In addition, the first user request detected in the first preset time period may be a request for obtaining a coupon code, and the specific event may be a request for purchasing a specific commodity, for example, the first user request may be used to obtain a coupon code applied to the specific commodity, and the electronic certificate may be the coupon code. It should be noted that, if the electronic voucher is a discount code, it can be applied to one or more specific commodities, for example, if the electronic voucher is a discount code whose milk powder category is full of 50 minus 25, it can be applied to purchase various brands of milk powder, if a user needs to purchase 20 yuan brand a milk powder, 20 yuan brand B milk powder and 10 yuan brand C milk powder, and if the above mentioned discount code whose milk powder category is full of 50 minus 25, brand a milk powder, brand B milk powder and brand C milk powder can be obtained through 25 yuan purchase. In addition, the verification image may include chinese characters, english characters, numbers, and the like, and the embodiment of the present application is not limited.
In this embodiment of the application, optionally, before generating and outputting the verification image when the first user request is detected within the first preset time period, the method may further include the following steps:
detecting whether the current time is later than the upper limit time of a first preset time period;
if so, adjusting the current state of the identifier corresponding to the specific event into an interactive state; if not, adjusting the current state of the identifier to be a non-interactive state;
while the identification is in an interactable state, a first user request is received.
The identifier corresponding to the specific event can be represented by a figure, an image, a text and the like, and the identifier comprises an interactive state and a non-interactive state. For example, if the current time is 7: 00, the current time is not later than (i.e., earlier than) the upper limit time (e.g., 8:00) of the first preset time period (e.g., 8: 00-9: 00); if the current time is 8: and 10, the current time is later than the upper limit time (for example, 8:00) of the first preset time period (for example, 8: 00-9: 00).
Specifically, the manner of adjusting the current state of the identifier corresponding to the specific event to the interactive state may be: detecting whether the current state of the identifier corresponding to the specific event is an interactive state, and if so, executing the receiving of the first user request; if not, adjusting the current state to be an interactive state; the method specifically comprises the following steps: highlighting the identification corresponding to the specific event.
Similarly, the manner of adjusting the current state of the identifier to the non-interactive state may be: detecting whether the current state of the identifier corresponding to the specific event is an interactive state, if not, executing the detection whether the current time is later than the upper limit time of a first preset time period; if so, adjusting the current state to be a non-interactive state; the method specifically comprises the following steps: and performing gray scale representation on the identifier corresponding to the specific event. When the identifier is in the non-interactive state, the user cannot click the identifier through touch operation.
Therefore, by implementing the optional embodiment, the response to the user operation in the non-preset time period can be avoided through the interaction state adjustment of the identifier corresponding to the specific event, and the power consumption is reduced.
Further, after receiving the first user request, the method may further include:
requesting a first display page corresponding to a specific event from a content distribution server and outputting the first display page;
detecting whether the request time corresponding to the first user request is in a first preset time period;
and if the electronic certificate is not in the first preset time period, outputting prompt information in the first display page, wherein the prompt information is used for indicating that the electronic certificate applied to the specific event cannot be acquired.
The content distribution server is configured to load a first display page, where the first display page is used to display an activity corresponding to a specific event, and the activity may be a promotion activity, a full-reduction activity, or the like. For example, the specific event is a milk powder purchasing event, the activity corresponding to the milk powder purchasing event may be an activity of a specified brand of milk powder full 50 minus 25, and the first display page is used for displaying the activity of the specified brand of milk powder full 50 minus 25 for the milk powder purchasing event. In addition, the request time corresponding to the first user request may be the time when the client transmits the first user request to the server. Furthermore, since the prompt information is used to indicate that the electronic certificate applied to the specific event cannot be acquired, the prompt information may be, for example: if the activity of reducing the milk powder is not started, please pick up the preferential codes after the activity is started.
Specifically, the manner of requesting the content distribution server for the first presentation page corresponding to the specific event and outputting the first presentation page may be: a client sends a page request to a content distribution server; the content distribution server returns a first display page to the client; the client outputs the first display page.
Therefore, the optional embodiment can be implemented to respond to the user request in a preset time period, reduce the power consumption caused by the first user request in the non-preset time period and improve the processing efficiency of the server.
In this embodiment of the application, optionally, after generating and outputting the verification image, the method may further include the following steps:
when user operation corresponding to the specific input area is detected, first user input data corresponding to the user operation is acquired.
Where the specific input area, which may be an input box typed by the user, does not intersect with the output area of the verification image, may detect a user operation (e.g., an input operation) and obtain data input by the user, i.e., first user input data, e.g., 123456.
Therefore, by implementing the optional embodiment, whether the identity of the user is a script can be verified through the verification image, so that the user can be prevented from carrying out abnormal preferential code pickup through the script to a certain extent.
In step S320, if it is detected that the first user input data for the verification image matches the verification image, an electronic certificate applied to a specific event is selected from the preset electronic certificates and output.
The preset electronic voucher can be a discount code, the discount code can be composed of characters such as Chinese characters, English characters and numbers, the number of the preset electronic vouchers can be multiple, and if the number of the preset electronic vouchers is multiple, the same two preset electronic vouchers do not exist in each preset electronic voucher.
In this embodiment of the application, optionally, before the verification image includes the verification character and the electronic certificate applied to the specific event is selected from the preset electronic certificates and output, the method may further include the following steps:
detecting whether an electronic certificate which corresponds to the user account and is applied to a specific event exists in the cache; wherein the user account corresponds to the first user request;
if the verification character does not exist, comparing the input character corresponding to the detected first user input data with the verification character;
and if the input character is the same as the verification character, judging that the first user input data is matched with the verification image.
The verification characters can be the above-mentioned chinese characters, english characters, numbers, etc. The cache can be redis, and data in the cache is stored in a key value mode. Additionally, the user account also corresponds to the second user request.
Therefore, by implementing the optional embodiment, whether the data input by the user is matched with the verification image can be judged, and abnormal preferential code pickup of the user through the script is avoided.
Further, if it is detected that the electronic certificate corresponding to the user account and specific to the event exists in the cache, the method may further include the following steps:
and requesting a second display page containing the electronic certificate from the content distribution server and outputting the second display page.
The second display page is used for displaying the electronic certificate, the second display page may include a character sequence corresponding to the electronic certificate, and may further include information such as a two-dimensional code, a barcode, and a password corresponding to the electronic certificate. When a second user request is detected within a second preset time period, the received second user input data and the electronic certificate can be matched by verifying information such as a two-dimensional code, a bar code or a password corresponding to the electronic certificate. Therefore, the problem of overlong verification time caused by the fact that the user manually inputs the character sequences corresponding to the electronic certificates one by one can be solved, the data matching efficiency can be improved, and the response efficiency to the user request is improved.
Therefore, by implementing the optional embodiment, the electronic certificate can be displayed to the user through the interaction scheme of the second display page, and the use experience of the user is improved.
In this embodiment of the application, optionally, selecting and outputting an electronic certificate applied to a specific event from preset electronic certificates includes:
detecting whether a preset electronic certificate exists in the cache;
if the electronic certificate exists, selecting the electronic certificate applied to the specific event from the preset electronic certificates and outputting the electronic certificate;
and deleting the electronic certificate applied to the specific event in the preset electronic certificate.
Wherein, if the preset electronic voucher does not exist in the cache, the method indicates that the discount code related to the specific commodity is picked up. In addition, after the electronic certificates applied to the specific events in the preset electronic certificates are deleted, the number of the preset electronic certificates is reduced by one.
Therefore, by implementing the optional embodiment, the uniqueness and the limitation of the preset electronic certificate can be ensured through a one-person-one-certificate system, and the electronic certificate is prevented from being falsely used by a user.
Further, if the preset electronic certificate does not exist in the cache, the method may further include the following steps:
and outputting prompt information for indicating that the preset electronic certificate is completely received.
The method for outputting the prompt information indicating that the preset electronic certificate is completely received may be: popping up prompt information for indicating that the preset electronic certificate is completely received in a pop-up window mode; or, the information content of the prompt message used for indicating that the preset electronic certificate has been completely received is displayed in a floating manner, which is not limited in the embodiment of the present application.
Therefore, by implementing the optional embodiment, the use experience of the user can be improved by timely informing the electronic certificate obtaining condition.
In this embodiment of the application, optionally, after selecting and outputting the electronic certificate applied to the specific event from the preset electronic certificates, the method may further include the following steps:
storing the user account and the electronic certificate in a key value structure (such as a key-value structure) in a cache; the key value structure is used for representing the binding relationship between the user account and the electronic certificate;
the key-value structure is persisted into the key-value database through caching.
The user account is used as a key (the data type is set), and the electronic certificate is used as a value (the data type is hash) to form a key-value structure.
It can be seen that implementing this alternative embodiment, the query speed for data can be improved by key-value structure storage. In addition, the key value structure is persisted, so that the traceability of data can be ensured, and the request and response results of each user are public and transparent.
In step S330, when a second user request is detected within a second preset time period, matching the received second user input data with the electronic certificate; the second user request is for applying the electronic credential to a particular event, the first predetermined time period being disjoint from the second predetermined time period.
The first preset time period may be earlier than the second preset time period, for example, the first preset time period is 8: 00-9: 00, the second preset time period is 10: 00-11: 00, and 8: 00-9: 00 is earlier than 10: 00-11: 00 without intersection. The second preset period includes an upper limit time (e.g., 10:00) and a lower limit time (e.g., 11:00), and the upper limit time and the lower limit time of the second preset period are used to define a range of the second preset period, and the second preset period may be a commodity purchase period. In addition, the second user request detected within the second preset period may be a purchase request for a specific commodity, for example, the second user request is used for applying a coupon code to purchase the specific commodity. Additionally, the received user input data may be a sequence of characters, such as 5461423461234.
In this embodiment of the application, optionally, matching the received second user input data with the electronic certificate includes:
determining a first character sequence corresponding to the second user input data and a second character sequence corresponding to the electronic certificate;
carrying out same sequence bit comparison on the characters in the first character sequence and the characters in the second character sequence according to the character arrangement sequence;
and if the same sequence position of the characters in the first character sequence and the characters in the second character sequence is the same, judging that the second user input data is successfully matched with the electronic certificate.
Wherein the same order bits may be the same position in the respective character sequences, e.g., the first character in a first character sequence (e.g., 123456) is the same order bits as the first character in a second character sequence (e.g., 123456). Therefore, the same sequence position of the characters in the first character sequence and the characters in the second character sequence is the same, that is, the first character in the first character sequence is the same as the first character in the second character sequence, the second character in the first character sequence is the same as the second character in the second character sequence, and the third character in the first character sequence is the same as the third character in the second character sequence.
Therefore, by implementing the optional embodiment, the data input by the user can be compared with the electronic certificate, so that the electronic certificate which the user needs to apply is real and credible, and the safety of the process of responding to the user request is improved.
In step S340, if the matching is successful, the second user request is responded according to the electronic certificate.
In this embodiment of the application, optionally, the step of responding to the second user request according to the electronic certificate, where the electronic certificate is a coupon code, and the specific event is a specific commodity purchase event, includes:
determining the commodity price corresponding to the specific commodity purchasing event according to the discount code;
the specific goods purchase event is performed according to the goods price.
Specifically, the manner of determining the commodity price corresponding to the specific commodity purchase event according to the coupon code may be: the item price (e.g., 25 dollars) corresponding to the specific item purchase event is determined based on offer details (e.g., full 50 minus 25 dollars) corresponding to the offer code.
Therefore, by implementing the optional embodiment, the commodity price after the discount can be automatically determined through the discount condition, so that the use experience of the user is improved, and the use viscosity of the user is improved.
Therefore, by implementing the method for responding to the user request shown in fig. 3, the problem of high concurrency can be solved to a certain extent by processing different user requests at different time intervals, and the processing efficiency of the user request is improved. In addition, whether the identity of the user is the script or not can be verified through the verification image, so that the user can be prevented from carrying out abnormal electronic certificate obtaining through the script to a certain extent.
Referring to fig. 4, fig. 4 schematically illustrates a flow chart of a method of responding to a user request according to another embodiment of the present application. As shown in fig. 4, the method for responding to a user request of another embodiment may include steps S400 to S440, in which:
step S400: detecting whether the current time is later than the upper limit time of a first preset time period; if yes, step S402 is performed, and if no, step S404 is performed.
Step S402: the current state of the identifier corresponding to the specific event is adjusted to be an interactive state, and step S406 is further performed.
Step S404: and adjusting the current state of the identifier to be a non-interactive state, and then re-executing the process.
Step S406: when the identifier is in an interactive state, receiving a first user request, requesting a first display page corresponding to a specific event from a content distribution server, and outputting the first display page; the first user requests for electronic credentials that apply to a particular event.
Step S408: detecting whether the request time corresponding to the first user request is in a first preset time period; if yes, step S412 is performed, and if no, step S410 is performed.
Step S410: and outputting prompt information in the first display page, wherein the prompt information is used for indicating that the electronic certificate applied to the specific event cannot be acquired, and then ending the process.
Step S412: the verification image is generated and output, and step S414 is further performed.
Step S414: when user operation corresponding to the specific input area is detected, first user input data corresponding to the user operation is acquired.
Step S416: the verification image comprises verification characters, and whether an electronic certificate which corresponds to the user account and is applied to a specific event exists in the cache is detected; wherein the user account corresponds to the first user request, if yes, step S420 is performed, if no, step S418 is performed.
Step S418: comparing the input character corresponding to the detected first user input data with the verification character, and if the comparison result shows that the input character is the same as the verification character, executing step S422; if the comparison result shows that the input character is different from the verification character, the process is ended.
Step S420: and requesting a second display page containing the electronic certificate from the content distribution server and outputting the second display page, and then executing step S432.
Step S422: it is determined that the first user input data matches the verification image.
Step S424: and detecting whether the preset electronic certificate exists in the cache, if so, executing step 428, and if not, executing step 426.
Step S426: and outputting prompt information for indicating that the preset electronic certificate is completely received, and then finishing the process.
Step S428: selecting and outputting the electronic certificate applied to the specific event from the preset electronic certificates, and then executing step S430.
Step S430: deleting the electronic certificate applied to a specific event in the preset electronic certificate, storing the user account and the electronic certificate in a cache in a key value structure, and persisting the key value structure in a key value database through the cache; the key-value structure is used for representing a binding relationship between the user account and the electronic certificate.
Step S432: when a second user request is detected in a second preset time period, determining a first character sequence corresponding to second user input data and a second character sequence corresponding to the electronic certificate; the second user request is for applying the electronic credential to a particular event, the first predetermined time period being disjoint from the second predetermined time period.
Step S434: comparing the same sequence bits of the characters in the first character sequence with the characters in the second character sequence according to the character arrangement sequence, and executing step S436 if the same sequence bits of the characters in the first character sequence and the characters in the second character sequence are the same; if the first character sequence and the second character sequence have characters with the same sequence and different bits, the process is ended.
Step S436: judging that the second user input data is successfully matched with the electronic certificate, determining the commodity price corresponding to the specific commodity purchasing event according to the discount code, and executing the specific commodity purchasing event according to the commodity price; the electronic voucher is a discount code, and the specific event is a specific commodity purchasing event.
It should be noted that steps S400 to S440 correspond to the steps in fig. 3 and the specific implementation thereof, and are not described herein again.
It can be seen that, by implementing the method for responding to the user request shown in fig. 4, the problem of high concurrency can be solved to a certain extent by processing different user requests at different time intervals, and the processing efficiency of the user request is improved. In addition, whether the identity of the user is the script or not can be verified through the verification image, so that the user can be prevented from carrying out abnormal electronic certificate obtaining through the script to a certain extent.
Referring to fig. 5, fig. 5 schematically illustrates a flow chart of a method of responding to a user request according to yet another embodiment of the present application. As shown in FIG. 5, a method of responding to a user request of yet another embodiment may comprise: step S510 to step S550, wherein:
step S510: in response to the first user request.
Step S520: the user identity is verified.
Step S530: and outputting the electronic certificate.
Step S540: matching the electronic credential with the user input data.
Step S550: in response to the second user request.
Specifically, the user may first log on the e-commerce platform, and click on an identifier (e.g., a milk powder can pattern) corresponding to a specific event (e.g., purchasing milk powder) for a first preset time period (e.g., a coupon getting time period). Furthermore, the client may receive a first user request corresponding to a user click operation, and after detecting the first user request, may output a verification image, and verify the user identity through the verification image, for example, an image including a verification code, and may further detect whether first user input data for the verification image (i.e., characters input by the user according to the verification code) is consistent with the verification code, so that it may be avoided that the user performs abnormal coupon code pickup through a script. If the electronic credentials (for example, the coupon codes) of the specific event are not received by the user, the coupon codes of the user account corresponding to the first user request can be selected from a plurality of preset electronic credentials (for example, a plurality of preset coupon codes) and output, that is, the above-mentioned output electronic credentials. And if the fact that the user draws the electronic certificate of the specific event is detected (namely, the user account corresponding to the user already has the discount code corresponding to the milk powder purchasing event), displaying the drawn electronic certificate. Further, the user may perform a specific event (e.g., purchase of powdered milk) for a second preset period of time (e.g., a specific event performing stage). Further, the client may receive a second user request corresponding to the user purchase operation. After detecting the second user request, the offer code may be matched to user input data (e.g., characters entered by the user in accordance with the offer code). If the matching is successful, a second user request may be responded, such as for a powdered milk purchase based on the coupon code.
It can be seen that, by implementing the method for responding to the user request shown in fig. 5, the problems of processing efficiency reduction, system crash and the like caused by the fact that the server needs to process a plurality of user requests simultaneously and in parallel can be reduced by executing the pre-purchase discount codes and the purchased commodities in stages, the stability of the system for responding to the user requests is improved, and the use experience of the user is further improved.
Further, in the present exemplary embodiment, a system for responding to a user request is also provided. Referring to fig. 6, the system 600 for responding to a user request may include a client 601 and a server 602, wherein:
a client 601, configured to send a first user request to a server 602;
a server 602 for receiving a first user request; detecting whether the request time corresponding to the first user request is in a first preset time period; when a first user request is detected within a first preset time period, generating a verification image and outputting the verification image to a client 601; a first user requesting an electronic voucher for application to a specific event;
the client 601 is further configured to receive a verification image; transmitting first user input data for the verification image to the server 602;
a server 602, further configured to receive first user input data; when the first user input data is detected to be matched with the verification image, selecting an electronic certificate applied to a specific event from preset electronic certificates and outputting the electronic certificate to the client 601;
the client 601 is further used for receiving the electronic certificate; transmitting second user input data for the electronic credential to the server 602;
a server 602, further configured to receive second user input data; detecting whether the request time corresponding to the second user request is in a second preset time period; when a second user request is detected within a second preset time period, matching second user input data with the electronic certificate; the second user request is for applying the electronic certificate to a specific event, the first preset time period and the second preset time period do not intersect; and if the matching is successful, responding to the second user request according to the electronic certificate.
It can be seen that, by implementing the system for responding to the user request shown in fig. 6, the problem of high concurrency can be solved to a certain extent by processing different user requests at different time periods, and the processing efficiency of the user request is improved. In addition, whether the identity of the user is the script or not can be verified through the verification image, so that the user can be prevented from carrying out abnormal electronic certificate obtaining through the script to a certain extent.
Still further, referring to fig. 7, fig. 7 schematically shows a block diagram of a system for responding to a user request according to another embodiment of the present application. As shown in fig. 7, a system 700 for responding to a user request of another embodiment includes a client 701, a proxy server 702, a content distribution server 703, a server 704, servers 705, … …, a server 706, a master redis707, a slave redis708, a slave redis709, a slave redis710, and a key-value database 711. The embodiment of the present application includes, but is not limited to, a server 704, a server 705, and a server 706, and similarly, the embodiment of the present application includes, but is not limited to, a master redis707, a slave redis708, a slave redis709, and a slave redis 710. The server 704, the server 705, the server 706, the master redis707, the slave redis708, the slave redis709 and the slave redis710 in fig. 7 are only exemplary illustrations, and in practical applications, a corresponding number of servers and rediss may be deployed according to requirements. Furthermore, redis a database that stores data in a cache.
Specifically, the client 701 may be configured to send a first user request to the proxy server 702, request a first presentation page corresponding to a specific event from the content distribution server 703, and output the first presentation page; the Content distribution server 703 is configured to load a page file (i.e., a first display page) for receiving the coupon, where the Content distribution server 703 may be a server of a Content Delivery Network (CDN), and the CDN may rely on edge servers deployed in various places to enable a user to obtain required Content nearby through functional modules of a central platform, such as load balancing, Content distribution, scheduling, and the like, so as to reduce Network congestion and improve user access response speed and hit rate; furthermore, the proxy server 702 may distribute the user request to one or more of the server 704, the servers 705, … …, and the server 706 for processing according to the load condition of each server, so as to ensure load balancing of each server, and thus, processing efficiency of the user request, utilization rate of the server, and system performance can be improved by processing the user request in parallel through a plurality of servers, and load balancing and disaster tolerance of the benefit code picking interface are realized. In addition, it should be noted that the master redis707, the slave redis708, the slave redis709, and the slave redis710 may be configured to store a key value structure (i.e., a kv structure) for representing a binding relationship between a user account and an electronic credential, where the master redis and the slave redis are adopted to implement read-write separation, so as to prevent the redis from becoming a performance bottleneck, and if the concurrency is severe, the redis can be paged to obtain the slave redis, thereby reducing the problem of low processing efficiency caused by high concurrency. In addition, data calls can be facilitated by persisting key-value structures from the redis710 into the key-value store 711; the key value database 711 may be a relational database management system (MySQL) and is used to store data in different tables, so as to improve the data call speed and the data call flexibility.
Referring to fig. 7 in conjunction with the steps performed by the client 601 and the server 602 in the system for responding to user requests shown in fig. 6, the client 701 may send a first user request to the proxy server 702; the proxy server 702 receives a first user request, detects whether the request time corresponding to the first user request is within a first preset time period, generates a verification image and outputs the verification image to the client 701 when the first user request is detected within the first preset time period; the client 701 receives the verification image, and transmits first user input data for the verification image to the proxy server 702; the proxy server 702 receives first user input data, and when detecting that the first user input data is matched with the verification image, selects an electronic certificate applied to a specific event from preset electronic certificates and outputs the electronic certificate to the client 701; the client 701 receives the electronic certificate and transmits second user input data for the electronic certificate to the proxy server 702; proxy server 702 receives the second user input data; detecting whether the request time corresponding to the second user request is in a second preset time period; when a second user request is detected within a second preset time period, distributing the second user request to the server 704, the servers 705 and … … and the server 706; the server 704, the servers 705 and … … and the server 706 call the master redis707, the slave redis708, the slave redis709 and the slave redis710 to match the second user input data with the electronic certificate, and if the matching is successful, the second user request is responded according to the electronic certificate; in addition, the server 704, the servers 705, … …, and the server 706 may store the user account and the electronic credential corresponding to the first user request in a key value structure to the primary redis707, the secondary redis708, the secondary redis709, and the secondary redis710, and persist the key value structure to the key value database 711 through the secondary redis 710.
It can be seen that, by implementing the system for responding to the user request shown in fig. 7, the problem of high concurrency can be solved to a certain extent by processing different user requests at different time periods, and the processing efficiency of the user request is improved. In addition, whether the identity of the user is the script or not can be verified through the verification image, so that the user can be prevented from carrying out abnormal electronic certificate obtaining through the script to a certain extent.
For details that are not disclosed in the embodiments of the system of the present application, please refer to the embodiments of the method for responding to a user request described above for details that are not disclosed in the embodiments of the system of the present application, because each functional module of the system for responding to a user request of the present application corresponds to a step of the above-described exemplary embodiment of the method for responding to a user request.
Still further, in this example embodiment, an apparatus for responding to a user request is also provided. Referring to fig. 8, the apparatus 800 for responding to a user request may include an authentication image generation unit 801, an electronic certificate selection unit 802, a data matching unit 803, and a user request response unit 804, where:
an authentication image generation unit 801 for generating and outputting an authentication image when a first user request is detected within a first preset period; a first user requesting an electronic voucher for application to a specific event;
an electronic certificate selecting unit 802, configured to select and output an electronic certificate applied to a specific event from preset electronic certificates when it is detected that first user input data for a verification image matches the verification image;
a data matching unit 803 for matching the received second user input data with the electronic certificate when the second user request is detected within a second preset time period; the second user request is for applying the electronic certificate to a specific event, the first preset time period and the second preset time period do not intersect;
and the user request responding unit 804 is used for responding to the second user request according to the electronic certificate when the matching is successful.
It can be seen that, by implementing the apparatus for responding to the user request shown in fig. 8, the problem of high concurrency can be solved to a certain extent by processing different user requests at different time intervals, and the processing efficiency of the user request is improved. In addition, whether the identity of the user is the script or not can be verified through the verification image, so that the user can be prevented from carrying out abnormal electronic certificate obtaining through the script to a certain extent.
In an exemplary embodiment of the present application, the apparatus may further include a period detecting unit, a state adjusting unit, and a user request receiving unit, wherein:
a period detecting unit configured to detect whether or not the current time is later than an upper limit time of a first preset period before generating and outputting a verification image when the verification image generating unit 801 detects a first user request within the first preset period;
the state adjusting unit is used for adjusting the current state of the identifier corresponding to the specific event into an interactive state after the time interval detecting unit detects that the current time is in the upper limit time of the first preset time interval;
the state adjusting unit is further used for adjusting the current state of the identifier to be in a non-interactive state after the time interval detecting unit detects that the current time is not in the upper limit time of the first preset time interval;
and the user request receiving unit is used for receiving the first user request when the identifier is in the interactive state.
Therefore, by implementing the optional embodiment, the response to the user operation in the non-preset time period can be avoided through the interaction state adjustment of the identifier corresponding to the specific event, and the power consumption is reduced.
In an exemplary embodiment of the present application, the apparatus may further include a page request unit and a prompt information output unit, where:
the page request unit is used for requesting a first display page corresponding to a specific event from the content distribution server and outputting the first display page after the user request receiving unit receives the first user request;
the time interval detection unit is also used for detecting whether the request time corresponding to the first user request is in a first preset time interval;
and the prompt information output unit is used for outputting prompt information in the first display page when the time interval detection unit detects that the request time corresponding to the first user request is not in a first preset time interval, wherein the prompt information is used for indicating that the electronic certificate applied to the specific event cannot be acquired.
Therefore, the optional embodiment can be implemented to respond to the user request in a preset time period, reduce the power consumption caused by the first user request in the non-preset time period and improve the processing efficiency of the server.
In an exemplary embodiment of the present application, the apparatus may further include a data obtaining unit, wherein:
a data acquisition unit configured to acquire first user input data corresponding to a user operation when the user operation corresponding to the specific input area is detected after the user generates and outputs the verification image at the verification image generation unit 801.
Therefore, by implementing the optional embodiment, whether the identity of the user is a script can be verified through the verification image, so that the user can be prevented from carrying out abnormal preferential code pickup through the script to a certain extent.
In an exemplary embodiment of the present application, the verification image includes a verification character, and the apparatus may further include a character matching unit, where:
the electronic certificate selecting unit 802 is further configured to detect whether an electronic certificate corresponding to the user account and applied to the specific event exists in the cache before selecting and outputting the electronic certificate applied to the specific event from the preset electronic certificates; wherein the user account corresponds to the first user request;
a character comparison unit, configured to compare the input character corresponding to the detected first user input data with the verification character when the electronic certificate selection unit 802 detects that the electronic certificate corresponding to the user account and applied to the specific event does not exist in the cache;
the electronic certificate selecting unit 802 is further configured to determine that the first user input data matches the verification image when the comparison result of the character comparison unit is that the input character is the same as the verification character.
Therefore, by implementing the optional embodiment, whether the data input by the user is matched with the verification image can be judged, and abnormal preferential code pickup of the user through the script is avoided.
In an exemplary embodiment of the present application, the page requesting unit is further configured to, when the electronic certificate selecting unit 802 detects that the electronic certificate corresponding to the user account and targeting at the specific event exists in the cache, request a second display page including the electronic certificate from the content distribution server and output the second display page.
Therefore, by implementing the optional embodiment, the electronic certificate can be displayed to the user through the interaction scheme of the second display page, and the use experience of the user is improved.
In an exemplary embodiment of the present application, the electronic certificate selecting unit 802 selects an electronic certificate applied to a specific event from preset electronic certificates and outputs the selected electronic certificate specifically may:
the electronic certificate selecting unit 802 detects whether a preset electronic certificate exists in the cache;
if the electronic certificate exists, the electronic certificate selecting unit 802 selects and outputs the electronic certificate applied to the specific event from the preset electronic certificates;
the electronic certificate selecting unit 802 deletes the electronic certificate applied to the specific event in the preset electronic certificate.
Therefore, by implementing the optional embodiment, the uniqueness and the limitation of the preset electronic certificate can be ensured through a one-person-one-certificate system, and the electronic certificate is prevented from being falsely used by a user.
In an exemplary embodiment of the application, the prompt information output unit is further configured to output a prompt information indicating that the pre-set electronic certificate is completely received when the electronic certificate selection unit 802 detects that the pre-set electronic certificate does not exist in the cache.
Therefore, by implementing the optional embodiment, the use experience of the user can be improved by timely informing the electronic certificate obtaining condition.
In an exemplary embodiment of the present application, the apparatus may further include a key value storage unit, wherein:
a key value storage unit, configured to store the user account and the electronic certificate in a key value structure in a cache after the electronic certificate selection unit 802 selects and outputs the electronic certificate applied to the specific event from the preset electronic certificates; the key value structure is used for representing the binding relationship between the user account and the electronic certificate;
and the key value storage unit is also used for persisting the key value structure into the key value database through caching.
It can be seen that implementing this alternative embodiment, the query speed for data can be improved by key-value structure storage. In addition, the key value structure is persisted, so that the traceability of data can be ensured, and the request and response results of each user are public and transparent.
In an exemplary embodiment of the present application, the way that the data matching unit 803 matches the received second user input data with the electronic certificate may specifically be:
the data matching unit 803 determines a first character sequence corresponding to the second user input data and a second character sequence corresponding to the electronic certificate;
the data matching unit 803 performs the same sequence bit alignment on the characters in the first character sequence and the characters in the second character sequence according to the character arrangement sequence;
if the same sequence position of the characters in the first character sequence is the same as that of the characters in the second character sequence, the data matching unit 803 determines that the matching between the second user input data and the electronic certificate is successful.
Therefore, by implementing the optional embodiment, the data input by the user can be compared with the electronic certificate, so that the electronic certificate which the user needs to apply is real and credible, and the safety of the process of responding to the user request is improved.
In an exemplary embodiment of the present application, the electronic certificate is a coupon code, the specific event is a specific commodity purchasing event, and the manner of the user request responding unit 804 responding to the second user request according to the electronic certificate may specifically be:
the user request response unit 804 determines the commodity price corresponding to the specific commodity purchasing event according to the discount code;
the user request responding unit 804 performs a specific goods purchase event according to the goods price.
Therefore, by implementing the optional embodiment, the commodity price after the discount can be automatically determined through the discount condition, so that the use experience of the user is improved, and the use viscosity of the user is improved.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the application. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
For details that are not disclosed in the embodiments of the apparatus of the present application, please refer to the embodiments of the method for responding to a user request described above for the details that are not disclosed in the embodiments of the apparatus of the present application.
As another aspect, the present application also provides a computer-readable medium, which may be contained in the electronic device described in the above embodiments; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by an electronic device, cause the electronic device to implement the method described in the above embodiments.
It should be noted that the computer readable medium shown in the present application may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software, or may be implemented by hardware, and the described units may also be disposed in a processor. Wherein the names of the elements do not in some way constitute a limitation on the elements themselves.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (15)

1. A method of responding to a user request, comprising:
when a first user request is detected within a first preset time period, generating and outputting a verification image; the first user requesting an electronic credential for application to a particular event;
if the first user input data aiming at the verification image is matched with the verification image, selecting and outputting an electronic certificate applied to the specific event from preset electronic certificates;
matching the received second user input data with the electronic credential when a second user request is detected within a second preset time period; the second user request is for applying the electronic credential to the particular event, the first preset time period being non-intersecting with the second preset time period;
and if the matching is successful, responding to the second user request according to the electronic certificate.
2. The method of claim 1, wherein before generating and outputting the verification image when the first user request is detected within a first preset time period, the method further comprises:
detecting whether the current time is later than the upper limit time of the first preset time period;
if so, adjusting the current state of the identifier corresponding to the specific event to be an interactive state; if not, adjusting the current state of the identifier to be a non-interactive state;
receiving the first user request while the identity is in the interactable state.
3. The method of claim 2, wherein after receiving the first user request, the method further comprises:
requesting a first display page corresponding to the specific event from a content distribution server and outputting the first display page;
detecting whether the request time corresponding to the first user request is within the first preset time period;
and if the electronic certificate is not in the first preset time period, outputting prompt information in the first display page, wherein the prompt information is used for indicating that the electronic certificate applied to the specific event cannot be acquired.
4. The method of claim 1, wherein after generating and outputting the verification image, the method further comprises:
when user operation corresponding to a specific input area is detected, the first user input data corresponding to the user operation is acquired.
5. The method according to claim 3, wherein before the verification character is included in the verification image and the electronic certificate applied to the specific event is selected from the preset electronic certificates and output, the method further comprises:
detecting whether an electronic certificate which corresponds to the user account and is applied to the specific event exists in a cache; wherein the user account corresponds to the first user request;
if the verification character does not exist, comparing the input character corresponding to the detected first user input data with the verification character;
and if the input character is the same as the verification character, judging that the first user input data is matched with the verification image.
6. The method of claim 5, wherein if it is detected that an electronic credential corresponding to the user account and for the particular event exists in the cache, the method further comprises:
requesting a second presentation page including the electronic voucher from the content distribution server and outputting the second presentation page.
7. The method of claim 5, wherein selecting and outputting the electronic voucher applied to the specific event from the preset electronic vouchers comprises:
detecting whether a preset electronic certificate exists in the cache;
if the specific event exists, selecting the electronic certificate applied to the specific event from the preset electronic certificates and outputting the electronic certificate;
and deleting the electronic certificate applied to the specific event in the preset electronic certificate.
8. The method of claim 7, wherein if the predetermined electronic credential does not exist in the cache, the method further comprises:
and outputting prompt information for indicating that the preset electronic certificate is completely received.
9. The method of claim 5, wherein after selecting and outputting the electronic voucher applied to the specific event from the preset electronic vouchers, the method further comprises:
storing the user account and the electronic certificate in a key value structure in the cache; the key value structure is used for representing the binding relationship between the user account and the electronic certificate;
persisting, by the cache, the key-value structure into a key-value store.
10. The method of claim 1, wherein matching the received second user input data with the electronic credential comprises:
determining a first character sequence corresponding to the second user input data and a second character sequence corresponding to the electronic certificate;
carrying out same sequence bit comparison on the characters in the first character sequence and the characters in the second character sequence according to the character arrangement sequence;
and if the same sequence position of the characters in the first character sequence is the same as that of the characters in the second character sequence, judging that the second user input data is successfully matched with the electronic certificate.
11. The method of claim 1, wherein the electronic voucher is a coupon code, the specific event is a specific merchandise purchase event, and responding to the second user request according to the electronic voucher comprises:
determining the commodity price corresponding to the specific commodity purchasing event according to the discount code;
executing the specific commodity purchasing event according to the commodity price.
12. A system for responding to a user request, comprising a client and a server, wherein:
the client is used for sending a first user request to the server;
the server is used for receiving the first user request; detecting whether the request time corresponding to the first user request is in a first preset time period; when the first user request is detected within the first preset time period, generating a verification image and outputting the verification image to the client; the first user requesting an electronic credential for application to a particular event;
the client is also used for receiving the verification image; transmitting first user input data for the verification image to the server;
the server is further used for receiving the first user input data; when the first user input data is matched with the verification image, selecting an electronic certificate applied to the specific event from preset electronic certificates and outputting the electronic certificate to the client;
the client is also used for receiving the electronic certificate; transmitting second user input data for the electronic credential to the server;
the server is further used for receiving the second user input data; detecting whether the request time corresponding to the second user request is in a second preset time period; matching the second user input data with the electronic credential when the second user request is detected within the second preset time period; the second user request is for applying the electronic credential to the particular event, the first preset time period being non-intersecting with the second preset time period; and if the matching is successful, responding to the second user request according to the electronic certificate.
13. An apparatus for responding to a user request, comprising:
a verification image generation unit for generating and outputting a verification image when a first user request is detected within a first preset time period; the first user requesting an electronic credential for application to a particular event;
the electronic certificate selecting unit is used for selecting and outputting an electronic certificate applied to the specific event from preset electronic certificates when detecting that first user input data aiming at the verification image is matched with the verification image;
the data matching unit is used for matching the received second user input data with the electronic certificate when a second user request is detected in a second preset time period; the second user request is for applying the electronic credential to the particular event, the first preset time period being non-intersecting with the second preset time period;
and the user request response unit is used for responding the second user request according to the electronic certificate when the matching is successful.
14. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method of any one of claims 1-11.
15. An electronic device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the method of any of claims 1-11 via execution of the executable instructions.
CN202010152500.2A 2020-03-06 2020-03-06 Method, system, device, storage medium and electronic equipment for responding to user request Pending CN113362061A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010152500.2A CN113362061A (en) 2020-03-06 2020-03-06 Method, system, device, storage medium and electronic equipment for responding to user request

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010152500.2A CN113362061A (en) 2020-03-06 2020-03-06 Method, system, device, storage medium and electronic equipment for responding to user request

Publications (1)

Publication Number Publication Date
CN113362061A true CN113362061A (en) 2021-09-07

Family

ID=77524158

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010152500.2A Pending CN113362061A (en) 2020-03-06 2020-03-06 Method, system, device, storage medium and electronic equipment for responding to user request

Country Status (1)

Country Link
CN (1) CN113362061A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI817807B (en) * 2022-11-02 2023-10-01 華南商業銀行股份有限公司 Mission integration system and method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI817807B (en) * 2022-11-02 2023-10-01 華南商業銀行股份有限公司 Mission integration system and method

Similar Documents

Publication Publication Date Title
US20210319468A1 (en) Information processing method, server, first terminal, and computer storage medium
US20120089467A1 (en) System and method of capturing point-of-sale data and providing real-time advertising content
WO2017050069A1 (en) Payment method, apparatus and system
CN109257321B (en) Secure login method and device
CN109831501B (en) Information distribution method and system based on block chain
CN110580641B (en) Method and apparatus for redeeming items
US11416897B1 (en) Methods and apparatus for mobile device messaging-based communications using custom-generated deeplinks and based on the Hyper Text Transfer Protocol (HTTP)
WO2019134634A1 (en) Vending machine transmission information processing method, device and system
CN112884405A (en) Inquiry system and scheduling method thereof
CN113362061A (en) Method, system, device, storage medium and electronic equipment for responding to user request
CN106941410B (en) Method and device for rapidly displaying virtual article
CN110865797A (en) Method and device for processing dynamic attributes of services
CN109087139A (en) Advertisement placement method and device for feed stream
CN113763004A (en) Information matching method and device
WO2019244863A1 (en) Information processing method, program, and information processing device
CN112968797B (en) Application configuration method, system and storage medium of cloud service software
CN112598810A (en) Exhibition entrance processing method and device
WO2018160266A1 (en) Identifying and rewarding sender and receiver of shared urls and recommendations using double- sided affiliate links
CN111488180B (en) Service information processing method and device, electronic equipment and storage medium
US9898751B1 (en) Direct purchase of merchandise
CN109033343B (en) Method and apparatus for generating information
CN113077315A (en) Data processing method and device, computer readable storage medium and electronic equipment
CN113886800A (en) Account management system, method and device
CN107609871B (en) Payment track reproduction method, device, system, electronic equipment and storage medium
KR20200109983A (en) Advertisement service processing apparatus based on the advertiser rank calculated based on the payment data of the payment gateway service and operating method thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40052371

Country of ref document: HK

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination