CN112003947A - System and verification method for preventing repeated requests from client to server - Google Patents

System and verification method for preventing repeated requests from client to server Download PDF

Info

Publication number
CN112003947A
CN112003947A CN202010881646.0A CN202010881646A CN112003947A CN 112003947 A CN112003947 A CN 112003947A CN 202010881646 A CN202010881646 A CN 202010881646A CN 112003947 A CN112003947 A CN 112003947A
Authority
CN
China
Prior art keywords
request
server
client
end buffer
preventing
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
CN202010881646.0A
Other languages
Chinese (zh)
Inventor
张永文
杨磊
季东滨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Ever Grand Intelligent Technology Co ltd
Original Assignee
Shandong Ever Grand Intelligent Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shandong Ever Grand Intelligent Technology Co ltd filed Critical Shandong Ever Grand Intelligent Technology Co ltd
Priority to CN202010881646.0A priority Critical patent/CN112003947A/en
Publication of CN112003947A publication Critical patent/CN112003947A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • H04L67/025Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0793Remedial or corrective actions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/566Grouping or aggregating service requests, e.g. for unified processing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses a system for preventing a client from repeatedly requesting a server, which is characterized in that a request interceptor, a front-end buffer, a background monitor and an abnormal monitor are configured at the client; the request interceptor is used for intercepting all request information sent to the server by the client; the front-end buffer is used for storing ongoing request information; the background monitor is used for monitoring feedback information of the server to the request information; the exception listener is used for monitoring exception information fed back by the server. Therefore, the system for preventing the client from repeatedly sending the request to the server solves the problem that the foreground repeatedly sends the request to the server, judges and processes the repeated request at the client, reduces the workload of the server, and avoids the repeated request caused by network delay or misoperation. The invention also discloses a method for preventing the client from repeatedly requesting the server.

Description

System and verification method for preventing repeated requests from client to server
Technical Field
The invention relates to the field of network communication, in particular to a system and a verification method for preventing a client from repeatedly requesting a server.
Background
At present, all aspects of production and life are not separated from a network, various software generally relates to data request and transmission between a server and a client, the client mainly makes a data request to the server, the server performs data extraction and processing after identity verification and then feeds back the data to the client, in the process, the client may make multiple times of same requests to the server due to factors such as misoperation or network delay, and if the servers perform processing one by one, the load of the server is increased, and on the other hand, if related requests relate to related actions, data confusion may be caused.
Therefore, the request sent from the client to the server needs to be subjected to secondary authentication besides authentication, so that unnecessary repeated requests are filtered.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: an authentication method for preventing a client from repeatedly requesting a server.
In order to solve the technical problems, the technical scheme adopted by the invention is as follows:
a system for preventing repeated requests from a client to a server, comprising: configuring a request interceptor, a front-end buffer, a background monitor and an exception monitor at a client;
the request interceptor is used for intercepting all request information sent to the server by the client;
the front-end buffer is used for storing ongoing request information;
the background monitor is used for monitoring feedback information of the server to the request information;
the abnormity monitor is used for monitoring abnormity information fed back by the server;
compared with the prior art, the invention has the following technical effects:
the invention solves the problem that the foreground repeatedly sends the request to the server, judges and processes the repeated request at the client, reduces the workload of the server and avoids the repeated request caused by network delay or misoperation.
Based on the system, the verification process comprises the following steps:
s1, the client side initiates a request A;
s2, the request interceptor intercepts the A request and inquires whether the A request exists in the front-end buffer; if the request A exists in the front-end buffer, the current initiated request A is cancelled, otherwise, the step S3 is executed;
s3, storing the request A into a front-end buffer, and sending the request A to a server;
s4, the server processes the request A, and the server feeds back a request result to the client after successfully processing the request A;
s5, the background listener continues to listen until the action of the server feeding back the request result to the client? If yes, go to step S6, otherwise continue to go to step S5;
and S6, after delaying the set time T, deleting the request A in the front-end buffer.
Compared with the prior art, the invention has the following technical effects:
the invention solves the problem that the foreground repeatedly sends the request to the server, judges and processes the repeated request at the client, reduces the workload of the server and avoids the repeated request caused by network delay or misoperation.
On the basis of the technical scheme, the invention can be further improved as follows.
Preferably, the request interceptor comprises an error handling program, wherein the error handling program comprises a step of resetting a front-end cache.
The method has the advantages that when unexpected faults occur in the operation process of the request interceptor, the preset error processing program is entered, and the step of resetting the content in the front-end cache is set in the error processing program, so that even after the unexpected faults occur, the subsequent request information initiation of the client to the server is not influenced after the system is restarted, and the initiation of the next normal request is not delayed due to the setting of the request interceptor.
Drawings
FIG. 1 is a schematic diagram of a system for preventing repeated requests from a client to a server according to the present invention;
fig. 2 is a flowchart of an authentication method for preventing a client from repeatedly requesting a server according to the present invention.
Detailed Description
The principles and features of this invention are described below in conjunction with the following drawings, which are set forth by way of illustration only and are not intended to limit the scope of the invention.
Fig. 1 is a schematic structural diagram of an authentication method for preventing a client from repeatedly requesting a server according to the present invention. An authentication method for preventing a client from repeatedly requesting a server, comprising: configuring a request interceptor 1-2, a front-end buffer 1-3 and a background monitor 1-4 at a client 1;
the request interceptor is used for intercepting all request information which is initiated by the client-side initiating request module to the server;
the front-end buffer is used for storing ongoing request information;
the background monitor is used for monitoring feedback information of the server to the request information;
the abnormity monitor is used for monitoring abnormity information fed back by the server;
as shown in fig. 2, the process of the client sending the a request to the server is as follows:
s1, the client side initiates a request A;
s2, the request interceptor intercepts the A request and inquires whether the A request exists in the front-end buffer; if the request A exists in the front-end buffer, the current initiated request A is cancelled, otherwise, the step S3 is executed;
s3, storing the request A into a front-end buffer, and sending the request A to a server;
s4, the server processes the request A, and the server feeds back a request result to the client after successfully processing the request A;
s5, the background listener continues to listen until the action of the server feeding back the request result to the client? If yes, go to step S6, otherwise continue to go to step S5;
and S6, after delaying the set time T, deleting the request A in the front-end buffer.
For example, the number of requests initiated by the client is 50, assuming that the current inventory number is 100, the client issues an inventory-out command, the number of the requests is 50, and the inventory number is changed to 50 after the inventory-out is normally completed. If the user performs misoperation at this time, the client continuously clicks twice warehouse-out, two identical instructions are issued by the client at this time, and if the server sequentially processes the instructions, two warehouse-out are actually performed, so that the inventory number at this time becomes 0.
If the problem is not great only with a single ex-warehouse service, the data can be recovered, but if the ex-warehouse action binds other services, such as order completion, work order completion and other series of service logics, the whole service flow is fatal at the moment and is difficult to recover, so that the effective avoidance of misoperation is very critical.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (3)

