CN108345500B - Event processing method and device - Google Patents
Event processing method and device Download PDFInfo
- Publication number
- CN108345500B CN108345500B CN201710053479.9A CN201710053479A CN108345500B CN 108345500 B CN108345500 B CN 108345500B CN 201710053479 A CN201710053479 A CN 201710053479A CN 108345500 B CN108345500 B CN 108345500B
- Authority
- CN
- China
- Prior art keywords
- request
- server
- terminal
- information
- configuration information
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
- G06F9/505—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer And Data Communications (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses an event processing method and device. Wherein, the method comprises the following steps: the terminal receives a first request for requesting processing of a first event; the terminal judges whether a first request is filtered according to first configuration information sent by the server when a first preset event occurs, wherein the first configuration information is used for determining an event which can be processed by the terminal when the server generates the first preset event; if the terminal judges that the first request is filtered according to the first configuration information, the terminal stops sending the first request to the server; and if the terminal judges that the first request is not filtered according to the first configuration information, the terminal sends the first request to the server. The invention solves the technical problem of large load of the server for processing the event when the server has the preset event in the prior art.
Description
Technical Field
The invention relates to the field of event processing, in particular to an event processing method and device.
Background
Currently, in event processing, for example, in event processing of disaster recovery performed by a background server, main methods include a load balancing method, a clustering method, and the like, and a main target object of the foregoing methods is still directed at various background servers, and various policies thereof are also deployed to the background servers.
A common disaster recovery processing method is to perform capacity expansion when the amount of calls is too large or to balance the number of background servers when a resource alarm occurs in the background servers, and this method is a conventional method that can ensure that all functions of all users are normally used, and this event processing takes effect quickly, and user experience can be not damaged under most conditions.
However, the expansion method is costly, and needs to be established on the premise that most of the background servers can still run, and if a large area of system paralysis occurs in the background servers, the disaster recovery processing without serious or urgent needs only bring about catastrophic user experience.
In addition, because various strategies for event processing are deployed on the background server, the load of the background server for processing events is large, the resources of the background server are already in a tension when disaster recovery is needed, whether the disaster recovery deployment of the background server can be successfully effective depends on the remaining normal service resources of the current background server, and if the disaster recovery of the background server is not effective at this time, the deterioration of the background environment is accelerated to a great extent, the user experience cannot be considered, and some important functions are directly stopped, so that the user experience is greatly influenced.
In view of the above problem in the related art that the load of the server for processing the event is large when the server has the preset event, no effective solution is proposed at present.
Disclosure of Invention
The embodiment of the invention provides an event processing method and device, which are used for at least solving the technical problem that the load of a server for processing an event is large when the server has a preset event in the related art.
According to an aspect of an embodiment of the present invention, there is provided an event processing method. The method comprises the following steps: the terminal receives a first request for requesting processing of a first event; the terminal judges whether a first request is filtered according to first configuration information sent by the server when a first preset event occurs, wherein the first configuration information is used for determining an event which can be processed by the terminal when the server generates the first preset event; if the terminal judges that the first request is filtered according to the first configuration information, the terminal stops sending the first request to the server; and if the terminal judges that the first request is not filtered according to the first configuration information, the terminal sends the first request to the server.
According to an aspect of the embodiment of the present invention, an event processing method is also provided. The method comprises the following steps: the method comprises the steps that under the condition that a first preset event occurs in a server, first configuration information is sent to a terminal, wherein the first configuration information is used for determining the event processed by the terminal; the server receives a first request sent by the terminal, wherein the terminal sends the first request to the server when judging that the first request is not filtered according to the first configuration information, or stops sending the first request to the server when judging that the first request is filtered according to the first configuration information.
According to another aspect of the embodiment of the invention, an event processing device is also provided. The device includes: a receiving unit configured to cause a terminal to receive a first request for requesting processing of a first event; the terminal comprises a judging unit, a processing unit and a processing unit, wherein the judging unit is used for enabling the terminal to judge whether to filter out a first request according to first configuration information sent by the server when a first preset event occurs, and the first configuration information is used for determining an event which can be processed by the terminal when the server generates the first preset event; the stopping unit is used for stopping sending the first request to the server if the terminal judges that the first request is filtered according to the first configuration information; and the sending unit is used for enabling the terminal to send the first request to the server if the first request is judged not to be filtered according to the first configuration information.
According to another aspect of the embodiment of the invention, an event processing device is also provided. The device includes: the terminal comprises a sending unit, a processing unit and a processing unit, wherein the sending unit is used for sending first configuration information to the terminal under the condition that a first preset event occurs in a server, and the first configuration information is used for determining an event processed by the terminal; and the receiving unit is used for enabling the server to receive the first request sent by the terminal, wherein the terminal sends the first request to the server when judging that the first request is not filtered according to the first configuration information, or stops sending the first request to the server when judging that the first request is filtered according to the first configuration information.
In the embodiment of the invention, a terminal is adopted to receive a first request for requesting to process a first event; the terminal judges whether a first request is filtered according to first configuration information sent by the server when a first preset event occurs, wherein the first configuration information is used for determining an event which can be processed by the terminal when the server generates the first preset event; if the terminal judges that the first request is filtered according to the first configuration information, the terminal stops sending the first request to the server; if the terminal judges that the first request is not filtered according to the first configuration information, the first request is sent to the server, and whether the first request is filtered or not is judged according to the first configuration information sent by the server when the first preset event occurs through the terminal, so that the request of the event is selectively filtered, the technical effect of reducing the load of the server for processing the event when the preset event occurs in the server is realized, and the technical problem of large load of the server for processing the event when the preset event occurs in the server in the related technology is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a schematic diagram of a hardware environment for an event method according to an embodiment of the invention;
FIG. 2 is a flow diagram of a method of event processing according to an embodiment of the present invention;
FIG. 3 is a flow diagram of another event processing method according to an embodiment of the invention;
fig. 4 is a flowchart of a method for a terminal to send a second request to a server according to an embodiment of the present invention;
FIG. 5 is a flow diagram of another event processing method according to an embodiment of the invention;
FIG. 6 is a flow diagram of another event processing method according to an embodiment of the invention;
FIG. 7 is a flow diagram of another event processing method according to an embodiment of the invention;
FIG. 8 is a flow diagram of another event processing method according to an embodiment of the present invention;
FIG. 9 is a flow diagram of another event processing method according to an embodiment of the invention;
FIG. 10 is a flow diagram of another event processing method according to an embodiment of the invention;
FIG. 11 is a flow diagram of another event processing method according to an embodiment of the invention;
FIG. 12 is a flow diagram of another event processing method according to an embodiment of the invention;
FIG. 13 is a schematic illustration of flexible policy control according to an embodiment of the present invention;
FIG. 14 is a flow chart illustration of a method of flexible policy synchronization according to an embodiment of the present invention;
fig. 15 is a flowchart of a flexibility control method of a terminal according to an embodiment of the present invention;
FIG. 16 is a flow chart of a method of flexible control of a server according to an embodiment of the present invention;
FIG. 17 is a schematic diagram of an event processing device according to an embodiment of the present invention;
FIG. 18 is a schematic diagram of an event processing device according to an embodiment of the present invention; and
fig. 19 is a block diagram of a terminal according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
According to an embodiment of the present invention, an embodiment of an event processing method is provided.
Alternatively, in the present embodiment, the event processing method described above may be applied to a hardware environment formed by the server 102 and the terminal 104 as shown in fig. 1. FIG. 1 is a schematic diagram of a hardware environment for an event method according to an embodiment of the present invention. As shown in fig. 1, a server 102 is connected to a terminal 104 via a network including, but not limited to: the terminal 104 is not limited to a PC, a mobile phone, a tablet computer, etc. in a wide area network, a metropolitan area network, or a local area network. The event processing method according to the embodiment of the present invention may be executed by the server 102, the terminal 104, or both the server 102 and the terminal 104. The event processing method of the embodiment of the present invention executed by the terminal 104 may also be executed by a client installed thereon.
Fig. 2 is a flow chart of an event processing method according to an embodiment of the present invention. As shown in fig. 2, the method may include the steps of:
in step S202, the terminal receives a first request for requesting processing of a first event.
In the technical solution provided by step S202 above, the terminal receives a first request for requesting to process a first event.
The terminal receives a first request for processing a first event, where the first event may be a service event, and the first request may be a service request for processing the service event, where the service request may include a plurality of service requests. The terminal of this embodiment may be deployed in a flexible filter layer above a network layer below a service layer, where the service layer is a part of software that is dedicated to processing tasks related to a service and may be configured to perform operations on data, the network layer may be configured to further manage data communication in a network on a data frame transfer function between two adjacent endpoints provided by a data link layer, and transfer data from a source end to a destination end via a plurality of intermediate nodes, so as to provide a most basic end-to-end data transfer service to a transport layer, and the flexible filter layer is configured to determine whether a service request needs to be filtered before the service request is sent out via the network layer.
Step S204, the terminal judges whether to filter out the first request according to the first configuration information sent by the server when the first preset event occurs.
In the technical solution provided by step S204 of the present invention, the terminal determines whether to filter the first request according to first configuration information sent by the server when the first preset event occurs, where the first configuration information is used to determine an event that can be processed by the terminal when the first preset event occurs in the server.
The first preset event occurs in the server, which may be an event that the server has a major fault or an event that the server has insufficient resources, wherein the server is a background server. After the terminal receives a first request for processing a first event, the terminal judges whether to filter the first request according to first configuration information sent by the server when the first preset event occurs, wherein the first configuration information is flexible service configuration information.
Optionally, the terminal and the server may comb out command words of all protocols between the terminal and the server, a scene to which the command words belong, a function module to which the command words belong, and allocate function IDs, scene types, and the like to all the protocols, where the command words of the protocols are used to represent names of the protocols, multiple protocols may belong to the same function ID at the same time, and the scene types may be divided into an active scene, a silent scene, and a pre-pull scene according to a timing of protocol initiation, where the active scene is a scene in which the terminal actively initiates a protocol request to the server under a condition that a user has a perception, for example, an interaction behavior between the user and the terminal, the silent scene is a scene in which the protocol request is initiated to the server under a condition that the user does not have a perception, and the pre-pull scene is a scene in which the protocol request may be initiated to the server under a condition that the user does not have a perception, or may be initiated to the server under a condition that the user has a perception, thereby optimizing the scenario of speed of processing events. When a terminal sends a protocol request, command words, affiliated scenes, affiliated functional modules and the like of all protocols are reported to a server together, the server carries out classification processing on the protocol command words according to the flow statistics condition of the protocol command words reported by the terminal and the distribution condition of the functional scenes, and then a flexible classification strategy is formulated, wherein the flexible classification strategy is also flexible service configuration information and is used for enabling the terminal to determine which requests need to be filtered when an event is processed. When a first preset event occurs in the server, counting problems occurring in the server, selecting first configuration information required to be adopted for the first preset event, and sending the first configuration information to the terminal, so that the terminal synchronously deploys the first configuration information, the method for deploying the flexible control strategy in the terminal is realized, and the terminal judges whether to filter the first request according to the first configuration information.
Step S206, stops sending the first request to the server.
In the technical solution provided by step S206 of the present invention, if the terminal determines that the first request is filtered according to the first configuration information, the terminal stops sending the first request to the server.
After the terminal judges whether to filter the first request according to the first configuration information sent by the server when the first preset event occurs, if the terminal judges to filter the first request according to the first configuration information, that is, the information carried in the first request can be discarded, the filtered first request is not distributed to the specific service servers of each layer of the server, and the user experience is not influenced in a short time.
Optionally, when the first request is stopped being sent to the server, a code for indicating that the first request is discarded is returned, and then prompt information is displayed, for example, prompt information of "the server is busy and please operate later" or prompt information of "waiting for uploading" or the like is displayed, so that the requests sent to the server are reduced from the perspective of the sender, the server is prevented from receiving all requests for processing events, and the load of the server for processing events is reduced.
Step S208, a first request is sent to the server.
In the technical solution provided by step S208 of the present invention, if the terminal determines that the first request is not filtered according to the first configuration information, the terminal sends the first request to the server.
After the terminal judges whether to filter the first request according to the first configuration information sent by the server when the first preset event occurs, if the terminal judges not to filter the first request according to the first configuration information, a normal event processing flow is executed between the terminal and the server, the first request is sent to the server, and the event corresponding to the first request can be a basic function of user experience and core experience which is most intented by the user. Optionally, the terminal receives the service request through the service layer, sends the service request to the proxy server of the server through the network layer, and then sends the service request to the service server of the server through the proxy server, and the service server executes the service event according to the service request, so that some basic functions can be rescued under the condition that the server has major faults and resources are insufficient, and the most conscious core experience of the user is maintained.
Through the above-described steps S202 to S208, the first request for requesting processing of the first event is received through the terminal by the embodiment; the terminal judges whether a first request is filtered according to first configuration information sent by the server when a first preset event occurs, wherein the first configuration information is used for determining an event which can be processed by the terminal when the server generates the first preset event; if the terminal judges that the first request is filtered according to the first configuration information, the terminal stops sending the first request to the server; if the terminal judges that the first request is not filtered according to the first configuration information, the first request is sent to the server, whether the first request is filtered is judged according to the first configuration information sent by the server when the first preset event occurs through the terminal, so that the request of the event is selectively filtered, the server is prevented from receiving all requests for processing the event, the technical problem that the load of the server for processing the event is large when the preset event occurs in the server in the related technology can be solved, and the technical effect of reducing the load of the server for processing the event when the preset event occurs in the server is achieved.
As an optional implementation manner, before the terminal determines whether to filter out the first request according to first configuration information sent by the server when the first preset event occurs, the terminal sends a second request carrying a preset protocol for processing the event between the terminal and the server to the server; and the terminal receives the first configuration information which is sent by the server in response to the second request.
Fig. 3 is a flow chart of another event processing method according to an embodiment of the present invention. As shown in fig. 3, the method further comprises the steps of:
step S301, the terminal sends a second request to the server.
In the technical solution provided in step S301 of the present invention, the terminal sends a second request to the server, where the second request carries a preset protocol for processing an event between the terminal and the server.
Before a terminal judges whether a first request is filtered according to first configuration information sent by a server when a first preset event occurs, the terminal sends a second request to the server, the second request carries a preset protocol used for processing the event between the terminal and the server, the terminal and the server jointly comb out command words, scenes and function modules of all the protocols, and distribute function IDs of the protocols, wherein a plurality of the protocols can simultaneously belong to the same function ID, and the types of the scenes can be divided into an active scene, a silent scene and a pre-pull scene according to the opportunity initiated by the preset protocol. When the terminal sends a second request carrying a preset protocol to the server, the terminal reports all required information to the server through the second request.
Step S302, the terminal receives the first configuration information sent by the server in response to the second request.
In the technical solution provided by step S302 of the present invention, the terminal receives first configuration information that is sent by the server in response to the second request, where the first configuration information is formulated by the server according to a preset protocol.
The method comprises the steps that a preset protocol comprises protocol command words, function scene distribution information and the like, after a terminal sends a second request to a server, the server responds to the second request, the protocol command words are classified according to flow statistics and the function scene distribution information of the protocol command words reported to the server by the terminal, a flexible classification strategy is formulated, the flexible classification strategy comprises first configuration information deployed to the terminal when a first preset event occurs to the first server, and the terminal receives the first configuration information.
When a first preset event occurs in the server, selecting first configuration information to be adopted according to the first preset event statistics, and synchronizing the first configuration information to the terminal, optionally, synchronizing the first configuration information to an agent of the server.
In the embodiment, before the terminal judges whether to filter out the first request according to first configuration information sent by the server when a first preset event occurs, the terminal sends a second request to the server, wherein the second request carries a preset protocol used for processing the event between the terminal and the server; the terminal receives first configuration information which is set by the server according to a preset protocol and sent by the server in response to the second request, so that the terminal judges whether the first request is filtered according to the first configuration information, the terminal stops sending the first request to the server if the terminal judges that the first request is filtered according to the first configuration information, and the terminal sends the first request to the server if the terminal judges that the first request is not filtered according to the first configuration information, so that the server is prevented from receiving all requests for processing events, the technical problem that the load of the server for processing the events is large when the server generates the preset events in the related art can be solved, and the technical effect of reducing the load of the server for processing the events when the server generates the preset events is achieved.
As an optional implementation manner, in step S301, the sending, by the terminal, the second request to the server includes: the terminal sends a second request carrying version information to the server; step S302, the first configuration information sent by the terminal receiving server in response to the second request includes: the terminal receives first configuration information formulated by the server according to a preset protocol and version information.
Each request sent by the terminal to the server carries version information of the local configuration information. The second request also carries version information, which may be added in a request header of the second request, for indicating a version of the second configuration information that has been stored locally at the terminal before the first preset event occurred at the server. And when the terminal sends the second request to the server, the terminal sends the second request which also carries the version information to the server. After the server receives the second request, the server formulates a flexible grading strategy according to a preset protocol carried by the second request, and when a first preset event occurs in the server, first configuration information is sent to the terminal, configured through a structural body in a protocol loopback packet issued by the server in response to the second request and is configuration information with high timeliness requirements. Optionally, version information of the first configuration information is added in a response header of the protocol loopback packet. The server judges whether the version of the first configuration information is higher than that of the second configuration information, if the server judges that the version of the first configuration information is higher than that of the second configuration information, the terminal receives the first configuration information issued by the server, so that the configuration information with the higher version on the terminal covers the configuration information with the lower version, and if the server judges that the version of the first configuration information is lower than that of the second configuration information, the terminal does not receive the first configuration information, so that the server determines whether to issue the first configuration information according to the version information carried by the second request sent by the terminal.
As an optional implementation manner, in step S204, the determining, by the terminal according to the first configuration information sent by the server when the first preset event occurs, whether to filter out the first request includes: the first scene information is used for indicating the trigger time of a protocol adopted by the first request, the first configuration information comprises second scene information, and the second scene information is used for indicating the trigger time of a preset protocol; determining to filter out the first request under the condition that the terminal judges that the first scene information is the same as the second scene information; in the case where the first scene information is not identical to the second scene information, the terminal determines not to filter out the first request.
Fig. 4 is a flowchart of a method for a terminal to send a second request to a server according to an embodiment of the present invention. As shown in fig. 4, the method comprises the steps of:
step S401, the terminal judges whether the first scene information carried by the first request is the same as the second scene information of the preset protocol.
In the technical solution provided in step S401 of the present invention, the terminal determines whether first scene information carried by the first request is the same as second scene information of the preset protocol, where the first scene information is used to indicate a trigger time of a protocol adopted by the first request, the first configuration information includes the second scene information, and the second scene information is used to indicate a trigger time of the preset protocol.
The first request carries first scenario information, and the type of the first scenario information may include multiple types, for example, the information of the first scenario type is an active type, a silent type, and a pre-pull type. After the terminal receives a first request for requesting processing of a first event, the terminal judges whether first scene information is the same as second scene information of a preset protocol, wherein the second scene information of the preset protocol is blacklist scene information set in first configuration information by a server.
If the terminal determines that the first scene information carried by the first request is the same as the second scene information of the preset protocol, step S402 is executed, and if the terminal determines that the first scene information carried by the first request is not the same as the second scene information of the preset protocol, step S403 is executed.
In step S402, the terminal determines to filter out the first request.
In the technical solution provided by step S402 of the present invention, if the terminal determines that the first scenario information is the same as the second scenario information, it determines to filter the first request.
After the terminal judges whether the first scene information carried by the first request is the same as the second scene information of the preset protocol, if the terminal judges that the first scene information is the same as the second scene information, namely, if the first scene information is judged to be blacklist scene information, the first request is determined to be filtered, the first request can be stopped being sent to the server, and the request quantity sent to the server is effectively reduced.
In step S403, the terminal determines not to filter out the first request.
In the technical solution provided in step S403 of the present invention, if the terminal determines that the first scenario information is different from the second scenario information, it is determined that the first request is not filtered.
After the terminal judges whether first scene information carried by the first request is the same as second scene information of a preset protocol or not, if the terminal judges that the first scene information is not the same as the second scene information, namely, if the terminal judges that the first scene information does not belong to blacklist scene information, the first request is determined not to be filtered, and the first request is sent to the server, so that the basic core function of a user can be continuously guaranteed.
The embodiment judges whether first scene information carried by the first request is the same as second scene information of a preset protocol through the terminal; if the terminal judges that the first scene information is the same as the second scene information, the terminal determines to filter out the first request; if the terminal judges that the first scene information is different from the second scene information, the first request is determined not to be filtered, the purpose that whether the first request is filtered or not is judged by the terminal according to the first configuration information sent by the server when the first preset event occurs is achieved, therefore, the request quantity sent to the server can be reduced under the condition that server resources are scarce, the load of server processing time is reduced, the basic core function of a user is guaranteed, and the user experience is improved.
As an optional implementation manner, in step S402, if the terminal determines that the first context information is the same as the second context information, determining to filter out the first request includes: and if the terminal judges that the first scene information is the same as the second scene information, discarding the first request and returning a code for indicating to discard the first request.
If the terminal determines that the first scene information is the same as the second scene information and determines to filter the first request, if the terminal determines that the first scene information is the same as the second scene information, for example, if the terminal determines that the scene information carried by the service request is blacklist scene information, the service request is discarded, and a code for indicating to discard the first request is returned, where the code is an error code.
As an optional implementation manner, the first function information is used to indicate a function to which a protocol adopted by the first request belongs, the first configuration information includes second function information, and the second function information is used to indicate a function to which a preset protocol belongs, after the terminal determines whether first scenario information carried in the first request is the same as the second scenario information, and under the condition that the first function information carried in the first request is the same as the second function information of the preset protocol, the terminal determines to filter the first request; in the case where the first function information is not identical to the second function information, the terminal determines not to filter out the first request.
Fig. 5 is a flowchart of another event processing method according to an embodiment of the present invention. As shown in fig. 5, the method further comprises the steps of:
step S501, the terminal determines whether the first function information carried by the first request is the same as the second function information of the preset protocol.
In the technical solution provided in step S501 of the present invention, if the terminal determines that the first scenario information is different from the second scenario information, it determines whether the first function information carried in the first request is the same as the second function information of the preset protocol, where the first function information is used to indicate a function to which a protocol adopted by the first request belongs, the first configuration information includes the second function information, and the second function information is used to indicate a function to which the preset protocol belongs.
The first request carries first function information, the first function information is divided according to functions of protocols, different protocols have different functions, and the first function information can be downloading function information and updating function information. And if the terminal judges that the first scene information is different from the second scene information, judging whether the first function information carried by the first request is the same as the second function information of the preset protocol, wherein the second function information is blacklist function information set in the first configuration information by the server. If the terminal determines that the first function information carried by the first request is the same as the second function information of the preset protocol, step S502 is executed, and if the terminal determines that the first function information carried by the first request is not the same as the second function information of the preset protocol, step S503 is executed.
Step S502, the terminal determines to filter out the first request.
In the technical solution provided in step S502 of the present invention, if the terminal determines that the first function information is the same as the second function information, it determines to filter the first request.
After the terminal judges whether the first function information carried by the first request is the same as the second function information of the preset protocol, if the terminal judges that the first function information is the same as the second function information, namely, if the first function information is judged to be blacklist function information, the first request is determined to be filtered, the first request can be stopped being sent to the server, and the request quantity sent to the server is effectively reduced.
In step S503, the terminal determines not to filter out the first request.
In the technical solution provided in step S503 of the present invention, if the terminal determines that the first function information is different from the second function information, it is determined that the first request is not filtered.
After the terminal judges whether the first function information carried by the first request is the same as the second function information of the preset protocol or not, if the terminal judges that the first function information is not the same as the second function information, namely, if the terminal judges that the first function information does not belong to the blacklist function information, the first request is determined not to be filtered, and the first request is sent to the server, so that the basic core function of the user can be continuously guaranteed.
Optionally, after the terminal receives a first request for requesting processing of a first event, the terminal may directly determine whether first function information carried by the first request is the same as second function information of a preset protocol, determine to filter the first request if the terminal determines that the first function information is the same as the second function information, and determine not to filter the first request if the terminal determines that the first function information is not the same as the second function information.
In the embodiment, after the terminal determines whether first scene information carried by a first request is the same as second scene information, if the terminal determines that the first scene information is different from the second scene information, it determines whether first function information carried by the first request is the same as second function information of a preset protocol, where the first function information is used to indicate a function to which a protocol adopted by the first request belongs, the first configuration information includes the second function information, and the second function information is used to indicate a function to which the preset protocol belongs; if the terminal judges that the first function information is the same as the second function information, the terminal determines to filter out the first request; if the terminal judges that the first function information is different from the second function information, the first request is determined not to be filtered, so that the request quantity sent to the server can be reduced under the condition that server resources are scarce, the load of the processing time of the server is reduced, the basic core function of a user is guaranteed, and the user experience is improved.
As an optional implementation manner, the first scene information and the second scene information respectively include at least one of the following: the active scene is a scene in which the terminal receives a trigger instruction and sends a second request to the server, wherein the trigger instruction is used for triggering the second request; a silent scene, wherein the silent scene is a scene in which the terminal sends a second request to the server; and pre-pulling a scene, wherein the pre-pulling scene is a scene in which the terminal receives the trigger instruction and sends a second request to the server, or the terminal sends the second request to the server.
The first scene information is used for indicating the trigger time of a protocol adopted by the first request, the first request carries the first scene information, and the second scene information is used for indicating the trigger time of a preset protocol. The first scene information and the second scene information may include at least one of an active scene, a silence scene, and a pre-pull scene. The active scenario is a scenario in which the terminal actively initiates a protocol request to the server through the trigger instruction under the condition that the user has a perception, for example, the user can trigger the protocol adopted by the first request through the active scenario under the condition that the server has a major accident through an interaction behavior between the trigger instruction and the terminal. The silent scene is a scene for initiating a protocol request to the server under the condition that a user does not sense the silent scene, a protocol adopted by a first request can be triggered by the silent scene under the condition that an accident occurring in the server is not serious, a prestretching field can initiate the request to the server under the condition that the user does not sense the silent scene, the request can also be initiated to the server under the condition that the user senses the silent scene, the protocol adopted by the first request can be triggered by the prestretching scene under the condition that the accident occurring in the server is serious, and the speed of processing the event is further optimized.
As an optional implementation manner, in step S502, if the terminal determines that the first function information is the same as the second function information, determining to filter out the first request includes: and if the terminal judges that the first function information is the same as the second function information, discarding the first request and returning a code for indicating to discard the first request.
As an optional implementation manner, the first command word is used to indicate a name of a protocol used by the first request, the first configuration information includes a second command word, the second command word is used to indicate a name of a preset protocol, after the terminal determines whether first function information carried by the first request is the same as second function information, and when the terminal determines that the first function information is different from the second function information, it determines whether the first command word carried by the first request is the same as the second command word of the preset protocol, and when the first command word carried by the first request is the same as the second command word, the terminal determines to filter the first request; in the case where the first command word carried by the first request is not the same as the second command word, the terminal determines not to filter out the first request.
Fig. 6 is a flowchart of another event processing method according to an embodiment of the present invention. As shown in fig. 6, the method further comprises the steps of:
step S601, the terminal determines whether the first command word carried by the first request is the same as the second command word of the preset protocol.
In the technical solution provided in step S601 of the present invention, if the terminal determines that the first function information is different from the second function information, it determines whether a first command word carried in the first request is the same as a second command word of a preset protocol, where the first command word is used to indicate a name of a protocol used by the first request, the first configuration information includes the second command word, and the second command word is used to indicate a name of the preset protocol.
If the first command word carried by the first request is determined to be the same as the second command word of the preset protocol, step S602 is executed, and if the first command word carried by the first request is determined to be different from the second command word of the preset protocol, step S602 is executed.
The second command word is a blacklist command word set in the first configuration information by the server, and after the terminal judges whether the first function information carried by the first request is the same as the second function information of the preset protocol, if the terminal judges that the first function information is different from the second function information, that is, if the terminal judges that the first function information is not the blacklist function information, whether the first command word is the same as the blacklist command word can be judged.
In step S602, the terminal determines to filter out the first request.
In the technical solution provided in step S602 of the present invention, if the terminal determines that the first command word carried in the first request is the same as the second command word, it determines to filter the first request.
In step S603, the terminal determines not to filter out the first request.
In the technical solution provided in step S603 of the present invention, if the terminal determines that the first command word carried in the first request is different from the second command word, it is determined that the first request is not filtered.
Optionally, after the terminal receives a first request for requesting processing of a first event, the terminal may directly determine whether a first command word carried in the first request is the same as a second command word of a preset protocol, determine to filter the first request if the terminal determines that the first command word is the same as the second command word of the preset protocol, and determine not to filter the first request if the terminal determines that the first command word is not the same as the second command word of the preset protocol.
In the embodiment, after the terminal determines whether the first function information carried by the first request is the same as the second function information, if the terminal determines that the first function information is different from the second function information, it determines whether the first command word carried by the first request is the same as the second command word of the preset protocol; if the terminal judges that the first command word carried by the first request is the same as the second command word, the terminal determines to filter the first request; if the terminal judges that the first command word carried by the first request is different from the second command word, the first request is determined not to be filtered, so that the request quantity sent to the server can be reduced under the condition that server resources are scarce, the load of the processing time of the server is reduced, the basic core function of a user is guaranteed, and the user experience is improved.
As an alternative implementation manner, in step S602, if the terminal determines that the first command word carried by the first request is the same as the second command word, determining to filter out the first request includes: and if the terminal judges that the first command word carried by the first request is the same as the second command word, discarding the first request and returning a code for indicating to discard the first request.
If the terminal judges that the first command word is the same as the second command word, and determines to filter the first request, if the terminal judges that the first command word is the same as the second command word, for example, if the terminal judges that the command word carried by the service request is a blacklist command word, the service request is discarded, and a code for indicating to discard the first request is returned, wherein the code is an error code.
As an alternative implementation manner, in step S602, if the terminal determines that the first command word carried by the first request is the same as the second command word, determining to filter out the first request includes: and if the terminal judges that the first command word carried by the first request is the same as the second command word, the terminal removes the first command word from the first request to obtain a third request and sends the third request to the server.
It should be noted that, the method for the terminal to determine whether to filter out the first request according to the first configuration information sent by the server when the first preset event occurs, the method for the terminal to determine whether the first scene information carried by the first request is the same as the second scene information of the preset protocol, the method for the terminal to determine whether the first function information carried by the first request is the same as the second function information of the preset protocol, the method for the terminal to determine whether the first command word carried by the first request is the same as the second command word of the preset protocol may be combined with each other, and is not limited to the method for the terminal to determine whether to filter out the first request according to the first configuration information sent by the server when the first preset event occurs, and the method for the terminal to determine whether to filter out the first request according to the first configuration information sent by the server when the first preset event occurs is only a preferred embodiment of the present invention, any method that a terminal capable of reducing the load of the server processing the event judges whether to filter the first request according to the first configuration information sent by the server when the first preset event occurs is within the protection scope of the present invention, and no one example is given here.
As an optional implementation manner, after sending the first request to the server, the terminal sends the first request to a proxy server of the server, where the proxy server is configured to determine whether to filter out the first request according to first configuration information sent by the server when the first preset event occurs.
The server synchronizes the first configuration information to a proxy server of the server besides synchronizing the first configuration information to the terminal, wherein the proxy server is a background access proxy and is used for judging whether to filter out the first request according to the first configuration information.
As an alternative embodiment, after the terminal receives the first request for requesting processing of the first event, the terminal sends the first request to the proxy server of the server without receiving the sent first configuration information.
In some cases, the terminal may not receive the flexible configuration, for example, when the terminal initially processes the event, the server has not yet issued the first configuration information, and at this time, the access layer in the background also needs to implement flexible control, and the access layer filters out some function command words in the first request, so as to reduce the request amount of the final service server from the perspective of the receiver, thereby reducing the load of the server.
As an optional implementation manner, in a case that the configuration time after the terminal receives the first configuration information reaches a preset time after the terminal sends the first request to the server, the terminal sends a fourth request to the server, where the fourth request is used to inquire whether the server allows the terminal to filter a fifth request by using the first configuration information, and the fifth request is used to request to process a second event; when the server allows the terminal to filter the fifth request by adopting the first configuration information, the terminal receives the first configuration information sent again by the server; and when the server does not allow the terminal to filter the fifth request by adopting the first configuration information, the terminal recovers the function of processing the event by the terminal under the condition that the server does not generate the first preset event.
Fig. 7 is a flowchart of another event processing method according to an embodiment of the present invention. As shown in fig. 7, the method further comprises the steps of:
step S701, the terminal acquires configuration time after receiving the first configuration information.
In the technical solution provided by step S701 of the present invention, the terminal obtains the configuration time after the terminal receives the first configuration information.
The terminal has the control of the flexible effective time, and the flexible effective time is the time after the terminal receives the first configuration information, and the configuration time is acquired.
In step S702, the terminal determines whether the configuration time reaches a preset time.
In the technical solution provided in step S702 of the present invention, the terminal determines whether the configuration time reaches a preset time.
After the terminal acquires the configuration time of the terminal after receiving the first configuration information, the terminal determines whether the configuration time reaches the preset time, and if the terminal determines that the configuration time reaches the preset time, the step S703 is executed.
Step S703, the terminal sends a fourth request to the server.
In the technical solution provided in step S703 of the present invention, if the terminal determines that the configuration time reaches the preset time, the terminal sends a fourth request to the server, where the fourth request is used to inquire whether the server allows the terminal to filter a fifth request by using the first configuration information, and the fifth request is used to request processing of the second event.
After the terminal judges whether the configuration time reaches the preset time or not, if the terminal judges that the configuration time reaches the preset time, the terminal sends a fourth request to the server to inquire whether the background continues to be flexible or not.
Step S704, when the server allows the terminal to filter the fifth request by using the first configuration information, the terminal receives the first configuration information sent again by the server.
In the technical solution provided by step S704 of the present invention, when the server allows the terminal to filter the fifth request by using the first configuration information, the terminal receives the first configuration information sent again by the server.
Step S705, when the server does not allow the terminal to filter the fifth request by using the first configuration information, the terminal recovers the function of processing the event by the terminal when the server does not have the first preset event.
In the technical solution provided by step S705 of the present invention, when the server does not allow the terminal to filter the fifth request by using the first configuration information, the terminal recovers the function of processing the event by the terminal when the server does not have the first preset event.
And the function of the terminal for processing the event under the condition that the server does not have the first preset event is recovered by the terminal, namely the original protocol logic is recovered by the terminal.
In the embodiment, after the terminal sends the first request to the server, the terminal acquires the configuration time of the terminal after receiving the first configuration information; the terminal judges whether the configuration time reaches the preset time or not; if the terminal judges that the configuration time reaches the preset time, a fourth request is sent to the server; when the server allows the terminal to filter the fifth request by adopting the first configuration information, the terminal receives the first configuration information sent again by the server; when the server does not allow the terminal to filter the fifth request by adopting the first configuration information, the function of processing the event by the terminal under the condition that the first preset event does not occur in the server is recovered, and the purpose that the server quickly recovers the request of the terminal after the first preset event is solved is achieved.
As an optional implementation manner, after the terminal sends the first request to the server, the terminal receives a preset instruction sent by the server, and the preset instruction is issued to the terminal by the server under the condition that the first preset event is ended; and the terminal clears the first configuration information according to the preset instruction and recovers the function of processing the event by the terminal under the condition that the first preset event does not occur in the server.
Fig. 8 is a flowchart of another event processing method according to an embodiment of the present invention. As shown in fig. 8, the method further comprises the steps of:
step S801, the terminal receives a preset instruction sent by the server.
In the technical solution provided in step S801 of the present invention, the terminal receives the preset instruction sent by the server, and the preset instruction is issued to the terminal by the server when the first preset event is ended.
The preset instruction is also an instruction for enabling the terminal to recover the original function, and after the terminal sends the first request to the server, the server actively issues the preset instruction to the terminal.
Step S802, the terminal clears the first configuration information according to the preset instruction and recovers the function of the terminal for processing the event under the condition that the server does not have the first preset event.
In the technical solution provided in step S802 of the present invention, the terminal clears the first configuration information according to the preset instruction, and recovers the function of processing the event by the terminal when the server does not have the first preset event.
After the terminal receives the preset instruction, the terminal automatically empties all the flexible configuration caches and restores the original protocol logic.
In the embodiment, after the terminal sends the first request to the server, the terminal receives the preset instruction sent by the server, and the preset instruction is issued to the terminal by the server under the condition of ending the first preset event; and the terminal clears the first configuration information according to the preset instruction and recovers the function of processing the event by the terminal under the condition that the first preset event does not occur in the server.
According to the embodiment of the invention, the embodiment of the event processing method is also provided.
Alternatively, in the present embodiment, the event processing method described above may be applied to a hardware environment formed by the server 102 and the terminal 104 as shown in fig. 1. As shown in fig. 1, a server 102 is connected to a terminal 104 via a network including, but not limited to: the terminal 104 is not limited to a PC, a mobile phone, a tablet computer, etc. in a wide area network, a metropolitan area network, or a local area network. The event processing method according to the embodiment of the present invention may be executed by the server 102, the terminal 104, or both the server 102 and the terminal 104. The event processing method of the embodiment of the present invention executed by the terminal 104 may also be executed by a client installed thereon.
Fig. 9 is a flowchart of another event processing method according to an embodiment of the present invention. As shown in fig. 9, the method includes the steps of:
step S902, sending first configuration information to the terminal when the server has a first preset event.
In the technical solution provided by step S902 of the present invention, when a first preset event occurs in the server, the server sends first configuration information to the terminal, where the first configuration information is used to determine an event processed by the terminal.
The first preset event occurs in the server, which may be an event that the server has a major fault or an event that the server has insufficient resources, wherein the server is a background server. After the terminal receives a first request for processing a first event, the terminal judges whether to filter the first request according to first configuration information sent by the server when the first preset event occurs, wherein the first configuration information is flexible service configuration information.
Optionally, the terminal and the server may comb out command words, scenes, and function modules of all protocols between the terminal and the server together, and allocate function IDs, scene types, and the like to all the protocols, where the command words of the protocols are used to represent names of the protocols, multiple protocols may belong to the same function ID at the same time, and the scene types may be divided into an active scene, a silent scene, and a pre-pull scene according to a time initiated by the protocols. When a terminal sends a protocol request, command words, affiliated scenes, affiliated functional modules and the like of all protocols are reported to a server together, the server carries out classification processing on the protocol command words according to the flow statistics condition of the protocol command words reported by the terminal and the distribution condition of the functional scenes, and then a flexible classification strategy is formulated, wherein the flexible classification strategy is also flexible service configuration information and is used for enabling the terminal to determine which requests need to be filtered when an event is processed. When a first preset event occurs in the server, counting problems occurring in the server, selecting first configuration information required to be adopted for the first preset event, and sending the first configuration information to the terminal, so that the terminal synchronously deploys the first configuration information, the method for deploying the flexible control strategy in the terminal is realized, and the terminal judges whether to filter the first request according to the first configuration information.
Step S904, the server receives the first request sent by the terminal, wherein the terminal sends the first request to the server if it is determined according to the first configuration information that the first request is not to be filtered, or stops sending the first request to the server if it is determined according to the first configuration information that the first request is to be filtered.
In the technical solution provided in step S904 of the present invention, if the terminal determines to filter the first request according to the first configuration information, that is, the information carried in the first request may be discarded, and the specific service servers in each layer of the server may not receive the filtered first request, and may not affect the user experience in a short time.
And if the terminal judges that the first request is not filtered according to the first configuration information, a normal event processing flow is executed between the terminal and the server, the server receives the first request, and an event corresponding to the first request can be a basic function of user experience and core experience most intented by the user. Optionally, the terminal receives the service request through the service layer, the proxy server of the server receives the service request received by the terminal through the service layer through the network layer, and then the service request is sent to the service server of the server through the proxy server, and the service server executes the service event according to the service request, so that some basic functions can be rescued under the condition that the server has major faults and resources are insufficient, and the most conscious core experience of the user is maintained.
Optionally, a flexible control policy also needs to be deployed in the access layer of the server, and then some function command words, scene information, function information, and the like are filtered in the access layer, so that the request amount for making a request to the server is reduced from the perspective of the receiver.
Optionally, in some cases, it is very unlikely that the terminal does not receive the first configuration information sent by the server, and at this time, some function command words, scenario information, function information, and the like are filtered through a flexible control policy deployed in an access stratum of the server, so that the request amount of the request to the server is reduced from the perspective of the recipient.
Through the above steps S902 and S904, when a first preset event occurs in the server, sending first configuration information to the terminal, where the first configuration information is used to determine an event processed by the terminal; the server receives a first request sent by the terminal, wherein the terminal sends the first request to the server under the condition that the first request is judged not to be filtered according to the first configuration information, or stops sending the first request to the server under the condition that the first request is judged to be filtered according to the first configuration information, so that the technical problem that the load of the server for processing events is large when the server generates preset events in the related art can be solved, and the technical effect of reducing the load of the server for processing events when the server generates the preset events is achieved.
As an optional implementation manner, before the server receives the first request, the server receives a second request sent by the terminal, where the second request carries a preset protocol for processing an event between the terminal and the server; and the server responds to the second request and sends first configuration information which is formulated according to a preset protocol and is used when a first preset event occurs in the server to the terminal.
As an optional implementation manner, the server includes a proxy server and a service server, and after the server receives a first request sent by the terminal, the proxy server implements a flexible control policy of the server according to whether first scenario information carried by the first request is the same as second scenario information of a preset protocol.
Fig. 10 is a flowchart of another event processing method according to an embodiment of the present invention. As shown in fig. 10, the method further comprises the steps of:
step S1001, the proxy server determines whether the first scenario information carried by the first request is the same as the second scenario information of the preset protocol.
In the technical solution provided in step S1001 of the present invention, the server determines whether first scenario information carried by the first request is the same as second scenario information of a preset protocol, where the first scenario information is used to indicate a trigger time of a protocol adopted by the first request, the first configuration information includes the second scenario information, and the second scenario information is used to indicate the trigger time of the preset protocol.
Step S1002, the proxy server removes the first context information from the first request to obtain a second request.
In the technical solution provided by step S1002 of the present invention, if the proxy server determines that the first context information is the same as the second context information, the proxy server removes the first context information from the first request to obtain the second request.
In step S1003, the proxy server forwards the second request to the service server.
In the technical solution provided by step S1003 of the present invention, the proxy server forwards the second request to the service server, where the service server is configured to process the second event according to the second request.
As an optional implementation manner, the server includes a proxy server and a service server, and after the server receives a first request sent by the terminal, the proxy server implements a flexible control policy of the server according to whether first function information carried by the first request is the same as second function information of a preset protocol.
Fig. 11 is a flowchart of another event processing method according to an embodiment of the present invention. As shown in fig. 11, the method further comprises the steps of:
in step S1101, the proxy server determines whether the first function information carried by the first request is the same as the second function information of the preset protocol.
In the technical solution provided in step S1101 of the present invention, the proxy server determines whether first function information carried by the first request is the same as second function information of the preset protocol, where the first function information is used to indicate a function to which a protocol adopted by the first request belongs, the first configuration information includes the second function information, and the second function information is used to indicate a function to which the preset protocol belongs.
Step S1102, the proxy server removes the first function information from the first request to obtain a third request.
In the technical solution provided by step S1102 of the present invention, if the proxy server determines that the first function information is the same as the second function information, the proxy server removes the first function information from the first request to obtain a third request.
Step S1103, the proxy server forwards the third request to the service server.
In the technical solution provided by step S1103 of the present invention, the proxy server forwards the third request to the service server, where the service server is configured to process the third event according to the third request.
As an optional implementation manner, the server includes a proxy server and a service server, and after the server receives a first request sent by the terminal, the proxy server implements a flexible control policy of the server according to whether a first command word carried in the first request is the same as a second command word of a preset protocol.
Fig. 12 is a flowchart of another event processing method according to an embodiment of the present invention. As shown in fig. 12, the method further comprises the steps of:
step S1201, the proxy server determines whether the first command word carried by the first request is the same as the second command word of the preset protocol.
In the technical solution provided in step S1201 of the present invention, the proxy server determines whether a first command word carried by the first request is the same as a second command word of a preset protocol, where the first command word is used to indicate a name of a protocol used by the first request, the first configuration information includes the second command word, and the second command word is used to indicate a name of the preset protocol.
In step S1202, the proxy server clears the first command word from the first request to obtain a fourth request.
In the technical solution provided by step S1202 of the present invention, if the proxy server determines that the first command word is the same as the second command word, the proxy server removes the first command word from the first request to obtain a fourth request.
In step S1203, the proxy server forwards the fourth request to the service server.
In the technical solution provided by step S1203 of the present invention, the proxy server forwards the fourth request to the service server, where the service server is configured to process the fourth event according to the fourth request.
It should be noted that the flexible control strategies of the servers in the embodiments shown in fig. 10 to 12 may be combined with each other, and a flexible control strategy on the terminal may be adopted, which is not described herein again, and then the flexible control strategies are deployed at the same time at the terminal and the server, so that, in the case of scarce server resources, on one hand, the basic core function of the user may be continuously ensured, and on the other hand, the amount of background requests may be effectively reduced, the remaining effective server resources may be maintained, and finally, the terminal request may be quickly recovered after the problem is repaired, and the normal event processing logic between the terminal and the server may be recovered.
Example 2
The technical solution of the present invention will be described below with reference to preferred embodiments. The event processing method of the present invention is specifically explained by a flexible disaster recovery system implementation process.
When the disaster recovery system of the embodiment is used for processing events, the disaster recovery system can be controlled by some flexible means before unavoidable or occurring disasters, and can rescue some basic functions under the conditions of serious faults and insufficient resources in the background, so that the most intentional core experience of a user is maintained, and all parts or all original functions are quickly and timely recovered after the background system problem is solved.
The flexible disaster recovery system combines two parts of a terminal and a background server, relates to a terminal flexible control strategy and a recovery strategy, and also comprises a flexible grading strategy, a filtering strategy and a recovery strategy.
For the terminal, after receiving the flexible configuration information sent by the server, the terminal selectively abandons the request of sending some function command words, thereby reducing the request from the perspective of the sender.
For the background, in some cases, it is very unlikely that the terminal will not receive the flexible configuration information, and at this time, the access layer in the background also needs to implement flexible control, and filters to some function command words at the access layer, thereby reducing the request amount of the final service server from the perspective of the receiver and reducing the load of the server for processing events.
In the embodiment of the invention, the mutual influence among various factors is comprehensively considered, the flexible disaster recovery strategy is simultaneously deployed at the terminal and the background, and finally the basic core function of the user can be continuously ensured under the condition that the background resources are scarce, on one hand, the request quantity of the background server is effectively reduced, the residual and effective resources of the background server are kept, and finally, the terminal request can be quickly recovered after the problem is repaired.
FIG. 13 is a schematic diagram of flexible policy control according to an embodiment of the present invention. As shown in fig. 13, the flexible disaster recovery system is respectively deployed at the terminal and the background, the terminal is deployed at the flexible filter layers below the service layer and on the network layer, all service requests including the service request 1, the service request 2, and the service request 3 need to pass through the flexible filter layer (Protocol Proxy) before being sent out through the network layer (Net Work), and the flexible filter layer discards the service request according to the flexible configuration information issued by the background. When receiving the request, the background Server firstly accesses a Proxy Server (Proxy Server) to judge whether filtering is needed, and the filtered request is not distributed to the specific service servers (service servers) of each layer.
In the implementation process of the flexible disaster recovery system, the terminal and the background server together comb command words of all protocols, the scenes to which the command words belong and the function modules to which the command words belong, distribute function IDs (a plurality of protocols can belong to the same function ID at the same time) for all the protocols, and report all information to the background server when a protocol request is sent, wherein the types of the scenes are divided into active, silent and pre-pull according to the time when the protocol request is sent.
And the server classifies the protocol command words according to the flow statistics and the functional scene distribution of the protocol command words reported to the background by the terminal and formulates a flexible classification strategy.
And when major problems occur in the background server, selecting a flexible grading strategy to be adopted according to statistics, and synchronizing the strategy to the terminal and the background access agent. FIG. 14 is a flow chart illustration of a method of flexible policy synchronization in accordance with an embodiment of the present invention. As shown in fig. 14, the method includes the steps of:
in step S1401, the terminal sends a request to the proxy server, the request including version information of the configuration information.
And adding the version information of PushInfo in a request header (Reqhead) in a request sent by the terminal to the proxy server. The request header of each request sent by the terminal to the proxy server is provided with the version information of pushInfo.
In step S1402, the proxy server sends a response result to the request to the terminal, where the response result includes the latest version information of the configuration information.
The server adds a general configuration pushInfo structure body in a protocol loopback (Response), wherein the structure body is mainly used for configuration information with high timeliness requirements, and only flexible service configuration information exists at present. And the proxy server determines whether the next latest pushInfo version information is available according to the version information of the pushInfo in the request header in the request. And if the latest pushInfo version information is higher than the version information of the pushInfo in the request header in the request, adding a pushInfo field in the response header of the response result, transmitting the latest pushInfo version information to the terminal, and at the terminal, covering the configuration with the higher pushInfo version with the lower version. And if the latest pushInfo version information is lower than that of the pushInfo in the request header in the request, the proxy server does not issue the latest pushInfo version information.
Fig. 15 is a flowchart of a flexibility control method of a terminal according to an embodiment of the present invention. As shown in fig. 15, the method includes the steps of:
in step S1501, the terminal receives a service request.
Step S1502, the terminal determines whether the scene information in the service request is a blacklist scene.
If the terminal determines that the scene information in the service request is not a blacklist scene, step S1503 is executed, and if the terminal determines that the scene information in the service request is a blacklist scene, step S1504 is executed.
Step S1503, the terminal determines whether the function information in the service request is a blacklist function.
After the terminal judges whether the scene information in the service request is a blacklist scene, if the terminal judges that the scene information in the service request is not the blacklist scene, the terminal judges whether the function information in the service request is a blacklist function. If the terminal determines that the function information in the service request is the blacklist function, step S1504 is executed, and if the terminal determines that the function information in the service request is not the blacklist function, step S1505 is executed.
Step S1504, the terminal discards the service request and returns an error code.
After the terminal judges whether the scene information in the service request is a blacklist scene, if the terminal judges that the scene information in the service request is the blacklist scene, the terminal discards the service request and returns an error code. Or after the terminal judges whether the function information in the service request is the blacklist function, if the terminal judges that the function information in the service request is the blacklist function, the terminal discards the service request and returns an error code.
In step S1505, the terminal determines whether the command word in the service request is a blacklist command word.
After the terminal judges whether the function information in the service request is the blacklist function, if the terminal judges that the function information in the service request is the blacklist function, the terminal judges whether the command word in the service request is the blacklist command word. If the terminal determines that the command word in the service request is the blacklist command word, step S1506 is executed, and if the terminal determines that the command word in the service request is not the blacklist command word, step S1507 is executed.
And step S1506, the terminal eliminates the command words of the blacklist and assembles the request.
After the terminal judges whether the command word in the service request is the blacklist command word, if the terminal judges that the command word in the service request is the blacklist command word, the command word of the blacklist is removed, and the request is assembled.
In step S1507, the terminal transmits a request to the background.
The background flexible control implementation logic is introduced below:
[ PROFILE ] FOR PROVIDING A PROGRAM
# filtered blacklisted scenes, scene 1 active, 2 silent, 3 pre-pull, multiple scenes directly with, as delimiters, e.g., blackscene 2, 3.
# configure function ID, e.g., function ID of each top page is 601, function ID directly in "," as a delimiter
Fig. 16 is a flowchart of a flexible control method of a server according to an embodiment of the present invention. As shown in fig. 16, the method includes the steps of:
in step S1601, the proxy server receives the request.
In step S1602, the proxy server determines whether to configure a blacklist.
After the proxy server receives the request, the proxy server determines whether to filter the request, and may determine whether to configure a blacklist. The blacklist includes a blacklist scene, a blacklist function, and a blacklist command word. If the proxy server determines to configure the blacklist, step S1603 is executed, and if the proxy server determines not to configure the blacklist, step S1605 is executed.
Step S1603, the proxy server rejects the blacklist command word in the request, and the blacklist command word is returned to null.
After the proxy server judges whether to configure the blacklist, if the proxy server judges to configure the blacklist, the proxy server can remove the blacklist command words in the request and return the blacklist command words to be null.
In step S1604, the proxy server fills the command word in the blacklist into the structure.
And after the proxy server rejects the blacklist command words and returns the blacklist command words to be null, the proxy server fills the command words in the blacklist into the structural body.
Step S1605, the proxy server forwards the request to the service server.
Optionally, the steps S1602 to S1604 may also be performed for the blacklist function and the blacklist command word, which is not described herein again.
When the flexible strategy is recovered, the flexible configuration can be disabled in two modes in the embodiment, the normal logic of the original protocol is recovered, one mode is that the terminal has the control of the flexible effective time, the terminal inquires whether the background server continues to be flexible or not after the effective time is reached, and if the flexibility of the background server is still effective, the flexible configuration is issued to the terminal again; one is that the background server actively sends a recovery instruction to the terminal after the problem is solved, and the server automatically clears all the flexible configuration caches after the terminal receives the instruction to recover the original protocol logic.
The event processing method of the embodiment performs multiple flexible disaster tolerance exercises on the application, the flow of the version in the background is reduced to 48% in 10 minutes after the flexible control silent request is started, and the flow is further reduced to 31% in 10 minutes after the pre-pull and 8 non-key protocol command words are started, so that the load of the server is reduced. After the flexibility is closed, the version flow returns to normal within 15 minutes, and the efficiency of event processing is improved.
It should be noted that, for simplicity of description, the above-mentioned 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 order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
Example 3
According to the embodiment of the invention, the event processing device for implementing the event processing method is also provided. Fig. 17 is a schematic diagram of an event processing apparatus according to an embodiment of the present invention. As shown in fig. 17, the event processing apparatus may include: a receiving unit 10, a judging unit 20, a stopping unit 30 and a transmitting unit 40.
A receiving unit 10, configured to enable the terminal to receive a first request for requesting processing of a first event.
The determining unit 20 is configured to enable the terminal to determine whether to filter the first request according to first configuration information sent by the server when a first preset event occurs, where the first configuration information is used to determine an event that can be processed by the terminal when the server has the first preset event.
And a stopping unit 30, configured to stop sending the first request to the server when the terminal determines that the first request is filtered according to the first configuration information.
A sending unit 40, configured to enable the terminal to send the first request to the server when it is determined that the first request is not filtered according to the first configuration information.
Optionally, the event processing apparatus further includes: a first transmitting unit and a first receiving unit. The first sending unit is used for enabling the terminal to send a second request to the server before the terminal judges whether the first request is filtered according to first configuration information sent by the server when a first preset event occurs, wherein the second request carries a preset protocol used for processing the event between the terminal and the server; the first receiving unit is used for enabling the terminal to receive first configuration information which is sent by the server in response to the second request, wherein the first configuration information is formulated by the server according to a preset protocol.
Optionally, the first sending unit is configured to enable the terminal to send the second request to the server by: the terminal sends a second request which also carries version information to the server, wherein the version information is used for indicating the version of second configuration information which is stored in the local terminal before a first preset event occurs in the server; the first receiving unit is used for realizing that the terminal receives the first configuration information which is sent by the server in response to the second request through the following steps: the terminal receives first configuration information formulated by the server according to a preset protocol and version information, wherein the version of the first configuration information is higher than that of the second configuration information.
Alternatively, the judging unit 20 includes: the device comprises a first judgment module, a first determination module and a second determination module. The first judging module is used for the terminal to judge whether first scene information carried by the first request is the same as second scene information of a preset protocol, wherein the first scene information is used for indicating the trigger time of the protocol adopted by the first request, the first configuration information comprises the second scene information, and the second scene information is used for indicating the trigger time of the preset protocol; the first determining module is used for determining to filter the first request when the terminal judges that the first scene information is the same as the second scene information; and the second determining module is used for determining not to filter the first request when the terminal judges that the first scene information is different from the second scene information.
Optionally, the first determining module is configured to determine to filter out the first request if the terminal determines that the first context information is the same as the second context information, through the following steps: and if the terminal judges that the first scene information is the same as the second scene information, discarding the first request and returning a code for indicating to discard the first request.
Optionally, the judging unit 20 further includes: the device comprises a second judgment module, a third determination module and a fourth determination module. The second judging module is used for judging whether the first function information carried by the first request is the same as the second function information of the preset protocol or not after the terminal judges whether the first scene information carried by the first request is the same as the second scene information or not and judging whether the first function information carried by the first request is the same as the second function information of the preset protocol or not if the terminal judges that the first scene information is not the same as the second scene information, wherein the first function information is used for indicating the function of the protocol adopted by the first request, the first configuration information comprises the second function information, and the second function information is used for indicating the function of the preset protocol; the third determining module is used for determining to filter the first request when the terminal judges that the first function information is the same as the second function information; and the fourth determining module is used for determining not to filter the first request when the terminal judges that the first function information is different from the second function information.
Optionally, the first scenario information and the second scenario information respectively include at least one of an active scenario, which is a scenario in which the terminal receives a trigger instruction and sends a second request to the server, wherein the trigger instruction is used for triggering the second request; a silent scene, wherein the silent scene is a scene in which the terminal sends a second request to the server; and pre-pulling a scene, wherein the pre-pulling scene is a scene in which the terminal receives the trigger instruction and sends a second request to the server, or the terminal sends the second request to the server.
Optionally, the third determining module is configured to perform the following steps to determine to filter out the first request if the terminal determines that the first function information is the same as the second function information: and if the terminal judges that the first function information is the same as the second function information, discarding the first request and returning a code for indicating to discard the first request.
Optionally, the judging unit 20 further includes: the third judging module is used for judging whether a first command word carried by the first request is the same as a second command word of a preset protocol or not when the terminal judges that the first function information is different from the second function information after the terminal judges that the first function information carried by the first request is the same as the second function information, wherein the first command word is used for representing the name of the protocol adopted by the first request, the first configuration information comprises the second command word, and the second command word is used for representing the name of the preset protocol; the fifth determining module is used for determining to filter the first request when the terminal judges that the first command word carried by the first request is the same as the second command word; and the sixth determining module is used for determining not to filter the first request when the terminal judges that the first command word carried by the first request is different from the second command word.
Optionally, the fifth determining module is configured to determine to filter out the first request if it is determined that the first command word carried by the first request is the same as the second command word by: and if the terminal judges that the first command word carried by the first request is the same as the second command word, discarding the first request and returning a code for indicating to discard the first request.
Optionally, the fifth determining module is configured to determine to filter the first request if the terminal determines that the first command word carried by the first request is the same as the second command word, through the following steps: and if the terminal judges that the first command word carried by the first request is the same as the second command word, the terminal removes the first command word from the first request to obtain a third request and sends the third request to the server.
Optionally, the event processing apparatus further includes: and the second sending unit is used for enabling the terminal to send the first request to a proxy server of the server after the first request is sent to the server, wherein the proxy server is used for judging whether the first request is filtered according to first configuration information sent by the server when a first preset event occurs.
Optionally, the event processing apparatus further includes: and a third transmitting unit, configured to, after the terminal receives the first request for requesting processing of the first event, the terminal transmits the first request to the proxy server of the server without receiving the transmitted first configuration information.
Optionally, the event processing apparatus further includes: the device comprises an acquisition unit, a first judgment unit, a fourth sending unit, a second receiving unit and a recovery unit. The terminal comprises an acquisition unit and a processing unit, wherein the acquisition unit is used for enabling the terminal to acquire the configuration time of the terminal after receiving the first configuration information after the terminal sends the first request to the server; the first judging unit is used for enabling the terminal to judge whether the configuration time reaches the preset time or not; the fourth sending unit is used for sending a fourth request to the server when the terminal judges that the configuration time reaches the preset time, wherein the fourth request is used for inquiring whether the server allows the terminal to filter a fifth request by adopting the first configuration information, and the fifth request is used for requesting to process a second event; the second receiving unit is used for receiving the first configuration information sent again by the server by the terminal when the server allows the terminal to adopt the first configuration information to filter the fifth request; and the recovery unit is used for enabling the terminal to recover the function of processing the event by the terminal under the condition that the server does not generate the first preset event when the server does not allow the terminal to filter the fifth request by adopting the first configuration information.
The event processing apparatus further includes: a third receiving unit and a processing unit. The third receiving unit is used for enabling the terminal to receive a preset instruction sent by the server after the terminal sends the first request to the server, wherein the preset instruction is issued to the terminal by the server under the condition that the first preset event is finished; and the processing unit is used for enabling the terminal to clear the first configuration information according to the preset instruction and recovering the function of processing the event by the terminal under the condition that the first preset event does not occur in the server.
It should be noted that the receiving unit 10 in this embodiment may be configured to execute step S202 in embodiment 1 of this application, the determining unit 20 in this embodiment may be configured to execute step S204 in embodiment 1 of this application, the stopping unit 30 in this embodiment may be configured to execute step S206 in embodiment 1 of this application, and the sending unit 40 in this embodiment may be configured to execute step S208 in embodiment 1 of this application.
This embodiment enables the terminal to receive a first request for processing a first event through the receiving unit 10, the terminal determines whether to filter out the first request according to the first configuration information sent by the server when the first preset event occurs through the determining unit 20, wherein the first configuration information is used for determining an event that can be processed by the terminal when a first preset event occurs at the server, by means of the stopping unit 30 the terminal is enabled if it is determined that the first request is filtered out based on the first configuration information, the transmission of the first request to the server is stopped, the terminal is caused to transmit the first request to the server by the transmission unit 40 if it is determined that the first request is not filtered out based on the first configuration information, can solve the technical problem that the load of the server for processing the event is large when the server has the preset event in the prior art, and further, the technical effect of reducing the load of the server for processing the event when the preset event occurs in the server is achieved.
According to the embodiment of the invention, the event processing device for implementing the event processing method is also provided. Fig. 18 is a schematic diagram of an event processing apparatus according to an embodiment of the present invention. As shown in fig. 18, the event processing apparatus may include: a transmitting unit 50 and a receiving unit 60.
The sending unit 50 is configured to send first configuration information to the terminal when a first preset event occurs in the server, where the first configuration information is used to determine an event processed by the terminal.
A receiving unit 60, configured to enable the server to receive the first request sent by the terminal, where the terminal sends the first request to the server if it is determined that the first request is not to be filtered according to the first configuration information, or stops sending the first request to the server if it is determined that the first request is to be filtered according to the first configuration information.
Optionally, the event processing apparatus further includes: the first receiving unit is used for enabling the server to receive a second request sent by the terminal before the server receives the first request, wherein the second request carries a preset protocol used for processing an event between the terminal and the server; and the response unit is used for enabling the server to respond to the second request and sending first configuration information which is set according to a preset protocol and is used when a first preset event occurs to the server to the terminal.
Optionally, the event processing apparatus further includes: the device comprises a first judging unit, a first clearing unit and a first forwarding unit. The server comprises a proxy server and a service server, wherein the first judging unit is used for enabling the proxy server to judge whether first scene information carried by a first request is the same as second scene information of a preset protocol or not after the server receives the first request sent by the terminal, the first scene information is used for indicating the trigger time of the protocol adopted by the first request, the first configuration information comprises the second scene information, and the second scene information is used for indicating the trigger time of the preset protocol; the first clearing unit is used for clearing the first scene information from the first request to obtain a second request if the proxy server judges that the first scene information is the same as the second scene information; and the first forwarding unit is used for enabling the proxy server to forward the second request to the service server, wherein the service server is used for processing the second event according to the second request.
Optionally, the event processing apparatus further includes: a second judging unit, a second clearing unit and a second forwarding unit. The server comprises a proxy server and a service server, and a second judging unit is used for enabling the proxy server to judge whether first function information carried by a first request is the same as second function information of a preset protocol or not after the server receives the first request sent by the terminal, wherein the first function information is used for indicating a function to which a protocol adopted by the first request belongs, the first configuration information comprises the second function information, and the second function information is used for indicating the function to which the preset protocol belongs; a second clearing unit, configured to clear the first function information from the first request to obtain a third request if the proxy server determines that the first function information is the same as the second function information; and the second forwarding unit is used for enabling the proxy server to forward the third request to the service server, wherein the service server is used for processing the third event according to the third request.
Optionally, the event processing apparatus further includes: a third judging unit, a third clearing unit and a third forwarding unit. The server comprises a proxy server and a service server, and the third judging unit is used for enabling the proxy server to judge whether a first command word carried by a first request is the same as a second command word of a preset protocol or not after the server receives the first request sent by the terminal, wherein the first command word is used for representing the name of the protocol adopted by the first request, the first configuration information comprises the second command word, and the second command word is used for representing the name of the preset protocol; the third clearing unit is used for clearing the first command word from the first request to obtain a fourth request if the proxy server judges that the first command word is the same as the second command word; and the third forwarding unit is used for enabling the proxy server to forward the fourth request to the service server, wherein the service server is used for processing the fourth event according to the fourth request.
It should be noted that the sending unit 50 in this embodiment may be configured to execute step S902 in embodiment 1 of this application, and the receiving unit 60 in this embodiment may be configured to execute step S904 in embodiment 1 of this application.
In this embodiment, the sending unit 50 sends the first configuration information to the terminal when the server has a first preset event, where the first configuration information is used to determine an event processed by the terminal, and the receiving unit 60 enables the server to receive the first request sent by the terminal, where the terminal sends the first request to the server when determining that the first request is not filtered according to the first configuration information, or stops sending the first request to the server when determining that the first request is filtered according to the first configuration information, so as to solve a technical problem that a load of the server for processing the event is large when the server has the preset event in the related art, and further achieve a technical effect of reducing the load of the server for processing the event when the server has the preset event.
It should be noted here that the above units and modules are the same as the examples and application scenarios realized by the corresponding steps, but are not limited to the disclosure of the above embodiment 1. It should be noted that the modules described above as a part of the apparatus may be operated in a hardware environment as shown in fig. 1, and may be implemented by software, or may be implemented by hardware, where the hardware environment includes a network environment.
Example 4
According to the embodiment of the invention, the invention also provides a server or a terminal for implementing the event processing method.
Fig. 19 is a block diagram of a terminal according to an embodiment of the present invention. As shown in fig. 19, the terminal may include: one or more (only one shown) processors 191, memory 193, and a transmission device 195 (such as the transmitting device in the above embodiments), as shown in fig. 19, the terminal can also include an input-output device 197.
The memory 193 may be used for storing software programs and modules, such as program instructions/modules corresponding to the event processing method and apparatus in the embodiment of the present invention, and the processor 191 executes various functional applications and data processing by running the software programs and modules stored in the memory 193, that is, implements the event processing method. The memory 193 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 193 may further include memory located remotely from the processor 191, which may be connected to the terminal through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 195 is used for receiving or transmitting data via a network, and may also be used for data transmission between a processor and a memory. Examples of the network may include a wired network and a wireless network. In one example, the transmission device 195 includes a Network adapter (NIC) that can be connected to a router via a Network cable and other Network devices to communicate with the internet or a local area Network. In one example, the transmission device 195 is a Radio Frequency (RF) module, which is used to communicate with the internet in a wireless manner.
Among them, the memory 193 is used to store, in particular, an application program.
The processor 191 may invoke an application stored in the memory 193 through the transmission device 195 to perform the following steps:
the terminal receives a first request for requesting processing of a first event;
the terminal judges whether a first request is filtered according to first configuration information sent by the server when a first preset event occurs, wherein the first configuration information is used for determining an event which can be processed by the terminal when the server generates the first preset event;
if the terminal judges that the first request is filtered according to the first configuration information, the terminal stops sending the first request to the server;
and if the terminal judges that the first request is not filtered according to the first configuration information, the terminal sends the first request to the server.
The processor 191 is further configured to perform the following steps: the method comprises the steps that before a terminal judges whether a first request is filtered according to first configuration information sent by a server when a first preset event occurs, the terminal sends a second request to the server, wherein the second request carries a preset protocol used for processing the event between the terminal and the server; and the terminal receives first configuration information which is sent by the server in response to the second request, wherein the first configuration information is formulated by the server according to a preset protocol.
The processor 191 is further configured to perform the following steps: the terminal sends a second request which also carries version information to the server, wherein the version information is used for indicating the version of second configuration information which is stored in the local terminal before a first preset event occurs in the server; the first configuration information which is sent by the terminal receiving server in response to the second request comprises: the terminal receives first configuration information formulated by the server according to a preset protocol and version information, wherein the version of the first configuration information is higher than that of the second configuration information.
The processor 191 is further configured to perform the following steps: the terminal judges whether first scene information carried by the first request is the same as second scene information of a preset protocol or not, wherein the first scene information is used for indicating the trigger time of the protocol adopted by the first request, the first configuration information comprises the second scene information, and the second scene information is used for indicating the trigger time of the preset protocol; if the terminal judges that the first scene information is the same as the second scene information, the terminal determines to filter out the first request; and if the terminal judges that the first scene information is different from the second scene information, the terminal determines not to filter the first request.
The processor 191 is further configured to perform the following steps: and if the terminal judges that the first scene information is the same as the second scene information, discarding the first request and returning a code for indicating to discard the first request.
The processor 191 is further configured to perform the following steps: after the terminal judges whether first scene information carried by a first request is the same as second scene information, if the terminal judges that the first scene information is different from the second scene information, the terminal judges whether first function information carried by the first request is the same as second function information of a preset protocol, wherein the first function information is used for indicating a function to which a protocol adopted by the first request belongs, the first configuration information comprises the second function information, and the second function information is used for indicating the function to which the preset protocol belongs; if the terminal judges that the first function information is the same as the second function information, the terminal determines to filter out the first request; and if the terminal judges that the first function information is different from the second function information, the terminal determines not to filter the first request.
The processor 191 is further configured to perform the following steps: and if the terminal judges that the first function information is the same as the second function information, discarding the first request and returning a code for indicating to discard the first request.
The processor 191 is further configured to perform the following steps: after the terminal judges whether first function information carried by a first request is the same as second function information, if the terminal judges that the first function information is different from the second function information, judging whether a first command word carried by the first request is the same as a second command word of a preset protocol, wherein the first command word is used for representing the name of the protocol adopted by the first request, the first configuration information comprises the second command word, and the second command word is used for representing the name of the preset protocol; if the terminal judges that the first command word carried by the first request is the same as the second command word, the terminal determines to filter the first request; and if the terminal judges that the first command word carried by the first request is different from the second command word, the terminal determines not to filter the first request.
The processor 191 is further configured to perform the following steps: and if the terminal judges that the first command word carried by the first request is the same as the second command word, discarding the first request and returning a code for indicating to discard the first request.
The processor 191 is further configured to perform the following steps: and if the terminal judges that the first command word carried by the first request is the same as the second command word, the terminal removes the first command word from the first request to obtain a third request and sends the third request to the server.
The processor 191 is further configured to perform the following steps: after the first request is sent to the server, the terminal sends the first request to a proxy server of the server, wherein the proxy server is used for judging whether the first request is filtered according to first configuration information sent by the server when a first preset event occurs.
The processor 191 is further configured to perform the following steps: after the terminal receives a first request for requesting processing of a first event, the terminal transmits the first request to a proxy server of the server without receiving the transmitted first configuration information.
The processor 191 is further configured to perform the following steps: after the terminal sends the first request to the server, the terminal acquires the configuration time of the terminal after receiving the first configuration information; the terminal judges whether the configuration time reaches the preset time or not; if the terminal judges that the configuration time reaches the preset time, a fourth request is sent to the server, wherein the fourth request is used for inquiring whether the server allows the terminal to filter a fifth request by adopting the first configuration information, and the fifth request is used for requesting to process a second event; when the server allows the terminal to filter the fifth request by adopting the first configuration information, the terminal receives the first configuration information sent again by the server; and when the server does not allow the terminal to filter the fifth request by adopting the first configuration information, the terminal recovers the function of processing the event by the terminal under the condition that the server does not generate the first preset event.
The processor 191 is further configured to perform the following steps: after the terminal sends the first request to the server, the terminal receives a preset instruction sent by the server, wherein the preset instruction is issued to the terminal by the server under the condition that the first preset event is finished; and the terminal clears the first configuration information according to the preset instruction and recovers the function of processing the event by the terminal under the condition that the first preset event does not occur in the server.
The processor 191 may invoke an application stored in the memory 193 through the transmission device 195 to perform the following steps:
the method comprises the steps that under the condition that a first preset event occurs in a server, first configuration information is sent to a terminal, wherein the first configuration information is used for determining the event processed by the terminal;
the server receives a first request sent by the terminal, wherein the terminal sends the first request to the server when judging that the first request is not filtered according to the first configuration information, or stops sending the first request to the server when judging that the first request is filtered according to the first configuration information.
The processor 191 is further configured to perform the following steps: before the server receives the first request, the server receives a second request sent by the terminal, wherein the second request carries a preset protocol for processing an event between the terminal and the server; and the server responds to the second request and sends first configuration information which is formulated according to a preset protocol and is used when a first preset event occurs in the server to the terminal.
The processor 191 is further configured to perform the following steps: the server comprises a proxy server and a service server, and after the server receives a first request sent by a terminal, the proxy server judges whether first scene information carried by the first request is the same as second scene information of a preset protocol, wherein the first scene information is used for indicating the trigger time of the protocol adopted by the first request, the first configuration information comprises the second scene information, and the second scene information is used for indicating the trigger time of the preset protocol; if the proxy server judges that the first scene information is the same as the second scene information, the proxy server removes the first scene information from the first request to obtain a second request; and the proxy server forwards the second request to the service server, wherein the service server is used for processing a second event according to the second request.
The processor 191 is further configured to perform the following steps: the server comprises a proxy server and a service server, and after the server receives a first request sent by the terminal, the proxy server judges whether first function information carried by the first request is the same as second function information of a preset protocol, wherein the first function information is used for indicating a function to which a protocol adopted by the first request belongs, the first configuration information comprises the second function information, and the second function information is used for indicating the function to which the preset protocol belongs; if the proxy server judges that the first function information is the same as the second function information, the proxy server removes the first function information from the first request to obtain a third request; and the proxy server forwards the third request to the service server, wherein the service server is used for processing a third event according to the third request.
The processor 191 is further configured to perform the following steps: the server comprises a proxy server and a service server, wherein after the server receives a first request sent by a terminal, the proxy server judges whether a first command word carried by the first request is the same as a second command word of a preset protocol, wherein the first command word is used for representing the name of the protocol adopted by the first request, the first configuration information comprises the second command word, and the second command word is used for representing the name of the preset protocol; if the proxy server judges that the first command word is the same as the second command word, the proxy server clears the first command word from the first request to obtain a fourth request; and the proxy server forwards the fourth request to the service server, wherein the service server is used for processing a fourth event according to the fourth request.
The embodiment of the invention provides an event processing scheme. Receiving, by the terminal, a first request for requesting processing of a first event; the terminal judges whether a first request is filtered according to first configuration information sent by the server when a first preset event occurs, wherein the first configuration information is used for determining an event which can be processed by the terminal when the server generates the first preset event; if the terminal judges that the first request is filtered according to the first configuration information, the terminal stops sending the first request to the server; if the terminal judges that the first request is not filtered according to the first configuration information, the first request is sent to the server, the technical problem that the load of the server for processing the event is large when the server has the preset event in the related technology can be solved, and the technical effect of reducing the load of the server for processing the event when the server has the preset event is achieved.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment is not described herein again.
It can be understood by those skilled in the art that the structure shown in fig. 19 is only an illustration, and the terminal may be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, and a Mobile Internet Device (MID), a PAD, etc. Fig. 19 is a diagram illustrating a structure of the electronic device. For example, the terminal may also include more or fewer components (e.g., network interfaces, display devices, etc.) than shown in FIG. 19, or have a different configuration than shown in FIG. 19.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
Example 5
The embodiment of the invention also provides a storage medium. Alternatively, in this embodiment, the storage medium may be a program code for executing the event processing method.
Optionally, in this embodiment, the storage medium may be located on at least one of a plurality of network devices in a network shown in the above embodiment.
Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps:
the terminal receives a first request for requesting processing of a first event;
the terminal judges whether a first request is filtered according to first configuration information sent by the server when a first preset event occurs, wherein the first configuration information is used for determining an event which can be processed by the terminal when the server generates the first preset event;
if the terminal judges that the first request is filtered according to the first configuration information, the terminal stops sending the first request to the server;
and if the terminal judges that the first request is not filtered according to the first configuration information, the terminal sends the first request to the server.
Optionally, the storage medium is further arranged to store program code for performing the steps of: the method comprises the steps that before a terminal judges whether a first request is filtered according to first configuration information sent by a server when a first preset event occurs, the terminal sends a second request to the server, wherein the second request carries a preset protocol used for processing the event between the terminal and the server; and the terminal receives first configuration information which is sent by the server in response to the second request, wherein the first configuration information is formulated by the server according to a preset protocol.
Optionally, the storage medium is further arranged to store program code for performing the steps of: the terminal sends a second request which also carries version information to the server, wherein the version information is used for indicating the version of second configuration information which is stored in the local terminal before a first preset event occurs in the server; the first configuration information which is sent by the terminal receiving server in response to the second request comprises: the terminal receives first configuration information formulated by the server according to a preset protocol and version information, wherein the version of the first configuration information is higher than that of the second configuration information.
Optionally, the storage medium is further arranged to store program code for performing the steps of: the terminal judges whether first scene information carried by the first request is the same as second scene information of a preset protocol or not, wherein the first scene information is used for indicating the trigger time of the protocol adopted by the first request, the first configuration information comprises the second scene information, and the second scene information is used for indicating the trigger time of the preset protocol; if the terminal judges that the first scene information is the same as the second scene information, the terminal determines to filter out the first request; and if the terminal judges that the first scene information is different from the second scene information, the terminal determines not to filter the first request.
Optionally, the storage medium is further arranged to store program code for performing the steps of: and if the terminal judges that the first scene information is the same as the second scene information, discarding the first request and returning a code for indicating to discard the first request.
Optionally, the storage medium is further arranged to store program code for performing the steps of: after the terminal judges whether first scene information carried by a first request is the same as second scene information, if the terminal judges that the first scene information is different from the second scene information, the terminal judges whether first function information carried by the first request is the same as second function information of a preset protocol, wherein the first function information is used for indicating a function to which a protocol adopted by the first request belongs, the first configuration information comprises the second function information, and the second function information is used for indicating the function to which the preset protocol belongs; if the terminal judges that the first function information is the same as the second function information, the terminal determines to filter out the first request; and if the terminal judges that the first function information is different from the second function information, the terminal determines not to filter the first request.
Optionally, the storage medium is further arranged to store program code for performing the steps of: and if the terminal judges that the first function information is the same as the second function information, discarding the first request and returning a code for indicating to discard the first request.
Optionally, the storage medium is further arranged to store program code for performing the steps of: after the terminal judges whether first function information carried by a first request is the same as second function information, if the terminal judges that the first function information is different from the second function information, judging whether a first command word carried by the first request is the same as a second command word of a preset protocol, wherein the first command word is used for representing the name of the protocol adopted by the first request, the first configuration information comprises the second command word, and the second command word is used for representing the name of the preset protocol; if the terminal judges that the first command word carried by the first request is the same as the second command word, the terminal determines to filter the first request; and if the terminal judges that the first command word carried by the first request is different from the second command word, the terminal determines not to filter the first request.
Optionally, the storage medium is further arranged to store program code for performing the steps of: and if the terminal judges that the first command word carried by the first request is the same as the second command word, discarding the first request and returning a code for indicating to discard the first request.
Optionally, the storage medium is further arranged to store program code for performing the steps of: and if the terminal judges that the first command word carried by the first request is the same as the second command word, the terminal removes the first command word from the first request to obtain a third request and sends the third request to the server.
Optionally, the storage medium is further arranged to store program code for performing the steps of: after the first request is sent to the server, the terminal sends the first request to a proxy server of the server, wherein the proxy server is used for judging whether the first request is filtered according to first configuration information sent by the server when a first preset event occurs.
Optionally, the storage medium is further arranged to store program code for performing the steps of: after the terminal receives a first request for requesting processing of a first event, the terminal transmits the first request to a proxy server of the server without receiving the transmitted first configuration information.
Optionally, the storage medium is further arranged to store program code for performing the steps of: after the terminal sends the first request to the server, the terminal acquires the configuration time of the terminal after receiving the first configuration information; the terminal judges whether the configuration time reaches the preset time or not; if the terminal judges that the configuration time reaches the preset time, a fourth request is sent to the server, wherein the fourth request is used for inquiring whether the server allows the terminal to filter a fifth request by adopting the first configuration information, and the fifth request is used for requesting to process a second event; when the server allows the terminal to filter the fifth request by adopting the first configuration information, the terminal receives the first configuration information sent again by the server; and when the server does not allow the terminal to filter the fifth request by adopting the first configuration information, the terminal recovers the function of processing the event by the terminal under the condition that the server does not generate the first preset event.
Optionally, the storage medium is further arranged to store program code for performing the steps of: after the terminal sends the first request to the server, the terminal receives a preset instruction sent by the server, wherein the preset instruction is issued to the terminal by the server under the condition that the first preset event is finished; and the terminal clears the first configuration information according to the preset instruction and recovers the function of processing the event by the terminal under the condition that the first preset event does not occur in the server.
Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps:
the method comprises the steps that under the condition that a first preset event occurs in a server, first configuration information is sent to a terminal, wherein the first configuration information is used for determining the event processed by the terminal;
the server receives a first request sent by the terminal, wherein the terminal sends the first request to the server when judging that the first request is not filtered according to the first configuration information, or stops sending the first request to the server when judging that the first request is filtered according to the first configuration information.
Optionally, the storage medium is further arranged to store program code for performing the steps of: before the server receives the first request, the server receives a second request sent by the terminal, wherein the second request carries a preset protocol for processing an event between the terminal and the server; and the server responds to the second request and sends first configuration information which is formulated according to a preset protocol and is used when a first preset event occurs in the server to the terminal.
Optionally, the storage medium is further arranged to store program code for performing the steps of: the server comprises a proxy server and a service server, and after the server receives a first request sent by a terminal, the proxy server judges whether first scene information carried by the first request is the same as second scene information of a preset protocol, wherein the first scene information is used for indicating the trigger time of the protocol adopted by the first request, the first configuration information comprises the second scene information, and the second scene information is used for indicating the trigger time of the preset protocol; if the proxy server judges that the first scene information is the same as the second scene information, the proxy server removes the first scene information from the first request to obtain a second request; and the proxy server forwards the second request to the service server, wherein the service server is used for processing a second event according to the second request.
Optionally, the storage medium is further arranged to store program code for performing the steps of: the server comprises a proxy server and a service server, and after the server receives a first request sent by the terminal, the proxy server judges whether first function information carried by the first request is the same as second function information of a preset protocol, wherein the first function information is used for indicating a function to which a protocol adopted by the first request belongs, the first configuration information comprises the second function information, and the second function information is used for indicating the function to which the preset protocol belongs; if the proxy server judges that the first function information is the same as the second function information, the proxy server removes the first function information from the first request to obtain a third request; and the proxy server forwards the third request to the service server, wherein the service server is used for processing a third event according to the third request.
Optionally, the storage medium is further arranged to store program code for performing the steps of: the server comprises a proxy server and a service server, wherein after the server receives a first request sent by a terminal, the proxy server judges whether a first command word carried by the first request is the same as a second command word of a preset protocol, wherein the first command word is used for representing the name of the protocol adopted by the first request, the first configuration information comprises the second command word, and the second command word is used for representing the name of the preset protocol; if the proxy server judges that the first command word is the same as the second command word, the proxy server clears the first command word from the first request to obtain a fourth request; and the proxy server forwards the fourth request to the service server, wherein the service server is used for processing a fourth event according to the fourth request.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment is not described herein again.
Optionally, in this embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing one or more computer devices (which may be personal computers, servers, network devices, etc.) to execute all or part of the steps of the method according to the embodiments of the present invention.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.
Claims (22)
1. An event processing method, comprising:
the terminal receives a first request for requesting processing of a first event;
the terminal judges whether the first request is filtered according to first configuration information sent by a server when a first preset event occurs, wherein the first configuration information is blacklist configuration information set by the server for the first preset event, and the first configuration information is used for determining an event which can be processed by the terminal when the first preset event occurs in the server;
if the terminal judges that the first request is filtered according to the first configuration information, the terminal stops sending the first request to the server;
and if the terminal judges that the first request is not filtered according to the first configuration information, the terminal sends the first request to the server.
2. The method according to claim 1, wherein before the terminal determines whether to filter out the first request according to first configuration information sent by the server when the first preset event occurs, the method further comprises:
the terminal sends a second request to the server, wherein the second request carries a preset protocol used for processing an event between the terminal and the server;
and the terminal receives the first configuration information which is sent by the server in response to the second request, wherein the first configuration information is established by the server according to the preset protocol.
3. The method of claim 2,
the terminal sending the second request to the server includes: the terminal sends the second request which also carries version information to the server, wherein the version information is used for indicating the version of second configuration information which is stored locally in the terminal before the terminal generates the first preset event in the server;
the terminal receiving the first configuration information sent by the server in response to the second request comprises: and the terminal receives the first configuration information formulated by the server according to the preset protocol and the version information, wherein the version of the first configuration information is higher than that of the second configuration information.
4. The method according to claim 2, wherein the terminal determining whether to filter out the first request according to first configuration information sent by the server when the first preset event occurs comprises:
the terminal judges whether first scene information carried by the first request is the same as second scene information of the preset protocol or not, wherein the first scene information is used for indicating the trigger time of the protocol adopted by the first request, the first configuration information comprises the second scene information, and the second scene information is used for indicating the trigger time of the preset protocol;
if the terminal judges that the first scene information is the same as the second scene information, determining to filter the first request;
and if the terminal judges that the first scene information is different from the second scene information, the terminal determines not to filter the first request.
5. The method of claim 4, wherein the terminal determining to filter out the first request if the terminal determines that the first context information is the same as the second context information comprises:
and if the terminal judges that the first scene information is the same as the second scene information, discarding the first request and returning a code for indicating to discard the first request.
6. The method according to claim 4, wherein after the terminal determines whether the first scenario information carried by the first request is the same as the second scenario information, the method further comprises:
if the terminal judges that the first scene information is different from the second scene information, judging whether first function information carried by the first request is the same as second function information of the preset protocol or not, wherein the first function information is used for indicating a function of the protocol adopted by the first request, the first configuration information comprises the second function information, and the second function information is used for indicating the function of the preset protocol;
if the terminal judges that the first function information is the same as the second function information, determining to filter the first request;
and if the terminal judges that the first function information is different from the second function information, the terminal determines not to filter the first request.
7. The method according to any of claims 4 to 6, wherein the first scene information and the second scene information respectively comprise at least one of:
an active scene, where the terminal receives a trigger instruction and sends the second request to the server, where the trigger instruction is used to trigger the second request;
a silent scenario, where the terminal itself sends the second request to the server;
and pre-pulling a scene, wherein the pre-pulling scene is a scene in which the terminal receives a trigger instruction and sends the second request to the server, or the terminal sends the second request to the server.
8. The method of claim 6, wherein the terminal determining to filter out the first request if the terminal determines that the first function information is the same as the second function information comprises:
and if the terminal judges that the first function information is the same as the second function information, discarding the first request and returning a code for indicating to discard the first request.
9. The method according to claim 6, wherein after the terminal determines whether the first function information carried by the first request is the same as the second function information, the method further comprises:
if the terminal judges that the first function information is different from the second function information, judging whether a first command word carried by the first request is the same as a second command word of the preset protocol or not, wherein the first command word is used for representing the name of the protocol adopted by the first request, the first configuration information comprises the second command word, and the second command word is used for representing the name of the preset protocol;
if the terminal judges that the first command word carried by the first request is the same as the second command word, determining to filter the first request;
and if the terminal judges that the first command word carried by the first request is different from the second command word, the terminal determines not to filter the first request.
10. The method of claim 9, wherein if the terminal determines that the first command word carried by the first request is the same as the second command word, determining to filter out the first request comprises:
and if the terminal judges that the first command word carried by the first request is the same as the second command word, discarding the first request and returning a code for indicating to discard the first request.
11. The method of claim 9, wherein if the terminal determines that the first command word carried by the first request is the same as the second command word, determining to filter out the first request comprises:
and if the terminal judges that the first command word carried by the first request is the same as the second command word, the terminal removes the first command word from the first request to obtain a third request, and sends the third request to the server.
12. The method of claim 1, wherein after sending the first request to the server, the method further comprises:
and the terminal sends the first request to a proxy server of the server, wherein the proxy server is used for judging whether to filter the first request according to the first configuration information sent by the server when the first preset event occurs.
13. The method of claim 1, wherein after the terminal receives a first request for processing a first event, the method further comprises: and the terminal sends the first request to a proxy server of the server under the condition that the sent first configuration information is not received.
14. The method according to claim 1, wherein after the terminal sends the first request to the server, the method further comprises:
the terminal acquires the configuration time of the terminal after receiving the first configuration information;
the terminal judges whether the configuration time reaches a preset time or not;
if the terminal judges that the configuration time reaches the preset time, sending a fourth request to the server, wherein the fourth request is used for inquiring whether the server allows the terminal to filter a fifth request by adopting the first configuration information, and the fifth request is used for requesting to process a second event;
when the server allows the terminal to filter a fifth request by adopting the first configuration information, the terminal receives the first configuration information sent again by the server;
and when the server does not allow the terminal to filter the fifth request by adopting the first configuration information, the terminal recovers the function of processing the event by the terminal under the condition that the server does not generate the first preset event.
15. The method according to claim 1, wherein after the terminal sends the first request to the server, the method further comprises:
the terminal receives a preset instruction sent by the server, wherein the preset instruction is issued to the terminal by the server under the condition of ending the first preset event;
and the terminal clears the first configuration information according to the preset instruction and recovers the function of processing the event by the terminal under the condition that the first preset event does not appear in the server.
16. An event processing method, comprising:
sending first configuration information to a terminal under the condition that a first preset event occurs in a server, wherein the first configuration information is blacklist configuration information set by the server for the first preset event, and the first configuration information is used for determining an event processed by the terminal;
the server receives a first request sent by the terminal, wherein the terminal sends the first request to the server under the condition that the terminal judges that the first request is not filtered according to the first configuration information, or stops sending the first request to the server under the condition that the terminal judges that the first request is filtered according to the first configuration information.
17. The method of claim 16, wherein prior to the server receiving the first request, the method further comprises:
the server receives a second request sent by the terminal, wherein the second request carries a preset protocol used for processing an event between the terminal and the server;
and the server responds to the second request and sends the first configuration information which is formulated according to the preset protocol and is generated when the first preset event occurs to the server to the terminal.
18. The method according to claim 17, wherein the server comprises a proxy server and a service server, and after the server receives the first request sent by the terminal, the method further comprises:
the proxy server judges whether first scene information carried by the first request is the same as second scene information of the preset protocol, wherein the first scene information is used for indicating the trigger time of the protocol adopted by the first request, the first configuration information comprises the second scene information, and the second scene information is used for indicating the trigger time of the preset protocol;
if the proxy server judges that the first scene information is the same as the second scene information, the proxy server removes the first scene information from the first request to obtain a second request;
and the proxy server forwards the second request to the service server, wherein the service server is used for processing a second event according to the second request.
19. The method according to claim 17, wherein the server comprises a proxy server and a service server, and after the server receives the first request sent by the terminal, the method further comprises:
the proxy server judges whether first function information carried by the first request is the same as second function information of the preset protocol, wherein the first function information is used for indicating a function of the protocol adopted by the first request, the first configuration information comprises the second function information, and the second function information is used for indicating the function of the preset protocol;
if the proxy server judges that the first function information is the same as the second function information, the proxy server removes the first function information from the first request to obtain a third request;
and the proxy server forwards the third request to the service server, wherein the service server is used for processing a third event according to the third request.
20. The method according to claim 17, wherein the server comprises a proxy server and a service server, and after the server receives the first request sent by the terminal, the method further comprises:
the proxy server judges whether a first command word carried by the first request is the same as a second command word of the preset protocol, wherein the first command word is used for representing the name of the protocol adopted by the first request, the first configuration information comprises the second command word, and the second command word is used for representing the name of the preset protocol;
if the proxy server judges that the first command word is the same as the second command word, the proxy server removes the first command word from the first request to obtain a fourth request;
and the proxy server forwards the fourth request to the service server, wherein the service server is used for processing a fourth event according to the fourth request.
21. An event processing apparatus, comprising:
a receiving unit configured to cause a terminal to receive a first request for requesting processing of a first event;
a determining unit, configured to enable the terminal to determine whether to filter the first request according to first configuration information sent by a server when a first preset event occurs, where the first configuration information is blacklist configuration information set by the server for the first preset event, and the first configuration information is used to determine an event that can be processed by the terminal when the first preset event occurs in the server;
a stopping unit, configured to stop sending the first request to the server when the terminal determines that the first request is filtered according to the first configuration information;
a sending unit, configured to enable the terminal to send the first request to the server when it is determined that the first request is not filtered according to the first configuration information.
22. An event processing apparatus, comprising:
a sending unit, configured to send first configuration information to a terminal when a first preset event occurs in a server, where the first configuration information is blacklist configuration information set by the server for the first preset event, and the first configuration information is used to determine an event processed by the terminal;
a receiving unit, configured to enable the server to receive a first request sent by the terminal, where the terminal sends the first request to the server when determining, according to the first configuration information, that the first request is not to be filtered, or stops sending the first request to the server when determining, according to the first configuration information, that the first request is to be filtered.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710053479.9A CN108345500B (en) | 2017-01-22 | 2017-01-22 | Event processing method and device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710053479.9A CN108345500B (en) | 2017-01-22 | 2017-01-22 | Event processing method and device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN108345500A CN108345500A (en) | 2018-07-31 |
| CN108345500B true CN108345500B (en) | 2022-04-26 |
Family
ID=62962022
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201710053479.9A Active CN108345500B (en) | 2017-01-22 | 2017-01-22 | Event processing method and device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN108345500B (en) |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104468244A (en) * | 2014-12-31 | 2015-03-25 | 北京奇虎科技有限公司 | Domain name resolution system disaster recovery construction method and device |
| CN104852934A (en) * | 2014-02-13 | 2015-08-19 | 阿里巴巴集团控股有限公司 | Method for realizing flow distribution based on front-end scheduling, device and system thereof |
| CN106911648A (en) * | 2015-12-23 | 2017-06-30 | 阿里巴巴集团控股有限公司 | One kind is environmentally isolated method and apparatus |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6988147B2 (en) * | 2001-05-31 | 2006-01-17 | Openwave Systems Inc. | Method of establishing a secure tunnel through a proxy server between a user device and a secure server |
| EP1267542A1 (en) * | 2001-06-12 | 2002-12-18 | TELEFONAKTIEBOLAGET L M ERICSSON (publ) | Method for communication between a client application and a server through a proxy-server |
-
2017
- 2017-01-22 CN CN201710053479.9A patent/CN108345500B/en active Active
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104852934A (en) * | 2014-02-13 | 2015-08-19 | 阿里巴巴集团控股有限公司 | Method for realizing flow distribution based on front-end scheduling, device and system thereof |
| CN104468244A (en) * | 2014-12-31 | 2015-03-25 | 北京奇虎科技有限公司 | Domain name resolution system disaster recovery construction method and device |
| CN106911648A (en) * | 2015-12-23 | 2017-06-30 | 阿里巴巴集团控股有限公司 | One kind is environmentally isolated method and apparatus |
Also Published As
| Publication number | Publication date |
|---|---|
| CN108345500A (en) | 2018-07-31 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| EP2846600B1 (en) | M2M communication method and system thereof | |
| EP3050258B1 (en) | Methods, systems, and computer readable media for diameter load and overload information and virtualization | |
| CN109392092B (en) | A kind of paging message sending method and related equipment | |
| KR102195643B1 (en) | Data transmission methods, devices and systems | |
| CN101902732B (en) | Method and system for synchronizing EPS (Evolved Packet System) bearer context statuses | |
| CN108632063B (en) | Method, device and system for managing network slice instances | |
| CN102244856B (en) | Method and apparatus for controlling downlink data transmission of MTC device | |
| CN106470117B (en) | Transmission switching method, equipment and the system of LTE broadband cluster system | |
| JP6097411B2 (en) | Data transmission method, apparatus and system | |
| CN113596913A (en) | Flow control method, device, CU and DU | |
| CN109587782B (en) | Synchronization method and device | |
| CN107920366A (en) | The method and device that a kind of business to mobile terminal is shunted | |
| CN102469514A (en) | Terminal and network access method thereof | |
| CN105307173A (en) | Communication network architecture, access authentication method and system based on communication network architecture | |
| CN102291318A (en) | Method for consulting maximum transmission unit (MTU) and router | |
| CN107104782A (en) | Data transmission method and device | |
| EP1435741A2 (en) | Radio access network and operation control method for the same | |
| CN102014499A (en) | Packet switched domain service processing method and device | |
| WO2025092592A1 (en) | Network analysis method and device | |
| CN108345500B (en) | Event processing method and device | |
| US10225191B2 (en) | Service packet distribution method and apparatus | |
| WO2011153836A1 (en) | M2m system and method for processing services thereof | |
| EP3051769B1 (en) | Dynamic switching to broadcast transmission of multimedia content over a mobile communication network | |
| US20160088076A1 (en) | Method, device and system for obtaining mobile network data resources | |
| CN109788520A (en) | Method for switching network, AMF and RAN node |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |