CN111711642A - Protocol request processing method and device, electronic equipment and storage medium - Google Patents

Protocol request processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111711642A
CN111711642A CN202010682640.0A CN202010682640A CN111711642A CN 111711642 A CN111711642 A CN 111711642A CN 202010682640 A CN202010682640 A CN 202010682640A CN 111711642 A CN111711642 A CN 111711642A
Authority
CN
China
Prior art keywords
protocol
request
time interval
time
receiving time
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
CN202010682640.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.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network 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 Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202010682640.0A priority Critical patent/CN111711642A/en
Publication of CN111711642A publication Critical patent/CN111711642A/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/131Protocols for games, networked simulations or virtual reality
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/30Interconnection arrangements between game servers and game devices; Interconnection arrangements between game devices; Interconnection arrangements between game servers
    • A63F13/35Details of game servers
    • A63F13/352Details of game servers involving special game server arrangements, e.g. regional servers connected to a national server or a plurality of servers managing partitions of the game world
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/18Multiprotocol handlers, e.g. single devices capable of handling multiple protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/26Special purpose or proprietary protocols or architectures

Abstract

The embodiment of the invention provides a protocol request processing method, a device, electronic equipment and a storage medium, wherein when a protocol request sent by a user account is received, the current receiving time of a server is recorded; acquiring last receiving time, wherein the last receiving time is the receiving time recorded when the server receives the protocol requests with the same protocol type sent by the user account last time; acquiring a request time interval corresponding to the protocol type of the protocol request; determining a reception time interval between the current reception time and the last reception time; processing the protocol request when the receive time interval is greater than the request time interval. The embodiment of the invention flexibly customizes different request time intervals aiming at the protocol requests of different protocol types, thereby limiting the sending frequency of the protocol requests of different protocol types, avoiding frequently processing the protocol requests and saving the computing resources of the server.

Description