1. A system for preventing a client from repeatedly requesting a server is characterized in that a request interceptor, a front-end buffer, a background monitor and an exception monitor are configured at the client;
the request interceptor is used for intercepting all request information sent to the server by the client;
the front-end buffer is used for storing ongoing request information;
the background monitor is used for monitoring feedback information of the server to the request information;
the exception listener is used for monitoring exception information fed back by the server.
2. An authentication method for preventing a client from repeatedly requesting a server, comprising the system of claim 1, wherein the authentication steps are as follows:
s1, the client side initiates a request A;
s2, the request interceptor intercepts the A request and inquires whether the A request exists in the front-end buffer; if the request A exists in the front-end buffer, the current initiated request A is cancelled, otherwise, the step S3 is executed;
s3, storing the request A into a front-end buffer, and sending the request A to a server;
s4, the server processes the request A, and the server feeds back a request result to the client after successfully processing the request A;
s5, the background listener continues to listen until the action of the server feeding back the request result to the client? If yes, go to step S6, otherwise continue to go to step S5;
and S6, after delaying the set time T, deleting the request A in the front-end buffer.
3. An authentication method for preventing repeated request from client to server as claimed in claim 2 wherein said request interceptor includes an error handler, said error handler including a step of resetting the front-end cache.
CN202010881646.0A 2020-08-26 2020-08-26 System and verification method for preventing repeated requests from client to server Pending CN112003947A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010881646.0A CN112003947A (en) 2020-08-26 2020-08-26 System and verification method for preventing repeated requests from client to server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010881646.0A CN112003947A (en) 2020-08-26 2020-08-26 System and verification method for preventing repeated requests from client to server

Publications (1)

Publication Number Publication Date
CN112003947A true CN112003947A (en) 2020-11-27

Family

ID=73470540

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010881646.0A Pending CN112003947A (en) 2020-08-26 2020-08-26 System and verification method for preventing repeated requests from client to server

Country Status (1)

