Method for preventing repeatedly requesting API server in short time

A repetitive request and server technology, applied in the information field, can solve problems such as heavy load on the server side, malicious refresh of webpage clients, service program crashes, etc., achieve good load conditions and avoid waste of server resources

Active Publication Date: 2014-08-20
SHANGHAI HUILIU CLOUD COMPUTING TECH CO LTD
View PDF3 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The problems of this processing flow are: 1. If the front-end web client does not take any protection measures, the web client may maliciously refresh the page and send the same request repeatedly; 2. In the case of a large-scale client cluster, Multiple users send requests to the server for processing at the same time. If the server does not have a buffer mechanism, the load on the server may be too large, unable to process in time or even cause the service program to crash

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method for preventing repeatedly requesting API server in short time
  • Method for preventing repeatedly requesting API server in short time

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0021] Embodiments of the present invention are described in further detail below in conjunction with the accompanying drawings:

[0022] A method to prevent repeated requests to the API server in a short period of time is to add a buffer mechanism on the server side to filter repeated requests in a short period of time, that is, when the server-side program is processing, add a buffer to save the currently processed task, and read in the buffer When writing an exception, return the error message that the system is busy to the client in time, and the server will compare each received request with the task in the current buffer, and reject repeated operations, which can provide double-layer protection for the processing operation of the server , to initially ensure that the load on the server side is good, and to avoid the waste of server resources or even the disorder of system business logic caused by repeated processing procedures.

[0023] The present invention introduces a...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention relates to a method for preventing repeatedly requesting an API (Application programming interface) server in a short time. The method comprises the following steps: 1, generating a cache file; 2, assembling message summarizations; 3, extracting the message summarizations of all the items in the cache file to compare with the current message summarization, if all the items are completely same, requested corresponding operation is not executed; 4, extracting the same items of the time stamp information in the cache file and the current message information summarization, if the cache file is protected by a reading-writing lock or the extracted message of the items are not acquiescent message summarization, the corresponding operation of the request is not executed; 5, the operation covering the items are written in the cache file, and executing the corresponding operation of the request; and 6, modifying relative items in the cache file to an acquiescent message summarization. The method achieve a dual-layer protection function for the processing operation to the server side, avoids the waste of server resources caused by repeated process flow, system service logic confusion and the like.

Description

technical field [0001] The invention belongs to the field of information technology, in particular to a method for preventing repeated requests to an API server within a short period of time. Background technique [0002] With the rapid development of Internet technology, network applications have become more and more diverse. The server processes various requests and returns the processing results to the network terminal. like figure 1 As shown, without other protection processing, the server directly performs related business processing after receiving the message, and returns the processing result information to the client. The problems of this processing flow are: 1. If the front-end web client does not take any protection measures, the web client may maliciously refresh the page and send the same request repeatedly; 2. In the case of a large-scale client cluster, Multiple users send requests to the server for processing at the same time. If the server does not have a ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Patents(China)
IPC IPC(8): H04L29/08
Inventor 朱泽范鹏刘晓军朱誉俞志坚
Owner SHANGHAI HUILIU CLOUD COMPUTING TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products