Protocol request processing method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a protocol request processing method, a protocol request processing apparatus, an electronic device, and a storage medium.
Background
In the internet, clients and servers communicate via a network protocol. Specifically, the client may send a protocol request to the server, and the server performs corresponding processing on the protocol request and returns a processing result to the client. Taking the game client as an example, when a player operates a game character on the game client to release the skill, the player may send a skill release request to the server, and the server determines whether to allow the release of the skill release request, and sends a processing result of whether to allow the release to the game client.
At present, protocols used by a client when sending protocol requests are numerous, and the number of the protocols is continuously increased along with development and operation, and because a server carries out corresponding processing each time the server receives a protocol request sent by the client, if the client frequently sends certain protocol requests to the server because of being cracked by a plug-in program or careless codes of developers, the waste of computing resources of the server is caused.
Disclosure of Invention
In view of the above problems, embodiments of the present invention are proposed to provide a protocol request processing method and a corresponding protocol request processing apparatus, electronic device, storage medium that overcome or at least partially solve the above problems.
In order to solve the above problem, an embodiment of the present invention discloses a protocol request processing method, where the method includes:
when a protocol request sent by a user account is received, recording the current receiving time of a server;
acquiring last receiving time, wherein the last receiving time is the receiving time recorded when the server receives the protocol requests with the same protocol type sent by the user account last time;
acquiring a request time interval corresponding to the protocol type of the protocol request;
determining a reception time interval between the current reception time and the last reception time;
processing the protocol request when the receive time interval is greater than the request time interval.
Optionally, the obtaining a request time interval corresponding to a protocol type of the protocol request includes:
and acquiring a request time interval corresponding to the protocol type of the protocol request from a preset protocol flow limit table.
Optionally, the obtaining a request time interval corresponding to a protocol type of the protocol request further includes:
and when the request time interval corresponding to the protocol type of the protocol request cannot be acquired from the preset protocol flow limit table, taking the preset request time interval as the request time interval corresponding to the protocol type.
Optionally, after recording the current receiving time of the server when receiving the protocol request sent by the user account, the method further includes:
and when the last receiving time cannot be acquired, processing the protocol request.
Optionally, after the determining the receiving time interval between the current receiving time and the last receiving time, the method further comprises:
denying processing the protocol request when the receive time interval is less than or equal to the request time interval.
Optionally, after rejecting processing of the protocol request when the reception time interval is less than or equal to the request time interval, the method further comprises:
generating a warning log for a protocol type of the protocol request;
counting the log number of the warning logs corresponding to the protocol types;
and when the number of the logs reaches a preset number of logs, generating frequent sending prompt information aiming at the protocol type to a specified target object.
Optionally, after rejecting processing of the protocol request when the reception time interval is less than or equal to the request time interval, the method further comprises:
and when the number of the protocol requests which are refused to be processed reaches the preset request number after the user account is logged in, logging out the user account.
The embodiment of the invention also discloses a protocol request processing device, which comprises:
the current receiving time acquisition module is used for recording the current receiving time of the server when a protocol request sent by a user account is received;
the last receiving time obtaining module is used for obtaining the last receiving time, and the last receiving time is the receiving time recorded when the server receives the protocol request which is sent by the user account and has the same protocol type last time;
a request time interval obtaining module, configured to obtain a request time interval corresponding to a protocol type of the protocol request;
a receiving time interval determining module for determining a receiving time interval between the current receiving time and the last receiving time;
a first protocol request processing module, configured to process the protocol request when the receiving time interval is greater than the request time interval.
The embodiment of the invention discloses electronic equipment, which comprises a processor, a memory and a computer program which is stored on the memory and can run on the processor, wherein when the computer program is executed by the processor, the steps of the protocol request processing method are realized.
The embodiment of the invention discloses a computer readable storage medium, wherein a computer program is stored on the computer readable storage medium, and when the computer program is executed by a processor, the steps of the protocol request processing method are realized.
The embodiment of the invention has the following advantages:
in the embodiment of the invention, when a protocol request sent by a user account is received, the current receiving time of a server is recorded and the last receiving time is obtained, wherein the last receiving time is the receiving time recorded when the server receives the protocol request sent by the user account on a client last time, then the receiving time interval of the protocol request is determined according to the current receiving time and the last receiving time, and when the receiving time interval is greater than the request time interval of the protocol type of the protocol request, the protocol request is processed. The embodiment of the invention flexibly customizes different request time intervals aiming at the protocol requests of different protocol types, thereby limiting the sending frequency of the protocol requests of different protocol types, avoiding frequently processing the protocol requests and saving the computing resources of the server.
Drawings
FIG. 1 is a flow chart of the steps of one embodiment of a protocol request processing method of the present invention;
fig. 2 is a block diagram of a protocol request processing apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
The protocol request processing method in the embodiment of the application can be operated on a terminal device or a server. The terminal device may be a local terminal device. When the protocol request processing method is operated as a server, it may be a cloud game.
In an alternative embodiment, cloud gaming refers to a cloud computing-based gaming mode. In the running mode of the cloud game, the running main body of the game program and the game picture presenting main body are separated, the storage and the running of the protocol request processing method are completed on a cloud game server, and the cloud game client is used for receiving and sending data and presenting the game picture, for example, the cloud game client can be a display device with a data transmission function close to a user side, such as a mobile terminal, a television, a computer, a palm computer and the like; however, the terminal device performing the game data processing is a cloud game server in the cloud. When a game is played, a player operates the cloud game client to send an operation instruction to the cloud game server, the cloud game server runs the game according to the operation instruction, data such as game pictures and the like are encoded and compressed, the data are returned to the cloud game client through a network, and finally the data are decoded through the cloud game client and the game pictures are output.
In an alternative embodiment, the terminal device may be a local terminal device. The local terminal device stores a game program and is used for presenting a game screen. The local terminal device is used for interacting with the player through a graphical user interface, namely, a game program is downloaded and installed and operated through an electronic device conventionally. The manner in which the local terminal device provides the graphical user interface to the player may include a variety of ways, for example, it may be rendered for display on a display screen of the terminal or provided to the player through holographic projection. For example, the local terminal device may include a display screen for presenting a graphical user interface including a game screen and a processor for running the game, generating the graphical user interface, and controlling display of the graphical user interface on the display screen.
Referring to fig. 1, a flowchart illustrating steps of an embodiment of a protocol request processing method according to the present invention is shown, where the protocol request processing method may be used in the aforementioned server, and the method specifically may include the following steps:
step 101, when a protocol request sent by a user account is received, recording the current receiving time of a server.
The user account refers to an account used when the user logs in the client, for example, a game account when the player logs in the game client. When a protocol request sent by a user account on a client is received, the server acquires the current system time when the protocol request is received and records the current system time as the current receiving time of the protocol request.
In the embodiment of the invention, a protocol current limiter is created for each user account when logging in a client, and the sending condition of the protocol request of each user account can be detected through the protocol current limiter, so that the protocol request with abnormal sending condition or the user account is correspondingly processed, and the waste of computing resources of a server is avoided. For example, in the game client, a protocol limiter may be created in the server for the game account of the player, and the protocol limiter may detect the sending of frequent protocol requests or game accounts, or the code of the game client that needs to be optimized.
And 102, acquiring last receiving time, wherein the last receiving time is the receiving time recorded when the server receives the protocol request with the same protocol type sent by the user account last time.
Wherein the protocol request has corresponding protocol types, each protocol type having a corresponding protocol name (pto _ name), for example, the protocol name of the protocol request for controlling the movement of a game character may be req _ move.
In the embodiment of the invention, each received protocol request is recorded in the protocol current limiter, and the recorded content at least comprises a user account, a protocol identifier and a receiving time corresponding to the protocol request. When a protocol request sent by a user account is received, the receiving time corresponding to the protocol request which is sent by the user account last time and has the same protocol type is obtained from the protocol current limiter and is used as the last receiving time.
Specifically, it is assumed that the receiving time T of the last received protocol request is recorded in the protocol limiter, and after receiving the protocol request sent by the user account, the server acquires the receiving time T corresponding to the protocol name from the protocol limiter according to the protocol name (pto _ name) of the protocol request.
Step 103, obtaining a request time interval corresponding to the protocol type of the protocol request.
In the embodiment of the present invention, corresponding request time intervals are preset for each protocol type, where a request time interval is also referred to as a minimum time interval, that is, when the same user account sends protocol requests of the same protocol type, the time interval should exceed the request time interval corresponding to the protocol type.
Step 104, determining a receiving time interval between the current receiving time and the last receiving time.
In the embodiment of the invention, the time difference value between the current receiving time and the last receiving time of the protocol request with the same protocol type is calculated and is used as the receiving time interval of the protocol request.
Step 105, when the receiving time interval is larger than the request time interval, processing the protocol request.
In the embodiment of the present invention, if the receiving time interval of the protocol requests with the same protocol type is greater than the request time interval corresponding to the protocol type, it indicates that the protocol requests are not frequently sent, and it is sufficient to process the protocol requests normally, and return the processing result to the user account.
In the embodiment of the invention, when a protocol request sent by a user account is received, the current receiving time of a server is recorded and the last receiving time is obtained, wherein the last receiving time is the receiving time recorded when the server receives the protocol request sent by the user account on a client last time, then the receiving time interval of the protocol request is determined according to the current receiving time and the last receiving time, and when the receiving time interval is greater than the request time interval of the protocol type of the protocol request, the protocol request is processed. The embodiment of the invention flexibly customizes different request time intervals aiming at the protocol requests of different protocol types, thereby limiting the sending frequency of the protocol requests of different protocol types, avoiding frequently processing the protocol requests and saving the computing resources of the server.
In an optional example of the present invention, the step 103 of obtaining a request time interval corresponding to a protocol type of the protocol request includes:
and acquiring a request time interval corresponding to the protocol type of the protocol request from a preset protocol flow limit table.
The embodiment of the invention presets a corresponding request time interval for the protocol request of each protocol type, and saves the protocol type and the request time interval into a preset protocol flow limit table of a protocol flow limiter. In an example, in the embodiment of the present invention, the preset protocol current limit table may be:
Figure BDA0002586402170000061
Figure BDA0002586402170000071
after receiving the protocol request, the embodiment of the present invention may query the corresponding request time interval in the table according to the protocol type of the protocol request, for example, if the protocol type of the received protocol request is req _ use _ kill, the corresponding request time interval may be obtained as 0.5 second.
In an optional example of the present invention, the step 103 of obtaining a request time interval corresponding to a protocol type of the protocol request further includes:
and when the request time interval corresponding to the protocol type of the protocol request cannot be acquired from the preset protocol flow limit table, taking the preset request time interval as the request time interval corresponding to the protocol type.
The protocol requests of a part of protocol types have low requirements for the request time interval, so that the request time interval does not need to be set in advance for the protocol requests of the protocol types and recorded in the preset protocol flow limit table, the protocol requests corresponding to the protocol types cannot be acquired in the preset protocol flow limit table, and a uniform default time interval, namely the preset request time interval, can be acquired at this time and serves as the request time interval of the protocol requests of the protocol types.
In an optional example of the invention, the method further comprises:
and when the last receiving time cannot be acquired, processing the protocol request.
If the last receiving time cannot be obtained from the protocol current limiter, it indicates that the protocol current limiter does not detect that the protocol request of the protocol type is sent by the user account once, and it may also indicate that the received protocol request is the protocol request of the protocol type sent by the user account for the first time, and it is sufficient to directly process the protocol request.
In an optional example of the invention, the method further comprises:
denying processing the protocol request when the receive time interval is less than or equal to the request time interval.
If the receiving time interval of the protocol requests with the same protocol type is smaller than or equal to the request time interval corresponding to the protocol type, the protocol requests are indicated to be sent frequently, the protocol requests can be refused to be processed, and refusing processing information is returned to the user account.
In one optional example of the invention, after denying processing the protocol request when the reception time interval is less than or equal to the request time interval, the method further comprises:
generating a warning log for a protocol type of the protocol request;
counting the log number of the warning logs corresponding to the protocol types;
and when the number of the logs reaches a preset number of logs, generating frequent sending prompt information aiming at the protocol type to a specified target object.
For a protocol request that is rejected from processing, a warning log (log) may be generated for the protocol type of the protocol request, and the server will not process the protocol request and send the warning log to the user account.
Wherein the specified target object may be a developer of the client. The embodiment of the invention counts the log quantity of the warning logs of each protocol type, and when the log quantity reaches the preset log quantity, the protocol request of the protocol type is indicated to be frequently sent, and the reason of frequent sending is probably program fault (bug) of the client, so that a piece of frequently-sent prompt information aiming at the protocol type can be generated to a developer, the developer searches the protocol request of the protocol type in the client code according to the prompt information, and carries out logic judgment through the code context to determine whether the protocol request is frequently sent due to the program bug, and if so, the sending frequency of the protocol request of the protocol type can be reduced by optimizing the client code.
For example, assuming that the alarm logs of the protocol request with the protocol type set _ hp (set blood pressure value) are counted and found to reach the preset log number, which indicates that the protocol request with the protocol type is frequently sent, a prompt message for frequently sending the set _ hp may be generated to a developer, the developer may search for a client code, detect where the set _ hp protocol request is sent, and then perform a logic judgment according to the context to determine whether the set _ hp protocol request is frequently sent due to program bug.
In one optional example of the invention, after denying processing the protocol request when the reception time interval is less than or equal to the request time interval, the method further comprises:
and when the number of the protocol requests which are refused to be processed reaches the preset request number after the user account is logged in, logging out the user account.
The frequent sending is not triggered under the normal operation of the user, and if the program bug does not exist in the client code, the result shows that the user possibly uses the plug-in program to crack the request sending protocol of the client. Therefore, the embodiment of the invention can record the number of the protocol requests refused to be processed of each user account after each user account logs in at the client, and logs out the user account at the client when the number of the protocol requests refused to be processed reaches the preset request number, thereby preventing the plug-in program from simulating the client to frequently send the protocol requests to attack the server.
For example, assuming that the preset number of requests is 100, when the number of protocol requests rejected for processing on the game account of the player reaches 100, the game account of the player can be logged out at the client, that is, the player is directly kicked off the line, so as to protect the server from being attacked by the plug-in program, ensure the data security of the server, and avoid the waste of computing resources of the server.
In order to make the embodiments of the present invention better understood by those skilled in the art, the following description will be made with specific examples. Specifically, in the embodiment of the present invention, a protocol current limiter is added for each user account, and the sending frequency of the protocol request of each protocol type sent by the control client is detected through the protocol current limiter, so that the protocol request of each protocol type is prevented from being sent frequently, and the implementation steps and flows are as follows:
1. a minimum time interval for setting the protocol request of each protocol type is preset, wherein a default time interval can be set for the protocol types for which the minimum time interval is not set.
2. A protocol restrictor is created for a user account when the user logs into a client using the user account.
3. After receiving a protocol request sent by a user account, the server acquires the current system time of the server as the current receiving time Now, and queries the receiving time T of the protocol request of the same protocol type received last time in the protocol current limiter according to the protocol type (pto _ name) of the protocol request, wherein T is 0 when the protocol request is not received by the protocol current limiter.
4. And acquiring pto _ name corresponding minimum time interval MinT from a preset protocol flow limit table.
5. And judging whether the Now-T is larger than MinT.
6. If Now-T is larger than MinT, the protocol request is considered to be effective, if Now-T is smaller than or equal to MinT, the protocol request is considered to be sent too frequently, and the protocol request which is too frequent can be processed differently according to actual conditions.
7. And updating the receiving time T (Now) corresponding to the pto _ name in the protocol flow restrictor of the user account.
The protocol requests that are determined to be transmitted too frequently in step 6 are processed as follows:
6.1, a warning log (log) is recorded, and the server does not process the protocol request.
6.2, the protocol types with the log number exceeding the preset log number indicate that the protocol requests of the protocol types are sent too frequently, and frequent sending prompt information aiming at the protocol types can be generated to remind developers to check codes related to the protocol types in the client, and to check whether the protocol requests are sent too frequently due to program bugs, so that the sending frequency of the protocol requests is reduced by optimizing the codes of the client.
And 6.3, acquiring the number of the protocol requests which are refused to be processed by the user account, and logging out the user account at the client when the number exceeds the preset request number so as to protect the server from being attacked by the plug-in program.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Referring to fig. 2, a block diagram of a protocol request processing apparatus according to an embodiment of the present invention is shown, where the embodiment of the present invention may specifically include the following modules:
a current receiving time obtaining module 201, configured to record current receiving time of the server when receiving a protocol request sent by a user account;
a last receiving time obtaining module 202, configured to obtain a last receiving time, where the last receiving time is a receiving time recorded when the server last receives a protocol request with a same protocol type sent by the user account;
a request time interval obtaining module 203, configured to obtain a request time interval corresponding to a protocol type of the protocol request;
a receiving time interval determining module 204, configured to determine a receiving time interval between the current receiving time and the last receiving time;
a first protocol request processing module 205, configured to process the protocol request when the receiving time interval is greater than the request time interval.
In an optional example of the present invention, the request time interval obtaining module 203 is configured to obtain, from a preset protocol flow limit table, a request time interval corresponding to a protocol type of the protocol request.
In an optional example of the present invention, the request obtaining module 203 is configured to, when a request time interval corresponding to a protocol type of the protocol request cannot be obtained from the preset protocol flow limit table, take a preset request time interval as the request time interval corresponding to the protocol type.
In an optional example of the invention, the apparatus further comprises:
and the second protocol request processing module is used for processing the protocol request when the last receiving time cannot be acquired.
In an optional example of the invention, the apparatus further comprises:
a protocol request rejection processing module for rejecting processing of the protocol request when the receiving time interval is less than or equal to the request time interval.
In an optional example of the invention, the apparatus further comprises:
an alert module to generate an alert log for a protocol type of the protocol request; counting the log number of the warning logs corresponding to the protocol types; and when the number of the logs reaches a preset number of logs, generating frequent sending prompt information aiming at the protocol type to a specified target object.
In an optional example of the invention, the apparatus further comprises:
and the user account login module is used for logging out the user account when the number of the protocol requests refused to be processed reaches the preset request number after the user account is logged in.
In summary, in the embodiment of the present invention, different request time intervals are flexibly customized for protocol requests of different protocol types, so as to limit the sending frequency of the protocol requests of different protocol types, avoid frequently processing the protocol requests, and save the computing resources of the server.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
The embodiment of the invention discloses electronic equipment, which comprises a processor, a memory and a computer program which is stored on the memory and can run on the processor, wherein when the computer program is executed by the processor, the steps of the protocol request processing method embodiment are realized.
The embodiment of the invention discloses a computer readable storage medium, wherein a computer program is stored on the computer readable storage medium, and when the computer program is executed by a processor, the steps of the embodiment of the protocol request processing method are realized.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The foregoing detailed description is directed to a protocol request processing method, a protocol request processing apparatus, an electronic device, and a storage medium, which are provided by the present invention, and specific examples are applied herein to explain the principles and embodiments of the present invention, and the descriptions of the foregoing examples are only used to help understand the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A method for processing a protocol request, the method comprising:
when a protocol request sent by a user account is received, recording the current receiving time of a server;
acquiring last receiving time, wherein the last receiving time is the receiving time recorded when the server receives the protocol requests with the same protocol type sent by the user account last time;
acquiring a request time interval corresponding to the protocol type of the protocol request;
determining a reception time interval between the current reception time and the last reception time;
processing the protocol request when the receive time interval is greater than the request time interval.
2. The method of claim 1, wherein obtaining the request time interval corresponding to the protocol type of the protocol request comprises:
and acquiring a request time interval corresponding to the protocol type of the protocol request from a preset protocol flow limit table.
3. The method of claim 2, wherein the obtaining the request time interval corresponding to the protocol type of the protocol request further comprises:
and when the request time interval corresponding to the protocol type of the protocol request cannot be acquired from the preset protocol flow limit table, taking the preset request time interval as the request time interval corresponding to the protocol type.
4. The method of claim 1, wherein upon receiving a protocol request sent by a user account, after recording a current time of receipt by the server, the method further comprises:
and when the last receiving time cannot be acquired, processing the protocol request.
5. The method of claim 1, wherein after said determining the receive time interval between said current receive time and said last receive time, said method further comprises:
denying processing the protocol request when the receive time interval is less than or equal to the request time interval.
6. The method of claim 5, wherein after denying processing the protocol request when the receive time interval is less than or equal to the request time interval, the method further comprises:
generating a warning log for a protocol type of the protocol request;
counting the log number of the warning logs corresponding to the protocol types;
and when the number of the logs reaches a preset number of logs, generating frequent sending prompt information aiming at the protocol type to a specified target object.
7. The method of claim 5, wherein after denying processing the protocol request when the receive time interval is less than or equal to the request time interval, the method further comprises:
and when the number of the protocol requests which are refused to be processed reaches the preset request number after the user account is logged in, logging out the user account.
8. A protocol request processing apparatus, characterized in that the apparatus comprises:
the current receiving time acquisition module is used for recording the current receiving time of the server when a protocol request sent by a user account is received;
the last receiving time obtaining module is used for obtaining the last receiving time, and the last receiving time is the receiving time recorded when the server receives the protocol request which is sent by the user account and has the same protocol type last time;
a request time interval obtaining module, configured to obtain a request time interval corresponding to a protocol type of the protocol request;
a receiving time interval determining module for determining a receiving time interval between the current receiving time and the last receiving time;
a first protocol request processing module, configured to process the protocol request when the receiving time interval is greater than the request time interval.
9. An electronic device comprising a processor, a memory and a computer program stored on the memory and capable of running on the processor, the computer program, when executed by the processor, implementing the steps of the protocol request processing method according to any one of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the protocol request processing method according to any one of claims 1 to 7.
CN202010682640.0A 2020-07-15 2020-07-15 Protocol request processing method and device, electronic equipment and storage medium Pending CN111711642A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010682640.0A CN111711642A (en) 2020-07-15 2020-07-15 Protocol request processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010682640.0A CN111711642A (en) 2020-07-15 2020-07-15 Protocol request processing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111711642A true CN111711642A (en) 2020-09-25