Country Link
CN (1) CN112003947A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112597486A (en) * 2020-12-24 2021-04-02 广东广宇科技发展有限公司 Method for preventing repeated access to Restful API based on Spring
CN114419756A (en) * 2022-01-30 2022-04-29 重庆长安汽车股份有限公司 Method and system for dynamically capturing abnormal scene of whole vehicle
CN114745363A (en) * 2022-03-18 2022-07-12 成都数联云算科技有限公司 Method, system, device and medium for processing front-end application request message

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120023377A1 (en) * 2010-07-20 2012-01-26 Robert Garskof Apparatus and Methods for Preventing Cross-Site Request Forgery
CN104035923A (en) * 2013-03-04 2014-09-10 阿里巴巴集团控股有限公司 Data inquiry method and device
CN106331153A (en) * 2016-09-20 2017-01-11 北京华为数字技术有限公司 Service request filtering method, service request filtering device and service request filtering system
CN107818026A (en) * 2016-09-14 2018-03-20 中兴通讯股份有限公司 A kind of method and apparatus of cache partitions reconstruct
CN108985092A (en) * 2017-06-05 2018-12-11 北京京东尚科信息技术有限公司 Submit filter method, device, electronic equipment and the storage medium of request
CN109359131A (en) * 2018-09-30 2019-02-19 深圳壹账通智能科技有限公司 Request processing method, device and computer equipment based on loan system
CN110311986A (en) * 2019-07-10 2019-10-08 中国民航信息网络股份有限公司 The treating method and apparatus of mobile terminal request

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120023377A1 (en) * 2010-07-20 2012-01-26 Robert Garskof Apparatus and Methods for Preventing Cross-Site Request Forgery
CN104035923A (en) * 2013-03-04 2014-09-10 阿里巴巴集团控股有限公司 Data inquiry method and device
CN107818026A (en) * 2016-09-14 2018-03-20 中兴通讯股份有限公司 A kind of method and apparatus of cache partitions reconstruct
CN106331153A (en) * 2016-09-20 2017-01-11 北京华为数字技术有限公司 Service request filtering method, service request filtering device and service request filtering system
CN108985092A (en) * 2017-06-05 2018-12-11 北京京东尚科信息技术有限公司 Submit filter method, device, electronic equipment and the storage medium of request
CN109359131A (en) * 2018-09-30 2019-02-19 深圳壹账通智能科技有限公司 Request processing method, device and computer equipment based on loan system
CN110311986A (en) * 2019-07-10 2019-10-08 中国民航信息网络股份有限公司 The treating method and apparatus of mobile terminal request

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112597486A (en) * 2020-12-24 2021-04-02 广东广宇科技发展有限公司 Method for preventing repeated access to Restful API based on Spring
CN114419756A (en) * 2022-01-30 2022-04-29 重庆长安汽车股份有限公司 Method and system for dynamically capturing abnormal scene of whole vehicle
CN114419756B (en) * 2022-01-30 2023-05-16 重庆长安汽车股份有限公司 Method and system for dynamically capturing abnormal scene of whole vehicle
CN114745363A (en) * 2022-03-18 2022-07-12 成都数联云算科技有限公司 Method, system, device and medium for processing front-end application request message
CN114745363B (en) * 2022-03-18 2023-12-15 成都数联云算科技有限公司 Front-end application request message processing method, system and device and medium

Similar Documents

Publication Publication Date Title
CN112003947A (en) System and verification method for preventing repeated requests from client to server
CN107370667B (en) Multithreading parallel processing method and device, readable medium and storage controller
CA3158476C (en) Method for processing response timeout, and systems for server and client to process response timeout
US7975047B2 (en) Reliable processing of HTTP requests
US20070130324A1 (en) Method for detecting non-responsive applications in a TCP-based network
CN111666162A (en) Distributed message transmission method, device, computer equipment and storage medium
CN111782360A (en) Distributed task scheduling method and device
CN110650164B (en) File uploading method and device, terminal and computer storage medium
CN111062723B (en) Virtual account transfer method, device, system and storage medium
US20150319036A1 (en) Network transaction control method and executing method, network controller, and forwarding device
CN107612950A (en) A kind of method, apparatus, system, electronic equipment that service is provided
CN111090532A (en) Application service calling method and device, electronic equipment and computer storage medium
CN111258790A (en) Anomaly compensation method and device
US9069632B2 (en) Message processing
CN113986501A (en) Real-time database API (application program interface) uninterrupted calling method, system, storage medium and server
US8103905B2 (en) Detecting and recovering from process failures
JPH10187567A (en) Socket binding method for communication system
CN112615901B (en) Method for sending user request by client and storage system
JP5329589B2 (en) Transaction processing system and operation method of transaction processing system
US7716523B2 (en) End-to-end transactional protection for requests in a web application
US10929237B2 (en) Error handling tool
CN109905459B (en) Data transmission method and device
CN114666411B (en) Request processing method, device, server, storage medium and product
US10674337B2 (en) Method and device for processing operation for device peripheral
CN112235363B (en) Data processing method, device, electronic equipment, storage medium and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20201127