Family

ID=72546444

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010682640.0A Pending CN111711642A (en) 2020-07-15 2020-07-15 Protocol request processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111711642A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112699015A (en) * 2020-12-29 2021-04-23 北京达佳互联信息技术有限公司 Log output method, device, server and computer readable storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106656966A (en) * 2016-09-30 2017-05-10 广州华多网络科技有限公司 Method and device for intercepting service processing request
CN106991013A (en) * 2017-04-18 2017-07-28 腾讯科技(深圳)有限公司 A kind of method and device handled resource request
CN107294931A (en) * 2016-04-11 2017-10-24 北京京东尚科信息技术有限公司 The method and apparatus of adjustment limitation access frequency
JP2018046436A (en) * 2016-09-15 2018-03-22 キヤノン株式会社 Communication device, communication method, and program
CN108092795A (en) * 2017-11-09 2018-05-29 深圳市金立通信设备有限公司 A kind of reminding method, terminal device and computer-readable medium
CN108632108A (en) * 2018-01-11 2018-10-09 西门子电力自动化有限公司 Monitoring method, device based on polling protocol and and readable storage medium storing program for executing
CN108737473A (en) * 2017-04-20 2018-11-02 贵州白山云科技有限公司 A kind of data processing method, apparatus and system
CN109040209A (en) * 2018-07-23 2018-12-18 深圳市牛鼎丰科技有限公司 Intercept method, apparatus, computer equipment and the storage medium of repetitive requests

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107294931A (en) * 2016-04-11 2017-10-24 北京京东尚科信息技术有限公司 The method and apparatus of adjustment limitation access frequency
JP2018046436A (en) * 2016-09-15 2018-03-22 キヤノン株式会社 Communication device, communication method, and program
CN106656966A (en) * 2016-09-30 2017-05-10 广州华多网络科技有限公司 Method and device for intercepting service processing request
CN106991013A (en) * 2017-04-18 2017-07-28 腾讯科技(深圳)有限公司 A kind of method and device handled resource request
CN108737473A (en) * 2017-04-20 2018-11-02 贵州白山云科技有限公司 A kind of data processing method, apparatus and system
CN108092795A (en) * 2017-11-09 2018-05-29 深圳市金立通信设备有限公司 A kind of reminding method, terminal device and computer-readable medium
CN108632108A (en) * 2018-01-11 2018-10-09 西门子电力自动化有限公司 Monitoring method, device based on polling protocol and and readable storage medium storing program for executing
CN109040209A (en) * 2018-07-23 2018-12-18 深圳市牛鼎丰科技有限公司 Intercept method, apparatus, computer equipment and the storage medium of repetitive requests

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112699015A (en) * 2020-12-29 2021-04-23 北京达佳互联信息技术有限公司 Log output method, device, server and computer readable storage medium
CN112699015B (en) * 2020-12-29 2023-12-19 北京达佳互联信息技术有限公司 Log output method, device, server and computer readable storage medium

Similar Documents

Publication Publication Date Title
CN110213356B (en) Login processing method based on data processing and related equipment
CN110536146B (en) Live broadcast method and device based on cloud game and storage medium
CN109743315B (en) Behavior identification method, behavior identification device, behavior identification equipment and readable storage medium for website
CN109981628B (en) Method and device for monitoring network live broadcast software performance and electronic equipment
CN111787345B (en) Interactive resource processing method and device based on network live broadcast room, server and storage medium
CN109698809B (en) Method and device for identifying abnormal login of account
CN107302586B (en) Webshell detection method and device, computer device and readable storage medium
EP3991389B1 (en) File upload control for client-side applications in proxy solutions
CN103701794A (en) Identification method and device for denial of service attack
CN108134816B (en) Access to data on remote device
CN108540533B (en) Request answering method and device
CN112044057A (en) Game state monitoring method and device
CN111711642A (en) Protocol request processing method and device, electronic equipment and storage medium
CN109688099B (en) Server-side database collision identification method, device, equipment and readable storage medium
JP2006155124A (en) Monitoring program, computer-readable recording medium with the program memorized thereon, and server and monitoring apparatus with the program stored therein
CN108881929B (en) Method and device for setting login prompt of live broadcast room
CN111818025B (en) User terminal detection method and device
CN113542418A (en) File management method and device, electronic equipment and storage medium
CN112714351A (en) Evidence obtaining method, evidence obtaining device and server
CN115051867B (en) Illegal external connection behavior detection method and device, electronic equipment and medium
CN111953633A (en) Access control method and access control device based on terminal environment
JP2007323320A (en) Log file transmission system and its method
WO2020000753A1 (en) Device security monitoring method and apparatus
JP6835507B2 (en) Unauthorized access detector, unauthorized access detection method and computer program
CN115118500A (en) Attack behavior rule obtaining method and device and electronic equipment

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: 20200925